Help, webmaster stuck in Iraq!

  • TheApostleWebmaster
  • Born
  • Born
  • TheApostleWebmaster
  • Posts: 2

Post 3+ Months Ago

Hello. I am a webmaster and am currently serving in Iraq under OIF.

Since I have limited contact to the internet, I had to download my site to my laptop (temporary closing down the site for security reasons) and will continue to finish the site (as a "project"). But, I cannot run cgi scripts from my laptop like they ran from the server.

I have apache and perl installed, and Im using WinXP. I was lucky to get perl and apache. Im not excatly sure how to set the paths (its not the same as setting them for a server) and Im either getting an error 500 msg or I see the source when trying to run the script.

I will post some samples of script in a few so you can view them. Help is appreciated. Thx alot!
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Scorpius
  • Proficient
  • Proficient
  • User avatar
  • Posts: 401
  • Loc: Scorpion Hole

Post 3+ Months Ago

Ok, well if you used a linux server before, your paths are probably different for your perl scripts. So you will probably have to open up the perl scripts you are using and change the path to perl, which is normally the first line on the script. That should be all you will have to do.
  • TheApostleWebmaster
  • Born
  • Born
  • TheApostleWebmaster
  • Posts: 2

Post 3+ Months Ago

It was hosted on Apache software, which I have now.
I feel like a newbie all over again. :?: :x

These are some of the problems:
When I run the scripts, I get either an error 500 (and I would think to chmod the script) or it would show the source.

I typed http://localhost/ in the brower (IE6.0) and "If you can see this, it means that the installation of the Apache web server software on this system was successful..."
I guess it was successfu; :>

Im running winxp. I didn't think chmod is necessary, and if it is, how do I chmod in win?

Also, what would my perl location usually be? The perl.exe file is located at C:\Perl\bin\perl.exe. What should the path be?
#!/usr/bin/perl, #!/usr/local/bin/perl, #!/Perl/bin, etc.

The help is greatly appreciated.
I hope Im not bothering ya with too many iritate questions.
Thx again!

Just addidional info:
ActivePerl 5.8.0
Perl.exe located in C:\Perl\bin

Apache HTTP Server 1.3.29
For Now-
Network Domain: localhost
Server Name: localhost
Installed to C:\Program Files\Apache Group\
  • Scorpius
  • Proficient
  • Proficient
  • User avatar
  • Posts: 401
  • Loc: Scorpion Hole

Post 3+ Months Ago

Ok well the perl path would be C:\Perl\bin\perl.exe, because all the other ones you listed were linux paths, which don't really name their drives unlike windows so you would have to put C:\Perl\bin\perl.exe for all of the paths in all of your scripts.
  • fiveladmin
  • Born
  • Born
  • fiveladmin
  • Posts: 1

Post 3+ Months Ago

in winders you dont need the #!/usr/bin/perl stuff
but you do need to make sure the script knows where it is
you also need to make sure cgi execution is enabled in your httpd.conf
to chmod in winblowz R-click->properties uncheck read only.
you may also have to assign an app to process the script, you can do this in folder options. if all you get still is the text check your http header, (also read your logs for hints) hope that helps ;)
  • AHaz
  • Graduate
  • Graduate
  • User avatar
  • Posts: 144
  • Loc: New York

Post 3+ Months Ago

Completely off topic...but, Thank you for fighting for another countries freedom while you could be here in a comfortable bed! it takes very courageous people to enter into a fight for other people and i just want to thank all of thos fighting for us overseas!!! My brother is in Kandahar and my uncle is somewhere in Iraq (we have no clue where even)
Thanks again
Alex Hazlett
  • this213
  • Guru
  • Guru
  • User avatar
  • Posts: 1260
  • Loc: ./

Post 3+ Months Ago

Actually, In Winblows you Do need the shebang if your cgi script's aren't registered in the Registry. It's an Apache thing, not a Windows thing. On my Win2K Servers, I use
#!/perl/bin/perl
Because Apache also likes *nux-like path names

You should also use forward slashes in your httpd.conf file, probably located at:
c:\program files\apache group\apache(v)\conf

Also in that file, you need to make sure you have your cgi-bin ScriptAliased properly and handled by the server, like so:
Code: [ Select ]
ScriptAlias /cgi-bin/ "C:/path/to/cgi-bin/"
<Directory "C:/path/to/cgi-bin">
  AllowOverride None
  Options +Includes
  Order allow,deny
  Allow from all
</Directory>

AddHandler cgi-script .cgi
  1. ScriptAlias /cgi-bin/ "C:/path/to/cgi-bin/"
  2. <Directory "C:/path/to/cgi-bin">
  3.   AllowOverride None
  4.   Options +Includes
  5.   Order allow,deny
  6.   Allow from all
  7. </Directory>
  8. AddHandler cgi-script .cgi

These statements, or something like them are probably already in your httpd.conf file, just open it in your favorite text editor and and Edit>Find "cgi-bin" and ".cgi" to find them

If you're trying to run scripts outside of your ScriptAliased directory, this will cause the code to be displayed instead of the server running the scripts. It best, for security, to leave this the way it is. However, if you want to make it possible to run scripts from any directory, find the "Options" statement to your document root, that's going to look alot like the "Directory" statement above but it says your path to your html files instead of your path to cgi-bin. Add ExecCGI to that statement. So you'd have:
Code: [ Select ]
<Directory C:/path/to/htdocs>
  Options +Includes ExecCGI
  Order allow,deny
  Allow from all
</Directory>
  1. <Directory C:/path/to/htdocs>
  2.   Options +Includes ExecCGI
  3.   Order allow,deny
  4.   Allow from all
  5. </Directory>


You also don't need to chmod in Winblows

HTH
This

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 51 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.