diff options
author | James Meyer <james.meyer@operamail.com> | 2009-03-26 17:44:43 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2009-03-26 17:44:43 (GMT) |
commit | e4a682fa8bb497bd662e984548908e5514b9f181 (patch) | |
tree | ae47048d41b8afb7d10911f384872a1f7c8c1b44 /abs/core-testing/php/php.install | |
parent | fff07199375007511e2b51ecb34b785dfe81df37 (diff) | |
download | linhes_pkgbuild-e4a682fa8bb497bd662e984548908e5514b9f181.zip linhes_pkgbuild-e4a682fa8bb497bd662e984548908e5514b9f181.tar.gz linhes_pkgbuild-e4a682fa8bb497bd662e984548908e5514b9f181.tar.bz2 |
php: modify php.ini to match system timezone on install. This shouldn't be needed, but php is what it is.
Diffstat (limited to 'abs/core-testing/php/php.install')
-rw-r--r-- | abs/core-testing/php/php.install | 58 |
1 files changed, 17 insertions, 41 deletions
diff --git a/abs/core-testing/php/php.install b/abs/core-testing/php/php.install index 0c7e289..ba55b54 100644 --- a/abs/core-testing/php/php.install +++ b/abs/core-testing/php/php.install @@ -1,44 +1,12 @@ post_install() { - echo ' - ==> PHP modules - - PHP has been built with optional modules. To enable these modules, - uncomment the modules from php.ini - - Some of them require extra packages to be installed: - - * bz2 : bzip2 - * curl : curl - * dba : gdbm - * gd : libpng, libjpeg, freetype2 - * imap : pam - * ldap : libldap - * mcrypt : mcrypt, libtool - * mysql/mysqli : libmysqlclient - * odbc/pdo_odbc : unixodbc - * openssl : openssl - * pgsql/pdo_pgsql : postgresql-libs - * pspell : aspell - * snmp : net-snmp - * sqlite : sqlite3 - * tidy : tidyhtml - * xsl : libxslt - - ==> PHP-CGI and FCGI - - There are several cgi relevant settings in your php.ini. Make sure to - adjust them according to your needs. At least you should activate the - cgi.fix_pathinfo directive in php.ini by uncommenting it. - - ==> PHP and Apache HTTPD - - To use mod_php with the Apache webserver, add this to your httpd.conf: - - LoadModule php5_module modules/libphp5.so - [..] - Include conf/extra/php5_module.conf - - ' + if [ -f /etc/systemconfig ] + then + . /etc/systemconfig + if [ -f /etc/php/php.ini ] + then + sed -i "s/^;date.timezone.*$/date.timezone=${timezone}/" /etc/php/php.ini + fi + fi } pre_upgrade() { @@ -67,6 +35,14 @@ post_upgrade() { echo 'Restoring old php.ini...' mv /etc/php/php.ini /etc/php/php.ini.pacnew mv /etc/php.ini.pacsave.tmp /etc/php/php.ini + if [ -f /etc/systemconfig ] + then + . /etc/systemconfig + if [ -f /etc/php/php.ini ] + then + sed -i "s/^;date.timezone.*$/date.timezone=${timezone}/" /etc/php/php.ini + fi + fi echo 'Updating extension dir...' sed -i -e 's#extension_dir = "/usr/lib/php/extensions/php/"#extension_dir = "/usr/lib/php/20060613/"#g' /etc/php/php.ini echo ' @@ -94,4 +70,4 @@ post_upgrade() { op=$1 shift -[ "$(type -t "$op")" = "function" ] && $op "$@"
\ No newline at end of file +[ "$(type -t "$op")" = "function" ] && $op "$@" |