These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for PHP doesn't work with custom root path... on the new forum.
Hi everyone, I failed to find my answer by searching on this forum. Please help out.
First, my configuration:
- CentOS 5.4, default installation + AMP related packages
- Virtualmin GPL
- suEXEC is disabled
- root path of my Virtual host: /home/< Virtual host >/public_html/
My issue is PHP related:
1)
I tried to confirm that PHP is working, with:
------------
<?
phpinfo();
?>
------------
My server only outputs a blank page with no error (I already have "display_errors" on). I checked my httpd logs, didn't see anything relevant to my issue.
If I changed the root path to "/var/www/html/" then my server would output the above script correctly.
What should I do in order to get PHP works with my custom root path?
Thanks for the help.
I'd recommend looking at the logs in both /var/log/httpd/error_log as well as the Virtual Server logs in $HOME/logs/error_log.
It's hard to say for sure from the info above -- though, have you attempted setting up suexec? Having that makes things a bit nicer in general -- both being more secure as well as resolving a variety of permissions issues that can creep up.
There's a thread on enabling suexec on Virtualmin GPL here:
http://www.virtualmin.com/node/8462
Hi andreychek, thanks for your reply.
1)
I have messed with my box a bit more before getting back to this thread.
While my issues persisted, everytime I checked my webpages in questions, I first deleted all contents in the logs, to have them easier for reading. For sure didn't see anything relevant to my issues.
I have reinstalled everything (CentOS, Webmin, phpMyAdmin, Virtualmin) from scratch on my home box, for like twice, and no luck.
Then for the third time, I installed my home box as in the following sequence (which was about the same as before...):
- CentOS 5.4 (default + AMP packages)
- Webmin
- phpMyAdmin
- Setting password for MySQL root
- Virtualmin
and somehow my issues are gone. I then installed my VPS the same way, and things are working fine.
While I have a working installation now, I didn't find out what was going on. I don't know, it is just weird...
2)
As for using suEXEC, while I am learning how things work, I would like to use the packages from the default repositories, instead of using Virtualmin's recompiled version of Apache (even though it is just with some fixed paths).
For now I am just messing with my VPS, and trying to have the basic stuffs working properly, so the extra performance & security gains from suEXEC are not important for me.
Thanks again for your reply.
While I have a working installation now, I didn't find out what was going on. I don't know, it is just weird...
Well, I'm glad it's working, though it's always just a bit nicer when you know what's gone awry! :-)
For now I am just messing with my VPS, and trying to have the basic stuffs working properly, so the extra performance & security gains from suEXEC are not important for me.
Sure, not everyone needs what suexec offers.
Have a good one!
-Eric