HOWTO: PHP 5 CLI to PHP 5 CGI + suPHP

Dennis

Verified User
Joined
Nov 13, 2004
Messages
123
Location
The Netherlands
Hi Wanener,

Look at this thread: http://www.directadmin.com/forum/showthread.php?t=19644&?

I think you need to build suPHP again to fix this issue.

cd /usr/local/directadmin/custombuild
./build update
./build clean
./build suphp
For your other question. I think PHP-CGI is the best way to run the PHP websites. To make it secure...you install suPHP as well. It will tell every account to use only its "base directory". So every account is "isolated" from the other on the server. With Joomla (or other programs) installs you never need to give the public read-write permissions to a specific directory for e.g. components or other plugin's.
If you run CLI, the user with certain permissions for every website is "apache:apache" and if there is a problem with one of the websites a hacker could get to other websites as well. Still there are enough ways to secure your server a little bit more through firewall settings or settings with "noexec" on the temp dir for example.

Hope this helps.

Regards,

Dennis
 

RoRoo

Verified User
Joined
Dec 16, 2004
Messages
111
I'm having a problem running suphp with user php.ini
I've followed the tutorial and everything works EXCEPT the SetEnv PHP_INI_SCAN_DIR isn't working. When I open a phpinfo the variable remains empty and therefore the user's php.ini isn't being applied.

Logs say nothing :( so troubleshooting is difficult

PHP Version 5.4.21

users httpd.conf:
Under Virtualhost directive below ErrorLog
SetEnv PHP_INI_SCAN_DIR /usr/local/directadmin/data/users/username/php/

ownership of php.ini is user (also tried with root)

Does anyone have a clue as to what's going on??
 
Top