php socket_create调用有关问题

WBOY
Release: 2016-06-13 10:09:25
Original
1420 people have browsed it

php socket_create调用问题
系统是WIN2003、IIS+PHP+DZ(php5isapi.dll)搭建的环境.

DZX2的论坛完全没问题,但是我手动运行php xxx.php文件时提示socket_create调用失败

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->D:\host\php>php-cgi.exe D:\Host\php\cross.phpX-Powered-By: PHP/5.2.5Content-type: text/html<br><b>Fatal error</b>:  Call to undefined function socket_create() in <b>D:\host\pp\cross.php</b> on line <b>66</b><br>Error in my_thread_global_end(): 1 threads didn't exitD:\host\php>
Copy after login


PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->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>
Copy after login


确定php.ini中开启,并且DLL已经全部拷贝到SYSTEM32了,我在IIS里运行phpinfo时效果:



求达人解答,不盛感激!

------解决方案--------------------
phpinfo 显示的是web 的配置环境. 而你的是命令行,修改系统环境里的路径到现在的php路径一致一般就可以解决问题了.
------解决方案--------------------
D:\host\php>php.exe cross.php 将使用与 php.exe 处于同一目录下的 php.ini

如果你的 php 是绿色安装的,那么不会出现问题
但你“DLL已经全部拷贝到SYSTEM32了”,显然不是绿色安装的
------解决方案--------------------
复制回来
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!