Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP Apache Increase Maximum Number of Concurrent Connections per Client
    primarykey
    data
    text
    <p>I would like to run dozens of long-running PHP scripts simultaneously, using XAMPP. Each script runs for more than 2 hours and does not use sessions, cookies, etc.</p> <p>For my first test run, I tried opening up 10 of these scripts on my browser, but only the first six that I opened actually began execution (I know this because at the beginning of each script, I immediately open up a file to write status updates there--nothing gets written from any of the scripts except the first 6).</p> <p>Is there a code I can put at the top of each script, or some PHP settings I can change, or any other ways I can make it so that I can simultaneously run as many PHP scripts as I want to?</p> <hr> <p><strong>EDIT Here is how to accomplish this:</strong></p> <p>1) Download PowerShell 2 (or the compatible version with your Windows version) from here: <a href="http://support.microsoft.com/kb/968929" rel="nofollow">http://support.microsoft.com/kb/968929</a><br></p> <p>2) Install it and restart your computer.<br></p> <p>3) Make a new file "example.ps1" and save it to a directory of your choice (e.g. c:\examples\example.ps1). Put this code in that file:</p> <pre><code>start-job {.\c:\xampp\php\php C:\xampp\htdocs\phpfiles\1.php} start-job {.\c:\xampp\php\php C:\xampp\htdocs\phpfiles\2.php} start-job {.\c:\xampp\php\php C:\xampp\htdocs\phpfiles\3.php} start-job {.\c:\xampp\php\php C:\xampp\htdocs\phpfiles\4.php} start-job {.\c:\xampp\php\php C:\xampp\htdocs\phpfiles\5.php} start-job {.\c:\xampp\php\php C:\xampp\htdocs\phpfiles\6.php} start-job {.\c:\xampp\php\php C:\xampp\htdocs\phpfiles\7.php} start-job {.\c:\xampp\php\php C:\xampp\htdocs\phpfiles\8.php} start-job {.\c:\xampp\php\php C:\xampp\htdocs\phpfiles\9.php} start-job {.\c:\xampp\php\php C:\xampp\htdocs\phpfiles\10.php} start-job {.\c:\xampp\php\php C:\xampp\htdocs\phpfiles\11.php} </code></pre> <p>4) Click on "Start" -> "Run" and type in "powershell" (without quotes).<br></p> <p>5) After PowerShell initiates, type in the following and press enter:</p> <pre><code>Set-ExecutionPolicy RemoteSigned </code></pre> <p>Then press "y" to set the changes.<br></p> <p>6) Now type in (make sure to enter in the full file path):</p> <pre><code>c:\examples\example.ps1 </code></pre> <p>7) To see your jobs simply type in:</p> <pre><code>get-job </code></pre> <p>To stop a job use this command:</p> <pre><code>stop-job JobName </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload