- Posts: 157
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Plugin conflict and recommended PHP settings for upload.
Plugin conflict and recommended PHP settings for upload.
- Goble002
- Topic Author
- Offline
- Premium Member
Less
More
3 years 7 months ago #178550
by Goble002
Plugin conflict and recommended PHP settings for upload. was created by Goble002
Hi,
was getting error below with Front-end editing whenever I edit item. So I switched to latest router as recommended here. www.joomlaworks.net/forum/k2-de/53846-fehlermeldungen-in-router-php-line-292
While uploading 5.8Mb image on Front-end I got following errors.
So I switch from PHP 7.4 to 7.3. Now only error :
The error was only with big files. No issue with a 350kb jpg. I found out that a plugin was causing the issue : "content jdownloads".
1. Any chance I can uploads working with this plugin ? Change ordering ?
2. A 5.4Mb file will typically take nearly 3 minutes to upload. It might takes longer for slow connections. That said, can you recommend PHP settiongs for my case ?
Actually it is :
was getting error below with Front-end editing whenever I edit item. So I switched to latest router as recommended here. www.joomlaworks.net/forum/k2-de/53846-fehlermeldungen-in-router-php-line-292
[b]Notice[/b]: Trying to get property 'alias' of non-object in [b]/home/.../components/com_k2/router.php[/b] on line [b]292[/b]
While uploading 5.8Mb image on Front-end I got following errors.
[b]Deprecated[/b]: Array and string offset access syntax with curly braces is deprecated in [b].../media/k2/assets/vendors/verot/class.upload.php/src/class.upload.php[/b] on line [b]2726[/b]
[b]Notice[/b]: Trying to access array offset on value of type int in [b].
../media/k2/assets/vendors/verot/class.upload.php/src/class.upload.php[/b] on line [b]2726[/b]
[b]Notice[/b]: Trying to access array offset on value of type int in
...[b]/media/k2/assets/vendors/verot/class.upload.php/src/class.upload.php[/b] on line [b]2726[/b]
[b]Fatal error[/b]: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes) in [b].../media/k2/assets/vendors/verot/class.upload.php/src/class.upload.php[/b] on line [b]2797[/b]
So I switch from PHP 7.4 to 7.3. Now only error :
[b]Fatal error[/b]: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes) in [b].../media/k2/assets/vendors/verot/class.upload.php/src/class.upload.php[/b] on line [b]2797[/b]
The error was only with big files. No issue with a 350kb jpg. I found out that a plugin was causing the issue : "content jdownloads".
1. Any chance I can uploads working with this plugin ? Change ordering ?
2. A 5.4Mb file will typically take nearly 3 minutes to upload. It might takes longer for slow connections. That said, can you recommend PHP settiongs for my case ?
Actually it is :
allow_url_fopen = Off
display_errors = On
enable_dl = Off
file_uploads = On
max_execution_time = 30
max_input_time = 60
max_input_vars = 1000
memory_limit = 128M
post_max_size = 7M
session.gc_maxlifetime = 1440
session.save_path = "/var/cpanel/php/sessions/ea-php74"
upload_max_filesize = 6M
zlib.output_compression = Off
Please Log in or Create an account to join the conversation.
- JoomlaWorks
- Offline
- Admin
Less
More
- Posts: 6218
3 years 7 months ago #178563
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on topic Plugin conflict and recommended PHP settings for upload.
post_max_size should be equal to upload_max_filesize and both at least to a decent value like 64M. Both are small that's why you can't upload anything...
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Goble002
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 157
3 years 7 months ago #178574
by Goble002
Replied by Goble002 on topic Plugin conflict and recommended PHP settings for upload.
Hi Fotis and thanks for your valuable input.
Refering to:
Actually it has been recommended by my hosting company (and it's the only advice thay gave me) to have "post_max_size" slightly more than "upload_max_filesize", In cPanel: it says :post_max_size should be equal to upload_max_filesize
Referring to:post_max_sizeSets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. Generally speaking, memory_limit should be larger than post_max_size.
I can't afford to have up to 64Mb files lying on the server (and I will need these files). This is where (and I guess the only way) where I can restrict the size upload limit. 6Mb would be a jpg file of 4000px, 72dpi, Image quality : 86%, and a few other tweaks to have the best quality vs size ratio.at least to a decent value like 64M.
Refering to:
Actually it is not. I can upload files up to 6Mb if I disable the plugin. I was thinking that I could tweak my PHP settings so that I could get both the upload and plugin working.Both are small that's why you can't upload anything...
Please Log in or Create an account to join the conversation.
- JoomlaWorks
- Offline
- Admin
Less
More
- Posts: 6218
3 years 7 months ago #178583
by JoomlaWorks
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by JoomlaWorks on topic Plugin conflict and recommended PHP settings for upload.
It's simpler to say that both should be equal. As long as the limits are generous enough, you'll never have to worry about this.
As for the limits itself, they are just that: limits. No memory or other resources is pre-allocated. So these should be generous (even 64M you mention is little for today's sites and servers).
Please try what I said and we can argue later.
As for the limits itself, they are just that: limits. No memory or other resources is pre-allocated. So these should be generous (even 64M you mention is little for today's sites and servers).
Please try what I said and we can argue later.
Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Goble002
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 157
3 years 7 months ago - 3 years 7 months ago #178596
by Goble002
Replied by Goble002 on topic Plugin conflict and recommended PHP settings for upload.
Hi,
64Mb set for both: No change. Uploads of 5-6Mb file will still cause the error when "Content - jDownloads" plugin enabled. Like explained no issue with 1Mb files.
I have even tried to change the order of the plugin: First, last and middle.
PHP settings:
64Mb set for both: No change. Uploads of 5-6Mb file will still cause the error when "Content - jDownloads" plugin enabled. Like explained no issue with 1Mb files.
I have even tried to change the order of the plugin: First, last and middle.
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes) in .../media/k2/assets/vendors/verot/class.upload.php/src/class.upload.php on line 2797
PHP settings:
allow_url_fopen = Off
display_errors = On
enable_dl = Off
file_uploads = On
max_execution_time = 30
max_input_time = 240
max_input_vars = 1000
memory_limit = 128M
post_max_size = 64M
session.gc_maxlifetime = 1440
session.save_path = "/var/cpanel/php/sessions/ea-php74"
upload_max_filesize = 64M
zlib.output_compression = Off
allow_url_include = Off
Last edit: 3 years 7 months ago by Goble002.
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- Plugin conflict and recommended PHP settings for upload.