HOW-TO: custom php.ini (suPHP) and phptmp folder for every domain

PHP:
<?php
phpinfo();
?>

put the code in a phpinfo.php in public_html of any website of yours and see output in a browser.
 
i installed directadmin by default php setting and now i trying installing suphp with this code :

cd /usr/local/directadmin/custombuild/
./build clean
./build update
./build set php5_cgi yes

now after inter this error show :
php5_cgi is not a valid option.

what's wrong with it ?
 
The guide is outdated and supports only CustomBuild 1.x, and can not be used for CustomBuild 2.x which you run.
 
Install SuPHP with CustomBuild 2.0

Thanks for this tut but I really don't know why no one learn how to install on CustomBuild 2.0
any way I just did this steps :

Code:
cd /usr/local/directadmin/custombuild
./build clean
./build update
the edit options.conf file via nano
Code:
nano options.conf
and then set
Code:
php1_mode=[COLOR="#0000FF"]php-fpm[/COLOR]
[COLOR="#FF0000"]or if it's[/COLOR]
php1_mode=[COLOR="#0000FF"]mod_php[/COLOR]
and same setting for php2_mode if you have two version of php to
Code:
php1_mode=[COLOR="#008000"]suphp[/COLOR]
php2_mode=[COLOR="#008000"]suphp[/COLOR]
after that
Code:
./build all d
./build rewrite_confs
so It's done , SuPHP is installed successfully but we need to fix phpMyAdmin, Roundcube, squirrelmail so just did:
Code:
./build roundcube
./build squirrelmail
./build phpmyadmin
now it's time to do chmod and chwon for all new file and folders so I ran this command :
Code:
for i in `/bin/ls /usr/local/directadmin/data/users/` ; do chown -R $i.$i /home/$i/domains/* ; echo $i ;done
Code:
for i in `/bin/ls /usr/local/directadmin/data/users/` ; do find /home/$i/domains/ -type f -exec chmod 644 {} \; ; echo $i ;done
Code:
for i in `/bin/ls /usr/local/directadmin/data/users/` ; do find /home/$i/domains/ -type d -exec chmod 755 {} \; ; echo $i ;done

Note :
if your users see the message ” Apache functioning normally ” instead of actual website, you should do this :
Code:
cd /usr/local/directadmin/custombuild/
./build rewrite_confs
and if Apache wouldn’t start with following error message:
Code:
Starting httpd: httpd: Syntax error on line 17 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/httpd-phpmodules.conf: Cannot load /usr/lib/apache/mod_suphp.so into server: /usr/lib/apache/mod_suphp.so: cannot open shared object file: No such file or directory
login as root user and run this :
Code:
./build suphp
./build rewrite_confs

so I read this steps to ask :
Should I do additional command to use all features of SuPHP ? for example seprate tmp folder for each user?
I just ask because prale user wrote some special bash scripts in his tutorial.
another question is how can disable "IP/~user" for example "4.2.2.4/~user" because when installation was complete I test and the PHP execute yet.

Thanks in advance
Sincerely
Game Over!
 
Back
Top