Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 19th, 2001, 05:01 PM
focus focus is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Luxembourg
Posts: 87 focus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 55 sec
Reputation Power: 9
calling a script on another server from within a script

Hi

This thing really foxes me.
I have a script on one server and I need to call an executable script on another server, effectively as an external sub-routine.
I have full access for setting permissions on both servers.

I tried :-
require "http://domain/cgi-binscript.pl";
and - of course - it failed ("Can't locate http://domain/cgi-bin/welcome.pl in @INC ... etc...")

Any ideas?
Or can anyone give me a word which exists in the Cookbook index so I can read up on it?

Thanks

Reply With Quote
  #2  
Old July 19th, 2001, 05:27 PM
dsb dsb is offline
PerlGuy
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2001
Posts: 714 dsb User rank is Sergeant Major (2000 - 5000 Reputation Level)dsb User rank is Sergeant Major (2000 - 5000 Reputation Level)dsb User rank is Sergeant Major (2000 - 5000 Reputation Level)dsb User rank is Sergeant Major (2000 - 5000 Reputation Level)dsb User rank is Sergeant Major (2000 - 5000 Reputation Level)dsb User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 2 Days 15 h 44 m 20 sec
Reputation Power: 36
Send a message via AIM to dsb
Code:
use lib '/path/to/script';
require script.pl;


You have to use a full path, not a URL.
__________________
- dsb -
Perl Guy

Reply With Quote
  #3  
Old July 19th, 2001, 05:50 PM
focus focus is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Luxembourg
Posts: 87 focus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 55 sec
Reputation Power: 9
Thanks dsb

I tried:-
-------------------------------------------
use lib 'mirror1.domain.com/usr/local/etc/httpd/cgi-bin/game.pl';
require "game.pl";
--------------------------------------------

and it just called the local version of game.pl

It's late here, so I can't see what it is I'm missing ....

Reply With Quote
  #4  
Old July 20th, 2001, 08:58 AM
Hero Zzyzzx's Avatar
Hero Zzyzzx Hero Zzyzzx is offline
11
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2001
Location: Lynn, MA
Posts: 4,635 Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 4 Days 23 h 44 m 19 sec
Reputation Power: 77
Send a message via AIM to Hero Zzyzzx
I'm not aware of an easy way to call another script the way you're trying to across a domain. If on *nix, you could map the remote drive to your local drive with nfs to have a local mount point, and then use that local mount point in the path for your require. Talk to your sysadmin about this.

Can you include the contents of the other script with an exec SSI in a static HTML file? I've never tried spanning a domain before with SSI.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > calling a script on another server from within a script


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT