Enable dbx HELP!

apps

#1

Hi guys

I´m trying to enable dbx, so I do this:
Copy the PHP5_installscript into a text editor and replace YOUR DOMAIN HERE on the 4th line with your site’s domain name. MAKE SURE YOU USE THE SAME CASE THAT APPEARS IN THE DIRECTORY LISTING (UPPER or lower).
Copy the new contents to your clipboard.
Log in to your account using SSH
Create a new file in your SSH by entering the command:
vim installscriptHit i for insert mode, then right-click to paste your clipboard (the install script) contents, then hit Esc, type :wq (that’s ‘colon’, ‘w’, ‘q’), and press Enter to save and exit.
Make the file executable by entering the command:
chmod +x installscriptRun the script by entering the command:
./installscriptAfter it has finished you will need to edit your htaccess file appropriately. Add the following:
AddHandler phpFive .php
Action phpFive /cgi-bin/php.cgi

PHP script that I change:

#!/bin/sh

Script updated 2006-12-25 by Carl McDade (hiveminds.co.uk) to allow memory limit and freetype

Save the code to a file as *.sh

Abort on any errors

set -e

The domain in which to install the PHP CGI script.

export DOMAIN=“www.universonautico.com.br

Where do you want all this stuff built? I’d recommend picking a local

filesystem.

Don’t pick a directory that already exists! We clean up after

ourselves at the end!

SRCDIR=${HOME}/source

And where should it be installed?

INSTALLDIR=${HOME}/php5

Set DISTDIR to somewhere persistent, if you plan to muck around with this

script and run it several times!

DISTDIR=${HOME}/dist

Pre-download clean up!!!

rm -fr $SRCDIR $DISTDIR

Update version information here.

PHP5="php-5.2.0"
LIBICONV="libiconv-1.11"
LIBMCRYPT="libmcrypt-2.5.7"
LIBXML2="libxml2-2.6.27"
LIBXSLT="libxslt-1.1.18"
MHASH="mhash-0.9.7.1"
ZLIB="zlib-1.2.3"
CURL="curl-7.14.0"
LIBIDN="libidn-0.6.8"
CCLIENT="imap-2004g"
CCLIENT_DIR=“imap-2004g” # Another pest!
FREETYPE=“freetype-2.2.1”

What PHP features do you want enabled?

PHPFEATURES="–prefix=${INSTALLDIR}
–with-config-file-path=${INSTALLDIR}/etc/php5/${DOMAIN}
–enable-fastcgi
–enable-dbx
–enable-force-cgi-redirect
–with-xml
–with-libxml-dir=${INSTALLDIR}
–with-freetype-dir=${INSTALLDIR}
–enable-soap
–with-openssl=/usr
–with-mhash=${INSTALLDIR}
–with-mcrypt=${INSTALLDIR}
–with-zlib-dir=${INSTALLDIR}
–with-jpeg-dir=/usr
–with-png-dir=/usr
–with-gd
–enable-gd-native-ttf
–enable-memory-limit
–enable-ftp
–with-exif
–enable-sockets
–enable-wddx
–with-iconv=${INSTALLDIR}
–enable-sqlite-utf8
–enable-calendar
–with-curl=${INSTALLDIR}
–enable-mbstring
–enable-mbregex
–with-mysql=/usr
–with-mysqli
–without-pear
–with-gettext
–with-imap=${INSTALLDIR}
–with-imap-ssl=/usr"

---- end of user-editable bits. Hopefully! ----

Push the install dir’s bin directory into the path

export PATH=${INSTALLDIR}/bin:$PATH

#setup directories
mkdir -p ${SRCDIR}
mkdir -p ${INSTALLDIR}
mkdir -p ${DISTDIR}
cd ${DISTDIR}

Get all the required packages

wget -c http://us3.php.net/distributions/${PHP5}.tar.gz
wget -c http://mirrors.usc.edu/pub/gnu/libiconv/${LIBICONV}.tar.gz
wget -c http://easynews.dl.sourceforge.net/sourceforge/mcrypt/libmcrypt-2.5.7.tar.gz
wget -c ftp://xmlsoft.org/libxml2/${LIBXML2}.tar.gz
wget -c ftp://xmlsoft.org/libxml2/${LIBXSLT}.tar.gz
wget -c http://superb-west.dl.sourceforge.net/sourceforge/mhash/${MHASH}.tar.gz
wget -c http://www.zlib.net/${ZLIB}.tar.gz
wget -c http://curl.haxx.se/download/${CURL}.tar.gz
wget -c http://kent.dl.sourceforge.net/sourceforge/freetype/${FREETYPE}.tar.gz
wget -c ftp://alpha.gnu.org/pub/gnu/libidn/${LIBIDN}.tar.gz
wget -c ftp://ftp.cac.washington.edu/imap/old/${CCLIENT}.tar.Z

echo ---------- Unpacking downloaded archives. This process may take several minutes! ----------

cd ${SRCDIR}

Unpack them all

echo Extracting ${PHP5}…
tar xzf ${DISTDIR}/${PHP5}.tar.gz
echo Done.
echo Extracting ${LIBICONV}…
tar xzf ${DISTDIR}/${LIBICONV}.tar.gz
echo Done.
echo Extracting ${LIBMCRYPT}…
tar xzf ${DISTDIR}/${LIBMCRYPT}.tar.gz
echo Done.
echo Extracting ${LIBXML2}…
tar xzf ${DISTDIR}/${LIBXML2}.tar.gz
echo Done.
echo Extracting ${LIBXSLT}…
tar xzf ${DISTDIR}/${LIBXSLT}.tar.gz
echo Done.
echo Extracting ${MHASH}…
tar xzf ${DISTDIR}/${MHASH}.tar.gz
echo Done.
echo Extracting ${ZLIB}…
tar xzf ${DISTDIR}/${ZLIB}.tar.gz
echo Done.
echo Extracting ${CURL}…
tar xzf ${DISTDIR}/${CURL}.tar.gz
echo Done.
echo Extracting ${LIBIDN}…
tar xzf ${DISTDIR}/${LIBIDN}.tar.gz
echo Done.
echo Extracting ${CCLIENT}…
uncompress -cd ${DISTDIR}/${CCLIENT}.tar.Z |tar x
echo Done.
echo Extracting ${FREETYPE}…
tar xzf ${DISTDIR}/${FREETYPE}.tar.gz
echo Done.

Build them in the required order to satisfy dependencies.

#libiconv
cd ${SRCDIR}/${LIBICONV}
./configure --enable-extra-encodings --prefix=${INSTALLDIR}

make clean

make
make install

#libxml2
cd ${SRCDIR}/${LIBXML2}
./configure --with-iconv=${INSTALLDIR} --prefix=${INSTALLDIR}

make clean

make
make install

#libxslt
cd ${SRCDIR}/${LIBXSLT}
./configure --prefix=${INSTALLDIR}
–with-libxml-prefix=${INSTALLDIR}
–with-libxml-include-prefix=${INSTALLDIR}/include/
–with-libxml-libs-prefix=${INSTALLDIR}/lib/

make clean

make
make install

#zlib
cd ${SRCDIR}/${ZLIB}
./configure --shared --prefix=${INSTALLDIR}

make clean

make
make install

#libmcrypt
cd ${SRCDIR}/${LIBMCRYPT}
./configure --disable-posix-threads --prefix=${INSTALLDIR}

make clean

make
make install

#libmcrypt lltdl issue!!
cd ${SRCDIR}/${LIBMCRYPT}/libltdl
./configure --prefix=${INSTALLDIR} --enable-ltdl-install

make clean

make
make install

#mhash
cd ${SRCDIR}/${MHASH}
./configure --prefix=${INSTALLDIR}

make clean

make
make install

#freetype
cd ${SRCDIR}/${FREETYPE}
./configure --prefix=${INSTALLDIR}

make clean

make
make install

#libidn
cd ${SRCDIR}/${LIBIDN}
./configure --with-iconv-prefix=${INSTALLDIR} --prefix=${INSTALLDIR}

make clean

make
make install

#cURL
cd ${SRCDIR}/${CURL}
./configure --with-ssl=${INSTALLDIR} --with-zlib=${INSTALLDIR}
–with-libidn=${INSTALLDIR} --enable-ipv6 --enable-cookies
–enable-crypto-auth --prefix=${INSTALLDIR}

make clean

make
make install

c-client

cd ${SRCDIR}/${CCLIENT_DIR}
make ldb

Install targets are for wusses!

cp c-client/c-client.a ${INSTALLDIR}/lib/libc-client.a
cp c-client/*.h ${INSTALLDIR}/include

#PHP 5
cd ${SRCDIR}/${PHP5}
./configure ${PHPFEATURES}

make clean

make
make install

#copy config file
mkdir -p ${INSTALLDIR}/etc/php5/${DOMAIN}
cp ${SRCDIR}/${PHP5}/php.ini-dist ${INSTALLDIR}/etc/php5/${DOMAIN}/php.ini

#copy PHP CGI
mkdir -p ${HOME}/${DOMAIN}/cgi-bin
chmod 0755 ${HOME}/${DOMAIN}/cgi-bin
cp ${INSTALLDIR}/bin/php ${HOME}/${DOMAIN}/cgi-bin/php.cgi
rm -fr $SRCDIR $DISTDIR
echo ---------- INSTALL COMPLETE! ----------

What´s the problem?

PHP INFO

http://www.universonautico.com.br/phpinfo.php


#2

that’s exactly my question to you, What’s the problem? Did it produce an error, does something not work? what?

–Matttail
art.googlies.net - personal website


#3

Hi

Is not working… I load the file phpinfo.php and dbx is not enable. Could you help me?

Thanks


#4

Ahh, I see. The phpinfo file says it’s using your own php.ini file and operating out of your home directory. I also see that phpinfo shows you compiled with dbx enabled.

Have you tested to see if it’s working? If so what was the result?

–Matttail
art.googlies.net - personal website


#5

Ok This is the message:Fatal error: Call to undefined function dbx_connect() in /home/.leonard/polus/www.universonautico.com.br/new/net/lib/common/database/SysConn.php on line 32

thanks


#6

The problem is that, and you can read about it here, dbx is no longer bundled into PHP and therefore you have to install the PECL extension for it. From your server’s shell, you should be able to do this yourself. I don’t know the exact name currently for the dbx extension, but assuming it is literally dbx, you can install it via the following command: pecl install dbx

I suggest using google to grab some more information before you attempt to install it though. :slight_smile:


Chips N Cheese - Custom PHP installs and the like!


#7

This is the message:

Cannot install, php_dir for channel “pecl.php.net” is not writeable by the current user

I´m reading more information.

Thanks


#8

Ya, it sounds like you’d need to go about installing your own copy of PHP5 in order to do this then. In doing so, you’d likewise have to modify your environment (.bash_profile) to point PEAR to your custom PHP install.

Quite complicated and I don’t really recommend it if you can find some alternative that’s easier.


Chips N Cheese - Custom PHP installs and the like!


#9

I´m really installed my own copy of php5, but is not working.

This is my php.ini :
http://www.universonautico.com.br//cgi-bin/php.ini

and the phpinfo
http://www.universonautico.com.br/phpinfo.php

Is very dificult to enable this…

thanks


#10

Yes, it’s definitely not an easy task, which is partially the reason I established my website - as I deal with specifically installing such things. Your current PHP setup looks to be just fine, and I’m pretty sure it’s just the environment settings that need adjusting… though there could be additional things as well (I know of one off-hand).
Anyways - You’re more than welcome to PM me on the forums here or email me if you’re interested in using my services for a small price - but there’s always the possibility that someone here or elsewhere can help you out for free.

Good luck either way - you seem to be on the right track at least! :wink:


Chips N Cheese - Custom PHP installs and the like!