Phpsocket_create call problems

Source: Internet
Author: User
Phpsocket_create call problem system is WIN2003, IIS + PHP + DZ (php5isapi. dll. the DZX2 Forum is okay, but I am running phpxxx manually. PHPcodeD: hostphp>php-cgi.exe D: Hostphpcross. phpX-P php socket_create call problems
The system is an environment built by WIN2003, IIS + PHP + DZ (php5isapi. dll.

There is no problem with the DZX2 forum, but the socket_create call fails when I manually run the php xxx. php file.

PHP code
  D:\host\php>php-cgi.exe D:\Host\php\cross.phpX-Powered-By: PHP/5.2.5Content-type: text/html
Fatal error: Call to undefined function socket_create() in D:\host\pp\cross.php on line 66
Error in my_thread_global_end(): 1 threads didn't exitD:\host\php>


PHP code
  D:\host\php>php.exe cross.phpFatal error: Call to undefined function socket_create() in D:\host\php\cross.php on line 66D:\host\php>


Make sure that php. ini is enabled, and all the DLL files have been copied to SYSTEM32. if I run phpinfo in IIS, the effect is as follows:



Thank you for your answers!

------ Solution --------------------
Phpinfo shows the web configuration environment, while you are using the command line. modifying the paths in the system environment to the current php path can solve the problem.
------ Solution --------------------
D: \ host \ php> php.exe cross. php will use php. ini in the same directory as php.exe

If your php is installed in green, no problem will occur.
But you have copied all the DLL files to SYSTEM32, which is obviously not installed in green.
------ Solution --------------------
Copy back

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.