Illegal String Offset & Fatal Error
-
Hi,
just recently, most of my WP Download buttons started to cause the following warning and error:
Warning: Illegal string offset ‘6007e5d7dc0f4’ in /home/…/public_html/wp-content/plugins/download-manager/libs/class.DownloadStats.php on line 50
Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 600700032 bytes) in /home/…/public_html/wp-includes/formatting.php on line 2757
Any idea what this is caused by?
-
Fixing the Error there are a couple of ways on how to go about resolving this error. These include:
1.Editing the
wp-config.phpfile
2.Editing thephp.inifile
3.Editing the.htaccessfile1.Editing the
wp-config.phpfileHere you will need to edit the
wp-config.phpfile.
define( 'WP_MEMORY_LIMIT', '1024M' );2.Editing the
php.inifileOn a live install, the file can be accessed within the root of your install, that is within the /public_html/ folder. Note that the file is not installed by WordPress but in most cases set up by your host. If you are using CPanel as your control panel, for example, make sure the checkbox for “Show Hidden Files” is checked and then click Go. You may check into this article on how to go about editing the file. Before editing the file, kindly preserve a backup to it by downloading it to your computer.
Once this is done, open the file, add or edit the following line:memory_limit 512M3.Editing the
.htaccessfileThe
.htaccessfile is a file located within the root of your WordPress files.You will need to add or edit the following code to the bottom of the file:
php_value memory_limit 256MWith this done, you can then save your changes and check if the error is resolved.
Thanks
Hi,
thanks for the quick response and your suggestions.
However, I am wondering if increasing the memory limit is really necessary and a sustainable solution. Can you explain to me what this huge usage of memory is caused by? I mean what action in the whole process of downloading a file (not bigger than 2MB) and updating the stats could use that amount of memory? Just curious.Thanks in advance
Again I am running into these kinds of errors. I am just wondering, why does the plugin try to allocate these enormous file sizes?
Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 9223372036854775840 bytes) in …public_html/wp-content/plugins/download-manager/libs/class.DownloadStats.php on line 50
Please explain it to me. I want to understand it.
Has the problem been resolved?
WordPress is written in
PHP, which is a server-side programming language. Every website needs a WordPress hosting server for it to function properly.Web servers are just like any other computer. They need memory to efficiently run multiple applications at the same time. Server administrators allocate specific memory size to different applications including PHP.
When your WordPress code requires more memory than the default allocated memory, you get to see this error.
I hope you have understood
Thanks
No, the problem has not been resolved.
I checked with my hosting provider and php memory limit for my site is already set to a max of over 700MB. So the problem has to be related to the plugin.
If you read my last message in detail, you see that error message says it tried to allocate 9223372036854775840 bytes, that’s like 9223372036 GB. Doesn’t that look suspicious to you in any way?
I also figured out, the underlying link for the download looks something like this: …/download/filename/?wpdmdl=14854&refresh=600e7752606f81611560786
The download of the file works when I remove the ‘refresh’ argument. Still shows the error but at least starts the download. I think it has to be some issue with the stats tracking.
I should also mention, that everything works totally fine when I am logged into my WordPress backend. Only causes these warnings and errors when accessing from the outside like a normal visitor.
Btw, thanks for taking the time to responding to my questions. I know you only try to help, I just need to figure out the root of the issue.
-
This reply was modified 5 years, 4 months ago by
hallowelt55.
-
This reply was modified 5 years, 4 months ago by
hallowelt55.
-
This reply was modified 5 years, 4 months ago by
hallowelt55.
-
This reply was modified 5 years, 4 months ago by
hallowelt55.
-
This reply was modified 5 years, 4 months ago by
hallowelt55.
Are you PRO user or free, if possible, share the related file/package URL
thanks
Currently a free user.
I’ld like to share my url but not publicly. Is there a way to contact you directly via PM?No, we have also a PRO + Free forum, https://www.wpdownloadmanager.com/support/, you can also visit that
thanks
I have also got a problem.
Warning: Illegal string offset ‘6015318e6d0d1’ in …wp-content/plugins/download-manager/libs/class.DownloadStats.php on line 50
Fatal error: Allowed memory size of 2097152000 bytes exhausted (tried to allocate 6015318000032 bytes) in …wp-content/plugins/download-manager/libs/class.DownloadStats.php on line 50
I have no problem with other pages. But sometimes there is a problem whenever I click on the Download button.
Please help me.
-
This reply was modified 5 years, 4 months ago by
Yusup Ali.
-
This reply was modified 5 years, 4 months ago by
The topic ‘Illegal String Offset & Fatal Error’ is closed to new replies.