Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

php sockets/CLI question 1

Status
Not open for further replies.

wangbar

Programmer
Jul 23, 2001
1,906
GB
I've got a simple socket server script which I'm trying to run with PHP5 on win2000/IIS5 with no luck. I'm new to running things from the command line (and anything that isn't basic database interaction) to be honest and have a couple of questions:

1) I've uncommented the appropriate lines in the php.ini file to enable sockets and the extension shows up in my phpInfo page but I see this in many online tutorials: 'PHP binary must be compiled with --enable-sockets' - how do I do this? Is it a Unix thing?

2) How do I actually run a file from the command line? I have the php file in my webroot directory.

 
1. I don't understand this question. Where are you seeing this error?

2. You run a PHP script from the command line on Win32 by invoking the interpreter and passing it the name of the script:

c:\path\to\php.exe \path\to\script.php

Of course, if php.exe is in a directory that is part of your PATH environment variable, you won't need the full path to php.exe.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
1. It's not an error as such, just something I saw in a tutorial file as being a prerequisite for running sockets - turns out that everything works without it in this case...

2. Thanks - that's exactly what I was after.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top