Hi all. My apologies for bugging you on a weekend :( I still seem to be getting no further. To recap:
I want to run a PHP script via crontab. The entry in /etc/crontab is: 12,42 * * * * root php /home/.sites/70/site4/update_products.php update_products.php contains: $fn="/home/.sites/70/site4/product_list.csv"; if(file_exists($fn)) { ... } The file is uploaded via FTP from an AS400 somewhere. If found, it should be parsed, then deleted. Whenever I try to run this through the shell, with "php /home/.site/70/site7/update_products.php" I get an error: PHP Warning: file_exists(): open_basedir restriction in effect. File(/home/.sites/70/site4/product_list.csv) is not within the allowed path(s): (/tmp/:/var/lib/php/session/:/usr/sausalito/ configs/php/) in /home/.sites/70/site4/update_products.php on line 10 I am logged in as admin and use su to become root. I get this error even if I copy the file to /web/. However I *can* run the file by browsing to http://<domain>/update_products.php All files and the /site4/ folder are owned by a username of the site. The only thing out of the ordinary is that the host name is 'upload', not www. This is on 5108R, fresh install, no other packages added. It also used to work on the server that was reimaged recently, a 2009 install that was otherwise up to date. Any ideas? Dick -----Original Message----- From: blueonyx-boun...@mail.blueonyx.it [mailto:blueonyx-boun...@mail.blueonyx.it] On Behalf Of Michael Stauber Sent: 27 April 2012 19:16 To: BlueOnyx General Mailing List Subject: [BlueOnyx:10372] Re: open_basedir restriction in effect. Hi DD, > It looks like /tmp/:/var/lib/php/session/:/usr/sausalito/configs/php/ is > being appended to the lists of approved paths no matter what. Yes, that is correct. Because the above are "must have" items. They (and the path to the Vsite in question) will always be filled in automatically. To that add a ':/'. That's a semicolon and a slash. That will add '/' to your path as well and grants access to anything everywhere. PROVIDED that the file that the script wants to access is in a readable directory and that the script has sufficient permissions to access said file. So please also check the ownership and permissions of your product_list.csv and the directory that it resides in. -- With best regards Michael Stauber _______________________________________________ Blueonyx mailing list Blueonyx@mail.blueonyx.it http://mail.blueonyx.it/mailman/listinfo/blueonyx _______________________________________________ Blueonyx mailing list Blueonyx@mail.blueonyx.it http://mail.blueonyx.it/mailman/listinfo/blueonyx