2

I have downloaded the CakePHP from it's site then I copied the files in srv/www/htdocs renamed the folder to first_app

Here is the output(error and warnings that shows me):

Release Notes for CakePHP 2.0.0-dev.

Fatal error: Class 'Debugger' not found in /srv/www/htdocs/first_app/cake/libs/view/pages/home.ctp on line 26

also the tutorial tells me that I must have this:

Apache server with mod_rewrite

I didn't know how to find it and install it?

is that causing this problem?

I want to know how to add "another" root without having problem

I used this and no result:

<Directory /srv/www/htdocs/first_app/app/webroot>
    Options None
    AllowOverride All
    Order deny,allow
    Deny from all
</Directory>

also I changed the /etc/apache2/server-default.conf

I changed allow override None to Allow override All in the part of this:

<Directory "/srv/www/htdocs">
Nickool
  • 3,662
  • 10
  • 42
  • 72

3 Answers3

2
chmod -R 0777 /srv/www/htdocs/first_app/app/tmp/

This makes the tmp dir writable for everybody (on your machine) so also for the web server. If you want to limit access, first try this, then browse to your CakePHP install, and then check in the cache dir which files have been created and what's the owner and group of those files.

The tmp dir contains more than just the cache dir, it also contains sessions and logs. Anything outside of /srv/www/htdocs/first_app/app/tmp/ does not need to be writable for the server, anything inside that folder should be writable.

The default CakePHP install comes with .htaccess files. You do need those files. They redirect every request to localhost/first_app (or any other dir your is installed in) into the webroot, so you don't have to do that yourself. You need to have AllowOverride All in your apache config. See here for instruction on how to enable that.

Arjan
  • 9,784
  • 1
  • 31
  • 41
  • Thank you Arjan! your explanation is perfect I am trying to solve it now the error is this one:Fatal error: Class 'Debugger' not found in /srv/www/htdocs/first_app/cake/libs/view/pages/home.ctp on line 26 – Nickool Aug 07 '11 at 08:18
  • a little point:the site that you told me is that problematic site that I tried and wasn't successfull:) – Nickool Aug 07 '11 at 08:56
  • I put this site previously and explained it – Nickool Aug 07 '11 at 08:57
  • `Debugger` should be present in `cake/libs/debugger.php`, I'm not sure why it's not found. Please check that the file exists (and has contents). What version of CakePHP are you using? And what PHP version? – Arjan Aug 07 '11 at 09:10
  • I have php5 and cakephp the latest that was in the site – Nickool Aug 07 '11 at 09:26
  • Arjan I Love you:D I downloaded less version now it works very well!!!! I am so thankful to you dear friend>:D – Nickool Aug 07 '11 at 11:31
0

Please Go through these links

http://www.youtube.com/watch?v=9stiBWz71Ts

http://ubuntu-linux-apache-mysql-php.blogspot.com/2008/12/how-to-install-cakephp-on-linux-ubuntu.html

http://groups.google.com/group/cake-php/browse_thread/thread/3ba763933544ece

It may help you.

Master Stroke
  • 5,108
  • 2
  • 26
  • 57
  • Thankyou I studied some but it tells me:change the DocumentRoot to /var/cake_install/app/webroot I don't want tochange my root I want to have it in the same root – Nickool Aug 06 '11 at 05:36
  • you SHOULD be using /app/webroot as document root. everything else is hacky... - especially if you (like yourself) have full control over your server settings. if you are on a local machine, use virtual hosts to set a fake domain like "http: //mysite/" – mark Aug 06 '11 at 21:26
  • Thank you Mark how I can do that? – Nickool Aug 07 '11 at 07:06
0

same problem on mac. on mac, i just right clicked on the directory it was concerned about and changed the permissions so that everyone could read/write, and clicked apply to enclosed files/folders.

I used to use linux but i'm not sure exactly how to do this, but hopefully this will get you on the right track? i assume that the command you posted changes the permissions of that folder, but maybe you need to change the permissions of the files and folders inside.

Josh Sherick
  • 2,161
  • 3
  • 20
  • 37