Re: Question about running php as root

From: Date: Wed, 05 Sep 2001 22:57:59 +0000
Subject: Re: Question about running php as root
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-66120@lists.php.net to get a copy of this message
> But is there a way to make one of my root scripts run by sending it a > command to do so from the DSO version of PHP like with system command > or something like that. Or some roundabout way to make it think root is > asking the script run. > > I hope you understand what I am asking. There possibly is, depending on your operating system (which you didn't mention) but you should probably consider doing it a different way - create a database table which contains jobs to do and have the apache side of php insert entries into that table, then have your root php script (running at intervals determined by you), check that table and perform the tasks set in the database table. If any of the commands you execute from the root php script take user-submitted data from the database and pass it to the command line, be sure to check it for naughty stuff - there's sections in the online php manual about security, and passing data to the command line jason

« previous php.general (#66120) next »