FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Only Allow exec in CLI
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Only Allow exec in CLI [message #179175 is a reply to message #179174] Mon, 24 September 2012 01:06 Go to previous messageGo to previous message
gordonb.1zi9u is currently offline  gordonb.1zi9u
Messages: 1
Registered: September 2012
Karma:
Junior Member
> For security I am looking to add exec() and similar commands to
> the disable functions setting in php.ini but I do have a need to
> execute command line commands within a cron job I am writing in
> PHP. I believe I heard this is possible but I would just like to
> confirm this or find a workaround.

You can specify a directory to look for php.ini on the command line
( -c <directory> ) for the CLI version of PHP. Thus, that cron job
can use a completely different php.ini with different configuration
than any other use of PHP. Does that meet your requirements?
Use the --ini option to find out what files it's actually loading.

You might want to put the job in a wrapper shell script.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Advice for Literature on PHP-Based Web Development Business Models
Next Topic: Count how many times a value occurs in an array
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 06:11:21 GMT 2024

Total time taken to generate the page: 0.04656 seconds