Toggle navigation Home Store Browse All ----- Webhosting Domains Quotation (Webdesign Services) eMail Hosting SEO- Search Engine Optimisation GRAPHIC DESIGN Dedicated/ VPS Webhosting BULKSMS Mobi Applications Website Maintenance Register a New Domain Transfer Domains to Us Announcements Knowledgebase Network Status Affiliates Contact Us Account Login Register ----- Forgot Password? Categories 9 CGI Scripts 34 Databases 28 Dedicated Servers 1 DNS 15 Domains 5 eCommerce 79 eMails 27 FTP 1 General Issues 1 MX Records 1 Nameservers 28 Other 104 Scripting 254 Web Hosting Control Panel 9 Web Resources 8 Web Stats & Logs 11 Web Tools 8 Website Help and Diagnostics 4 Windows Hosting Categories CGI Scripts (9) Databases (34) Dedicated Servers (28) DNS (1) Domains (15) eCommerce (5) eMails (79) FTP (27) General Issues (1) MX Records (1) Nameservers (1) Other (28) Scripting (104) Web Hosting Control Panel (254) Web Resources (9) Web Stats & Logs (8) Web Tools (11) Website Help and Diagnostics (8) Windows Hosting (4) [WHP1.11] Why does my PHP script fail with 'Fatal error: Allowed memory size of 8388608 bytes exhausted'? Support DatabasePrint NowWhy does my PHP script fail with 'Fatal error: Allowed memory size of 8388608 bytes exhausted'?PHP has a built-in limit on the amount of memory it will allocate. If that limit is reached, the process will exit with this error message. This is usually the result of the PHP script trying to load a large file, such as an image, into memory all at once. While it is better if you can arrange for the script not to do such things, it is also possible to increase the memory limit to avoid this problem. To do that, edit (or create in your script's folder if it does not exist) the php.ini file with your PHP scripts (create it if it does not exist) and add the following line:memory_limit=16MYou should replace the '16' with whatever value is appropriate. The default is 8M (8 megabytes, the 8388608 bytes from the error message).If this does not resolve the problem, you can also increase the web server memory limit by editing (or creating in your script's folder if it does not exist) the ".htaccess" file and adding the following line:RLimitMem 256000000Both php.ini and .htaccess files should be created in plain text (for example with Notepad on Windows, or TextEdit in Plain Text mode on a Mac) to avoid any formatting information being saved. Rich text editors such as WordPad, MS Word, and TextEdit in its default Rich Text mode will produce unreadable files. Was this answer helpful? Yes No Print this Article Also Read [WHP1.25] I've uploaded files to File manager but cannot see them, they were recently visible. What's happened? File manager has a 5mb memory limit which restricts the number of files that can be displayed if... [WHP1.08] Why is my secure site not showing the padlock in the browser? The main reason for this is the use of a http:// link to a graphic or script inside the site... [WHP1.22] I have a script I got elsewhere which doesn't work. Can you help me? We can only provide support for scripts and software that we have written, or that we are the... [WHP1.16] Possible issues with OSCommerce and MySQL5 We have been made aware that some customers may have issues with their OSCommerce installations... [WHP1.09] I can't get SMTP working with my Actinic install. Why? Versions prior to v7 do not support authenticated SMTP. To obtain a free fix for this, go to... Support My Support Tickets Announcements Knowledgebase Downloads Network Status Open Ticket × Close Title Loading...