Magento Forum

Check if server can run Magento
 
licentia
Sr. Member
 
Avatar
Total Posts:  78
Joined:  2007-08-31
Portugal
 

Hi,
´
Magento only checks PHP version, and if its lower than 5.2.0 the installation process is blocked.

I think Magento should also check for extensions.

There are a few (or more than that) that don’t have all extensions on server (specially mcrypt).

I’ve created a small script that checks the php version and some extensions (a think the ones Magento needs but no official confirmation).

The script then tels user if the server can run Magento, and if not, shows the problems.

I think Magento should release something like this so we can check the server before upload the files.

This is the extension list i check

$check = array('mcrypt','ctype','pcre','pdo_mysql','gd','iconv','simplexml','pdo','dom','curl');

Some are a Magento dependency and others ZF.

Uncompress the file a upload check.php to the server and then run it

Regards,

File Attachments
check.zip  (File Size: 2KB - Downloads: 749)
 
Magento Community Magento Community
Magento Community
Magento Community
 
MrD3SAi
Jr. Member
 
Avatar
Total Posts:  3
Joined:  2008-03-27
Philadelphia
 

Nice check feature.  I have modified it to include mySQL check as well using this code:

function find_SQL_Version() {
   $output 
shell_exec('mysql -V');
   
preg_match('@[0-9]+\.[0-9]+\.[0-9]+@'$output$version);
   return 
$version[0];
}

$passes_mySQL 
version_compare("4.1.20"find_SQL_Version(), "<");
Hope it can be helpful to others :-)
File Attachments
check.zip  (File Size: 2KB - Downloads: 526)
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top