Page 1 of 1

Executing php using the PHP Script Interpreter

Posted: Thu Dec 22, 2005 10:47 am
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

Posted: Thu Dec 22, 2005 12:05 pm
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

Posted: Thu Dec 22, 2005 12:09 pm
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/

Posted: Thu Dec 22, 2005 9:21 pm
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

Posted: Sat Dec 24, 2005 5:49 pm
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.

Posted: Mon Dec 26, 2005 5:47 pm
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