It is an easy method to install Magento in one type of click. But, there are situations where it goes more unpredictable to get errors like 500. You all know that 500 is an error which is code for generic sequence. The server tries to identify the problem but it fails in some instances. In that case, it throws an error called “500”. If you try to give refresh it might work but it doesn’t give you any assurance to get resolved after clicking on the refresh button.
For instance, the problem gets solved after refreshing the installation then there is a problem with the server. Your problem may be solved at the same time it’s time to look after the fault for a precaution. Luck! Change the time from one to one right!
For confirmation, just execute the below comment for identifying server error logs:
The above comment is declared for Magento 1 and Magento 2 find below:
These comments will help you to enable the mode of the developer. It’s simple execution so that we can find the error happened while installing the Magento.
Solution: Change the default file permission as 644 from 664. Use below command to ensure folder permissions are right or not.
If you are worried about changing the file or folder permission as 644 or something then use below command:
/home/xxxxx/public_html/.htaccess: Invalid command 'SetEnv', perhaps misspelt or defined by a module not included in the server configuration
Solution: A server should be installed with proper modules. To enable the Apache Modules go to EasyApache4 and then select Apache Modules.
Simultaneously, execute below command to get details for installing curl extension.
Based on the environment of hosting, the PHP configuration modification takes place. Taking an example as cPanel follows the below instruction:
Step 1: Go to cPanel. Search for the list of PHP versions selects one as per your requirement.
Step 2: Get options for PHP and then tap on PHP selector.
This helps to increase the max_input_time and max_execution_time immediately.
For a direct record, try adding few changes in .htaccess file. Add the below-mentioned PHP directives such as:
Solution: Rename the file for temporary use. This may help you to solve if the entries in the .htaccess file are valid.
Solution: Replace the index.php permission file by removing the maintenance.flag.
This error is very easy to predict and doesn’t let more hours of execution. We have given you a solution for each error for better understandability. Take a minute for a long stretch and then start working on the Magento installation without interruptions. It will give you a good result than you expect! One minute wonder makes a much difference!
For instance, the problem gets solved after refreshing the installation then there is a problem with the server. Your problem may be solved at the same time it’s time to look after the fault for a precaution. Luck! Change the time from one to one right!
For confirmation, just execute the below comment for identifying server error logs:
Code:
Mage::setIsDeveloperMode(true);
ini_set(‘display_errors’, 1);
Code:
php bin/magento deploy:mode:set developer
- Issues in permission:
Solution: Change the default file permission as 644 from 664. Use below command to ensure folder permissions are right or not.
Code:
app/etc
var
media
Code:
find. -type f -exec chmod 644 {} \;
find . -type d -exec chmod 556 {} \;
- Modules missing:
/home/xxxxx/public_html/.htaccess: Invalid command 'SetEnv', perhaps misspelt or defined by a module not included in the server configuration
- Installation of Apache module such as mod_env is not present
- Magento versions like 2.2 and 2.3 must have a mod_version. It’s missing here!
Solution: A server should be installed with proper modules. To enable the Apache Modules go to EasyApache4 and then select Apache Modules.
Simultaneously, execute below command to get details for installing curl extension.
Code:
apt-get install curl libcurl3 libcurl3-dev php5-curl
- Lacking resources:
Based on the environment of hosting, the PHP configuration modification takes place. Taking an example as cPanel follows the below instruction:
Step 1: Go to cPanel. Search for the list of PHP versions selects one as per your requirement.
Step 2: Get options for PHP and then tap on PHP selector.
This helps to increase the max_input_time and max_execution_time immediately.
For a direct record, try adding few changes in .htaccess file. Add the below-mentioned PHP directives such as:
Code:
php_value memory_limit 256M
php_value max_execution_time 1800
php_value max_input_time 1800
- Entries in .htaccess file is invalid:
Solution: Rename the file for temporary use. This may help you to solve if the entries in the .htaccess file are valid.
- Enabling maintenance mode:
Solution: Replace the index.php permission file by removing the maintenance.flag.
This error is very easy to predict and doesn’t let more hours of execution. We have given you a solution for each error for better understandability. Take a minute for a long stretch and then start working on the Magento installation without interruptions. It will give you a good result than you expect! One minute wonder makes a much difference!