per-user php.ini file

migmac

Verified User
Joined
Apr 15, 2014
Messages
88
Hi,

I need to do this:

1) Tell exim to trust your script, which may allow the return-path to be changed:
http://help.directadmin.com/item.php?id=257

since I am using suphp I need to do create a per-user php.ini file and add this code:

[mail function]
sendmail_path = /usr/sbin/sendmail -t -i -f [email protected]

the problem is that is being somehow difficult for me to create this per user php.ini

What have I done:


1. Login to DirectAdmin control panel and go to the domain you wish to override php.ini settings through an option DirectAdmin>> Extra Features>> Custom HTTPD Configurations
2. Click on Custom httpd settings and Select the domain name.
3. Then I have enter the code: SetEnv PHP_INI_SCAN_DIR /usr/local/directadmin/data/users/$username/php.
4. I have created the directory /usr/local/directadmin/data/users/$username/php and inside I have created an empty file called php.ini
5. I have run this commands:
chown $username:$username /usr/local/directadmin/data/users/$username/php/
chown root:root /usr/local/directadmin/data/users/$username/php/php.ini
chattr +i -R /usr/local/directadmin/data/users/$username/php/


Now, I am not sure what to do next, the php.ini file that I have created is empty, should I place the line sendmail_path = /usr/sbin/sendmail -t -i -f [email protected] alone in that empty php.ini? how do I tell that the $username will have to use the new php.ini path?

how can I avoid in a upgrade of directamin that this path is overwrite?

until now have I done something wrong?

Thank you
 
Suphp is no longer developed you are better to use fastcgi or php-fpm.
 
Suphp is no longer developed you are better to use fastcgi or php-fpm.

I mainly have cpanel servers, I just started this week to use my first directadmin server, so far I like it. But the server I am testing directadmin only haves 2GB ram so I guess I can't go with fastcgi or php-fpm since they do consume 2gb ram just themselves right?

but, does this affect the goal I want, to have a per-user php.ini file?

ditto,

your using mod_php + mod_ruid2, do you know if they will run fast on a 2gb ram server?

The reason I have installed suphp was because without it the wordpress asks for username and password when you try to upgrade it

also, ditto, do you know if this instructions are up to date to install mod_ruid2 ?

http://forum.directadmin.com/showthread.php?t=37467

Thank you!
 
If you're using CustomBuild 2.0 you can switch to mod_ruid2 without any manual configuration/installation, as it's fully supported. CustomBuild versions below that still require manual steps. The tutorial linked in your post is very outdated, I've written a wiki on it a while back: http://wiki.amservers.nl/Mod_ruid2 -- I'm not entirely sure it's up to date (but in either case more up to date than the thread).

I would recommend using CB 2.0 (which is what I'm using).

Also, with mod_ruid2, WordPress will not ask for user/pass to update.

I have to say 2GB isn't that much these days, but depending on how many sites and how they're build it should still do a decent job, either with mod_ruid2 or php-fpm. You can also try one and switch to another to see what's working best for you.
 
Tell exim to trust your script, which may allow the return-path to be changed:
http://help.directadmin.com/item.php?id=257
See my post to your previous thread. Please do not move your issue across multiple threads.

I did forget about the trusted sender when replying to the last thread but I'll go back and indicate it now.

You can add the trusted sender in your serverwide exim.conf file.

If you don't have root shell access to your server; if you're a client of a webhosting company, then your provider will need to set it for you.

Then you won't need your own php.ini file.

Jeff
 
untrusted_set_sender = *
no_local_from_check

the above 2 lines solved my problem immediately, but unfortunately I had to disable suphp

One of the reasons I was using suphp was because the wordpress autoupdate asks for ftp credentials, and if you install suphp it will stop asking for them, I have recompile php to remove suphp and for my suprise the wordpress is not asking for the credentials, very strange..

Arieh,

This is my first server with directadmin, I am using cPanel for years, but recently I found that I can have very good prices in the directadmin license, so I am testing to understand if can be a solution for specific needs. Currently I am testing in a small server with 2gb ram which is much better than to test it in a vps. But, until now I am very impressed with the result! I will try your CB 2.0 recommendation

Thank you
 
Back
Top