Magento: Using APC leads to SimpleXML PHP error - magento

I want to use APC with Magento. I added the folling code in app/etc/local.xml:
<cache>
<backend>apc</backend>
<prefix>MAGE_</prefix>
</cache>
but I am getting the error below.
APC is already enabled on the server and working with other sites.
The error message
Warning: simplexml_load_file()
[function.simplexml-load-file]:
Entity: line 58: parser error :
expected '>' in
/var/www/html/webkul/magento/partner/app/Mage.php
on line 645
Warning: simplexml_load_file()
[function.simplexml-load-file]:
in
/var/www/html/webkul/magento/partner/app/Mage.php
on line 645
Warning: simplexml_load_file()
[function.simplexml-load-file]: ^ in
/var/www/html/webkul/magento/partner/app/Mage.php
on line 645
Notice: Trying to get property of
non-object in
/var/www/html/webkul/magento/partner/app/Mage.php
on line 647
Notice: Trying to get property of
non-object in
/var/www/html/webkul/magento/partner/app/Mage.php
on line 647
Notice: Trying to get property of
non-object in
/var/www/html/webkul/magento/partner/app/Mage.php
on line 647
What could lead to this error?

I'm use memcache to provider back cache
that magento can not read config file please makesure you config is correct
BTW:apc is not compatible X64 OS

Make sure your LAMP stack has all of the requirements being met:
http://www.magentocommerce.com/knowledge-base/entry/how-do-i-know-if-my-server-is-compatible-with-magento
Particularly SimpleXML.

Related

Getting error when deploying Laravel code

trying to deploy locally first, then to Heroku code following tutorial provided by class professor. Followed video to the T but his deploys and mine doesn't. I am code-dumb so please be as basic as possible. https://www.youtube.com/watch?time_continue=1583&v=8NOslcDSIoI
Using Laravel with PhpStorm.
Could not find resource 'views/layouts.html.php' in any resource paths.(searched: C:\Users\{MY NAME}\PhpstormProjects\is601webpage\vendor\filp\whoops\src\Whoops\Handler/../Resources)
(1/1) RuntimeException
Could not find resource 'views/layouts.html.php' in any resource paths.(searched: C:\Users\{MY NAME}\PhpstormProjects\is601webpage\vendor\filp\whoops\src\Whoops\Handler/../Resources)
in PrettyPageHandler.php line 621
at PrettyPageHandler->getResource('views/layouts.html.php')
in PrettyPageHandler.php line 170
at PrettyPageHandler->handle(object(ErrorException))
in Run.php line 320
at Run->handleException(object(ErrorException))
in Handler.php line 343
at Handler->renderExceptionWithWhoops(object(ErrorException))
in Handler.php line 322
at Handler->renderExceptionContent(object(ErrorException))
in Handler.php line 306
at Handler->convertExceptionToResponse(object(ErrorException))
in Handler.php line 285
File name should be layouts.blade.php.

Magento: Warning: simplexml_load_file

i got a problem with magento.
The problem is when i try to access: one of the categories
i get the following error:
There has been an error processing your request
Exception printing is disabled by default for security reasons.
Error log record number: 996553057356
content of the log:
Warning: simplexml_load_file() [function.simplexml-load-file]:
/home/0/w202816/www/webshop/errors/local.xml:1: parser error :
Document is empty in
/home/0/w202816/www/webshop/errors/processor.php on line 337
Warning: simplexml_load_file() [function.simplexml-load-file]: in
/home/0/w202816/www/webshop/errors/processor.php on line 337
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in
/home/0/w202816/www/webshop/errors/processor.php on line 337
Warning: simplexml_load_file() [function.simplexml-load-file]:
/home/0/w202816/www/webshop/errors/local.xml:1: parser error :
Start tag expected, '<' not found in
/home/0/w202816/www/webshop/errors/processor.php on line 337
Warning: simplexml_load_file() [function.simplexml-load-file]: in
/home/0/w202816/www/webshop/errors/processor.php on line 337
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in
/home/0/w202816/www/webshop/errors/processor.php on line 337
Warning: Cannot modify header information - headers already sent by
(output started at
/home/0/w202816/www/webshop/errors/processor.php:337) in
/home/0/w202816/www/nwebshopikk/errors/processor.php on line 360
Warning: Cannot modify header information - headers already sent by
(output started at
/home/0/w202816/www/webshop/errors/processor.php:337) in
/home/0/w202816/www/webshop/errors/processor.php on line 361
How to fix?
It appears you're missing the local.xml.sample or local.xml or its malformatted.
Try to find a vanilla magento installation and copy:
root/errors/local.xml.sample
Into your
root/errors/local.xml.sample
OR
root/errors/local.xml
If you want them rendered on the client.

Magento cronjob error

I'm trying to set up a cronjob for magento.
My cronjob is:
*/5 * * * * /bin/sh /var/www/vhosts/#######/httpdocs/cron.sh >/dev/null 2>&1
This works well, but cron.sh is giving this error:
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imap.ini on line 1 in Unknown on line 0
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
[eAccelerator] This build of "eAccelerator" was compiled for PHP version 5.3.2-1ubuntu4.9. Rebuild it for your PHP version (5.3.2-1ubuntu4.14) or download precompiled binaries.
PHP Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
PHP Warning: realpath(): SAFE MODE Restriction in effect. The script whose uid is 0 is not allowed to access /var/www/vhosts/########/httpdocs/app owned by uid 10001 in /var/www/vhosts/########/httpdocs/app/Mage.php on line 273
PHP Fatal error: Uncaught exception 'Mage_Core_Exception' with message ' is not a directory or not readable by this user' in /var/www/vhosts/########/httpdocs/app/Mage.php:594
Stack trace:
#0 /var/www/vhosts/########/httpdocs/app/Mage.php(278): Mage::throwException(' is not a direc...')
#1 /var/www/vhosts/########/httpdocs/app/Mage.php(752): Mage::setRoot()
#2 /var/www/vhosts/########/httpdocs/cron.php(29): Mage::isInstalled()
#3 {main}
thrown in /var/www/vhosts/########/httpdocs/app/Mage.php on line 594
Deleted the first line of /etc/php5/cli/conf.d/mcript.ini (Number 12)
This may help you
For reference :
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/573436
eaccelerator : https://wiki.archlinux.org/index.php/EAccelerator
safe_mode : just comment safe_mode or Laravel shared hosting - Directive 'safe_mode' is deprecated in PHP 5.3 and greater
app :file permission issue give -R 777

any page maybe get the error include admin page

When open a page, then maybe get an error info, it\’s even now.
Anyone else had this issue or have any idea on how to fix this or where to start looking?
/**
* Retrieve application root absolute path
*
* #param string $type
* #return string
*/
public static function getBaseDir($type = \'base\')
{
return self::getConfig()->getOptions()->getDir($type); // Line 296
}
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Object.php on line 99
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Object.php on line 115
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Object.php on line 115
Warning: array_keys() expects parameter 1 to be array, null given in /var/www/html/magento/lib/Varien/Object.php on line 115
Warning: array_intersect(): Argument #1 is not an array in /var/www/html/magento/lib/Varien/Object.php on line 115
Notice: Trying to get property of non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/Config/Options.php on line 146
Notice: Trying to get property of non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/Config/Options.php on line 65
Notice: Trying to get property of non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/Config/Options.php on line 66
Notice: Trying to get property of non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/Config/Options.php on line 67
Notice: Trying to get property of non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/Config/Options.php on line 68
Notice: Trying to get property of non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/Config/Options.php on line 69
Notice: Trying to get property of non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/Config/Options.php on line 70
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84
Notice: Trying to get property of non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/App.php on line 1315
Notice: Trying to get property of non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/App.php on line 813
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 81
Notice: Trying to get property of non-object in /var/www/html/magento/lib/Varien/Autoload.php on line 84
Notice: Trying to get property of non-object in /var/www/html/magento/app/code/core/Mage/Core/Model/Config.php on line 224
Fatal error: Call to a member function getDir() on a non-object in /var/www/html/magento/app/Mage.php on line 296
I posted a full walk through of this on my blog earlier but after searching hard to figure this out I figured I would post up the solution here too.
The problem is a PHP bug affecting version up to 5.3.3 (https://bugs.php.net/bug.php?id=50027). The bug relates to a garbage collection issue which screws about with being able to access properties on the config options object. This is why some people see a difference after increasing their memory limit - it impacts when garbage collection occurs.
The result is that in _construct() in app/code/core/Mage/Core/Model/Config/Options.php, even though $this is a valid object, any attempt to read any of the properties of $this reports an error that $this is a non-object.
The only robust fix is therefore to upgrade PHP to a version greater than 5.3.3
i have the exact same problem! Have you been able to solve it?
Upping the memory in php.ini worked for some time, but then the errors came back.
Take a look here for more info:
http://www.magentocommerce.com/boards/viewthread/43941/P15/
Greets
Try looking at the memory setting in your php.ini file. This should be 512M or higher. By default it will probably be 128M.
Also look at how often cron is running on server.
Also look at max user connections to DB.
For Magento, you probably want something likeL max_connections = 500 in your php.ini file.
I've experienced same issue in past, looks like resetting frequency of cron jobs back to Magento default has fixed for us.
Certainly nothing wrong with the code. It's php.ini config or server config essentially.

Fatal error in joomla site?

after uploading a file in joomla site this error come
Fatal error: Cannot call overloaded function for non-object in /webcorp1/www/corpusers/p/u/punjabtourism.gov.in/libraries/joomla/utilities/simplexml.php on line 607
Fatal error: Class 'JLoader' not found in /webcorp1/www/corpusers/p/u/punjabtourism.gov.in/libraries/loader.php on line 161
anybody have solution please help
Disable caching and see if that helps the problem - or, if you're using APC caching, then switch to just simple file caching.

Resources