Title: Illegal String Offset &amp; Fatal Error
Last modified: January 20, 2021

---

# Illegal String Offset & Fatal Error

 *  [hallowelt55](https://wordpress.org/support/users/hallowelt55/)
 * (@hallowelt55)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/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?

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Support [Nayeem Hyder](https://wordpress.org/support/users/nriddhi/)
 * (@nriddhi)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/illegal-string-offset-fatal-error/#post-13934359)
 * Fixing the Error there are a couple of ways on how to go about resolving this
   error. These include:
 * **1.Editing the `wp-config.php` file**
    **2.Editing the `php.ini` file** **3.
   Editing the `.htaccess` file**
 * **1.Editing the `wp-config.php` file**
 * Here you will need to edit the`wp-config.php` file.
    `define( 'WP_MEMORY_LIMIT','
   1024M' );`
 * **2.Editing the `php.ini` file**
 * On 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 512M`
 * **3.Editing the `.htaccess` file**
 * The `.htaccess` file 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 256M`
 * With this done, you can then save your changes and check if the error is resolved.
 * Thanks
 *  Thread Starter [hallowelt55](https://wordpress.org/support/users/hallowelt55/)
 * (@hallowelt55)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/illegal-string-offset-fatal-error/#post-13936162)
 * 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
 *  Thread Starter [hallowelt55](https://wordpress.org/support/users/hallowelt55/)
 * (@hallowelt55)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/illegal-string-offset-fatal-error/#post-13951498)
 * 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.
 *  Plugin Support [Nayeem Hyder](https://wordpress.org/support/users/nriddhi/)
 * (@nriddhi)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/illegal-string-offset-fatal-error/#post-13951529)
 * 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
 *  Thread Starter [hallowelt55](https://wordpress.org/support/users/hallowelt55/)
 * (@hallowelt55)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/illegal-string-offset-fatal-error/#post-13951834)
 * 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](https://wordpress.org/support/users/hallowelt55/).
    -  This reply was modified 5 years, 4 months ago by [hallowelt55](https://wordpress.org/support/users/hallowelt55/).
    -  This reply was modified 5 years, 4 months ago by [hallowelt55](https://wordpress.org/support/users/hallowelt55/).
    -  This reply was modified 5 years, 4 months ago by [hallowelt55](https://wordpress.org/support/users/hallowelt55/).
    -  This reply was modified 5 years, 4 months ago by [hallowelt55](https://wordpress.org/support/users/hallowelt55/).
 *  Plugin Support [Nayeem Hyder](https://wordpress.org/support/users/nriddhi/)
 * (@nriddhi)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/illegal-string-offset-fatal-error/#post-13952042)
 * Are you PRO user or free, if possible, share the related file/package URL
 * thanks
 *  Thread Starter [hallowelt55](https://wordpress.org/support/users/hallowelt55/)
 * (@hallowelt55)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/illegal-string-offset-fatal-error/#post-13952119)
 * Currently a free user.
    I’ld like to share my url but not publicly. Is there 
   a way to contact you directly via PM?
 *  Plugin Support [Nayeem Hyder](https://wordpress.org/support/users/nriddhi/)
 * (@nriddhi)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/illegal-string-offset-fatal-error/#post-13952350)
 * No, we have also a PRO + Free forum, [https://www.wpdownloadmanager.com/support/](https://www.wpdownloadmanager.com/support/),
   you can also visit that
 * thanks
 *  [Yusup Ali](https://wordpress.org/support/users/fileour/)
 * (@fileour)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/illegal-string-offset-fatal-error/#post-13979575)
 * 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](https://wordpress.org/support/users/fileour/).

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Illegal String Offset & Fatal Error’ is closed to new replies.

 * ![](https://ps.w.org/download-manager/assets/icon-256x256.png?rev=1561688)
 * [Download Manager](https://wordpress.org/plugins/download-manager/)
 * [Support Threads](https://wordpress.org/support/plugin/download-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/download-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/download-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/download-manager/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [Yusup Ali](https://wordpress.org/support/users/fileour/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/illegal-string-offset-fatal-error/#post-13979575)
 * Status: not resolved