473,657 Members | 2,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

invoking perl script from a cgi script running in the browser

2 New Member
i have a perl cgi script named extracter.cgi which calls a perl script(remote.p l) that resides in the same directory(/var/www/cgi-bin).The program works when run in command line . But when extracter.cgi is run as a web program it does not invoke the remote.pl in the line: `perl -e ./remote.pl`.Do i have to set any permission for the browser. All the files in cgi-bin has been set to 777.
If any one knows plz tell me.
Thanks in advance.
Jun 1 '07 #1
1 1675
miller
1,089 Recognized Expert Top Contributor
Greetings tanzeem,

First of all, when running a script from a web browser, watch out for assumptions concerning the "current working directory". The easiest fix for this is to simply include the full explicit path when refering to remote.pl.

Secondly, when executing a perl script from another perl script, simply use "do". There are reasons why you should do it this way, but to put it simply, it's cleaner.

- Miller
Jun 1 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
7853
by: Jason Miles | last post by:
Hi, I wrote this little script to check to see if our Lotus Notes servers are running, and from the command line it works fine if I type perl notescheck.pl When I invoke the script from a web page I get an error: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.
5
1751
by: Hal Vaughan | last post by:
Is there a way to run a Perl script WITHOUT submitting a form? I want to be able to click an "update" button on a page and have it run a Perl script to update info, without changing the document in the browser. Is there any way to do that and leave the current page intact in the browser? Thanks! Hal
0
9738
by: Kirt Loki Dankmyer | last post by:
So, I download the latest "stable" tar for perl (5.8.7) and try to compile it on the Solaris 8 (SPARC) box that I administrate. I try all sorts of different switches, but I can't get it to compile. I need it to be compiled with threads. Anyone have any wisdom on how best to do this? Here's a transcript of my latest attempt. It's long; you might want to skip to the bottom, where I try "make" and the fatal errors start happening.
1
2458
by: daBearIsIn | last post by:
I am trying to work thru the book “Sams Teach Yourself CGI” and am having trouble running the first sample script. +++++++++++++++++++++++++++ #!C:\ProgramFiles\Perl\bin\perl use CGI; $query = new CGI; print $query->header;
3
4123
by: sir.linying | last post by:
My php script is to call perl scipt which makes use of Spreadsheet::ParseExcel module to parse Excel file. I am able to launch php script from command line so that perl script can run and properly parse Excel file. However, when I put php script on server side and then launch php through client request, perl program can't run. Anyone has any suggestion re how to fix this problem? Thanks a lot, -Ying
21
34385
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most obvious of which is the sharing of files. For example, you upload images to a server to share them with other people over the Internet. Perl comes ready equipped for uploading files via the CGI.pm module, which has long been a core module and allows users...
22
6020
by: owlice | last post by:
Greetings! I thought I'd add a little something to a web site, a "tip of the week," and wanted it automated so that if I get hit by a truck (or, more likely, am forgetful), the tip is updated automatically. I learned enough Perl (read: just enough) to code a script that does what I want it to do. Now the question is: how to get it to run automatically. I would like the program to be invoked when someone, anyone, hits my homepage. I...
5
2301
by: tudorbalan | last post by:
I'm a complete beginner in Perl.In fact... I just need a perl script to upload files to server without having to use html <input type="file"> tag. I found a script...it works when I run it in cmd ...but it doesn't work in browser(other simple scripts work ). It gives me an internal server error 500. I am using xampp and perl addon for xampp. I used the files upload1.php upload1.pl upload1.html from this example: ...
1
47445
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or “save“. I’m going to show you how to do that using a perl script. What You Need Any recent...
0
8837
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8512
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7347
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6175
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4171
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1969
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1732
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.