1
votes

I'm installing Magento version 2.0.0 on my server. I am getting 500 error without even configure it. Try various solutions got no positive response. Apply the check and cleanup files and receive these messages:

Check :

Your server does not meet the following requirements in order to install Magento.
The following requirements failed, please contact your hosting provider in order to receive assistance with meeting the system requirements for Magento:

You need MySQL 4.1.20 (or greater)

The following requirements were successfully met:
You have PHP 5.2.0 (or greater)
Safe Mode is off
You have the curl extension
You have the dom extension
You have the gd extension
You have the hash extension
You have the iconv extension
You have the mcrypt extension
You have the pcre extension
You have the pdo extension
You have the pdo_mysql extension
You have the simplexml extension

Clean-up :

----------------------- CLEANUP START -------------------------

*************** SETTING PERMISSIONS ***************
Setting all folder permissions to 755
Setting all file permissions to 644
Setting pear permissions to 550

****************** CLEARING CACHE ******************

************** CHECKING FOR EXTENSIONS ***********
-= WARNING =- Overrides or extensions exist in the app/code/local folder
-= WARNING =- Overrides or extensions exist in the app/code/community folder

------------------- CLEANUP COMPLETED in:2.6845 seconds ------------------

At check file it says I do not have that version of MySQL on my server. Add the following code to see which version I have and this is the answer:

echo "<h2>Exact Version PHP & MySQL: </h2>";
printf("PHP version: %s\n", PHP_VERSION); 
$mysql = mysqli_connect('localhost', 'root', 'example'); 
#$mysql = mysqli_connect('localhost', 'root', ''); 
## Test the MySQL connection 
if (mysqli_connect_errno()) {
   printf("</br> Connection failed: %s\n", mysqli_connect_error());
   exit();
}
## Print the MySQL server version 
printf("</br> MySQL server version: %s\n",    mysqli_get_server_info($mysql)); 
##Close the MySQL connection 
mysqli_close($mysql);

Result :

Exact Version PHP & MySQL:

PHP version: 5.5.30-1~dotdeb+7.1 
MySQL server version: 5.6.15

EDIT

Error Logs my server

[Fri Jan 08 12:02:44 2016] [error] [client 200.111.332.174] PHP Fatal error: Uncaught exception 'Magento\Framework\Exception\LocalizedException' with message 'Can't create directory /home/nhernandez/public_html/editorialauncreemos/var/generation/Magento/Framework/App/ResourceConnection/.' in /home/nhernandez/public_html/editorialauncreemos/vendor/magento/framework/Code/Generator.php:103\nStack trace:\n#0 /home/nhernandez/public_html/editorialauncreemos/vendor/magento/framework/Code/Generator/Autoloader.php(35): Magento\Framework\Code\Generator->generateClass('Magento\\Framewo...')

1 [internal function]: Magento\Framework\Code\Generator\Autoloader->load('Magento\\Framewo...')

2 [internal function]: spl_autoload_call('Magento\\Framewo...')

3 /home/nhernandez/public_html/editorialauncreemos/vendor/magento/framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct('Magento\\Framewo...')

4 /home/nhernandez/public_html/editorialauncreemos/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\\Fram in /home/nhernandez/public_html/editorialauncreemos/vendor/magento/framework/Code/Generator.php on line 103

1
I there a close option for Cannot be bothered to read the first 2 lines of the error from the screen? - RiggsFolly
Except at the bottom where the OP lists "MySQL server version: 5.6.15". Curious. Unless the OP is not using localhost for the Magneto DB. - aynber
It will be obvious, but I do have a later version installed on my server. - NHTorres
Then he is not connecting to the same MYSQL in the install as he does in his PHP test - RiggsFolly
You can have, although it does lead to confusion, more than one MYSQL Server installed on any one system - RiggsFolly

1 Answers

0
votes

Since you mentioned that the magento store loads after giving 777 permissions, we can conclude that there is no problem with mysql database connectivity.

Your server logs tell exactly what the problem really is. Make sure that the ownership of magento root directory, subdirectories and all files are as per apache (httpd.conf) User and Group.

In my box, User is http and Group is http. Issue following commands, where $MAGENTO_ROOT is your magento root directory:

$ chown http:http * -R
$ cd $MAGENTO_ROOT
$ sudo rm var/{cache,session,generation} -R
$ sudo -u http -g http bin/magento setup:upgrade
$ sudo -u http -g http bin/magento setup:di:compile

If you are using php-fpm then make sure php-fpm.ini has same user and group values.