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/
Related
image: https://i.stack.imgur.com/bpDuM.png
I just installed EasyPHP Devserver, it would enable you to access PHPmyAdmin clicking on module at the bottom of the page, the problem is that in order to start those modules You must start the Database and HTTP before.
Http works, but when I click on Database it doesn't do nothing.
I've also tried to use Xampp, but neither this works, maybe my pc has some problem with virtual ports...
it looks like it's not a virtual ports problem !
I started the development with easyphp, but after that I preferred to use WampServer, and even more linux debian.
if you want to work with wamp, don't forget to install Visual Studio :)
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 have a problem updating wordpress or installing wordpress plugin in my local version of google app engine. I get the following message.
Downloading install package from
https://downloads.wordpress.org/plugin/event-espresso-decaf.4.8.38.decaf.zip…
Unpacking the package…
Could not create directory.
With the same code base I am able install plugin using MAMP (Macintosh, Apache, MySQL, and PHP). However fails with google Pyton script (dev_appserver.py).
I tried changing the permission of the file system by giving privilege to all user for write. Tried executing as sudo dev_appserver.py .. Followed the advice in other post, No luck.
Whats the problem here?, With MAMP all looks good in my local, but the same code break as I deploy to GAE (appcfg.py -A APP-ID update app.yaml). Whats the problem here
Cannot write to file on Google App Engine Dev server with PHP?
Staring SDK 1.9.18, dev_appserver disables local file writing by default to better simulate the production environment. You can enable file writing by adding "google_app_engine.disable_readonly_filesystem=1" to your php.ini file.
I also wrote a blog post about running WordPress on App Engine flexible environment at:
https://wp.gaeflex.ninja/2016/03/25/using-wordpress-multisite/
Please give it a try too.
I am very new to CakePHP and want to know how to install it. Also, can you tell me if the installation process is similar to Joomla! installation. Does CakePHP have an administration interface?
cakephp has administration options. Please put the whole installation in the apps folder on your web-server. Point your browser to the folder i.e. If using a local server, 127.0.0.1/index.php/
Follow the instructions shown.
If you need a cakephp based cms you can use croogo
On Windows:
In xampp the public directory is httdocs. There you copy the cake directory. In the webbrowser you call it with "http://localhost/[your_cakedirectory]" ...
You have to read the sections of installations in the cookbook.
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