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 #179177 is a reply to message #179176] Mon, 24 September 2012 02:26 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 9/23/2012 9:30 PM, cph wrote:
> 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.
>

There is no way if your system administrator has properly set up Linux
security.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[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 Sep 19 01:43:13 GMT 2024

Total time taken to generate the page: 0.04473 seconds