Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 2
Does your server meet the requirements for Magento? 
 
Crucial
Enthusiast
 
Avatar
Total Posts:  770
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: 1337)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

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

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

Thank you for the script smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial
Enthusiast
 
Avatar
Total Posts:  770
Joined:  2007-11-07
Phoenix, AZ
 

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

 
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
Guru
 
Avatar
Total Posts:  626
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: 574)
 
Magento Community Magento Community
Magento Community
Magento Community
 
njwood60
Jr. Member
 
Total Posts:  25
Joined:  2008-09-16
 

Hi

Thanks for this thread and the server checker

Just to let you know that my server passes the test when I run the magento-check.php file, and I went ahead with Magento.

I have now found that MagentoConnect doesn’t work as popen() is not enabled on my server.

I think that should be added to the magento-check.php file, to check that popen is enabled.

While technically I can install and run Magento without MagentoConnect, I can’t install any extensions, so as far as I’m concerned it really doesn’t run

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Roly
Sr. Member
 
Total Posts:  276
Joined:  2008-04-30
 

You will have to ask your webhost to enable popen() for you..

 
Magento Community Magento Community
Magento Community
Magento Community
 
njwood60
Jr. Member
 
Total Posts:  25
Joined:  2008-09-16
 

Thanks Roly - yes I do realise that

However if the requirements had stated that popen was required then I would have asked the hoster prior to installing Magento and would not have proceeded if it was not possible to have popen enabled

 
Magento Community Magento Community
Magento Community
Magento Community
 
Roly
Sr. Member
 
Total Posts:  276
Joined:  2008-04-30
 

Your host disable it for security reason.. smile

Try ask them whether they can enable it.. especially when magento is so popular now. smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
jballotti
Guru
 
Avatar
Total Posts:  339
Joined:  2008-04-20
Chicago area
 

The script shows that I need MySQL version 4.1.x or higher even though I have version 5.0.45. Also, it fails to check to see if MySQL supports InnoDB storage engine. This is becoming a real issue.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Crucial
Enthusiast
 
Avatar
Total Posts:  770
Joined:  2007-11-07
Phoenix, AZ
 
jballotti - 05 March 2009 06:54 AM

The script shows that I need MySQL version 4.1.x or higher even though I have version 5.0.45. Also, it fails to check to see if MySQL supports InnoDB storage engine. This is becoming a real issue.

You can ignore that, the script just couldn’t get the version of MySQL, which can only be obtained if SSH access is available (or you can run system calls through PHP).

If you know you’re running the required version then you can proceed with installing Magento, which also has a check function in it for various PHP extensions, MySQL, and versions.

And there’s no plans on updating the script in this thread (put out almost a year ago). It was made before Varien put it up officially and is now maintained here:

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

Checking for InnoDB would require the user putting in the database information so the script could connect to the database and check for InnoDB and the actual version. Though, as I mentioned before, the installer for Magento does a good job of checking for everything anyways.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Yoke Lee
Sr. Member
 
Avatar
Total Posts:  80
Joined:  2008-05-08
China - Singapore
 

Hi I dunno why

My Host server stated that MySql version is 5.0.51-community
but i still got the error of that You need MySQL 4.1.20 (or greater) in magento-check.php

what can i do about this?

also it said that shell_exec() has been disabled in magento-check.php on line 28.

any suggestion would be great. Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
TanRambun
Sr. Member
 
Avatar
Total Posts:  93
Joined:  2008-11-16
Bangkok, Thailand
 
Yoke Lee - 15 March 2009 02:19 AM

My Host server stated that MySql version is 5.0.51-community
but i still got the error of that You need MySQL 4.1.20 (or greater) in magento-check.php

what can i do about this?

also it said that shell_exec() has been disabled in magento-check.php on line 28.

Maybe shell_exec is in the list of disabled functions in your php-configuration (look at “disable_functions” in the output of phpinfo())? Then the script could not detect the MySQL-version and shows an error.

I would guess you can savely ignore this error if you are sure your MySQL-server is version 5.0.51-community.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Yoke Lee
Sr. Member
 
Avatar
Total Posts:  80
Joined:  2008-05-08
China - Singapore
 

Hi TanRambun,

Thanks for the info.
Yes it is disabled.

Problem is I cannot edit the php.ini in my webhost server myself.
I have contacted the web host provider, but it seems no response.

Should start to think about the premium rather than the free one…
The service really questionable…

Btw, does this have something to do with the never pass through license agreement on installation issue?

 
Magento Community Magento Community
Magento Community
Magento Community
 
TanRambun
Sr. Member
 
Avatar
Total Posts:  93
Joined:  2008-11-16
Bangkok, Thailand
 
Yoke Lee - 15 March 2009 04:07 AM

Btw, does this have something to do with the never pass through license agreement on installation issue?

Don’t know. Do you get an error-message you can post here?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2