views:

47

answers:

1

I recently installed Zend Server CE but I can't get php-win to do anything. When I run a cmd script using the standard php call it works perfectly but any call using php-win just fails to do anything. No output; nothing.

For example:

php C:\path\to\script

The above works.

But the below doesn't do anything:

php-win c:\path\to\script

Any ideas?

A: 

Quoting from the PHP manual:

As of PHP 5, a new php-win.exe file is distributed. This is equal to the CLI version, except that php-win doesn't output anything and thus provides no console (no "dos box" appears on the screen). This behavior is similar to php-gtk. You should configure with --enable-cli-win32.

I.e. php-win is not supposed to produce output. It can do other things though - write to the disk, to the database, etc. So if you want to check it, write script like:

 <?php
 file_put_contents("a", "aaa");

and see if the file appears.

StasM