I have a drupal 7 site running on a Redhat shared hosting environment that uses zend php. I am having problems with file upload on content types and webforms that accepts various file types up to 300MB. I have modified the server’s php upload limit through the php.ini file, and can confirm that the limit is raised through
phpinfo() and the drupal status report that
post post_max_size and
upload_max_filesize. I believe this is a server configuration error because the site functions as expected on both my ubuntu development machine and test server, so the only possibility is with the settings on the shared redhat server environment.
The errors occur when I try to upload files in the 30-80 MB range, either to my content type or through the webform. In either case when a file is uploaded the request takes an abnormally long time and then fails with the following errors:
An AJAX HTTP request terminated abnormally. Debugging information follows. Path: /file/ajax/field_training_materials/und/form-_TZM0uXFQeo35YReaxuUjeHprp2tr192kNHTucXffSM StatusText: n/a ResponseText: Error The website encountered an unexpected error. Please try again later. ReadyState: undefined
Once, I received the following JS error while attempting the uploads:
"Blocked Script Execution in 'node/722/edit' because the document's frame is sandboxed and the 'allow-scripts' permission is not set" and
"Blocked form submission to '/node/722/edit' because the form's frame is sandboxed and the 'allow-forms' permission is not set. Googling these errors didn’t turn up any useful information.
From what I can tell the files get almost completely uploaded to 57 of 58 MB and is placed in the correct directory without being attached to the content type. It seems to mostly have problems with audio files, but I don’t have a range of different file types at different sizes to test for a pattern of breakpoint.
I researching the problem, I read that some people have trouble with the Suhosin PHP extension putting extra constrictions on PHP settings, but my live server doesn’t have Suhosin running on it. Reading about the Suhosin issue, I have also tried upping the max_input_vars value, which only changed the error to the following.
An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (300 MB) that this server supports.
From running phpinfo(), I can see that all my php value settings are getting applied, but I suspect that maybe they don’t take effect. Since the first error, the error has been failing silently, and nothing meaningful gets placed in my logs. I have also checked that all my php ini_set statements are consistent between .htaccess, settings.php, and the php.ini files.
I have just spoken with tech support the following error was thrown when I tried the file upload:
[Thu Feb 02 07:29:10.729972 2017] [core:error] [pid 475229] [client 184.108.40.206:6690] Script timed out before returning headers: index.php, referer:path to my content edit page. I also do not get anything meaningful in the watch dog logs.
The only difference between the file upload attempts with the content type and the webform is that the ajax error’s path is different and I get the following JS error in the console:
Error: Syntax error, unrecognized expression: .error, #overlay-context=form/training-suggestions-
So, the only thing I am sure of at this point is that it must be a server configuration error. My suspicion is that somehow the the php values settings are getting applied, but perhaps overwritten at some stage. Any advice on how to solve or diagnose this would be greatly appreciated.