Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

half on my scripts didn't work once uploaded

by lepetitalbert (Abbot)
on Jan 21, 2006 at 22:56 UTC ( #524710=perlquestion: print w/replies, xml ) Need Help??

lepetitalbert has asked for the wisdom of the Perl Monks concerning the following question:

Hello dear monks,

I'm working on web site, pages are .shtml with several

<!--#include virtual="script.pl" -->

statements.

On my (windows)abyss server everything works, but when I upload to the IIS server, half on the scripts are just printed to the page.

I thought it was a ftp problem, so I played with the settings of smartftp, with no results.

I'm re-designing the site. The previous one has the same structure and I had no problem.

What am I doing wrong(again).

Have a nice day.

"There is only one good, namely knowledge, and only one evil, namely ignorance." Socrates

Replies are listed 'Best First'.
Re: half on my scripts didn't work once uploaded
by pileofrogs (Priest) on Jan 22, 2006 at 01:37 UTC

    When you say half the scripts are just printed on the page, is it the same script called multiple times or different scripts? Is it always the same scripts that don't work?

    If you're seeing the perl code, that means your server knows enough to include them, so SSI is working. If SSI was broken you'd see an empty spot where the include portion normally goes.

    It sounds like whatever mechanism tells your server when to interpret something as perl isn't kicking in. So concentrate on that. Does it key off the file name? Something in the file? Can you replace the includes that don't work with one that does? Try replacing the ones that don't work with a "hello world" script. The point is to reduce the complexity until you can see what's different between the ones that work and the ones that don't.

      Hello pileofrogs,

      I'll try your 'hello world' method.

      Thanks.

      Have a nice day.

      "There is only one good, namely knowledge, and only one evil, namely ignorance." Socrates
Re: half on my scripts didn't work once uploaded
by turo (Friar) on Jan 22, 2006 at 00:48 UTC

    one dull question: has your IIS support for perl scripting? ...

    cheers

    perl -Te 'print map { chr((ord)-((10,20,2,7)[$i++])) } split //,"turo"'

      Hello,

      Yes it has. As said half of the scripts work.

      have a nice day

      "There is only one good, namely knowledge, and only one evil, namely ignorance." Socrates
Re: half on my scripts didn't work once uploaded
by explorer (Chaplain) on Jan 21, 2006 at 23:11 UTC
    Check that you delete the output buffering with $|=1;

      hello,

      I've added '$|=1;' to my scripts. No change.

      Have a nice day.

      "There is only one good, namely knowledge, and only one evil, namely ignorance." Socrates
Re: half on my scripts didn't work once uploaded
by davido (Cardinal) on Jan 22, 2006 at 04:57 UTC

    Did you convert the line endings to match those expected by the IIS operating system? That could influence whether or not the shebang line gets interpreted correctly, and thus, whether or not the Perl interpreter is invoked as it should be.


    Dave

      sorry wrong button. 6am here !

      "There is only one good, namely knowledge, and only one evil, namely ignorance." Socrates

        Hello again dear Monks,

        NOTE : there's already a site (I wrote) running on the server.

        - Removed all <!--#include virtual="/script.pl" -->

        - added <!--#include virtual="/scr/title.pl" -->

        title.pl is a simple

        print qq~ html stuff ~

        OK

        - added footer.pl (same as title.pl). OK

        - added <!--#include virtual="/scr/menu.pl?file=menuservices.txt"  -->

        Got Error processing SSI file '/scr/menu.pl%3Ffile=menuaudits.txt'

        ?!? if I change to <!--#exec cgi="/scr/menu.pl?file=menuservices.txt"  -->, the menu appears and the footer is gone ??

        ?!? If I change all '#include virtual' to '#exec cgi' (I read that #exec doesn't work with params?), OK ?!?

        but then I have problems with the next script.

        Any suggestion is welcome.

        Remenber that everything works fine on my abyss server.

        The only diff I can see between the old and the new site, is that the old one didn't use CGI (I had only print qq~'s) and now I use CGI but only in 2 scripts ?!

        Hope it's understandable, sorry for my english.

        Thanks.

        Have a nice day.

        "There is only one good, namely knowledge, and only one evil, namely ignorance." Socrates
Re: half on my scripts didn't work once uploaded
by Anonymous Monk on Jan 22, 2006 at 04:18 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://524710]
Approved by Errto
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2020-10-25 00:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (248 votes). Check out past polls.

    Notices?