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 #179176 is a reply to message #179175] Mon, 24 September 2012 01:30 Go to previous messageGo to previous message
cph is currently offline  cph
Messages: 10
Registered: September 2012
Karma:
Junior Member
On Sunday, September 23, 2012 6:06:41 PM UTC-7, Gordon Burditt wrote:
>> 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.

For security I assume there is no way for a php script on the server to switch to the php.ini that has exec() enabled.

That is, if a customer has ftp access to a site for them, they are forced to use the php.ini setup that disables it.
[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: Sat Nov 23 23:02:11 GMT 2024

Total time taken to generate the page: 0.07071 seconds