[San-Diego-pm] Running PHP slide show from Perl

Nicholas Wehr pm at bionikchickens.com
Wed Oct 6 10:17:53 PDT 2010

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')

good luck

On Wed, Oct 6, 2010 at 5:45 AM, Joel Fentin <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:
> http://calscape.com/Raja99/plant1.php
> + I wrote a Perl script to run plant1.php. You can run it at:
> http://www.calscape.com/cgi-bin/Admin/Raja99A.pl.
> It doesn't work. Note the error message.
> + The operative code lines:
> print "Content-type: text/html\n\n";
> chdir '../../Raja99/';
> system('./plant1.php');
> 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
> http://mail.pm.org/mailman/listinfo/san-diego-pm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/san-diego-pm/attachments/20101006/566448bf/attachment.html>

More information about the San-Diego-pm mailing list