Custom PHP config- add extension

Custom PHP config- add extension

Posted by: jlehrhoff
Posted on: 2008-04-13 10:43:00

I am trying to install an app that needs the mailparse extension. I created a custom PHP installation on the site ( http://wiki.dreamhost.com/PHP.ini ). I am a NIX noob, so I'm not really sure how to install this PECL extension on a hosted box situation like this.
Also, my PHPinfo output is giving me dreamhost's timezone, and I don't see anywhere in the php.ini file to change the timezone. Would like to change to EST.

Any help would be greatly appreciated.

Re: Custom PHP config- add extension

Posted by: jlehrhoff
Posted on: 2008-04-13 14:57:00

well I found a script but I'm not really sure what the path to the PHP installation is

http://wiki.dreamhost.com/PECL_Mailparse

I've tried a few and ended up with the following error:
./installmailparse.sh: line 188: /home/username/domain.com/cgi-bin/bin/phpiz
e: No such file or directory

2 of the paths I used were: ${HOME}/domain.com/cgi-bin
and I also tried usr/local/PHP5



Re: Custom PHP config- add extension

Posted by: sXi
Posted on: 2008-04-14 00:13:00

That script asks for your php directory, not the compiled .cgi location:

In reply to:

# Install Mailparse to which directory?
# Note: This *MUST* be set to your PHP5 installation directory!
INSTALLDIR=${HOME}/php5


It depends entirely on how you went about customising your PHP during the build as to where your php files would be located.

Common places are probably /HOME/user/php5 and /HOME/user/etc/php5

Browse through your user directory via ftp/shell and try find it.


Re: Custom PHP config- add extension

Posted by: jlehrhoff
Posted on: 2008-04-14 06:35:00

I actually was able to accomplish this by installing a custom instance of PHP5 in my site. For anyone who runs into this in the future, check:
http://wiki.dreamhost.com/Installing_PHP5

Tags: php installationnoobtimezoneini