Announcement

#1 2024-06-04 16:37:54

ttucker
Member
2024-06-04
7

Cannot upload photos larger than 1 meg

Hello/Hi/Greetings,

New install of Piwigo on ubuntu 22.04, web server is apache2.  Trying to upload photos, and it works up to about 1mb in size. Anything larger and it stops at about 1meg (.988mb)
Anything smaller uploads and works fine.

I have checked all the php.ini settings related to uploads: (and I have tried adjusting these values)

post_max_size    8G
upload_max_filesize    4G
memory_limit    2G


    Piwigo 14.4.0 Check for upgrade
    Installed on 31 May 2024, 4 days ago
    Operating system: Linux
    PHP: 8.1.2-1ubuntu2.17 (Show info) [2024-06-04 09:28:19]
    MySQL: 5.5.5-10.6.16-MariaDB-0ubuntu0.22.04.1 [2024-06-04 09:28:19]
    Graphics Library: ImageMagick 6.9.11-60
    Cache size 2.54 MB right now Refresh

Offline

 

#2 2024-06-10 16:44:08

ttucker
Member
2024-06-04
7

Re: Cannot upload photos larger than 1 meg

Anyone have any suggestions? at  a loss on this

Offline

 

#3 2024-06-10 17:19:13

Schneider-Fotografie
Member
Berlin
2023-04-16
33

Offline

 

#4 2024-06-10 19:19:35

ttucker
Member
2024-06-04
7

Re: Cannot upload photos larger than 1 meg

If you look at the original post, I have already done so. And I have tried various php settings.

This is not the only thing operating on this web server, and I can  upload large files in the other website on this server with the same PHP settings without issue. It is only in PIWIGO that I have the issue.

And I don't seem to have any errors in the logs, it just hangs at about 1mb and never continues.

Last edited by ttucker (2024-06-10 20:05:13)

Offline

 

#5 2024-06-10 19:30:00

ttucker
Member
2024-06-04
7

Re: Cannot upload photos larger than 1 meg

Here are the php settings from piwigo info:

allow_url_fopen    On    On
allow_url_include    Off    Off
arg_separator.input    &    &
arg_separator.output    &    &
auto_append_file    no value    no value
auto_globals_jit    On    On
auto_prepend_file    no value    no value
browscap    no value    no value
default_charset    UTF-8    UTF-8
default_mimetype    text/html    text/html
disable_classes    no value    no value
disable_functions    pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,    pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
display_errors    On    Off
display_startup_errors    Off    Off
doc_root    no value    no value
docref_ext    no value    no value
docref_root    no value    no value
enable_dl    Off    Off
enable_post_data_reading    On    On
error_append_string    no value    no value
error_log    no value    no value
error_prepend_string    no value    no value
error_reporting    32767    22527
expose_php    On    On
extension_dir    /usr/lib/php/20210902    /usr/lib/php/20210902
fiber.stack_size    no value    no value
file_uploads    On    On
hard_timeout    2    2
highlight.comment    #FF8000    #FF8000
highlight.default    #0000BB    #0000BB
highlight.html    #000000    #000000
highlight.keyword    #007700    #007700
highlight.string    #DD0000    #DD0000
html_errors    On    On
ignore_repeated_errors    Off    Off
ignore_repeated_source    Off    Off
ignore_user_abort    Off    Off
implicit_flush    Off    Off
include_path    .:/usr/share/php    .:/usr/share/php
input_encoding    no value    no value
internal_encoding    no value    no value
log_errors    On    On
mail.add_x_header    On    On
mail.force_extra_parameters    no value    no value
mail.log    no value    no value
max_execution_time    600    600
max_file_uploads    40    40
max_input_nesting_level    64    64
max_input_time    60    60
max_input_vars    5000    5000
max_multipart_body_parts    -1    -1
memory_limit    2G    2G
open_basedir    no value    no value
output_buffering    no value    no value
output_encoding    no value    no value
output_handler    no value    no value
post_max_size    8G    8G
precision    14    14
realpath_cache_size    4096K    4096K
realpath_cache_ttl    120    120
register_argc_argv    Off    Off
report_memleaks    On    On
report_zend_debug    Off    Off
request_order    GP    GP
sendmail_from    no value    no value
sendmail_path    /usr/sbin/sendmail -t -i    /usr/sbin/sendmail -t -i
serialize_precision    17    17
short_open_tag    Off    Off
SMTP    localhost    localhost
smtp_port    25    25
sys_temp_dir    no value    no value
syslog.facility    LOG_USER    LOG_USER
syslog.filter    no-ctrl    no-ctrl
syslog.ident    php    php
unserialize_callback_func    no value    no value
upload_max_filesize    4G    4G
upload_tmp_dir    /tmp    /tmp
user_dir    no value    no value
user_ini.cache_ttl    300    300
user_ini.filename    .user.ini    .user.ini
variables_order    GPCS    GPCS
xmlrpc_error_number    0    0
xmlrpc_errors    Off    Off
zend.assertions    1    1
zend.detect_unicode    On    On
zend.enable_gc    On    On
zend.exception_ignore_args    Off    Off
zend.exception_string_param_max_len    15    15
zend.multibyte    Off    Off
zend.script_encoding    no value    no value
zend.signal_check    Off    Off

Offline

 

#6 Yesterday 07:14:07

Akiragi
Member
2024-06-08
5

Re: Cannot upload photos larger than 1 meg

Hello.

As per my opinion  you have already checked  your php.ini settings which is great.

Here are some things you can check this.
Please insure the Limit RequestnBody directive in your Apache config is not set too low.  You can check if there is a htaccess  train that might be booting yourphp.ini settings.  corroborate that the upload directory has the correct  warrants.  You can produce a phpinfo php  train to  insure your changes tophp.ini are taking effect.  Also you can look at Apache and PHP error logs for any applicable  dispatches.

Hope this will help you:)

Offline

 

#7 Yesterday 16:12:20

ttucker
Member
2024-06-04
7

Re: Cannot upload photos larger than 1 meg

Thanks for your reply.

My Limit RequestnBody directive is not set at all.

I don't have any .htaccess files

I looked at my phpinfo and don't see anything unusual. The results are in a post above.

The only thing  I see in /var/log/apapache2/error.log uploading photos is.

[Thu Jun 13 09:10:31.323024 2024] [evasive20:error] [pid 2457289] [client 172.16.5.2:47034] client denied by server configuration: /var/www/html/photos/ws.php, referer: https://xxxxxx/photos/admin.php?page=photos_add


and I cannot find any other errors

Any other suggestions?

Offline

 

#8 Yesterday 17:50:57

Schneider-Fotografie
Member
Berlin
2023-04-16
33

Re: Cannot upload photos larger than 1 meg

Overwrite PIWIGO with new files. It's worth a try.

Offline

 

#9 Yesterday 18:22:40

ttucker
Member
2024-06-04
7

Re: Cannot upload photos larger than 1 meg

While that is a good idea, I have done it twice, and I reinstalled from scratch, recreating the mysql database and everything.

Offline

 

#10 Yesterday 18:50:34

Schneider-Fotografie
Member
Berlin
2023-04-16
33

Re: Cannot upload photos larger than 1 meg

I have another idea.
Create the .htaccess file via FTP (please put a dot in front of it and File permission on 644) and insert the following:

Code:

php_value upload_max_filesize 64M
php_value post_max_size 22M

File permission on 755 (works with FTP- program)

_data/
and
upload/
with subfolder


Restart Apache with:
sudo /etc/init.d/apache2 restart
# or
sudo service apache2 restart

Last edited by Schneider-Fotografie (Yesterday 19:12:50)

Offline

 

#11 Yesterday 20:04:49

ttucker
Member
2024-06-04
7

Re: Cannot upload photos larger than 1 meg

Well, that did not work either.. Thanks for the info.. Still trying to figure it out.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact