[BlueOnyx:22079] Re: Advice please

Dirk Estenfeld dirk.estenfeld at blackpoint.de
Thu May 17 08:35:40 -05 2018


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




More information about the Blueonyx mailing list