Enabling PHP Modules

Phlickr uses two several of PHP5's extensions, CURL and SimpleXML. In some cases these two extensions may not be enabled by default.

The first step is verify that the modules are not already being loaded. You view a list of the modules using the following command:

$ php -m
[PHP Modules]
...
curl
... 
SimpleXML
...

[Zend Modules]

Enabling extensions is a platform specific task.

Windows

By default the Windows build of PHP5 comes with SimpleXML compiled in so you’ll only need to enable CURL.

  1. Find the location of the php.ini file:
    C:\>php -r "print get_cfg_var('cfg_file_path');"
    C:\WINDOWS\php.ini
  2. Open the php.ini file with Notepad:
    C:\>notepad C:\WINDOWS\php.ini
  3. Find the line “;extension=php_curl.dll” and remove the semi-colon at the begining.
  4. Save the file.
  5. Re-run the “php -m” command to verify that the modules will now load.

FreeBSD

  1. Su to root
    $ su
    Password:
    hostname#
  2. Use portinstall to install the two modules from FreeBSD’s ports collection.
    hostname# portinstall php5-curl
    hostname# portinstall php5-simplexml
  3. Re-run the “php -m” command to verify that the modules will now load.
 
enabling_modules.txt · Last modified: 2006/04/09 12:20
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki