[PHP] Re: Re [PHP] cURL in an exec() . more. SOLVED

2002-07-03 Thread Scott Fletcher

Ha ha!  Just what I mentioned from above.  FULL PATH!  :-)  FletchSOD

Jay Blanchard [EMAIL PROTECTED] wrote in message
003201c222ac$9760ad90$8102a8c0@niigziuo4ohhdt">news:003201c222ac$9760ad90$8102a8c0@niigziuo4ohhdt...
 It's always the smallest things that will get you, I should be slapped
 (preferably by a good looking woman) :) 

 exec was not broken
 the permissions don't have to be mucked with
 ownership and group can be left alone
 this should be stamped on the forehead of each and every PHP developer

 USE FULL PATHS!

 $bash = #!/bin/sh;
 $curl = /usr/local/bin/curl -d
 \name=mynamepassword=mypasswordbtnsubmit=submit\ -s -o cdrlist.html
 https://theserver.com/download/list.html;;
 $sh = fopen(/var/www/htdocs/rcr/getlist.sh, w+);
fputs($sh, $bash.\n\n);
fputs($sh, $curl);
 fclose($sh);
 chmod(/var/www/htdocs/rcr/getlist.sh, 0755);
 exec(/var/www/htdocs/rcr/getlist.sh);

 This solved all of the problems. I did the full paths thing during the
 process of elimination, to remove all doubt about the code. This will make
 sure that the script can be found and executed.

 On another note;

 Had I done this with exec and the cURL statement earlier it would have
 worked as well. But I think that i am going to keep it this way as it will
 hopefully make the code clearer. I will have to write more cURL statements
 later in the script and I can then assemble shell scripts as needed.

 Thanks for all of your help...

 Jay






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Re [PHP] cURL in an exec() . more. SOLVED

2002-07-03 Thread Scott Fletcher

:-)  I went through the same thing the first time!  Never again!  I just
pray and hope that I don't forget the next time!

Scott Fletcher [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Ha ha!  Just what I mentioned from above.  FULL PATH!  :-)  FletchSOD

 Jay Blanchard [EMAIL PROTECTED] wrote in message
 003201c222ac$9760ad90$8102a8c0@niigziuo4ohhdt">news:003201c222ac$9760ad90$8102a8c0@niigziuo4ohhdt...
  It's always the smallest things that will get you, I should be slapped
  (preferably by a good looking woman) :) 
 
  exec was not broken
  the permissions don't have to be mucked with
  ownership and group can be left alone
  this should be stamped on the forehead of each and every PHP developer
 
  USE FULL PATHS!
 
  $bash = #!/bin/sh;
  $curl = /usr/local/bin/curl -d
  \name=mynamepassword=mypasswordbtnsubmit=submit\ -s -o cdrlist.html
  https://theserver.com/download/list.html;;
  $sh = fopen(/var/www/htdocs/rcr/getlist.sh, w+);
 fputs($sh, $bash.\n\n);
 fputs($sh, $curl);
  fclose($sh);
  chmod(/var/www/htdocs/rcr/getlist.sh, 0755);
  exec(/var/www/htdocs/rcr/getlist.sh);
 
  This solved all of the problems. I did the full paths thing during the
  process of elimination, to remove all doubt about the code. This will
make
  sure that the script can be found and executed.
 
  On another note;
 
  Had I done this with exec and the cURL statement earlier it would have
  worked as well. But I think that i am going to keep it this way as it
will
  hopefully make the code clearer. I will have to write more cURL
statements
  later in the script and I can then assemble shell scripts as needed.
 
  Thanks for all of your help...
 
  Jay
 
 
 





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php