views:

24

answers:

1

Hello everyone, I'm starting a new project using Linux and PHP, but for the early dev state i'm now, I'm trying to use XAMPP for now.

I'm Running Ubuntu 10.04 x64 on a laptop, And got everything I need. The site I should build is based upon CodeIgniter and some implementation of smarty, but I think this is not that important because the same site runs pretty well on windows (with XAMPP )

The Problem I have is, if I put some php file on the root (like foo.php) with phpinfo() on it, the server parsed it as it should be, but when I try to get the url for one CodeIgniter app (as http://localhost/site/site.php ), Firefox tries to download the file & Chrome alerts some server error.

Again, the site as it works perfectly on windows (I share code using mercurial, if that's important)

I have around 3 codeigniter apps sharing the same System folder, and those get pickup by the loader (as site.php, admin.php...), but anyone I pick I still getting the same msg.

Also, the server list all the files perfectly, and tried to rename the file and then asked for the same (to see if the problem is cache or something) but I get a 404.

I'm also a newbie on apache and linux in general, I don't know what to do...

Any help will be greatly appreciated. Thanks in advance!

+1  A: 

Check your apache.conf and httpd.conf. There are configuration entries called AddHandler which assign a module to each file extension which should handle this. If no module is provided the apache will send the file as plain text to the client.

coding.mof
But Apache does run other scripts, like a single phpinfo(), so i got no clue on this...
josecortesp
Ok, what about the file permissions? Compare the Owner and Group of the php file and containing directory with the ones from the apache usually installed to /usr/sbin/apache2. It might be that the subdirectories of your htdocs directory are not accessible by the apache service.
coding.mof
looks like Fixed with the permissions. Thanks a lot!
josecortesp