1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Plesk 7.5.3 + PHP and uploaded files

Discussion in 'Plesk for Linux - 8.x and Older' started by codacoda, Aug 2, 2005.

  1. codacoda

    codacoda Guest

    install off: psa_installer_v2.0.0_build75050509.20_os_FedoraCore_2_i686

    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:

    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:
    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
  2. hardweb

    hardweb Guest

    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.
  3. codacoda

    codacoda Guest

    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...