[BlueOnyx:22082] Re: Advice please

Greg Kuhnert gkuhnert at compassnetworks.com.au
Fri May 18 01:41:23 -05 2018


Or better still…

/usr/bin/php -c /etc/ -d open_basedir="" -f filename.php

Doing this means no extra ini file to maintain :)

> On 17 May 2018, at 11:35 pm, Dirk Estenfeld <dirk.estenfeld at blackpoint.de> wrote:
> 
> Hello Colin,
> 
> if you are running suphp fort he site you can call
> /path/to/php -c /home/sites/yoursite/php.ini /home/sites/yoursite/web/yourscript.php
> Or you copy your general php.ini, disable open_basedir and call 
> /path/to/php -c /path/to/your/php.ini /home/sites/yoursite/web/yourscript.php
> 
> Best regards,
> Dirk
> 
> ---
> 
> blackpoint GmbH – Friedberger Straße 106b – 61118 Bad Vilbel
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Blueonyx [mailto:blueonyx-bounces at mail.blueonyx.it] Im Auftrag von Colin Jack
> Gesendet: Donnerstag, 17. Mai 2018 11:52
> An: BlueOnyx General Mailing List <blueonyx at mail.blueonyx.it>
> Betreff: [BlueOnyx:22076] Advice please
> 
> Bit of a noob question here ... ☹
> 
> We have a client that needs to run some PHP scripts regularly using cron.
> The scripts run fine from their website using a browser.
> 
> Unfortunately when I try and run them from the CLI I get open_basedir errors amongst other things.
> 
> Warning: include(): open_basedir restriction in effect. File(/home/.sites/28/site1/web/global-includes/db.php) is not within the allowed path(s): (/tmp/:/usr/sausalito/configs/php/:/usr/share/pear:/var/lib/php/session/) in /home/.sites/28/site1/web/process1/crons/ajax_check_boms.php on line 8
> 
> The script runs fine through apache - so open_basedir settings allow it, but how do I get this to run from the CLI. 
> Presume this is because it is not being run from within the site?
> Add path to server php.ini?
> 
> Slightly out of my depth here. 
> 
> Thanks
> 
> Colin
> 
> _______________________________________________
> Blueonyx mailing list
> Blueonyx at mail.blueonyx.it
> http://mail.blueonyx.it/mailman/listinfo/blueonyx
> 
> _______________________________________________
> Blueonyx mailing list
> Blueonyx at mail.blueonyx.it
> http://mail.blueonyx.it/mailman/listinfo/blueonyx

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20180518/b3921d27/attachment.html>


More information about the Blueonyx mailing list