如何在WAMP上同时运行多个.PHP脚本?

如何在WAMP上同时运行多个.PHP脚本?,php,nginx,wamp,Php,Nginx,Wamp,我试图同时运行多个PHP脚本文件(在chrome浏览器中),但似乎WAMP限制了最多8个。允许8次以上的正确设置是什么? 是否可以像在NGINX中那样运行httpd.exe实例的多个worker?我认为您必须在apache配置中更改maxclients。您的配置必须具有以下内容: # prefork MPM # StartServers: number of server processes to start # MinSpareServers: minimum number of server

我试图同时运行多个PHP脚本文件(在chrome浏览器中),但似乎WAMP限制了最多8个。允许8次以上的正确设置是什么?
是否可以像在NGINX中那样运行httpd.exe实例的多个worker?

我认为您必须在apache配置中更改
maxclients
。您的配置必须具有以下内容:

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
    StartServers        5
    MinSpareServers     5
    MaxSpareServers     10
    MaxClients          150
    MaxRequestsPerChild 0
</IfModule>
#预工作MPM
#StartServers:要启动的服务器进程数
#MinSpareServers:保留备用的最小服务器进程数
#MaxSpareServers:保留备用的最大服务器进程数
#MaxClient:允许启动的最大服务器进程数
#MaxRequestsPerChild:服务器进程服务的最大请求数
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0

有关更多信息,请查看以下内容:

您遇到的问题可能与服务器无关,而与浏览器有关。浏览器只允许有限数量的同时连接到某个服务器,因此,如果您想克服这个限制,就必须使用不同的服务器

您可以在主机文件中这样做,使用不同的名称路由到同一主机,例如(为了清楚起见,在不同的行上):

现在你可以有8个连接到
server1.local
,8个连接到
server2.local
,等等

编辑:有关更多信息,请参阅。

转到:

<xampp_root>/xamppfiles/etc/httpd.conf
大于8。

因此,如果要增加每个用户的并发执行量,应打开:

session.auto_start
(您可以使用
phpinfo()
检查它是否打开)

或者在脚本内部(如果会话是独立启动的,例如:

session_start();
// do stuff, read vars etc...
session_write_close();

// do something that takes a long time....


session_start();
// now update sesson vars with the result

你说的多个脚本文件是什么意思?请更好地解释8个不同的php文件和多个循环(执行时间…千秒)在同一时间运行,并由Mostafa Shahverdy提供设置,但#Include/etc/extra/httpd-mpm.conf确实被注释了。。。
<xampp_root>/etc/extra/httpd-mpm.conf
MaxClients          150
session.auto_start
session_start();
// do stuff, read vars etc...
session_write_close();

// do something that takes a long time....


session_start();
// now update sesson vars with the result