Sorry for yet another question about the session upload_progress freature in PHP, but it has me stumped. I developed a prototype file upload facility on a Windows server and the progress feature worked just fine. But when I moved the prototype to our Linux server, it didn't work. The progress array never appears in the $_SESSION superglobal, though the files transfer without issue.
Here is the environment:
Here are the session variables:
Here are my core file transfer settings:
(I set the output_buffering parameter to match the setting on the Windows server where the upload progress worked. Initially, it had "no value" on the Linux server).
Here is the HTML that sets up the form:
<form name="UploadForm" id="UploadForm" method="post" enctype="multipart/form-data">
<input type="hidden" name="<?php echo ini_get('session.upload_progress.name');?>" id="<?php echo ini_get('session.upload_progress.name');?>" value="1" />
Enter a note to be sent along with your file:<br />
<textarea name="UploadNote" id="UploadNote" rows="5" cols="50"></textarea><br /><br />
<div style="border: thin solid black; padding: 10px;">
Choose the file you wish to transfer and then click the "Upload" button.
<input type="file" name="UploadFile" id="UploadFile" />
<br /><br /><input type="button" id="SubButton" value="Upload" onclick="submit_form('SU')" />
The PHP program to retrieve the uploaded file is launched in a hidden iframe. The status checking program is called every 1.5 seconds via jQuery/Ajax.
Like I said, the upload_progress code worked on a Windows server and was moved unchanged to the Linux server. Some of the things I've since checked:
I have to think there is some module that is part of the standard cPanel Apache build that is affecting the operation of the session.upload_progress feature. Does anyone have any suggestions of what to try? Thanks very much.
I know its an old thread but I'll leave this here for other coming across the same problem. It is indeed mod_security interfering with the session.upload. SecRequestBodyAccess needs to be set to Off for session.uploads to work. The reason being is that SecRequestBodyAccess buffers the page output so mod_security can process the page.