• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Plesk 7.5.3 + PHP and uploaded files

C

codacoda

Guest
install off: psa_installer_v2.0.0_build75050509.20_os_FedoraCore_2_i686

PSA_7.5.3
comes with PHP Version 4.3.10

A majour issue insofar as hosting websites is concerned, hopefully somebody can shed some light on the problem...

the $_FILES array in PHP comes empty after a form submission using a script that works on any other server.

there are the obvious PHP.INI settings (polled from phpinfo upon execution of the script), all checked and played with:

Code:
file_uploads On On 
max_execution_time 300 300 
max_input_time 600 600 
memory_limit 64M 64M 
open_basedir /home/httpd/vhosts/drillingsystems.co.uk/httpdocs:/tmp no value 
upload_max_filesize 300M 300M 
upload_tmp_dir no value no value

just about any iteration of the above has already been tried.
upload_tmp_dir is understood to be /tmp as default.

during the script execution as a new file is being created, you can see it appear inside of /tmp

however, as soon as script stops execution, the file is being deleted and $_FILES remains blank.

http://uk.php.net/manual/en/features.file-upload.common-pitfalls.php mentions of a few possible problems that can cause this. in particular this is worrying:
Here is another that may make your upload fall over. If you are using Squid or similar proxy server make sure that this is not limiting the size of the HTTP headers. This took me weeks to figure out!

looking at httpd.conf, a few proxy and cache modues are being loaded.

I hope i am not the first to come to that problem and i hope it is nothing as obscure as a requestimit or header limit imposed by an include file...

has anyone else experienced this and what are your suggestions? need to get this ressolved as soon as possible as i need to demo some content management for a client tomorrow...

thanks in advance
 
Trying to debug this might be a little bit harder than replacing the php.ini file with a stock RPM one. The origin of the problems is the php.ini file, but can not tell you exactly what's the issue there without a look to the server. In /etc/ you should have multiple php.ini* files saved by RPM, use another one.
 
yeah there is the php.ini.saved_by_psa which i have already tried. defaults - pretty much - no joy :(

it could be to do with an apache cache/proxy module and headers:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so

since the upload works in that php makes a /tmp/php{RANDNAME} file appear, just that it destroys it immediately after that:

-rw------- 1 psaadm psaadm 94208 Aug 3 01:00 phpDgYG8w

this is what comes up during a big file upload as i'd expect to be able to do move_uploaded_filename after that.

any clue as to what log levels i can enable to debug this? error_log does not report anything since there simply is no problem with the coding...

QUESTION: it just occured to me the testing is via https, could this be related, i wonder...

*edit* omg. i migrated it as a subdir of another domain that is not under http and it worked :/ nice...
 
Back
Top