any time I need to change directories for whatever reason - I&#39;ve found that it&#39;s best practice to:<br><br>use strict;<br>use File::Basename;<br>use File::Spec::Functions;<br>use FindBin;<br><br>also, keep in mind - you didn&#39;t check the return value from your chdir. I think you&#39;d be better off with absolute paths if you could swing it. you also should assume your environment is blanked out, so your cgi will not have the environment that apache does, per se. with your system call, use absolute paths for the php program as well. AND make sure you can run php from the shell. eg. system(/usr/bin/php /path/to/file/plant1.php&#39;)<br>

<br>good luck<br>-nw<br>
<br><div class="gmail_quote">On Wed, Oct 6, 2010 at 5:45 AM, Joel Fentin <span dir="ltr">&lt;<a href="mailto:joel@fentin.com">joel@fentin.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

I have been attempting to test/run a slideshow program. The program must be run from a Perl program.<br>
<br>
+ First note that plant1.php works. See it here:<br>
<a href="http://calscape.com/Raja99/plant1.php" target="_blank">http://calscape.com/Raja99/plant1.php</a><br>
<br>
+ I wrote a Perl script to run plant1.php. You can run it at:<br>
<a href="http://www.calscape.com/cgi-bin/Admin/Raja99A.pl" target="_blank">http://www.calscape.com/cgi-bin/Admin/Raja99A.pl</a>.<br>
It doesn&#39;t work. Note the error message.<br>
<br>
+ The operative code lines:<br>
print &quot;Content-type: text/html\n\n&quot;;<br>
chdir &#39;../../Raja99/&#39;;<br>
system(&#39;./plant1.php&#39;);<br>
<br>
<br>
I hope sombody knows what is happening and can help.<br>
Thank you.<br><font color="#888888">
<br>
-- <br>
Joel Fentin       tel: 760-749-8863<br>
Biz Website:      <a href="http://fentin.com" target="_blank">http://fentin.com</a><br>
Personal Website: <a href="http://fentin.com/me" target="_blank">http://fentin.com/me</a><br>
_______________________________________________<br>
San-Diego-pm mailing list<br>
<a href="mailto:San-Diego-pm@pm.org" target="_blank">San-Diego-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/san-diego-pm" target="_blank">http://mail.pm.org/mailman/listinfo/san-diego-pm</a><br>
</font></blockquote></div><br>