Hello All !
I'm looking for the right method to execute a .php with [popen] on
Windows (before, all works fine under OSX, i was using [ggee/shell]).
Here is what i do :
[ C:/wamp/bin/php/php5.2.6/php.exe -f C:/wamp/www/ADM/arbre.php 10 ( | [popen]
When i click on this message, Windows open a Command Prompt window
and close it immediately, but i receive nothing with Pd.
However, when i enter directely 'C:/wamp/bin/php/php5.2.6/php.exe -f
C:/wamp/www/ADM/arbre.php 10' in a Command Prompt window and press
'Enter', all works fine and Pd receive the datas.
Any Idea about my problem ?
Thanks. ++
Jack
Le mercredi 10 septembre 2008 à 18:16 +0200, Jack a écrit :
However, when i enter directely 'C:/wamp/bin/php/php5.2.6/php.exe -f
C:/wamp/www/ADM/arbre.php 10' in a Command Prompt window and press
'Enter', all works fine and Pd receive the datas.
it's hard to believe that cmd is able to read slashes like backslashes
however, I usually write a batch file and start the .bat file with popen, and problems goes away.
Le 10 sept. 08 à 19:01, patco a écrit :
Le mercredi 10 septembre 2008 à 18:16 +0200, Jack a écrit :
However, when i enter directely 'C:/wamp/bin/php/php5.2.6/php.exe -f C:/wamp/www/ADM/arbre.php 10' in a Command Prompt window and press 'Enter', all works fine and Pd receive the datas.
it's hard to believe that cmd is able to read slashes like backslashes
Yes, you are right, it was backslashes, i just do copy and paste
sorry ;)
How do you do to receive a variable in a .bat to send (in my exemple)
10 to 'arbre.php' ? (Pd send 10 to .bat then .bat send 10 to PHP).
Thanx
++
Jack
however, I usually write a batch file and start the .bat file with popen, and problems goes away.
you can add the variable to the filename, and get it with %1 %2 ... I guess you know how to send it to php, you can also use a socket for this and [netsend]
How do you do to receive a variable in a .bat to send (in my exemple)
10 to 'arbre.php' ? (Pd send 10 to .bat then .bat send 10 to PHP). Thanx ++Jack
however, I usually write a batch file and start the .bat file with popen, and problems goes away.
Thanks, but i try to start two .bat in the same time and it doesn't
work. So i decide to forget windows ;)
I read somewhere it is possible to do it with two .exe but i have not
enough time to test it.
++
Jack
Le 10 sept. 08 à 19:59, patco a écrit :
you can add the variable to the filename, and get it with %1 %2 ... I guess you know how to send it to php, you can also use a socket for
this and [netsend]How do you do to receive a variable in a .bat to send (in my exemple) 10 to 'arbre.php' ? (Pd send 10 to .bat then .bat send 10 to PHP). Thanx ++
Jack
however, I usually write a batch file and start the .bat file with popen, and problems goes away.
Hi,
Perhaps because I have CYGWIN installed, my [popen] accepted back slashes.
I wrote a script that ouputs ($argv[1] * 2) and sent it the following message. [php c:/phptest.php 10 <
results were good.
-- David Shimamoto
Le 10 sept. 08 à 19:01, patco a écrit :
Le mercredi 10 septembre 2008 à 18:16 +0200, Jack a écrit :
However, when i enter directely 'C:/wamp/bin/php/php5.2.6/php.exe -f C:/wamp/www/ADM/arbre.php 10' in a Command Prompt window and press 'Enter', all works fine and Pd receive the datas.
it's hard to believe that cmd is able to read slashes like backslashes
Yes, you are right, it was backslashes, i just do copy and paste
sorry ;) How do you do to receive a variable in a .bat to send (in my exemple)
10 to 'arbre.php' ? (Pd send 10 to .bat then .bat send 10 to PHP). Thanx ++Jack
however, I usually write a batch file and start the .bat file with popen, and problems goes away.
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hallo, patco hat gesagt: // patco wrote:
Le mercredi 10 septembre 2008 à 18:16 +0200, Jack a écrit :
However, when i enter directely 'C:/wamp/bin/php/php5.2.6/php.exe -f
C:/wamp/www/ADM/arbre.php 10' in a Command Prompt window and press
'Enter', all works fine and Pd receive the datas.it's hard to believe that cmd is able to read slashes like backslashes
I think, some implementations of popen can do that. Maybe the one attached written in pdlua works on MS-Windows, too (cannot check for lack of MS-Windows).
Frank