I'm running Apache2 on Ubuntu as my development area, I started organizing my files and noticed that PHP only works in the root directory (/var/www) so say I put a file called function.php in say '/var/www/function' and refer to it in an include in /var/www/index.php the index.php script will run but the function.php will not.
I'm betting there is something wrong with either the configuration of PHP or maybe Apache but I have no idea where to start looking to fix the problem. (Google hasn't me on this one.)
Apache - PHP (Subdirectories)
Moderator: General Moderators
Re: Apache - PHP (Subdirectories)
The Ubuntu LAMP stack has always worked right out of the box for me. Have you tried a phpinfo() file in one of the directories that isn't working? Does anything display if you access it directly?
Re: Apache - PHP (Subdirectories)
Me too, first time I've ever had a problem with it.The Ubuntu LAMP stack has always worked right out of the box for me.
Yup, nothing. It doesn't work.Have you tried a phpinfo() file in one of the directories that isn't working?
I just purged the whole LAMP stack and reinstalled it and it seems to be working fine now. (For anyone else reading this, that is the worst solution.)