Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 28. Mar 2024, 21:31

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 23. Mar 2019, 23:16 
Offline

Joined: 23. Mar 2019, 21:20
Posts: 2
I get the following error in the log file:
ERROR 8 in onents/com_jfuploader/tfu/tfu_helper.php, line 462: A non well formed numeric value encountered.

The line in question is
462 if ($memory > return_kbytes(ini_get('memory_limit')*1024) - $InUse)
I think the problem is, that 'memory_limit' is not an integer and not for sure in kB, when multiplying it by 1024

I changed it to the following and that got rid of the error.
if ($memory > return_kbytes(ini_get('memory_limit'))*1024 - $InUse)

Question: In the same file in function return_kbytes($val) on line 513, shouldn't the value for GB be 1048576 ?

Peter


Top
 Profile  
 
PostPosted: 29. Mar 2019, 22:35 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
How is the setting of memory_limit of your server? Normally MB GB are supported. Maybe you have a char in there which is not valid.

Best, Michael


Top
 Profile  
 
PostPosted: 30. Mar 2019, 02:06 
Offline

Joined: 23. Mar 2019, 21:20
Posts: 2
Hi Michael,
As I indicated, I think it is a bracket issue in the statement.
If 'memory_limit' = '8M', then ini_get('memory_limit')*1024 will produce an error. In php only the + operator will transform the string to an integer.
By first doing return_kbytes(ini_get('memory_limit')) then you will multiply an integer with 1024.

Curiously enough line 467 in the same file tfu_helper.php has the statement in the form I proposed.

Reguarding my last question, GB * 1024 * 1024 gives you the value in kB
Thanks,
Peter


Top
 Profile  
 
PostPosted: 31. Mar 2019, 19:15 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
You are right. The bracket are wrong. Strange that this no one has found before.

i'll check and provide an update.

Best, Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy