Magento – Fatal error: Class Mage not found

Of corse, this can be caused by many different things, but if you’re stuck, without any ideas what could be wrong, than¬†try solution bellow. Compiler stores everything in one file and can cause problems with includes. Just clear compiler and disable it if you don’t need it of corse.

I was getting error like this:

Warning: include(Mage.php): failed to open stream: No such file or directory in /my/web/server/root/public_html/lib/Varien/Autoload.php on line 94 Warning: include(): Failed opening 'Mage.php' for inclusion (include_path='/my/web/server/root/public_html/app/code/local:/my/web/server/root/public_html/app/code/community:/my/web/server/root/public_html/app/code/core:/my/web/server/root/public_html/lib:.:/usr/local/share/pear') in /my/web/server/root/public_html/lib/Varien/Autoload.php on line 94 Fatal error: Class 'Mage' not found in /my/web/server/root/public_html/app/code/core/Mage/Core/functions.php on line 244

Just login into your shell and then execute commands bellow (without comments):

//clear compiler
php compiler.php clear
//disable compiler
php compiler.php disable

It is most likely that this will fix your problem. If not, keep digging ūüôā

Hope it helps.

Alpine PhotoTile for Instagram not showing images

If you’re using this WordPress plugin to show Instagram images gallery on your site, and you noticed that images don’t show anymore, chances are, that this is due to deprecated PHP¬†function¬†ereg_replace. recently I upgraded my PHP¬†version to 7.1 and this plugin stopped working. So, if you upgraded your PHP, this is almost certain¬†the cause of problem. There is how to fix this.

Error log was showing this:

2017/02/11 11:31:40 [error] 18865#18865: *4616 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function ereg_replace() in /path/to/site/public_html/wp-content/plugins/alpine-photo-tile-for-instagram/gears/alpinebot-display.php:58

So, open alpinebot-display.php with your favorite text editor and go to line where error is Рin this case 58. Just replace ereg_replace with preg_replace and it should work again.

Hope it hepls.

WHMCS – can’t add new tld to domains

I found this odd issue with WHMCS billing platform.¬†I wanted to add new tld to our domain pricing list, but when I clicked on Save Changes I’ll get notice that¬†tld was added, but it wasn’t¬†on domain list.

Just add/edit this in your php configuration – php.ini (default value is 1000):

max_input_vars = 5000

PHP: SSL operation failed with code 1

If you installed PHP 5.6 or grater and your application returns something like this:

SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL...

Then there is a simple fix for that. You can override¬†default OpenSSL’s CA bundle with the one bellow.

  1. Download this cert bundle.
  2. Add this line to your php.ini file
    openssl.cafile=/path/to/your/downloade/cacert.pem
  3. Restart apache/nginx and you should be ok.

© 2017 geegkytuts.net
Hosted by Hosterdam


About author