<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Or better still…<div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/usr/bin/php -c /etc/ -d open_basedir="" -f filename.php</span></div><div><br class=""></div><div>Doing this means no extra ini file to maintain :)</div><div><br class=""><blockquote type="cite" class=""><div class="">On 17 May 2018, at 11:35 pm, Dirk Estenfeld <<a href="mailto:dirk.estenfeld@blackpoint.de" class="">dirk.estenfeld@blackpoint.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hello Colin,<br class=""><br class="">if you are running suphp fort he site you can call<br class="">/path/to/php -c /home/sites/yoursite/php.ini /home/sites/yoursite/web/yourscript.php<br class="">Or you copy your general php.ini, disable open_basedir and call <br class="">/path/to/php -c /path/to/your/php.ini /home/sites/yoursite/web/yourscript.php<br class=""><br class="">Best regards,<br class="">Dirk<br class=""><br class="">---<br class=""><br class="">blackpoint GmbH – Friedberger Straße 106b – 61118 Bad Vilbel<br class=""><br class=""><br class="">-----Ursprüngliche Nachricht-----<br class="">Von: Blueonyx [<a href="mailto:blueonyx-bounces@mail.blueonyx.it" class="">mailto:blueonyx-bounces@mail.blueonyx.it</a>] Im Auftrag von Colin Jack<br class="">Gesendet: Donnerstag, 17. Mai 2018 11:52<br class="">An: BlueOnyx General Mailing List <<a href="mailto:blueonyx@mail.blueonyx.it" class="">blueonyx@mail.blueonyx.it</a>><br class="">Betreff: [BlueOnyx:22076] Advice please<br class=""><br class="">Bit of a noob question here ... ☹<br class=""><br class="">We have a client that needs to run some PHP scripts regularly using cron.<br class="">The scripts run fine from their website using a browser.<br class=""><br class="">Unfortunately when I try and run them from the CLI I get open_basedir errors amongst other things.<br class=""><br class="">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<br class=""><br class="">The script runs fine through apache - so open_basedir settings allow it, but how do I get this to run from the CLI. <br class="">Presume this is because it is not being run from within the site?<br class="">Add path to server php.ini?<br class=""><br class="">Slightly out of my depth here. <br class=""><br class="">Thanks<br class=""><br class="">Colin<br class=""><br class="">_______________________________________________<br class="">Blueonyx mailing list<br class=""><a href="mailto:Blueonyx@mail.blueonyx.it" class="">Blueonyx@mail.blueonyx.it</a><br class="">http://mail.blueonyx.it/mailman/listinfo/blueonyx<br class=""><br class="">_______________________________________________<br class="">Blueonyx mailing list<br class="">Blueonyx@mail.blueonyx.it<br class="">http://mail.blueonyx.it/mailman/listinfo/blueonyx<br class=""></div></div></blockquote></div><br class=""></div></body></html>