My css file is not loading.
I have just installed apache2 with php on ubuntu. (Mysql server already installed.)
I have placed fresh download of cake php from official site. But when I am trying to access it, CSS file is not loaded.
Here is the screen shot.
I would think telling him to read the instructions and setup requirements including the use of mod_rewrite would be a better solution than pointing him towards the no mod_rewrite method.
A quick google for mod_rewrite apache ubuntu brings up a ton of possibly useful information and will likely work out for him better than turning off one of Cake's key features.
Try deleting these files:
/.htaccess
/app/.htaccess
/app/webroot/.htaccess
and uncommenting this line on app/config/core.php [69]
Configure::write('App.baseUrl', env('SCRIPT_NAME'));
EDIT:
to answer your comment: as far as I know, what this does is set the base url of the app to index.php (env() Gets an environment variable from available sources) That baseUrl is used to rewrite the urls without using mod_rewitte, with pathinfo.
I've seen this issue when the .htaccess is missing from the root or from webroot. Usually, this occurs when adding files to svn and the .htaccess is not included.
Just wanted to add
to enable mod_rewrite with apache on ubuntu
sudo a2enmod rewrite
Related
I've been following the guide found here, https://unixcop.com/how-to-install-pimcore-on-ubuntu-20-04/, to install the PimCore X version from scratch on a fresh server.
However, after going through all of the steps and firing up the initial home page, I get the profiler complaining about a number of 404 errors for resources that it cannot find within the /_wdt/ folder, with the profiler never loading.
The admin section of PimCore cannot be loaded either, it comes up with a big 404 error, so I'm guessing that the router isn't working properly. Looking into the log files for both PimCore and Apache, there isn't anything useful to be found.
I've tried to install PimCore several times, each with the same result.
Any help would be gratefully received.
It turns out that the .htaccess file within the /public/ folder wasn't being installed with the fresh install. The .htaccess file contents can be found here, https://pimcore.com/docs/pimcore/current/Development_Documentation/Installation_and_Upgrade/System_Setup_and_Hosting/Apache_Configuration.html
Best way to install Pimcore are using docker.
You can read it on github page https://github.com/pimcore/skeleton
All that you need is install docker.
You can do it from this link https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04
I've checked everything...
After upgrading interface looks like this:
Totally broken, but the only thing that is breaking everything is icons...
Neither CMD or DevTools doesn't seem to show any missing files...
I have already ran all of the commands makemigrations, migrate and collectstatic --clear.
Running manage.py check didn't show up any errors.
Checked(disabled/enabled) all of the apps, didn't work.
Checked urls.py on any misconfiguration with staticfiles, still nothing.
Compared my base.py, dev.py files with fresh install of 2.11, didn't see nothing that can cause overriding CSS or JS(I'm using Django Debug Toolbar, tryed disabling it, didn't work, same as everything). Help. Please.
And also on a fresh install there was no "SKIP TO MAIN CONTENT" button on top. I don’t know what that has to do with anything
Wagtail 2.11
Django 3.0.11
Using Pipenv for virtual environment
Damn! Of course, after posting a question, I found an answer. When running collectstatic I've noticed that there was too many Found another file with the destination path... messages, but did not take this into account. Then I realized that somehow in my core app staticfiles folder were duplicates of Wagtail's core static files, so I installed Wagtail 2.11 for the millionth time, ran the server and nothing changed... Fortunately, I've guessed(thanks to #gasman) to clear cache and reload the window and IT WORKED!
Conslusion: Check for duplicated static files, mine were from the old version of Wagtail, but Wagtail is on latest, which caused this issue...
I'm new to CakePHP and my employer asked me to move our CakePHP app from a dedicated server to another server (for testing purposes). I've copied all the files, changed app's database.php config but I'm getting a ERR_TOO_MANY_REDIRECTS when accessing the app on the new server.
I did not work on the app so I don't know much about it, but I have all the files.
LE: So, I've uploaded the app on a fresh install of CakePHP. I now have 3 .htaccess files, CakePHP says it's working, but when I try to upload DebugKit (following the install notes & having the proper version for CakePHP 2.4.3.) I get the ERR_TOO_MANY_REDIRECTS.
A look in Chrome's console shows me this. If I delete the DebugKit altogether, the page looks like this & it also has the footer from the app.
The new structure of the app is the standard one.
Please advise!
Best guess is the (apache?) DocumentRoot setting may be clashing with your APP config on the new server and/or the PHP settings. Have you checked your php.ini on the new server? What's the output of phpinfo() ? Once fixed HIGHLY RECOMMEND check other environment variables by turning on the DEBUG flag in config/app.php For your version try pr(Debugger::trace()); or even better for dev. install the Debug kit. Anyway, DocumentRoot should be set to webroot (assuming default install and directory structure).
I'm trying to do some cakePHP development using my existing homestead
installation I use for Laravel.
I can get the application running but it says that
'URL rewriting is not properly configured on your server.'
I tried to use the instructions to configure nginx but did not have much luck.
Has anyone gotten url rewriting to work, or can point me at any sources?
I know their is a vagrant setup for cakephp, but I'd rather continue to use homestead if possible.
SSH into your Homestead VM.
Edit /etc/nginx/sites-available/your-site.app and add /webroot to the line that looks like: root "/home/vagrant/your-site"; so that it looks like root "/home/vagrant/your-site/webroot";
Restart nginx with: sudo service nginx restart
Your should find your CakePHP pages can find their static content.
I don't know much about homestead, other than it is a vagrant box. I would suggest using a box that was tailored for cakephp:
https://github.com/FriendsOfCake/vagrant-chef
This is an article on how to get that set up correctly:
http://josediazgonzalez.com/2014/12/02/designing-a-store-application-in-cakephp/
I've downloaded a project from a root server. It acts there very fine. But when i run the project in the localhost on xampp environment, didn't find the any css nor any images. How can i solve this problem?
You should also verify the contents of your .htaccess files in the root install directory, in /app and /app/webroot. Depending if you are serving CakePHP from a subdirectory (like http://domain.com/somesubdirectory/) you might have to add a RewriteBase directive to your .htaccess file in /app/webroot/. Details here.
Check the permissions of the /app/webroot/css and /app/webroot/img folders. Also check if you have mod_rewrite properly configured.
Check out this tutorial which talks about mod_rewrite:
link text
"Occasionally a new user will run in to mod_rewrite issues, so I'll mention them marginally here. If the CakePHP welcome page looks a little funny (no images or css styles), it probably means mod_rewrite isn't functioning on your system. Here are some tips to help get you up and running: ..."