webForumDet fria alternativet

Köra lokalt på en maskin med Windows 98

Webbservrar

27 svar · 782 visningar · startad av Sammy · sida 2 av 2

Frågan, av Sammy

Finns det något program (webserver) för att kunna köra cgi (-skript) lokalt på en maskin med Windows 98? Var isf hittar jag det programmet? \------------------ /Sammy Swärd

Läs frågan i sin helhet →
Medlem sedan maj 2000202 inlägg
#21

Nej tyvärr så fungerade inte det heller!

Fick meddelandet:

Det gick inte att köra skriptet /cgi-bin/counter.cgi: Win32 Felkod = 16389

Testade också att döpa om filen till counter.pl men då får jag samma meddelande?

Ska '#!/usr/bin/perl' i koden vara en annan kanske?

------------------
/Sammy Swärd

Medlem sedan feb. 20002 612 inlägg
#22

Det verkar som om det skulle vara enklare att ladda hem Sambar och köra med det istället....;)
eller så köper du en gammal, eller om du har, en 486 och lägger in Linux i den och kör den som en webbserver lokalt hemma. Funkar alldeles utmärkt.

Medlem sedan mars 2000475 inlägg
#23

testa med ett perl-skript du vet fungerar...

------------------
Micke & Annas Sajt
micke@micke-anna.nu

Medlem sedan maj 2000202 inlägg
#24

Rödalacket:

Sambar? Vad stöder det programmet? ASP? CGI? SSI? mer?

Mikael:

Hängde inte med på ditt sista inlägg?

------------------
/Sammy Swärd

Medlem sedan mars 2000475 inlägg
#25

testa med ett cgi/perl skript som du vet fungerar... det kan ju vara fel på ditt, eller?

annars vet jag tyvärr inte, jag är som sagt var inte någon hajare på perl

------------------
Micke & Annas Sajt
micke@micke-anna.nu

Medlem sedan maj 2000202 inlägg
#26

Har testat ett antal olika script men med samma resultat så det verkar inte vara scripten det är fel på utan något med PWS'n som inte stämmer?

------------------
/Sammy Swärd

Medlem sedan feb. 2000211 inlägg
#27

Sambar har stöd för delar av SSI, inte allt sist jag kollade på det. Vidare så har sambar perl med vid instalationen. Dock kan du inte körea PHP eller ASP mha av Sambar (kunde inte i 4,2 iaf)

När det gäller denna rad

Ska '#!/usr/bin/perl' i koden vara en annan kanske?

så verkar den inte stämma. Prova med att sätta den till #!perl eller till den fullständiga sökvägen till perl, dvs c:\minsökväg\perl.exe

Medlem sedan mars 2000475 inlägg
#28

följande hittade jag på microsofts hemsida (www.microsoft.com) artikel:
"FP2000: Using Perl with Microsoft Personal Web Server on Windows 95/98"
artikel id: Article ID: Q231998

SUMMARY
The third-party products discussed in this article are manufactured by vendors independent of Microsoft; we make no warranty, implied or otherwise, regarding these products' performance or reliability.

The following article describes setting up Microsoft Personal Web Server to utilize the Windows version of Perl. This will allow you to run Perl scripts on the Microsoft Personal Web Server.

The third-party products discussed in this article are manufactured by vendors independent of Microsoft; we make no warranty, implied or otherwise, regarding these products' performance or reliability.

This article also includes a sample Perl script that can be used to test the Perl engine on your computer.

MORE INFORMATION
WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT or Windows 2000, you should also update your Emergency Repair Disk (ERD).

How to configure the Microsoft Personal Web Server to use Perl
For security reasons, you do not want perl.exe to exist in any directory that can be browsed from other computers. With a script mapping in the registry, you can place the Perl.exe outside of the normal directory structure and avoid such security risks.
On the Start menu, click Run.

In the Open box, type "Regedit" without the quotation marks and click OK.

Open the following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC \Parameters\ScriptMap

On the Edit menu, point to New, and click String Value.

Name the value .pl and press Enter.

Select .pl, and click Modify on the Edit menu.

In the Value Data box, <the full path to perl.exe>\perl.exe %s %s

NOTE: The "%s %s" is case sensitive. (e.g. "%S %S" will not work).

Close the Registry Editor, and restart your computer.

How to create Perl script to test with
Create a file with Notepad, and type the following lines of code. Save the file as testing.pl in a folder in your web. Make sure this folder is marked executable.

In Notepad, type the following:
print "HTTP/1.0 200 OK\n";
print "Content-Type: text/html\n\n";

print "<HTML>\n";
print "<HEAD>\n";
print "<TITLE>Perl Test Page</TITLE>\n";
print "</HEAD>\n";
print "<BODY>\n";
print "<H3>This is a test to see if Perl is Working</H3>\n";
print "<P>\n";
print "<H5>If you can see this, Perl is properly configured</H5>\n";
print "</BODY>\n";
print "</HTML>\n";
How to test the script
To test the script, simply browse to the Perl script in Internet Explorer. For example, if you placed the testing.pl file in a folder named cgi-bin in your root web, you would type the following in the Internet Explorer address bar: http://localhost/cgi-bin/testing.pl

det är den artikeln jag följde, och det fungerar kanon hos mig. har pws installerat på en win98 maskin, kör både aspupload och jmail och perl...

------------------
Micke & Annas Sajt
micke@micke-anna.nu

262 ms totalt · 4 externa anrop · v20260731065814-full.a51de22e
128 ms — deklarationer (db)
0 ms — hämta statistik (cache)
131 ms — hämta tråd, inlägg och bilagor (db)
123 ms — ändringar (db)