DCUA
Nov 3 2003, 03:30 AM
I have server with CPanel.
I have phpsuexec installed (from CPanel).
But when I tried to send email from php script it sent from "nobody" but not from user account.
Anybody can help me?
devo-x
Nov 4 2003, 09:58 AM
WHM - "Tweak Settings" (I think) - Enable to option to prevent email sent from user nobody
Lippy
Nov 4 2003, 10:37 AM
Just to let you know that if that option is clicked most php scripts will be unable to send emails. This doesn't force it to use an account it just makes it so that "nobody" is not a valid email address to be sent from.
simoa
Nov 12 2003, 03:48 PM
turning on this option is vulnerable to hack?
Lippy
Nov 12 2003, 03:52 PM
Turning on this option allows PHP/CGI scripts to send email from the nobody user. Yes if not properly looked after(disabling specfic files, firewall, and the like) it can cause either a attack from a non-authorized user or open up the ability to send spam from your server.
Lientje
Nov 13 2003, 04:03 AM
QUOTE
Originally posted by DCUA
I have server with CPanel.
I have phpsuexec installed (from CPanel).
But when I tried to send email from php script it sent from "nobody" but not from user account.
Anybody can help me?
Cpanel has SuExec installed. This is for Cgi-scripts not php.
You need to recompile apache with phpsuexec
DCUA
Nov 13 2003, 04:40 AM
QUOTE
Originally posted by Lientje
Cpanel has SuExec installed. This is for Cgi-scripts not php.
You need to recompile apache with phpsuexec
Thank you!
Is there any way to send email from nobody after recompilation?
Anything should be done by me additionally?
Lientje
Nov 13 2003, 04:51 AM
After recompilation be sure to enable the option in WHM to prevent email sent from user nobody.
Then it must be oke
Use /scripts/easyapache option 6 yo recompile.
Martin:D
DCUA
Nov 13 2003, 04:55 AM
Thank you!!
ramprage
Nov 19 2003, 12:06 PM
After you've done this it means email sent out from PHP/CGI scripts will be send out using the persons username and NOT nobody?
So scripts won't break correct?
Please clarify
Lientje
Nov 19 2003, 12:31 PM
Scripts wont break.
However some scripts just would not work anymore.
The reason of this is mostly that the script is not safe.
On most Apache servers, PHP runs as an Apache Module. As such, it runs directly in the user Nobody, but doesn't require the execute flag.
This means that in order to execute a PHP file, it simply needs to be world readable.
The problem is that this allows every other users on the server to read your PHP files !
Many scripts use a PHP file to store a database username and password. This means that on another server every client could read your PHP files, retrieve your password and access your databases
PHPsuexec executes PHP scripts under your username.
As such, instead of using everyone's permissions it uses the owner's permissions.
You can thus change the permissions of your PHP scripts to : 0700 or 0400 and still be able to read and execute them. However, these scripts will no longer be accessible to any other users.
In fact, PHPsuexec will refuse to execute a script if it is world-writtable to protect you from someone abusing one of your scripts.
Hope this helps
DCUA
Nov 19 2003, 01:19 PM
QUOTE
Originally posted by ramprage
After you've done this it means email sent out from PHP/CGI scripts will be send out using the persons username and NOT nobody?
yes, email now sent from username, I checked this.
DCUA
Dec 4 2003, 03:48 PM
What if I have no /scripts/easyapache ?
How can I rebuild apache with PHPSUEXEC ?
ramprage
Dec 4 2003, 04:01 PM
/scripts/easyapache is only for cpanel servers, if you don't have that you'll need to download the apache sources files from apache.org
DCUA
Dec 5 2003, 01:30 AM
QUOTE
Originally posted by ramprage
... you'll need to download the apache sources files from apache.org
any help with it?
how to rebuild it?
I did not find proper information.
I tried many things.
ramprage
Dec 5 2003, 09:57 AM
Google is your best friend:
php suexec install
http://www.debianhowto.de/howtos/en/php_cgi/
DCUA
Dec 5 2003, 10:25 AM
Thank you VERY much!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.