Executing php using the PHP Script Interpreter

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
eic09632
Forum Newbie
Posts: 2
Joined: Thu Dec 22, 2005 10:40 am

Executing php using the PHP Script Interpreter

Post by eic09632 »

Hi,

i'm trying to develop a simple http server. I have already accomplish to work with static webpages.
At the moment, i'trying to work with dynamic webpages developed with PHP.
I know that one way to do that is by executing functions using from a dll (php5ts.dll => PHP Script Interpreter).
This dll is present in the directory where PHP is installed.
The problem is that i can't find any documentation about this dll,
specifically, the function that allows the execution of scripts and the corresponding input parameters.
I would to know if anyone could tell me where i can found the documentation that i need.


Thanks for any help,

Pedro
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

This dll is present in the directory where PHP is installed.
Move this file to C:\Windows\System32 or C:\WINNT\System32 depending on your Windows version.
For Apache2 installation - http://www.php.net/manual/en/install.wi ... pache2.php
For Apache1 installation - http://www.php.net/manual/en/install.wi ... pache1.php
User avatar
Buddha443556
Forum Regular
Posts: 873
Joined: Fri Mar 19, 2004 1:51 pm

Post by Buddha443556 »

It sound like you want to add CGI, SAPI or ISAPI support. CGI support for PHP would probably be easiest to implement. But you shouldn't need to know the Zend API to implement any of them. Should ya? Uhg ... Too much Egg Nog. :oops:

http://cgi-spec.golux.com/
User avatar
trukfixer
Forum Contributor
Posts: 174
Joined: Fri May 21, 2004 3:14 pm
Location: Miami, Florida, USA

Post by trukfixer »

Umm I may have mis-read but I dont think either one of those answers is the answer he is looking for- he is trying to build his own webserver *NOT* apache , so he needs the documentation for how the .dll hooks into the server (or how the server passes data to the php .dll) I suspect he will find some clues by looking at apache, however, he needs the documentation for the dll file in order to build his webserver so that it will work *like* apache does, in order to integrate php with his webserver (like apache integrates php as the iSAPI ) . :)

I have no idea where to fins this information myself, so I cant help
User avatar
Buddha443556
Forum Regular
Posts: 873
Joined: Fri Mar 19, 2004 1:51 pm

Post by Buddha443556 »

Actually, I'm on the same page as you are Trukfixer.

Doesn't CGI use STDIN (and Command Line) and STDOUT to communicate between the server and the script? That should not require more than the PATH to the php.exe I would think?

I totally agree it would probably help to dig around the Apache (or even PHP) source code for ideas on how PHP is implement as a CGI or module.

The WWW Common Gateway Interface explains the data input and output between the server and script.
eic09632
Forum Newbie
Posts: 2
Joined: Thu Dec 22, 2005 10:40 am

Post by eic09632 »

Doesn't CGI use STDIN (and Command Line) and STDOUT to communicate between the server and the script? That should not require more than the PATH to the php.exe I would think?
I have already accomplish to execute a php script by using the command line. But, I would prefer to execute it by using a dll file.
By executing it through the command line, I have to change the php script. I can´t use the GET or POST array, for example, I
can´t have a variables like $_GET["name"] or $_POST["name"]. I have to change those variable to something like ARGV[0].
So, that would imply a moddification to a "normal" php script.

he needs the documentation for the dll file in order to build his webserver so that it will work *like* apache does
This is exactly what i need, but i can´t find it anywhere. :( HELP!!!!
If anyone knows where i can find this type of information, please post it. Thks.

I totally agree it would probably help to dig around the Apache (or even PHP) source code for ideas on how PHP is implement as a CGI or module.
I also agree. I have to take a deep look at the Apache source code.



Thks for helping. Any help is welcome.

Pedro
Post Reply