![]() |
| HTML | PHP Scripts | Webmaster Tools | Webmaster Forums | Web Hosting | Domain Names | Webmaster Books |
|
|
#1 |
|
New User
Join Date: Jun 2010
Webmaster Discussions: 1
Rep Power: 2 ![]() |
perl not executing from PHP
I have a php module with the following:
<?php echo " <HTML> <HEAD> <TITLE>web Gallery</TITLE> </HEAD> <BODY> <P> web gallery "; exec("perl simple.pl"); echo " </p> </BODY> </HTML> "; ?> It never executes the perl program simple.pl If I run CMD it runs the program just fine?? I have a Win 7 system running following: Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 To the begining of the PATH variable I haave added C:\xampp\perl\bin;C:\Program Files\ImageMagick-6.6.2-Q16; These were installed with Xampp. Any help will be appreciated, I have some older php and perl modules that used to work (2006) with older Apache/PHP/Perl versions. but I am just getting back to them now. |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Apr 2007
Webmaster Discussions: 98
Rep Power: 27 ![]() ![]() ![]() ![]() ![]() ![]() |
Re: perl not executing from PHP
Hey,
Try adding the perl shebang to the beginning of the string. E.g. Code:
<?php
exec("/usr/bin/perl; perl simple.pl", $output);
echo implode($output);
?>
E.g. Code:
<?php $include_url = 'http://www.domain.com/simple.pl'; include($include_url); ?> |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Rate This Thread | |
|
|
Similar Webmaster Discussions
|
||||
| Thread | Webmaster Discussion Starter | Forum | Replies | Last Post |
| problem while executing perl script through browser | sptr | CGI Perl Forum | 0 | 06-18-2008 06:49 AM |
| Executing the PERL CGI Script | vicky_brsh | CGI Perl Forum | 1 | 07-28-2007 08:32 AM |
| Javascript executing perl? | Nongolf | Javascript Forum | 4 | 05-11-2007 01:21 PM |
| Executing program | sylvain | HTML Forum | 1 | 03-23-2002 02:07 AM |