I asked what kind because some perl scripts require information from Apache. Using the passthru(), the perl script won't have access to the Apache environment. In this case, it shouldn't be a problem.
Mark Hensler
If there is no answer on Google, then there is no question.
Earlier befor i moved on to php i was using SSI on the same server, i couldnt exec a perl or php script. When i used php i can exec php scripts but still not perl scripts... any ideaS?
SSI has nothing to do with PHP or the functionality of the Perl script.
We keep questioning you as to the functionality of the Perl script...
Have you tested it in a terminal? Does it work?
Have you tried to run other Perl scripts? Have any of those been successful?
Mark Hensler
If there is no answer on Google, then there is no question.
That didn't answer any of my questions. I don't care what you had working on another server.
Paths change between servers. Have you made sure that the script is properly configured for use on your current server?
Have you tested this perl script from a terminal on your current server? Did it work?
Have you tested any other perl scripts on your current server? Have any of those worked?
Mark Hensler
If there is no answer on Google, then there is no question.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.
Mark Hensler posted this at 04:03 — 24th June 2003.
He has: 4,048 posts
Joined: Aug 2000
What kind of perl script?
You could try using passthru().
mohd posted this at 18:05 — 24th June 2003.
They have: 101 posts
Joined: Apr 2003
a .pl one?
mohd posted this at 18:32 — 24th June 2003.
They have: 101 posts
Joined: Apr 2003
the program can be found here:
http://www.scriptarchive.com/ssi_image.html
Mark Hensler posted this at 21:07 — 24th June 2003.
He has: 4,048 posts
Joined: Aug 2000
Ya, try passthru().
I asked what kind because some perl scripts require information from Apache. Using the passthru(), the perl script won't have access to the Apache environment. In this case, it shouldn't be a problem.
Mark Hensler
If there is no answer on Google, then there is no question.
mohd posted this at 22:44 — 24th June 2003.
They have: 101 posts
Joined: Apr 2003
dosen't work
i tried it...
ROB posted this at 00:36 — 25th June 2003.
They have: 447 posts
Joined: Oct 1999
try passthru('/usr/local/perl /full/path/to/script.pl');
if that doesnt work try to execute it from a shell and see if the script is working.
mohd posted this at 17:28 — 25th June 2003.
They have: 101 posts
Joined: Apr 2003
oh i used double quotes " is taht okay or single quote it?
ROB posted this at 17:39 — 25th June 2003.
They have: 447 posts
Joined: Oct 1999
although you *should* only use double quotes if your string contains variables, it should work either way.
mohd posted this at 04:09 — 26th June 2003.
They have: 101 posts
Joined: Apr 2003
didn't work.
Earlier befor i moved on to php i was using SSI on the same server, i couldnt exec a perl or php script. When i used php i can exec php scripts but still not perl scripts... any ideaS?
ROB posted this at 16:57 — 26th June 2003.
They have: 447 posts
Joined: Oct 1999
oh duh, perl is at /usr/bin/perl (not /usr/local/perl). my bad.
try passthru('/usr/bin/perl /full/path/to/script.pl');
and make sure perl is actually there, sometimes it's at /usr/local/bin/perl
to test perl from php you can make a test script like so:
<?php
<pre>
echo `/usr/bin/perl -v`;
</pre>
?>
you should get something like this: http://anglerschat.com/test.php
mohd posted this at 23:30 — 26th June 2003.
They have: 101 posts
Joined: Apr 2003
tried:
passthru('/usr/bin/perl/public_html/cgi-bin/script.pl');
Dosent work!!
and yeah i get a similar test page to the link you provided me with
ROB posted this at 03:01 — 27th June 2003.
They have: 447 posts
Joined: Oct 1999
oh, you need a space in there between the path to perl and the path to the script
passthru('/usr/bin/perl /public_html/cgi-bin/script.pl');
mohd posted this at 02:01 — 28th June 2003.
They have: 101 posts
Joined: Apr 2003
k i will try thanks
mohd posted this at 02:07 — 28th June 2003.
They have: 101 posts
Joined: Apr 2003
Nope!!!!!!!
ROB posted this at 05:13 — 28th June 2003.
They have: 447 posts
Joined: Oct 1999
well i'd guess this script doesnt work. does it work from a shell?
or you can try:
<?php
echo `/usr/bin/perl /public_html/cgi-bin/script.pl`;
?>
and see if it's spitting out any errors.
Mark Hensler posted this at 08:26 — 28th June 2003.
He has: 4,048 posts
Joined: Aug 2000
You need the full system path to the file.
passthru('/usr/bin/perl '.$DOCUMENT_ROOT.'/public_html/cgi-bin/script.pl');
mohd posted this at 20:02 — 28th June 2003.
They have: 101 posts
Joined: Apr 2003
Still dosent work.. remember i told you previously tha ti had a problem with SSI includes executing perl/php scripts
So i used php and php includes can exec php scripts but not perl
Suzanne posted this at 20:40 — 28th June 2003.
She has: 5,507 posts
Joined: Feb 2000
is SSI enabled on your server?
is the perl script reasonable to rewrite in php?
Mark Hensler posted this at 05:25 — 29th June 2003.
He has: 4,048 posts
Joined: Aug 2000
Are you sure you have the script configured properly?
mohd posted this at 07:05 — 29th June 2003.
They have: 101 posts
Joined: Apr 2003
yup
I got ssi enabled buy i cant execute stuff
Mark Hensler posted this at 07:18 — 30th June 2003.
He has: 4,048 posts
Joined: Aug 2000
SSI has nothing to do with PHP or the functionality of the Perl script.
We keep questioning you as to the functionality of the Perl script...
Have you tested it in a terminal? Does it work?
Have you tried to run other Perl scripts? Have any of those been successful?
Mark Hensler
If there is no answer on Google, then there is no question.
mohd posted this at 17:58 — 30th June 2003.
They have: 101 posts
Joined: Apr 2003
I had it work befor on a free netfirms server using SSI, but i cant get it to work here using SSI or php
Mark Hensler posted this at 18:17 — 30th June 2003.
He has: 4,048 posts
Joined: Aug 2000
That didn't answer any of my questions. I don't care what you had working on another server.
Paths change between servers. Have you made sure that the script is properly configured for use on your current server?
Have you tested this perl script from a terminal on your current server? Did it work?
Have you tested any other perl scripts on your current server? Have any of those worked?
Mark Hensler
If there is no answer on Google, then there is no question.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.