Running PHP as user

Started by Mazaykina, Jul 07, 2022, 02:28 AM

Previous topic - Next topic

MazaykinaTopic starter

Hi, please provide alternative recommendations for executing php under Apache as a user, aside from using php as CGI.
  •  

argoway

SUPHP is a method of initiating PHP as an independent user. Similar to the Apache suexec extension, SUPHP also enables running PHP as a specific user or group that owns a particular website in shared hosting environments.

In my view, mod_suphp is a fusion of mod_php and php_cgi, however, it offers advantages over php_cgi such as the processing of Htaccess directives and the avoidance of creating child threads during script processing. Nonetheless, it also has drawbacks. If there is even a minor error in the script, it will result in a 500 error, whereas if the script functions properly in mod_php mode, it may not work in suphp due to the differences in the method of processing.
  •  

RZA2008

There are various options for calling a PHP script, including running it independently through SSH using a utility or accessing it directly through a web browser. Another way is by setting a schedule with Cron.

I would recommend seeking the support of your web hosting provider for the first run of the script. This will involve specifying a particular script, which will allow hosting specialists to have a better understanding of the task and provide more precise guidance.
  •