[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-WebCGI] Okey..what next?




> >Now i have a perculilar thing happening. when i access the script though
the
> >submit button the results is
> >"The file you requested was not availible or does not exist."
> >Yet the little window i mentioned earlier opens in the background
> >"...machttp search appleEvents...."
>
> OK.  I think you have found not one but two more differences between
> Unix CGI scripting and Mac CGI scripting here, so continuing...

> >I made a mistake and deleted a ' in one of the lines and when i accessed
the
> >script though the submit button, i got a different error than not
found...it
> >said "bad name after www::. File ':vars.pl; line 12"
> >ANd when i put the ' back in.. it goes back to file not found.
>
> I think what you are getting is not an error message from the Web
> server, but an error message from MacPerl!  So, the two differences:
>
> 1) Under Unix, an error (standard error) found by perl is sent to a
> log file on the Web host computer; error_log by default if you are
> using Apache, for example.
>
>     Using the MacPerl CGI Script glue, standard error (Errors from
> MacPerl) get sent back as content so they appear on your web page.
> Personally, I prefer the MacPerl behavior, but this difference can be
> confusing.

So when i get the "file not found" it is akin to a 404 on the appache?
And when i get the "Bad Name" error , that is Macperl spitting out the error
message into the browser window instead of error log file on appache?

>
> 2) Different operating systems use different characters to separate
> directories (called folders on a Mac) the lie in the path to your
> file.  In your file vars.txt (vars.pl) you have:
>
> $index_db = '/cgi-bin/data/index.txt';
>
> I think that should be:
>
> $index_db = ':data:index.txt';
>
> ...assuming your CGI script is in cgi-bin

Yes it is in cgi-bin and i had already  changed that, but did not update the
txt files i put up for you to see...sorry.
I t made no difference..
I tried without the leading : and no difference.


> >I tried to access the mtsearch.cgi directly from the browser, and it does
> >something wierd and puts a copy of the cgi script on the the desktop
along
> >with a mtsearch.cgi.hqx file. ???
>
> This never works.  You always need a Web server to use a CGI.


Do i have a configuration problem with my browser or something...If i go to
http://10.0.0.0/cgi-bin/mtsearch.cgi (typed in address bar) i get message "a
cgi or interal server componet could not complete the reqested action."
If i go to http://10.0.0.0/cgi-bin (typed in address bar) then click the
file mtsearch.cgi it does that hqx file as mentioned above.
And if i run the script through the submit button i get the file not found.
 I don't understand that at all.

So i did a test and made your basic hello world script:
#!perl -w
print "Content-type: text/html\n\n";
print "Hello, world!\n";
Accessing that through http://10.0.0.0/cgi-bin/hello.cgi  worked and i see
just hte word "hello"
Accessing the cgi-bin then clicking hello.cgi give me the .HQX file on the
desktop.
At this time I noticed the address bar reads :
http://10.0.0.0/PNF:toBinhex:/cgi-bin/hello.cgi
When i am in the WebRoot (http://10.0.0.0) and i mouse over the links www or
cgi-bin the status bar reads http://10.0.0.0/PNF:byName:/cgi-bin or
http://10.0.0.0/PNF:byName:/www
Is that supposed to happen?

Sorry if i am ignorant on this, but this whole project is baffleing to me.


> :-)  I'll drop by the next time I'm in North Carolina.  Is this
> anywhere near Research Triangle Park?
>
I am in Asheville,  Western North Carolina, I believe the research Triangle
is in Chapel Hill, Durham, Raleigh. about 3-4 hours east of me.



==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org