Need help for web server which executes PHP pages

[email protected] (melvin jose)
Newsgroups php.webmaster
Message-ID <[email protected]>
Sir,              I am creating a WEB SERVER in C which only executes PHP pages. Because I have created a website in PHP. 
So i need a webserver of my OWN. I know php provides a built in server. But this is for my study purpose.
I use php5-cgi script to execute(interpret) php script, by calling :  (execl("/usr/bin/php5-cgi", "php5-cgi", NULL);)
my problem i don't know how to maintain Session(PHPSESSID)/ COOKIE.
I get COOKIE:PHPSESSID=12334444444  from browser. But i don't know how to pass that to the PHP5-CGI .
To pass Query strings i used:    putenv("QUERY_STRING=");
But i don't see any ways or Documentations to pass COOKIES.
I asked everywhere in communities. But no one knows about it.
  Could you please help me. Any kind of information about a WEB SERVER is acceptable.
If you want am ready to send all my server code.
Link to full question: How to send COOKIE, PHPSESSID from my own webserver to php5-cgi script
|   |
|   |  |   |   |   |   |   |
| How to send COOKIE, PHPSESSID from my own webserver t...I am developing a Webserver in C. I know how to pass environment variables to ph5-cgi, eg: putenv("QUERY_STRING="); putenv("REQUEST_METHOD=GET"); putenv("RE... |
|  |
| View on stackoverflow.com | Preview by Yahoo |
|  |
|   |

  
  Hope fully,   Melvin Jose                        India
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.