Server Errors and Blank Pages in OpenCart: Most Common Causes

Updated on 20/01/2016 for OpenCart 2.x

Even though it's 2016, you may still encounter the dreaded Blank Screen of Death or an Internal Server Error when moving your OpenCart store, installing new extensions or just performing a regular update. We've revised and updated this post to account for new version of OpenCart.

This post covers blank pages and internal server errors. If you're struggling with JSON.parse errors in OpenCart, see our other blog post.

First things first – find the actual cause

It is important to understand, that blank pages and internal server errors don't have a single common cause – it simply means something went wrong with your store somewhere, therefore it couldn't load. To find out the actual reason for this, you need to look into your server's error log and find the exact error message.

Since the location of the main server error log varies between hosting providers, you'll need to look up the documentation for your particular hosting provider. In most cases, however, you can also display the contents of the log through your server's administration software (e.g. CPanel).

If you've found the log, but it's empty, you'll need to make sure your errors are getting logged. To do this, make sure your log is writable and verify the values of the following PHP variables in your php.ini file: display_errors and log_errors. They are usually set to Off and On in production respectively, but you can change both of them to On for debugging purposes.

If none of this seems to work you can add the following lines of code to the beginning of your index.php file for this debugging session:

error_reporting(E_ALL);
ini_set('display_errors', '1');
ini_set('log_errors', '1');

Now when you have the error message, it's time to fix this!

Here are the most common issues for blank pages in OpenCart.

Broken configuration files

This is a common problem that can happen after you move your store to a different server.

OpenCart stores various pieces of its main configuration in two files: config.php and admin/config.php. If you're moving your store to a different domain or a different server, you may need to adjust some or all of them.

Double check your main store URL in HTTP_ and HTTPS_ variables, paths to your OpenCart setup in DIR_ variables and the database configuration in DB_ variables. All of them should match your new server setup.

Broken directory structure

Although this is a less common cause of blank pages in OpenCart, it is still worth mentioning. Both admin and catalog folders must follow the same structure in OpenCart:

You may get a blank page with no errors if this structure is missing the controller/ folder. Just make sure the folders are in place.

Magic quotes

Even though it's 2016 out there, we still see servers with magic quotes enabled once in a while. This can cause all kinds of issues, including problems resulting in blank pages. Make sure to disable them once and for all.

Syntax errors of all kinds

Syntax errors can happen to anyone – an extra bracket, a forgotten comma or a broken extension or vQmod file can easily turn your beautiful store into a blank page. Fortunately, they're usually easy to fix.

This is what a common syntax error may look like:

[Thu Jan 21 12:48:37 2012] [error] [client 127.0.0.1] PHP Parse error: syntax error, unexpected '}' in /srv/www/dev/opencart/2101/index.php on line 47

Now all you need to do is open up that file and fix that error! Easy.

However, make sure the file name is now one of vQmod's cache files – they usually look somewhat like this: vqmod/vqcache/vq2-catalog_controller_checkout_cart.php. In this case, editing the file directly won't work as it will be overwritten by vQmod.

To fix this, you'll need to find the particular vQmod modification that's causing problems and disable it until you find a way to fix the error. We suggest searching for the particular piece of code from the error message inside your vqmod/xml/ folder (using Notepad++ file search, for example) and then disabling the broken vQmod file by changing it's extension to .xml_. This will bring your store back to life while you're writing an angry message to the developer of this particular modification.

Notice: Error: E-Mail to required!

This particular error can be caused by two things – a bug in OpenCart 2.0.2.0 or email missing from your store's configuration. If you're still using OpenCart 2.0.2.0, you should definitely update to the latest version available, otherwise make sure your email settings are correct in Admin > Settings > Your Store > System > Email.

Error: Table doesn't exist
Error: Unknown column in 'field list'

These errors mean OpenCart is trying to access a database table or a field that is missing. This is almost exclusively caused by third party modules and themes – and since the cause of this lies within the extension itself, the best way to fix it is to reinstall the theme or extension and contact the developers if this doesn't help.

Warning: fsockopen(): unable to connect to http://yourdomain.com:25/

This error indicates a problem with either your mail configuration in OpenCart or with your mailserver. Make sure that your mail settings are correct in Admin > Settings > Your Store > System > Email and that your mailserver is up and running.

These are the most common causes and solutions for blank pages and internal server errors in OpenCart. Hopefully by now you've fixed your issue, but if not – feel free to comment down below and we'll see if we can help.

 

Still need help? Hire us!

We offer a wide range of professional OpenCart & MultiMerch services. Find out more!

About the authorMartin Boze is the Founder of MultiMerch Marketplace. I also love skydiving, motorcycles and space. And other cool things.

Leave a Reply

68 Comments on "Server Errors and Blank Pages in OpenCart: Most Common Causes"

Notify of
avatar
Sort by:   newest | oldest | most voted
Tarang
Guest

Hi,
Thank you for the valued information.

My website was migrated from 1 server to another recently and i have shifted the code and DB from old server to the new one. It was hosted on windows server initially and nw i have switched to linux.

I checked for these 2 errors / issues you mentioned above, with my install.
But config files and folder structure is correct.

I have re-installed opencart and uploaded old db and files which i have modified. I am using a custom theme.

Can you please tell me what else can cause this issue? Can this be a database issue?

Mohsin Rafiq
Guest

Hi.

I was using a linux server when creating opencart site, now customer purchases a windows based hosting. It is problematic for me now. I am seeing blank page although the URL redirects towards login.

http://www.ourstockinhand.com/index.php?route=account/login

Please tell me where can i be wrong? I have changed directories paths but no all in vain....

Annie
Guest
Hi, I have been battling this blank page issue for days. I'm trying to install OC on Mamp Pro. Joomla, Magento and WP install without issue so I feel confident this is not a Mamp, phpmyadmin or MySql error. This is what the error log says: [17-Jul-2012 00:06:33 UTC] PHP Notice: Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-store WHERE REPLACE(url, 'www.', '') = 'http://xxx.com.au/'' at line 1Error No: 1064SELECT * FROM sec-store WHERE REPLACE(url, 'www.', '') = 'http://xxx/' in /Applications/MAMP/htdocs/secrets/system/database/mysql.php… Read more »
Miranda
Guest

Hello,

I moved my website from one domain to another en now i get a blank page. I checked the config.php but everything seems fine. The link to the administration area is working. What did i do wrong?

Adem
Guest
Hi everyone, after 2 weeks of frustration and determination not to go through a whole new install again I think I have a solution, how general it will be I am not sure but it certainly has worked for me. I noticed a problem from the start with my "Cart" on homepage not loading and after some searching I discovered this was a problem with the way I installed Opencart on my site, without the "www" so I done a search on google for "opencart cart not updating on homepage" and found a thread that pointed me in the right… Read more »
trackback

[...] here I found a workaround http://ffct.cc/blank-pages-in-opencart- … on-causes/ [...]

umair
Guest

Although i am new in opencart . I also face this problem so Sometime blank pages in opencart due to vqmod. Usually it is session error. You need to install a new fresh copy of VqMod whenever change your server. also replace old index file with newly downloaded (Uninstalled) copy of opencart. For more help and share your knowledge contact me.

Ajayi Oluwaseun Emmanuel
Guest

This problem has to do with vqmod as suggested. this worked for me.
but in my case, i simply uninstalled an unused vqmod script and that was it.

Rachana Dhabalia
Guest

This page has the most useful information on Opencart errors that I could find anywhere. I have actually referred this page to my hosting company to try & resolve the issues. I am surely going to bookmark this on and will surely share this with all my friends.

Carl
Guest

Well, consider the following : an off site upgrade from 1.5.2.1 to 1.5.5.1, had a blank front page, yet admin worked. Turns out the server need php-mcrypt, after installing that, problem solved. It would be an idea to integrate that as a factor in your article, possibly php functionality.

Jeremy
Guest

Hi,
I currently have a blank page problem in the plugin I'm developing. I've already checked all of the causes described on this page and it's not any of them. After I call $this->render(), the contents of $this->output will be the page I'm trying to create but it never appears on the browser.

Diego Medina
Guest

One more reason.

1- It start by seeing an error that the image.php script failed to allocate memory .... Something like:

Fatal error: Allowed memory size of 31457280 bytes exhausted (tried to allocate 10000 bytes) in ...public_html/system/library/image.php on line 73

So you may go ahead and increase the memory that each php script can use.
Then you get a blank page with no response body (it is a request that end up aborted)

2- The solution in my case was to go into the Admin panel -> Image and change the biggest size from 10000 x 10000 to 1000 x 1000

Thanks for this page!

Christian
Guest

I just solved another issue with a white screen, which was related to Suhosin blocking PHP execution:
After moving my OpenCart project from my Ubuntu dev notebook to our Debian web server, it showed a blank screen.
However, a new OpenCart installation worked on that web server.
Found the reason hours later: the Suhosin extension in PHP, which blocked part of the vqmod execution, was causing this. The error message was in the system error log, not in the web server's log.
No idea why vqmod did not work with Suhosin. Disabling Suhosin for that virtual server solved it finally.

Zühtü
Guest
I installed Opencart to a linux server couple of months ago. It was idle. Now I've started to put some products, installed a theme and SSL to do some tests. Everything was ok since two days before. The site suddenly gives plank page. Some of the error_log reads as follows: (H E L P !) [Fri Jul 04 06:43:41 2014] [error] [client 66.249.91.205] File does not exist: /vhosts/peraluna.com/http/feeds [Fri Jul 04 06:59:25 2014] [error] [client 66.249.78.137] File does not exist: /vhosts/peraluna.com/http/robots.txt [Fri Jul 04 07:43:51 2014] [error] [client 66.249.91.189] File does not exist: /vhosts/peraluna.com/http/feeds [Fri Jul 04 08:07:53 2014] [error]… Read more »
Claudie Larouche
Guest

Do you have any ideas where I could find the server's PHP error log file?

Martin Boze
Guest

Those are usually located inside the logs/ folder that is outside of your public_html/ directory.

Shivaram Mahapatra
Guest

I have installed the multimerch core package. after installing it i have edited the menu.tpl file admin section. after editing the file, multimurch menu is disappered from sodebar menu.

Martin Boze
Guest

You'll need to look into your vQmod error log. This usually happens when you modify one of the lines that MultiMerch relies on to insert its code. You'll see the exact line that causes this and will need to update MultiMerch xml file accordingly.

Ahtisham Khalid
Guest

After all configurations when i open my opencart then there is nothing to display. Only Blank pages... How can i fix it?

Martin Boze
Guest

Try adding the error_reporting and display/log_errors lines to the beginning of your index.php file. That should make errors appear.

Ahtisham Khalid
Guest

I did that but useless... I used this code... But still white pages... I don't understand how to fix it... Please help me...
ini_set('display_errors', 1);

ini_set('log_errors', 1);

error_reporting(E_ALL);

Martin Boze
Guest

If this still doesn't work, you may need to ask your hosting provider to configure error logging properly for you. Could be a server configuration thing.

swordslayer01
Guest

I just wanted to say a BIG THANK YOU FOR THIS ARTICLE! SAVED ME FROM THROWING MY COMPUTER OUT THE WINDOW! THANK YOU!

Martin Boze
Guest

Great to hear that :)

Stephen Stankiewicz
Guest

Martin maybe you can help me, Once I activate SEO URLS - I get the folowing issue, cart works fine with it off. Using Catchy theme and SEO is critical to be activated Notice: Undefined variable: part in /home/brandkey/public_html/vqmod/vqcache/vq2-system_storage_modification_catalog_controller_common_seo_url.php on line 139

Martin Boze
Guest

Hi Stephen, are you using any third party SEO plugins? Does the theme have any SEO system of its own? Custom SEO plugins tend to cause issues with MultiMerch, unfortunately.

Stephen Stankiewicz
Guest

Thank you for the followup, No 3rd party SEO plugins and I believe it is the default seo_url.php file controlling things. I have been working on a few other things on the site but still need to attend to the matter before launching. If I switch to the out of the box theme everything is good so I thought it could be something you may have seen in the past.

Martin Boze
Guest

Probably the custom theme modifying the SEO system in some way (if it doesn't happen on the default one). Mail us at support@multimerch.com and we'll take a look!

Girish Jha
Guest

Hello Martin, i am having problem in my opencart website. I have checked New account alert mail but still unable to send auto generate welcome mail to new registration. Please help. Waiting for your reply. Thank you

Martin at MultiMerch
Guest

The first thing to do would be to check your logs – in most cases, you'll find the reason in OpenCart's main error log (usually a misconfigured mailserver or similar things).

Girish Jha
Guest

Actually everything is working fine. Only i have problem- when customer signup on my website after that confirmation mail only going to store owner & not going to Customer.

Martin at MultiMerch
Guest

Anything in your OpenCart log or server log? Could it be that you're trying to use a non-existent customer email address?

fashiondeal. in
Guest

hey martin i am facing a problem from many days. when i click on geo zones. page load too much and whole website become dead about 15 minutes. while other pages working fine. same problem occurs with error logs. i am not able to find out the problem.

Martin at MultiMerch
Guest

How many zones do you have defined?

fashiondeal. in
Guest

just 4 shipping zones i have defined

Martin Boze
Guest

You may want to run an SQL profiler to see if there's a particular query causing this. Doesn't look like something specifically related to OpenCart, more likely a server configuration.

delblues
Guest
hi martin, Im having issues with the blank screen, trying to install locally to development, but I can figure out whats is happen. Ive tried all of your tips above, and it did not work form me. I just copied all the files, one for one in each directory, and tried to run the main site to install multimerch, but i cannot: only got the blank page. 01) sometimes, at the admin page temptative, it shows up this error bellow, which is the same as the sytem error log file - "error.log" : Undefined property: TemplateBasic::$load in /Applications/MAMP/htdocs/opencart-2.2.0.0/upload/vqmod/vqcache/vq2-admin_view_template_common_header.tpl on line… Read more »
Martin at MultiMerch
Guest

This happens because MultiMerch 7.x is not compatible with OpenCart 2.2. Please use it with OpenCart 2.1.x. The new version of MultiMerch (8.x) will be released soon that is OC2.2-compatible.

delblues
Guest

thanks, it works now! Waiting for the new version. Have a schedule?

Martin Boze
Guest

MultiMerch 8 Beta has just been released. In a few days we'll fix the remaining issues and release MultiMerch 8 stable :)

Arif
Guest

Hi Marting, Where can I get the Multimerch Core 8 ? Github still have the 7.7. I just installed the OC 2.2 and then tried Mulitmerch 7.7 but getting the issue as delblue mentioning. Caan you please suggest ?

Arif
Guest

Right now I am going with OC 2.1 and the Multimerch 7.7. Can you guys please create a easier and unbroken upgrade path from this setup ?

Martin Boze
Guest

MM 7.x for OpenCart 2.1.x is the latest version that has MultiMerch Core, I'm afraid. Due to major structure changes between OC 2.1.x and 2.2.x is isn't 2.2-compatible.

MultiMerch does not have a separate Core version starting with 8.x.

trackback

[…] The dreaded Blank Pages of Death and Internal Server Errors are common when moving your OpenCart store, installing new extensions or performing an update.  […]

trackback

[…] Fixing Blank Pages and Server Errors in OpenCart. ThemeBooster Support Center. 345: "Error: Could not load language common/maintenance!" in OpenCart 1.5 - InMotion Hosting. When working with OpenCart, or any program, there is always the possibility for errors to occur. This article describes a particular error in OpenCart that occurs when placing the OpenCart site into maintenance mode due to a missing maintenance.php file. This results in a blank screen with "Error: Could not load language common/maintenance! […]

trackback

[…] Fixing Blank Pages and Server Errors in … – The dreaded Blank Pages of Death and Internal Server Errors are common when moving your OpenCart store, installing new extensions or performing an update. […]

trackback

[…] Fixing Blank Pages and Server Errors in … – The dreaded Blank Pages of Death and Internal Server Errors are common when moving your OpenCart store, installing new extensions or performing an update. […]

Aarif Nabi Roshangar
Guest

hi,
please help, my opencart website is not working after i made some changes in footer.tpl, i refreshed modifications as well but no result.

Martin Boze
Guest

Feel free to shoot us an email with more details to support@multimerch.com and I'll see if we can help you :)

Aarif Nabi Roshangar
Guest

hi
please help me , i see these error logs

[22-Nov-2016 10:20:26 Etc/GMT] PHP Fatal error: Call to undefined function phperror_reporting() in /home/haroosig/public_html/kashmirkit.com/index.php on line 1

Arun Singh
Guest

/home/splasdjr/public_html/vqmod/vqcache/vq2-system_storage_modification_system_engine_action.php
how to resolve this error opencart version 2.1.0.1

Arun Singh
Guest

Hi,
when we click on menu then this error are come please help me

Areb Faraz
Guest

Hello martin sudden of my multivendor module from admin disappear what should i do now.. please help

Martin Boze
Guest

In most cases, this is caused by broken vQmods or vQmod caching issues. Please mail us at support@multimerch.com if this happens again – this way we'll be able to get back to you sooner.

IVEDIRS Devi
Guest

Hello Martin, Suddenly in my opencart website /admin the page, Displays "Requested Page Not Found' Error Message.
I don't know what is happened & why its happened. Please Help me to solve. Here I don't have any senior persons to help/solve this issue.

Martin Boze
Guest

This can happen for a number of reasons including third party mods, broken htaccess files and incorrect permissions (make sure your admin/ folder is not group-writable!).

Mahender Singh Manral
Guest
Mahender Singh Manral

I am getting a blank page as I have moved from localhost to server.Error log is empty.

Martin Boze
Guest

Make sure to update your config.php and admin/config.php files! Also, make sure to check the location of the actual error log in your phpinfo(); settings – it could be that it's logging errors to a different location.

Young Tex
Guest

Thank you verry much, you solved my problem. It was simply that I changed my password and all I needed is to edit the new password in the SLQ.

Malaabes.com
Guest
Hello Martin, Thank you for the valid information. I just need a help with my very strange issue that i am facing in Opencart V 2.0.1.1 which i have recently upgraded to from OC V 1.5.6.4 In all the admin pages like: Categories, Products, Manufacturers etc. it shows the pages count as (0). Products for instance shows 20 products only in the first page and when the next page clicked, it shows again the exact same 20 products while i am already shifted to the second page. https://uploads.disquscdn.com/images/e0ae6c03e749872a7d6e054168150fdc321c392a03761fb80df256dd3acfd250.png Although everything in the admin back end looks neat, the front shows… Read more »
satheesh
Guest

Hi martin in my opencart website i coudn't move to the next page.. when i click to page 2 from page1 it shows void and its not moving at al... also i coudnt sort number of products to display in a page as well... can u please help me in that

Martin Boze
Guest

In this case you'll need to use Chrome's or Firefox' developer tools to look into server's response. I recommend checking our quick Ajax debug guide here: https://multimerch.com/blog/debugging-syntaxerror-json-parse-in-opencart/

Eugene
Guest
I checked everything...and finally fixed my problem since all codes have no problem executing with no erros as well...we found out it is server related....we are using plesk on centos 7, originally open files limit is 1024 and 4096 for nginx Since plesk heavily relies on nginx. and we have lots of spams on port 80...so I suspected it might be nginx loading issues, after a month of debugging, we finally fixed it 1. Check your system open files limit, default is 1024...we adjusted it to larger value and fixed the problem.... 2. Check your nginx and httpd open files… Read more »