At 14:46 4-9-2002, you wrote:
>Hi there, I'm re-designing a WORKING Perl script.. to combine 2 databases,
>2 sets of headers/footers (which the scripts include)..
>
>& just do 1 set of cgi scripts & use the sub-domain to determine which
>databases / Footers to use...
>
>QUESTION:
>
>Is there a way to add a 'subdomain' to 'localhost' ??
Edit:
/WINNT/system32/etc/hosts
Put in:
127.0.0.1 localhost localhost.localdomain
On the server itself.
Or:
127.0.0.1 localhost testserver.mydomain.lan
If you need it from a remote client - well - obviously that won't work and
be glad about that, cause that would be a major hole in TCP/IP.
>I'm having trouble with "Premature end of script headers" & I'm finding it
>VERY hard to determine where the problem is...
There's a real simple solution:
Make sure the syntax is correct, simply run it on the command line.
If the syntax is correct, than your problem, is that output is generated,
before a header is sent.
So - send a header, before doing anything else:
#!/perl/bin/perl
# Set a file-global, accessible from anywhere.
$::Debug=1;
if($::Debug)
{
print "Content-Type: text/html\n\n";
}
use ....
...
>as the script finds the subdomain name, I cant just use the 'localhost' to
>try & determine the error.. & when i upload to the ISP/.server - It
>doesnt tell me the "LINE NUMBER" where my scrupt actually started to print...
So - uncomment all prints :-)
>1) Can Sambar have 'subdomains' ?
>2) Is there a perl script/line I can use to FORCE the script to tell me
>what line number the error occured in ?
Other than overriding the print command, nope.
Overriding the print command is tricky - it has a very loose syntax.
-------------------------------------------------------
To unsubscribe please go to http://www.sambar.ch/list/