Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script name in perl cgi script

Status
Not open for further replies.

jursetti

Programmer
Jun 20, 2002
7
US
I have several AIX 5.3 web servers. Some are running Apache 2.0.59 and others are running IBM HTTP Server 6.0.2, which equates to Apache 2.0.47. My perl 5.8.8 cgi scripts return just the script name with no path information from the perl $0 variable on the IBM HTTP 6.02/Apache 2.0.47 servers. But I'm getting the full path to the script when I running on the Apache 2.0.59 server.

If I run the script outside of the web server on any of the servers, I get just the script name with no path information.

For example, if my cgi url is and my document root is /www, $0 returns my_script.cgi on the IBM HTTP 6.0.2/Apache2.0.47 server and / on the Apache 2.0.59 server.

If I run my_script.cgi from the command line, $0 always returns my_script.cgi.

I will be switching all of my servers over to Apache 2.0.59 in the near future.

Could this be a configuration issue or is something else going on here? BTW, I'm posting this on the perl forum, too.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top