Extension checking code

    $extension_array = array(‘names’ => array(‘apc’ => ‘001′, ‘xmlreader’ => ‘002′, ‘xmlwriter’ => ‘003′, ‘json’ => ‘004′, ‘fileinfo’ => ‘005′, ‘imagick’ => ‘006′, ‘gd’ => ‘007′, ‘bz2′ => ‘008′, ‘curl’ => ‘009′, ‘mysql’ => ‘010′, ‘mysqli’ => ‘011′, ‘pgsql’ => ‘012′, ‘zlib’ => ‘013′, ‘zip’ => ‘014′),
‘more_info’ =>
array
(
‘001′ => array(‘description’ => ‘This extension is WONDERFULL’, ’style’ => ‘red’, ‘loaded’ => ‘no’),
‘002′ => array(‘description’ => ‘This extension is WONDERFULL’, ’style’ => ‘red’, ‘loaded’ => ‘no’),
‘003′ => array(‘description’ => ‘This extension is WONDERFULL’, ’style’ => ‘red’, ‘loaded’ => ‘no’),
‘004′ => array(‘description’ => ‘This extension is WONDERFULL’, ’style’ => ‘red’, ‘loaded’ => ‘no’),
‘005′ => array(‘description’ => ‘This extension is WONDERFULL’, ’style’ => ‘red’, ‘loaded’ => ‘no’),
‘006′ => array(‘description’ => ‘This extension is WONDERFULL’, ’style’ => ‘red’, ‘loaded’ => ‘no’),
‘007′ => array(‘description’ => ‘This extension is WONDERFULL’, ’style’ => ‘red’, ‘loaded’ => ‘no’),
‘008′ => array(‘description’ => ‘This extension is WONDERFULL’, ’style’ => ‘red’, ‘loaded’ => ‘no’),
‘009′ => array(‘description’ => ‘This extension is WONDERFULL’, ’style’ => ‘red’, ‘loaded’ => ‘no’),
‘010′ => array(‘description’ => ‘This extension is WONDERFULL’, ’style’ => ‘red’, ‘loaded’ => ‘no’),
‘011′ => array(‘description’ => ‘This extension is WONDERFULL’, ’style’ => ‘red’, ‘loaded’ => ‘no’),
‘012′ => array(‘description’ => ‘This extension is WONDERFULL’, ’style’ => ‘red’, ‘loaded’ => ‘no’),
‘013′ => array(‘description’ => ‘This extension is WONDERFULL’, ’style’ => ‘red’, ‘loaded’ => ‘no’),
‘014′ => array(‘description’ => ‘This extension is WONDERFULL’, ’style’ => ‘red’, ‘loaded’ => ‘no’)
),
);

The code that you see above is the code that i will use (or just made actually) to check if extensions are loaded or not. atthis moment i`m checking for 14 extensions but it might get bigger (mbstring mightget in aswell). This check (actual checking code won`t be posted.. still working on that) isn`t causing anything bad for your magedb installation.. it will just inform you about the status of your MageDB and how you can improve the functionallity of MageDB. the users won`t notice a thing with this check.

The users WILL likely (you can turn that on/off) see a custom error message if GD and I(mage)magick are not enabled. this is because image gd/imagemagick is being used to generate the thumbnails on MageDB and without it you won`t see any images at all (unless you have choosen not to thumbnail the images or if there are thumbnails in the cache.

i will post some more on this checking and how it looks later on. also not that the above code isn`t done like the actual checking code but it`s just to give you a impression of what extensions are gonna be used with MageDB.

till next blog.

Mark.

Leave a Reply