DirectAdmin recognize another PHP configuration else than custombuild version

tigerti

Verified User
Joined
May 6, 2014
Messages
16
Dear friends
We have rebuild our PHP using custom build. I realized that in the directadmin interface, the directadmin is not reading PHP configuration from our custom build and is referring to another PHP configuration file else than the original one which users are using that.

The problem is that we don't have open_basedir for all of the virtual hosts on the server and when we check the DirectAdmin interface in the related section for PHP MODULES it is saying that OPEN_BASEDIR is enabled for all of the virtual hosts

But in fact it is not as we can see in the virtual host of all of the users and as we can reach to other user's home directories using PHP shells

My desire is to fix the issue so the directAdmin interface will be able to use the real PHP setting and will be able to set open_basedir for each virtual host from the DirectAdmin interface.

Please help us on this case.
Also where we can initiate a support ticket to directadmin?
Best Regards
 
The read php.ini is under
/usr/local/etc/php5/cgi/php.ini

But DirectAdmin interface is still applying the changes from interface to this file:
/usr/local/lib/php.ini

How to force DirectAdmin interface to read from and apply changes to
/usr/local/etc/php5/cgi/php.ini
 
Dear friend i found my solution here
http://help.directadmin.com/item.php?id=183
I used the old way manually for one domain and it worked.

I added suPHP_ConfigPath |HOME|/ the virtual host template
/usr/local/directadmin/data/templates/custom/virtual_host2.conf

i have also edited :
/etc/httpd/conf/extra/httpd-suphp.conf
and commented
#suPHP_ConfigPath /usr/local/etc/php5/cgi/



I copied php.ini of the server to /home/usr/php.ini
and i edited the /home/usr/php.ini and added open_basedir parameter:
open_basedir=/home/user:/usr/local/etc/php5/cgi:/tmp



i restarted the HTTPD and it worked :)

Now i want to do it for all

i have copied php.ini file to all of the home folders of users
echo /home/*/ | xargs -n 1 cp /usr/local/etc/php5/cgi/php.ini


I just don't know a way to automatically append a line to php.ini of users but the problem is that the script should realize the user of the folder and edit the open_basedir path relatively

There is a script here:
http://help.directadmin.com/item.php?id=183

How to use for my need? I just want to append the already created php.ini files and add the open_basedir parameter based on the username of the folder

Thank you for your care
 
Hello,

I believe directadmin reads domain's conf file instead, so you should probably write a script to keep the data synced.

/usr/local/directadmin/data/users/<username>/domains/<domain>.conf

it is

Code:
safemode=OFF
 
Back
Top