I have installed Magento Community edition and tried creating my first simple hello world module. After a few hours I finally got it working.
My issues were I had used incorrect casing in some of the XML tags.
While trying to get it to work I tried to load the page a not found message was displayed, but no error.
I have switched errors on in the admin control panel System > Configuration > Developer > Log Settings and wrote a line which I know should have thrown an error but I just got a blank screen
How do I get errors to display in Magento?
Is it considered an error when I use incorrect casing in an xml file or is that an issue where I would not receive an error message? And if that is the case how would I quickly find the file that is causing the issue (obviously not a problem at the moment, but I can imagine as the module become functional it will be hard to find a single casing issue that is causing the problem)
For enable error reporting
In Index page change the following:
error_reporting(E_ALL | E_STRICT);
to
error_reporting(E_ALL);
Set $_SERVER['MAGE_IS_DEVELOPER_MODE'] = true
and uncomment this line
#ini_set('display_errors', 1);
In Errors folder rename local.xml.sample to local.xml.
hope this help.
to complete the pankaj post,
this work for me
index.php
ini_set('display_errors', 1);
error_reporting(E_ALL);
$_SERVER['MAGE_IS_DEVELOPER_MODE'] = true;
Here are the steps that you should do in order to set Magento to display errors on the browser:
System > Cache Management > Disable All
System > Configuration > Advanced > Developer > Log Settings > Enabled => Yes
System > Configuration > Web > Search Engine Optimization > Use Wbe Server Rewrites => Yes
System > Index Management > Reindex All
Open .htaccess and set: SetEnv MAGE_IS_DEVELOPER_MODE "true" at the end of the file
Open .htaccess and set: php_value display_errors On somewhere within
Rename or copy /errors/local.xml.sample to /errors/local.xml
Modifying this code in magneto directory index.php:
Search for error_reporting(E_ALL | E_STRICT);
Replace with
error_reporting(E_ALL);
$_SERVER['MAGE_IS_DEVELOPER_MODE'] = true;
OR
Uncomment it by removing the # sign from
#ini_set('display_errors', 1);
Refereed Link:
http://www.templatemonster.com/help/magento-how-to-display-error-messages.html
Related
I installed magento 2.4.2 on bluehost vps hosting, but I am getting the website as shown in figure 1 I tried every solution I found online but non of them worked for me.
Solutions I tried:
1- changing the permission for pub/static dir.
2- In app/etc/di.xml, find the virtualType name=”developerMaterialization” section and its item called name=”view_preprocessed”. I changed Symlink with Copy in Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink.
3- php bin/magento setup:static-content:deploy -f command
4- RewriteEngine On, in /pub/static/.htaccess file
5- set sign static files to No (dev/static/sign to 0)
I wish someone can help
Hi #Silverwolf96 and welcome on StackOverflow.
There are few things you can try/check.
1.) Check in the page source if the URLs to your files are correct. If not set correctly, set them manually as described in step 2.
2.) Go to Store > Configuration > General > Web and set under Base URLs & Base URLs (Secure) your URLs for static files - you can set this URL manually and it needs to be set as http://www.example.com/static/
3.) You can try to remove pub/static/frontend on the server
4.) Check what happens if you select Magento Luma as the default theme
PHP info page shows that log_errors is set Off even tho I set it On
in info.php page shows:
Loaded Configuration File -> /etc/php/7.0/apache2/php.ini
Scan this dir for additional .ini files -> /etc/php/7.0/apache2/conf.d
top portion of altered php.ini file:
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
display_errors = On
log_errors = On
error_log = /var/log/php-errors.log
I have tracked the rest of php.ini file and found other log_error reference which I have also set On
log_errors = On
I am not sure if I should use ini_set('display_errors', 1); format in .ini files, I have found answers about this and used everything to test if anything worked but still.
So what's wrong with config?
Note: yes, I have restarted apache2.
Using up to date Ubuntu Server x64 16.04 running PHP Version 7.0.13-0ubuntu0.16.04.1
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
won't work in ini file.
to enable error reporting write following line in your ini file
error_reporting = E_ALL
for more info refer here
I can't find solvation for this problem. Some products is OK, some return me 500 error (without timeout).
Debug mode gave me nothing interesting (identical errors on OK-pages and noOK-pages).
Logs are empty.
Magento 1.9.2.1.
500 is PHP error so please check view.phtml file find out error.
As advice: enable debug mode of your Magento system.
1)
In index.php uncomment this line:
#ini_set('display_errors', 1);
And add into your .htaccess
SetEnv MAGE_IS_DEVELOPER_MODE "true"
Then is a chance that you can see an errors
2)
In addition you can check your logs in /var/log folder
3) check your server logs. Error 500 usually logged in default server logs
500 is PHP error.
Check in template file, try to debug the php code (should in view.phtml file)
I got the same issue and i fixed it by debug in view.phtml file. The code calls a function in the module that i disabled.
I am trying to install magento 1.9 on my web hosting server .
I ftp-ed the files into my hosted website but experience the following error when i try to access my URL.
Fatal error: Class 'Mage_Core_Controller_Request_Http' not found in /home/bf/public_html/app/code/core/Mage/Core/Model/App.php on line 1238
I tried a google search but i am unable to find anything relevant .
Just download the Fresh copy from Magento community again. Also make sure that your server has all the prerequisite for Magento as mentioned in below link.
http://docs.magento.com/m1/ce/user_guide/magento/system-requirements.html
Please make sure that below files exist in this directory
app/code/core/Mage/Core/Controller/Request/Http.php
1.Make sure you have enabled curl on your server and with have right file permission.
2.Make sure file should exist on following path:
/home/bf/public_html/app/code/core/Mage/Core/Controller/Request/Http.php
3.Make sure compilation mode is disabled.
/home/bf/public_html/includes/config.php
Every thing inside should be commented.
4.If it does not work, you have to debug this.
Open index.php in root and add these line of code,
Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);
It will show you why error is coming.Once you will find the root cause, you can get the solution on google or any forum.
The error log record number created isn't found under var/report and i cannot access the backend.
`Exception printing is disabled by default for security reasons.
Error log record number: 148013902355`
How can i solve this ?
I cannot read the error it has printed on that particular log number. It's in remove server and showing in backend mysite.com/admin.
Update : I can see error after (allowing developermode and enabling to display error in root/index.php file)
//if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
Mage::setIsDeveloperMode(true); //and allowing this
//}
ini_set('display_errors', 1); //commenting this
To view the error in detail on browser rename local.xml.sample to local.xml in Errors folder in magento root directory. Also please check var/report writable permission for error file.