Bluehost.com Web Hosting $6.95

popen and pclose. Something changed in 4.4.2 !

This is a discussion on popen and pclose. Something changed in 4.4.2 ! within the PHP General forums, part of the PHP Programming Forums category; Greetings! I was using popen and pclose on a previous version of PHP on Windows with an older version of ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-12-2006
venkymadurai@googlemail.com
 
Posts: n/a
Default popen and pclose. Something changed in 4.4.2 !

Greetings!

I was using popen and pclose on a previous version of PHP on Windows
with an older version of Apache (2.x). ( I think it was 4.4.1 but will
need to check as i am not sure).

pclose(popen("start " . $exe . " " . $args, "r"))

Where $exe is my path to the batch file and $args are the arguments for
the batch file. The batch file, in turn calls other batch files on a
shared folder on a different PC

On Windows, it would open up the dos window and run commands there and
exit and the PHP script that called the pclose would terminate loading
on the users' browsers.

Now, with PHP 4.4.2, the pclose and popen send the tasks to the
background and the dos window does not show up! As a result, killing
the dos process is not possible (i get access denied in windows...) and
the users cannot see the dos window when it runs.

I would like the php script to send the commands to a dos window, and
the php script to finish executing. I tried passthru, system, exec and
proc_open... and none of them work. None of them bring up the dos
window.

Please help!


Regards


Venkat

Reply With Quote
  #2 (permalink)  
Old 06-21-2006
venkymadurai@googlemail.com
 
Posts: n/a
Default Re: popen and pclose. Something changed in 4.4.2 !

Works now...

Allow Apache service in windows "to interact with the desktop" !

Rgds

Venkat
venkymadurai@googlemail.com wrote:
> Greetings!
>
> I was using popen and pclose on a previous version of PHP on Windows
> with an older version of Apache (2.x). ( I think it was 4.4.1 but will
> need to check as i am not sure).
>
> pclose(popen("start " . $exe . " " . $args, "r"))
>
> Where $exe is my path to the batch file and $args are the arguments for
> the batch file. The batch file, in turn calls other batch files on a
> shared folder on a different PC
>
> On Windows, it would open up the dos window and run commands there and
> exit and the PHP script that called the pclose would terminate loading
> on the users' browsers.
>
> Now, with PHP 4.4.2, the pclose and popen send the tasks to the
> background and the dos window does not show up! As a result, killing
> the dos process is not possible (i get access denied in windows...) and
> the users cannot see the dos window when it runs.
>
> I would like the php script to send the commands to a dos window, and
> the php script to finish executing. I tried passthru, system, exec and
> proc_open... and none of them work. None of them bring up the dos
> window.
>
> Please help!
>
>
> Regards
>
>
> Venkat


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 05:00 PM.


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