[San-Diego-pm] Running PHP slide show from Perl
joel at fentin.com
Wed Oct 6 10:35:15 PDT 2010
On 10/6/2010 10:17 AM, Nicholas Wehr wrote:
> any time I need to change directories for whatever reason - I've
> found that it's best practice to:
> use strict;
> use File::Basename;
> use File::Spec::Functions;
> use FindBin;
> also, keep in mind - you didn't check the return value from your
> chdir. I think you'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')
Does the above assume the program was not found?
The error messages (two) both refer to code inside plant1.php.
A more fundamental question: Can you run php from system()?
> On Wed, Oct 6, 2010 at 5:45 AM, Joel Fentin <joel at fentin.com
> <mailto:joel at fentin.com>> wrote:
> I have been attempting to test/run a slideshow program. The
> program must be run from a Perl program.
> + First note that plant1.php works. See it here:
> + I wrote a Perl script to run plant1.php. You can run it at:
> It doesn't work. Note the error message.
> + The operative code lines:
> print "Content-type: text/html\n\n";
> chdir '../../Raja99/';
> I hope sombody knows what is happening and can help.
> Thank you.
> Joel Fentin tel: 760-749-8863
> Biz Website: http://fentin.com
> Personal Website: http://fentin.com/me
> San-Diego-pm mailing list
> San-Diego-pm at pm.org <mailto:San-Diego-pm at pm.org>
Joel Fentin tel: 760-749-8863
Biz Website: http://fentin.com
Personal Website: http://fentin.com/me
More information about the San-Diego-pm