<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19222">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>DD</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>*/5 * * * * curl -s <A 
href="http://yourlocal.domain.com/phpscripts/index.php?your_unique_query">http://yourlocal.domain.com/phpscripts/index.php?your_unique_query</A></FONT></DIV>
<DIV><FONT size=2 face=Arial>curl -s will run a web php script using crontab for 
a user php script on a 5106r as root haven't tested it as used in a user 
cron..</FONT></DIV>
<DIV><FONT size=2 face=Arial>if it works over the web in a browser it should 
work when the server reads it over the web.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>David Hahn</FONT></DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, April 27, 2012 11:15 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [BlueOnyx:10382] Re: 
  open_basedir restriction in effect.</DIV>
  <DIV><BR></DIV>Oh!  I think I see what you're trying to do.  You 
  want to run a PHP script from the command-line.  <BR><BR>But I don't 
  think you can do that.  You must have a "interpreter" to run a script in 
  a particular language, and I believe that in PHP - the interpreter is built 
  into Apache.  Without that interpreter (as from the command-line) - it 
  won't run.  I don't think you can simply call a PHP script from the 
  command-line and get it to run.  Can any of you experts out there expand 
  on this further?  Can you call a PHP script from the command-line? 
  <BR><BR>Dick, you may have to consider rewriting that script in something else 
  like Perl to get it to run.  Or you might try a off-hand trick, like 
  calling that PHP script from the command-line using a command-line browser 
  like Lynx.  <BR><BR>Give that a try - see if you can get Lynx to run that 
  PHP script, so you can keep it in PHP.  If that works from the CL, put 
  Lynx into the cron job calling that PHP script.  And you might even pipe 
  the Lynx output to a text file with the date, to have a record of running that 
  PHP script each day. <BR><BR>Good luck. <BR><BR><BR>Chuck <BR><BR><BR><FONT 
  size=2><B>---------- Original Message -----------</B> <BR>From: "DD" 
  <bqlist@distortal.com> <BR>To: "'BlueOnyx General Mailing List'" 
  <blueonyx@mail.blueonyx.it> <BR>Sent: Fri, 27 Apr 2012 23:08:00 +0100 
  <BR>Subject: [BlueOnyx:10378] Re: open_basedir restriction in effect. 
  <BR><BR>> Hi all. My apologies for bugging you on a weekend :( <BR>> 
  <BR>> I still seem to be getting no further. To recap: <BR>> <BR>> 
      I want to run a PHP script via crontab. The entry in 
  /etc/crontab <BR>> is: <BR>>     12,42  * * * * 
  root php /home/.sites/70/site4/update_products.php <BR>> <BR>> 
  update_products.php contains: <BR>> <BR>> 
      $fn="/home/.sites/70/site4/product_list.csv"; <BR>> 
      if(file_exists($fn)) { ... } <BR>> <BR>> The 
  file is uploaded via FTP from an AS400 somewhere. If found, it should be 
  <BR>> parsed, then deleted. <BR>> <BR>> Whenever I try to run this 
  through the shell, with "php <BR>> 
  /home/.site/70/site7/update_products.php" I get an error: <BR>> <BR>> 
      PHP Warning:  file_exists(): open_basedir 
  restriction in effect. <BR>> 
      File(/home/.sites/70/site4/product_list.csv) is not 
  within the <BR>>     allowed path(s): 
  (/tmp/:/var/lib/php/session/:/usr/sausalito/ <BR>> 
      configs/php/) in 
  /home/.sites/70/site4/update_products.php <BR>>     on 
  line 10 <BR>> <BR>> I am logged in as admin and use su to become root. 
   I get this error even if <BR>> I copy the file to /web/. However I 
  *can* run the file by browsing to <BR>> 
  http://<domain>/update_products.php <BR>> <BR>> All files and the 
  /site4/ folder are owned by a username of the site. The <BR>> only thing 
  out of the ordinary is that the host name is 'upload', not www. <BR>> 
  <BR>> This is on 5108R, fresh install, no other packages added. It also 
  used to <BR>> work on the server that was reimaged recently, a 2009 install 
  that was <BR>> otherwise up to date. <BR>> <BR>> Any ideas? <BR>> 
  <BR>> Dick <BR>> <BR>> -----Original Message----- <BR>> From: 
  blueonyx-bounces@mail.blueonyx.it <BR>> 
  [mailto:blueonyx-bounces@mail.blueonyx.it] On Behalf Of Michael Stauber 
  <BR>> Sent: 27 April 2012 19:16 <BR>> To: BlueOnyx General Mailing List 
  <BR>> Subject: [BlueOnyx:10372] Re: open_basedir restriction in effect. 
  <BR>> <BR>> Hi DD, <BR>> <BR>> > It looks like 
  /tmp/:/var/lib/php/session/:/usr/sausalito/configs/php/ is <BR>> > being 
  appended to the lists of approved paths no matter what. <BR>> <BR>> Yes, 
  that is correct. Because the above are "must have" items. They (and the 
  <BR>> <BR>> path to the Vsite in question) will always be filled in 
  automatically. <BR>> <BR>> To that add a ':/'. That's a semicolon and a 
  slash. That will add '/' to <BR>> your <BR>> path as well and grants 
  access to anything everywhere. PROVIDED that the <BR>> file <BR>> that 
  the script wants to access is in a readable directory and that the <BR>> 
  script <BR>> has sufficient permissions to access said file. So please also 
  check the <BR>> ownership and permissions of your product_list.csv and the 
  directory that it <BR>> <BR>> resides in. <BR>> <BR>> -- <BR>> 
  With best regards <BR>> <BR>> Michael Stauber <BR>> 
  _______________________________________________ <BR>> Blueonyx mailing list 
  <BR>> Blueonyx@mail.blueonyx.it <BR>> <A 
  href="http://mail.blueonyx.it/mailman/listinfo/blueonyx" 
  target=_blank>http://mail.blueonyx.it/mailman/listinfo/blueonyx</A> <BR>> 
  <BR>> _______________________________________________ <BR>> Blueonyx 
  mailing list <BR>> Blueonyx@mail.blueonyx.it <BR>> <A 
  href="http://mail.blueonyx.it/mailman/listinfo/blueonyx" 
  target=_blank>http://mail.blueonyx.it/mailman/listinfo/blueonyx</A> 
  <BR><B>------- End of Original Message -------</B> <BR></FONT>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>Blueonyx mailing 
  list<BR>Blueonyx@mail.blueonyx.it<BR>http://mail.blueonyx.it/mailman/listinfo/blueonyx<BR></BLOCKQUOTE></BODY></HTML>