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 script execution mode not working on the new forum.
On some sites, I have enabled the PHP script execution mode to use FCGId (run as virtual server owner).
When I run
<?php system('whoami'); ?>
In a test file, it still shows ww-data.
This is Ubuntu 10.04 with Virtualmin GPL.
Howdy,
There was an issue with Ubuntu (that more recent installers handle) where if mod_php is enabled in Apache, it overrides CGI/FCGID.
If you look in /etc/apache2/mods-enabled/php5.conf -- do you see any "SetHandler" lines in there? If so, comment them out, and restart Apache -- that should do the trick for you!
-Eric
Thank you, their are indeed some SetHandler lines in the conf file. If I remove those lines, what would the effect be on the existing websites that make use of mod_php? Will I need to go into each one (currently 100+) and manually add in those lines?
Nope, it should continue to work for the other websites.
My recommendation would be to comment out those two lines, restart Apache, then test your other mod_php sites, just to make sure that works as expected. But it should work as needed.
-Eric