• 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

error upload php

dfutura

Basic Pleskian
I trying to upload a file with php. I f the file is 2 Mb it works, but if the exceed 2 Mb it donr work.

I have change in /usr/local/psa/admin/conf/php.ini ->
upload_max_filesize = 5147483647
post_max_size = 5147483647

and restart apache but nothing. Any suggestion?

Regards.
 
You might check the

memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)

and my php.ini uses MB instead of bytes or kilobytes on the file size limits ie: instead of 5147483647 how about 5M

you might also try specifying

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir =

depending on what options you used to install PHP originally might be affecting your file uploads as well. Post a link to your phpinfo() or PM it.
 
hi,

I think am changing the php.ini that no correspond. I have put in php.ini upload_max_filesize 5M. But in phpinfo() is 2M.

The php.ini I have changes is located here:
/usr/local/psa/admin/conf

This changes is only for a domain, what file i have to modify.
 
I have change vhost.conf for this domin and it works:

<Directory /home/httpd/vhosts/domain.com/httpdocs>
php_admin_flag register_globals on
php_admin_flag upload_max_filesize 5M
</Directory>
 
Back
Top