summaryrefslogtreecommitdiffstats
path: root/abs/core/php/php.install
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
commit7b29169fff9e7c624890c5edffe85def8a293136 (patch)
tree47753889faa3a2063b66d1c7e7681e703eb1b39a /abs/core/php/php.install
parentc491dea779dac29afff3578bf8245943817c2339 (diff)
downloadlinhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.zip
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.gz
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.bz2
LinHES 6.01.00
Diffstat (limited to 'abs/core/php/php.install')
-rw-r--r--abs/core/php/php.install62
1 files changed, 19 insertions, 43 deletions
diff --git a/abs/core/php/php.install b/abs/core/php/php.install
index 0c7e289..469db4a 100644
--- a/abs/core/php/php.install
+++ b/abs/core/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,8 +35,16 @@ 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
+ sed -i -e 's/#extension_dir = "/usr/lib/php/extensions/php/"/#extension_dir = "/usr/lib/php/20060613/"#g' /etc/php/php.ini
echo '
==> Location of php.ini has changed
@@ -88,10 +64,10 @@ post_upgrade() {
# can be removed later
if [ $(vercmp '5.2.4-3' $2) -eq 0 ]; then
echo 'Updating extension dir...'
- sed -i -e 's#extension_dir = "/usr/lib/php/extensions/"#extension_dir = "/usr/lib/php/20060613/"#g' /etc/php/php.ini
+ sed -i -e 's/#extension_dir = "/usr/lib/php/extensions/"/#extension_dir = "/usr/lib/php/20060613/"#g' /etc/php/php.ini
fi
}
op=$1
shift
-[ "$(type -t "$op")" = "function" ] && $op "$@" \ No newline at end of file
+[ "$(type -t "$op")" = "function" ] && $op "$@"