installing php to own webserver

This is a discussion on installing php to own webserver within the PHP Language forums, part of the PHP Programming Forums category; Hi currently i'm developing simple web server which support cgi with python in win32. and i started from python'...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-03-2004
bucket79
 
Posts: n/a
Default installing php to own webserver

Hi
currently i'm developing simple web server which support cgi with
python in win32.
and i started from python's basic library, CGIHTTPServer.
it support cgi but only for extension like .exe .py.
so now i just wanna add php extension
here's cgi handling schem of this webserver.
first it check requested file's extension. and then if it is 'py' then
it call's popen2('python requested-script'). now we can handle input
and output file descriptor of this process.

it's very simple :)
so i add some code for handling php likewise.
first i turned off the cgi.force_redirect.
and called popen2('python some-request-script') but it shows 'No input
file specified'
i tested this thing's in python's interactive interpreter in directly
then it shows right. let me show some code

>>> files = os.popen2("c:\\php\\php.exe c:\\test.php")
>>> files[1].read()

"Content-type: text/html\nX-Powered-By: PHP/4.3.5\n\nhere's php"

but when i run this code via http server, it seems like 'c:\\test.php'
doesn't passed to 'c:\\php\\php.exe'

i think php.exe waste it's stdin

how can i handle this problem?
any posting would be appreciated :)

ps.is there anyone who made supporting for php interpretion with own
web server? please let me show some example.
Reply With Quote
  #2 (permalink)  
Old 05-04-2004
bucket79
 
Posts: n/a
Default Re: installing php to own webserver

bucket79@daum.net (bucket79) wrote in message news:<95f72778.0405021848.1614240@posting.google.c om>...
> Hi
> currently i'm developing simple web server which support cgi with
> python in win32.
> and i started from python's basic library, CGIHTTPServer.
> it support cgi but only for extension like .exe .py.
> so now i just wanna add php extension
> here's cgi handling schem of this webserver.
> first it check requested file's extension. and then if it is 'py' then
> it call's popen2('python requested-script'). now we can handle input
> and output file descriptor of this process.
>
> it's very simple :)
> so i add some code for handling php likewise.
> first i turned off the cgi.force_redirect.
> and called popen2('python some-request-script') but it shows 'No input
> file specified'
> i tested this thing's in python's interactive interpreter in directly
> then it shows right. let me show some code
>
> >>> files = os.popen2("c:\\php\\php.exe c:\\test.php")
> >>> files[1].read()

> "Content-type: text/html\nX-Powered-By: PHP/4.3.5\n\nhere's php"
>
> but when i run this code via http server, it seems like 'c:\\test.php'
> doesn't passed to 'c:\\php\\php.exe'
>
> i think php.exe waste it's stdin
>
> how can i handle this problem?
> any posting would be appreciated :)
>
> ps.is there anyone who made supporting for php interpretion with own
> web server? please let me show some example.



i solved the problem by setting doc_root of php.ini.
i guess this is for security problem
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 08:49 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0