You are not logged in.

#1 2005-07-08 18:41:24

codecop
Member
Registered: 2005-03-29
Posts: 10

Cant use mysql from php4...

i used makepkg to build php4 and used modified php5 PKGBUILD file:

# $Id: PKGBUILD,v 1.43 2004/07/02 21:18:08 judd Exp $
# Maintainer: dorphell <dorphell@archlinux.org>
pkgname=php
pkgver=4.3.11
pkgrel=2
pkgdesc="A high-level scripting language"
backup=(etc/php.ini)
depends=('openssl' 'libjpeg' 'freetype2' 'libpng' 'pam'
         'gdbm' 'libxslt' 'openldap')
makedepends=('apache' 'mysql' 'imap' 'postgresql' 'bzip2')
source=(http://www.php.net/distributions/$pkgname-$pkgver.tar.gz php.ini)
url="http://www.php.net"
md5sums=('5de2ba1aababb5868d55ea43cf3bebef' 'ad03540061739ee60ed8c632a3c8b27d')

build() {
  cd $startdir/src/$pkgname-$pkgver
  ./configure --with-apxs2 --prefix=/usr --sysconfdir=/etc
    --with-ttf --enable-mailparse --with-config-file-scan-dir=/etc
    --enable-bcmath=shared --enable-calendar=shared --enable-ftp=shared
    --enable-gd-native-ttf --enable-magic-quotes --enable-posix=shared
    --enable-session --enable-shared --enable-shmop=shared --with-imap
    --enable-sysvsem=shared --enable-sysvshm=shared --enable-track-vars
    --enable-trans-sid --enable-safe-mode --enable-sockets=shared
    --enable-xml --with-bz2=shared --without-db2 --without-db3
    --with-freetype-dir=/usr --with-gd --with-gdbm --enable-exif
    --with-jpeg-dir=/usr --with-mysql=shared,/usr --with-ldap
    --with-mysql-sock=/tmp/mysql.sock --with-openssl --with-gettext
    --with-pear=/usr/share/pear --with-dom --with-dom-xslt
    --with-pgsql=shared --with-pgsql-sock=/tmp/pgsql.sock
    --with-png-dir=/usr --with-regex=php --with-zlib
  make || return 1
  mkdir -p $startdir/pkg/usr/lib/apache
#  cp config_vars.mk config_vars.old
#  sed "s|^INSTALL_IT.*$|INSTALL_IT = apxs -i -a -S LIBEXECDIR=$startdir/pkg/usr/lib/apache -n php4 libs/libphp4.so|" config_vars.old >config_vars.mk
  sed -i "s|-i -a -n php4|-i -n php4|g" Makefile
  make INSTALL_ROOT=$startdir/pkg EXTENSION_DIR=/usr/lib/php install
  cp ../php.ini $startdir/pkg/etc
}

in php.ini i uncomentet extension=mysql.so , restarted httpd, but when i try connect to mysql i got that i call undefined function. phpinfo() dont shows info about active mysql settings.
when i installing php5 everything works fine.

maybe i miss something?
thanks

Offline

#2 2005-07-08 22:05:18

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: Cant use mysql from php4...

likely there are options/syntax/etc that cannot be used. i recommend using the cvs to find an old php4 build and go from there rather than use the php5 build. If the cvs does not have any perhaps someone still has an old PKGBUILD from the php4 days


AKA uknowme

I am not your friend

Offline

#3 2005-07-08 22:08:14

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: Cant use mysql from php4...


AKA uknowme

I am not your friend

Offline

#4 2005-07-09 08:52:57

codecop
Member
Registered: 2005-03-29
Posts: 10

Re: Cant use mysql from php4...

Thanx sarah31.
This very helped to me, mysql workong!
Thanx again

Offline

#5 2005-07-09 18:50:50

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: Cant use mysql from php4...

no problem now you know one of the great features of the webface for the cvs.


AKA uknowme

I am not your friend

Offline

Board footer

Powered by FluxBB