local php scripts in windows

Just starting out? Need help? Post your questions and find answers here.
Motu
Posts: 17
Joined: Fri Feb 12, 2016 2:07 pm

local php scripts in windows

Post by Motu »

when you have php files on your local disc under windows and try to load them with the HTTPRequest command you get a 500 (Internal Server Error) in the browser.
Shouldn't Spiderbasic tread local php file as flat text? Renaming the files to txt does not result in server errors.
Fred
Site Admin
Posts: 1820
Joined: Mon Feb 24, 2014 10:51 am

Re: local php scripts in windows

Post by Fred »

It's not spiderbasic which handle these files, it's sbmongoose, the small webserver shipped with SB. It doesn't handle php natively, so I think it's why you get the error. It's a serverside error, not a SpiderBasic error.
User avatar
Peter
Posts: 1197
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1:9080
Contact:

Re: local php scripts in windows

Post by Peter »

@Fred: As far as i know mongoose can handle php (via CGI) in principle. See: https://www.dokuwiki.org/install:mongoose. Or am i wrong?

Greetings ... Peter
Motu
Posts: 17
Joined: Fri Feb 12, 2016 2:07 pm

thanks

Post by Motu »

thanks for the reply,
I finaly got it to work - i installed wamp on the system and added the php path to the header of the php file:

Code: Select all

#!C:\wamp64\bin\php\php5.6.16\php.exe
<?php

echo "Content-Type: text/html";
echo "\r\n";
echo "\r\n";
?>
maybe that information should be added somewhere :-)
Post Reply