| PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >> |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread |
|
|
#1 (permalink) |
|
php, wha?!
Comfy Contributor
Joined in Feb 2008
163 posts
Gave thanks: 4
Thanked 5 times
|
proc_open.... trying to execute a php file like an include()
The scenario is, I want to make proc_open() work like include().... I need to have access to all the variables like $_GET, $_POST, $_SERVER, $_REQUEST, $HTTP_SERVER_VARS, and what not. I don't want it to have any call back to the functions that I'm executing it from, I know that's an unlikely scenario to happen. I can't find any information on how apache does it.... at all... I think I might have to use "php -a" to make it happen, but I don't want to really do that.. Any help with this would be great.... Btw, before someone suggests using some other function, the reason I need to use proc_open(), is because I'm trying to emulate multi-threading.
Thanks in advanced. |
|
|
|
|
|
#2 (permalink) |
|
Surpass Developer
Excelling Contributor
Joined in Jan 2004
Lives in Florida
Hosted on decc.surpasshosting.com
511 posts
Gave thanks: 20
Thanked 78 times
|
the manpage for proc_open has an example which I believe is doing sort of what you need to do:
PHP: proc_open - Manual Check example #1. You can put $_GET,$_POST inside $env: PHP Code:
PHP Code:
![]()
__________________
Mark Surpass Hosting Developer sɹnoʎ uɐɥʇ ɹǝʇʇǝq sı bıs ʎɯ |
|
|
|
|
|
#3 (permalink) |
|
php, wha?!
Comfy Contributor
Joined in Feb 2008
163 posts
Gave thanks: 4
Thanked 5 times
|
I find everything that I put into $env to be unreliable. I've gotten only the first letter from everything I've had in my $_GET array before. I pretty much just came to the conclusion I need to figure out how to pass on the data that apache passes on to php, in the exact same way. Which, I can't read through C++, so I have no idea how this works, and no one else seems to either. I'm about to just give up and go ruby.
|
|
|
|