Resolving an unable to fork PHP warning in Windows
来源:互联网 发布:淘宝手机怎么开店认证 编辑:程序博客网 时间:2024/05/16 05:34
Symptoms
In Windows, when trying to execute a system callfrom a PHP script, you receive a warning like "Warning: system()[function.system]: Unable to fork". A related warning message is"Warning: shell_exec() [function.shell-exec]: Unable to execute"
Sample Code
<?php
// print output of shell command executed with backtick operator
print htmlentities(`dir`);
?>
Cause
The most likely cause is insufficient permissions to execute system calls in the web server environment.
Fix
You need to give the Internet Guest Account (a.k.a. IUSR_MachineName or simply IUSR) read and execute permission to the command shell program, cmd.exe
. Typically, permission to this file is explicitly denied as a security measure.
- Open Windows Explorer and browse to the
c:/windows/system32
orc:/winnt/system32
directory. - Right-click on
cmd.exe
, and select Properties.... - Click the Security tab. See image below.
- If Internet Guest Account is not already listed, then click Add, then Advanced..., then Find Now.
- Scroll down to and select IUSR_MachineName, where MachineName is the name of your computer.
- Click OK twice to return to the Security tab.
- Select Internet Guest Account and then click the box under Allow for Read & Execute.
- Click OK.
- Resolving an unable to fork PHP warning in Windows
- Resolving an unable to fork PHP warning in Windows
- PHP Warning: SQLite3::query(): unable to open database file in
- Warning: unable to open an initial console
- WARNING: Unable to open an initial console
- Warning: unable to open an initial console
- WARNING: Unable to open an initial console
- WARNING: Unable to open an initial console
- Warning: unable to open an initial console.
- PHP Warning: File upload error - unable to create a temporary file in Unknown on line 0
- ubuntu下遇到Warning: unable to open an initial console.
- PHP Warning: mssql_connect() Unable to connect to server
- PHP Warning: PHP Startup: Unable to load dynamic library
- PHP Warning: PHP Startup: redis: Unable to initialize module
- Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap"
- Cacti安装错误:Warning: exec(): Unable to fork [c:/rrdtool/rrdtool.exe] 已解决
- warning: unable to bind to property '' on class 'Object' (class is not an IEventDispatcher)
- warning: unable to bind to property '' on class '' (class is not an IEventDispatcher)
- 老紫竹JAVA基础培训(6),For循环语句的使用
- 今天出差去山东省劳动和社会保障厅
- 匆匆太匆匆
- Set up your own ClipBucket on windows
- CURL模拟访问网页
- Resolving an unable to fork PHP warning in Windows
- 第一篇博客
- c#实现单链表的操作
- 金牛组
- BMP文件头格式 表
- CRM 全屏的方法
- 本地客户端读取WebService中的DataSet
- Head First C# 中文版 图文皆译 第十一章 事件和代理 page498
- Gentoo Linux ALSA Guide