Next Webinar: Maximizing Magento - Get the Most out of Promotions. Register Today!

Magento

Open Source eCommerce Evolved

Magento Forum

   
Does your server meet the requirements for Magento? 
 
Crucial
Guru
 
Avatar
Total Posts:  505
Joined:  2007-11-07
Phoenix, AZ
 

I posted this file in another thread, but figured some people might find this useful. It’s a PHP script I made real quick that checks to see if your server meets the requirements for Magento. If it does, it lets you know, otherwise it tells you what needs to be installed. See attached for the PHP script. Simply upload it and then go to it in your browser.

It checks for the following:

-PHP 5.2.0 (or greater)
-MySQL 4.1.20 (or greater)

-cURL
-DOM
-GD
-hash
-iconv
-mcrypt
-pcre
-PDO
-PDO_MYSQL
-SimpleXML

Here’s the code:

<?
extension_check
(array( 
    
'curl',
    
'dom'
    
'gd'
    
'hash',
    
'iconv',
    
'mcrypt',
    
'pcre'
    
'pdo'
    
'pdo_mysql'
    
'simplexml'
));

function 
extension_check($extensions{
    $fail 
'';
    
    if(
version_compare(phpversion(), '5.2.0''<')) {
        $fail 
.= '<li>PHP 5.2.0 (or greater)</li>';
    
}
    
    
if(!ini_get('safe_mode')) {
        preg_match
('/[0-9]\.[0-9]+\.[0-9]+/'shell_exec('mysql -V')$version);
        
        if(
version_compare($version[0]'4.1.20''<')) {
            $fail 
.= '<li>MySQL 4.1.20 (or greater)</li>';
        
}
    }
    
    
foreach($extensions as $extension{
        
if(!extension_loaded($extension)) {
            $fail 
.= '<li>'.$extension.'</li>';
        
}
    }
    
    
if($fail{
        
echo '<p>Your server does not meet the requirements for Magento.';
        echo 
'The following requirements failed:</p>';
        echo 
'<ul>'.$fail.'</ul>';
    
else {
        
echo '<p>Congratulations! Your server meets the requirements for Magento.</p>';
    
}
}
?>

File Attachments
magento-check.php  (File Size: 1KB - Downloads: 211)
 Signature 

Crucial Web Hosting
We provide hosting for Magento in shared, semi-dedicated, and dedicated configurations.
Our Containers include free features like professional Magento support, SSL certificate, McAfee Secure, and hourly backups.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1771
Joined:  2007-08-07
Los Angeles
 

@crucial: actually mhash and mysqli are not required anymore smile

 Signature 

- I would love to change the world, but they won’t give me the source code -

 
Magento Community Magento Community
Magento Community
Magento Community
 
Kres
Jr. Member
 
Avatar
Total Posts:  9
Joined:  2007-11-25
Barcelona
 

Thank you for the script smile

 Signature 

Saioa · Blog

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial
Guru
 
Avatar
Total Posts:  505
Joined:  2007-11-07
Phoenix, AZ
 

Updated the script to remove mhash and mysqli check, and also added MySQL version checking.

 Signature 

Crucial Web Hosting
We provide hosting for Magento in shared, semi-dedicated, and dedicated configurations.
Our Containers include free features like professional Magento support, SSL certificate, McAfee Secure, and hourly backups.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mmw
Jr. Member
 
Total Posts:  3
Joined:  2008-04-16
 

On a fresh install of WAMP server 2.0; I receive the following message on the config step of install and I am stumped.
http://localhost/magento/magento/index.php/install/wizard/config/

o PHP Extension “pdo_mysql” must be loaded
o PHP Extension “mcrypt” must be loaded
o PHP Extension “curl” must be loaded

Any ideas?
Here is a snippet from my PHP.ini

;extension=php_bz2.dll
extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_exif.dll
;extension=php_fdf.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_ifx.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_msql.dll
;extension=php_mssql.dll
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll
;extension=php_openssl.dll
extension=php_pdo.dll
;extension=php_pdo_firebird.dll
;extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_oci8.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
;extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_pspell.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_soap.dll
;extension=php_sockets.dll
extension=php_sqlite.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_zip.dll

extension=php_mcrypt.dll
extension=php_mcrypt_filter.dll

 
Magento Community Magento Community
Magento Community
Magento Community
 
adimagento
Magento Team
 
Avatar
Total Posts:  551
Joined:  2007-08-29
Los Angeles, CA
 

We are using this great requirements sniffer from Crucial on our Professional Installation page too.

We made a few small changes like checking for Safe Mode and displaying a detailed pass/fail information.

http://www.magentocommerce.com/store/professional-magento-installation

Thanks Crucial for putting this together smile

File Attachments
magento-check.php  (File Size: 2KB - Downloads: 75)
 Signature 

Adi
Community Administrator

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
Sales: Call 877.832.5289 (North America) 310.295.4144 (International)
© Copyright 2008 Varien. Magento is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
40862 users|391 users currently online|87498 forum posts