So I need to copy a site from a webserver and run it from my localhost.
The site is created with CakePHP 1.2.3.8166 (it says in VERSION.txt).
I am new to CakePHP, so i started with the 2.0 tutorial and i have also a fresh install of 1.2.11 and both work perfectly. (I just had to fix the mod_rewrite issues by enabling AllowOverride All).
However when i tried to run my downloaded site i just got “page not found” error.
With a little searching, the solution was to remove the first “/” in
“RewriteRule ^$ /app/webroot/ [L]” and other places in the .htaccess files.
So now my page looks wired, like this:
http://pastebin.com/ZMX3RjZG
Clearly the page does’t load properly and i don’t know what is wrong.
Now i am stuck, anyone have come across similar problem?
I run:
Windows 7 Pro 64bit,
PHP 5.3.6,
Apache 2.2.19
Any help appreciated.
Based on the second code sample you’ve provided and the way the rendered content is garbled I would say that shorthand tags aren’t enabled in your version of PHP.
This shorthand notation might be the root of your problem:
There are two solutions, either change all the shorthand tags to the full declaration:
Which might be quite an undertaking as you’re working with an existing project. It all depends on the size of it and if this shorthand notation is present in all of the files (the Cake core uses the full declaration). Or you could enable shorthand in your
php.iniand restart the Apache server.More information on shorthand tags can be found in the PHP manual.