15

Please bear with me; I'm a developer, not a server admin. My company wants to explore using Magento. They've handed me a pre-configured Linux server with apache and PHP installed, but when I try to run the Magento setup, it tells me that there are PHP extensions that need to be loaded. I can edit the php.ini file, but have no idea where to get the extensions or how to install them, and there's no one here who knows, either.

Can anyone give me a hand? I need the PDO_MySQL, mcrypt, and GD extensions. I've searched and found sites that talk about downloading from the terminal and compiling code, but it's all way over my head. Is there an easy way to do this?

EmmyS
  • 253
  • 1
  • 2
  • 7

4 Answers4

16

It might help to know what distro you are running, and what version of php. I'm talking about the process of finding packages as well since its better to know how to find stuff than just install what you're told. Teach an man to fish and all that.

Now, I have ubuntu and centos boxen on hand, and through the magic of the package search command....

For Ubuntu

I used apt-cache search KEYWORD php to find the packages in question - in this case the name of the plugin as the keywords. From that, you can install the 3 packages you need through apt-get install php5-mcrypt php5-gd php5-mysql - the last package should cover PDO on debian like distros I believe

For Centos/Red Hat

I used dnf search KEYWORDS the same way - but not all the packages you need seem available by default. Older versions of these distributions use yum rather than dnf.

The packages you're interested in are php-pdo php-gd and php-mcrypt - the last is not in the default repository (I checked on yum, then googled)- you may need to add the EPEL repository to get that package instead

Using the default package manager should result in easier to install and maintain packages, since your updates will happen with everything else.

Journeyman Geek
  • 6,977
  • 3
  • 32
  • 50
4

Have a look at http://pear.php.net/

Often Linux system have the pear application in repository, so you would just need to run a command for each extension you'd like to install.

milo5b
  • 156
  • 3
0

You may want to review http://www.directadmin.com/forum/showthread.php?t=24448. This has all of the necessary commands and trouble shooting.

dmasi
  • 101
  • 1
  • Welcome to Serverfault! Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – Scott Pack Oct 10 '12 at 15:54
-3

To update the PHP Extension in Linux:

Step 1: Login as a root

step2: type--> Yum install php-xml

step3:service httpd restart // restart the service

Arjun
  • 1
  • 3
    You should invest some time into reading the question. php-xml isn't mentioned there, and by no means `yum` works on all distributions. Same for restarting services. – Deer Hunter Oct 17 '14 at 10:55