Compiling PHP 5


#1

Hi,

I’m compiling from this script: http://wiki.dreamhost.com/Template:PHP5_installscript

However, once I change the .htaccess file, I get an internal server error. The error log shows: Illegal option AddHandler

Does anyone have a clue on this? I’ve tried compiling now more than once but it keeps giving me the same error!


#2

Those scripts copy the wrong file into cgi-bin. There’s a note about it up top :wink:

Anyway…

http://php525.dreamhosters.com/files/


Upload [color=#CC0000]php525.sh[/color] into your [color=#00CC00]HOME[/color] directory. (See .txt for source).

Edit the line export DOMAIN="[sub.]domain.com" in [color=#CC0000]php525.sh[/color] to reflect the domain (or subdomain) you’re installing php5 into.

$ chmod x php525.sh

$ ./php525.sh

Create or Edit the domain’s .htaccess when complete.

Create or Upload an info.php and browse to it to check the environment.


Maximum Cash Discount on any plan with MAXCASH


#3

Sorry for my late reply, I’m currently trying your script, however I’m getting this:

xtracting php-5.2.5
Extracting libiconv-1.12
Extracting libmcrypt-2.5.8
Extracting libxml2-2.6.31
Extracting libxslt-1.1.9
Extracting mhash-0.9.9
Extracting zlib-1.2.3
Extracting curl-7.18.0
Extracting libidn-1.6
Extracting imap-2004g
Extracting freetype-2.3.5
./configure: line 1753: cannot create temp file for here document: No space left on device
./configure: line 1765: cannot create temp file for here document: No space left on device
./configure: line 1800: cannot create temp file for here document: No space left on device
./configure: line 1967: cannot create temp file for here document: No space left on device
./configure: line 1972: cannot create temp file for here document: No space left on device
./configure: line 1977: cannot create temp file for here document: No space left on device
./configure: line 1982: cannot create temp file for here document: No space left on device
./configure: line 1987: cannot create temp file for here document: No space left on device
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
./configure: line 2279: cannot create temp file for here document: No space left on device
sed: couldn’t open file conftest.sed: No such file or directory
checking for a thread-safe mkdir -p… /bin/mkdir -p
checking for gawk… gawk
checking whether make sets $(MAKE)… ./configure: line 2394: cannot create temp file for here document: No space left on device
no
./configure: line 2454: cannot create temp file for here document: No space left on device
./configure: line 2459: cannot create temp file for here document: No space left on device
checking whether make sets $(MAKE)… (cached) no
checking for gcc… gcc
./configure: line 2977: cannot create temp file for here document: No space left on device
./configure: line 2981: cannot create temp file for here document: No space left on device
checking for C compiler default output file name…

I do know for sure that I’m not using using 1 % of my disk space or bandwidth so I’m not sure what the problem could be (512 GB left)?

Robin


#4

Either a user quota problem or (gasp!) a filer problem.

Hopefully the user quota is set to a lower ammount than your full 512GB.

You can check the quota easily by looking at Users > Manage Users and click the Edit button to the right of the user account you’re installing php under. If the user appears to have enough space (that figure is in MBs remember! eg. 1024 = 1GB) then it is a broader problem that will necessitate you contacting Support through your panel to get them to check the current available disk space available to you.

Maximum Cash Discount on any plan with MAXCASH


#5

After trying a few times, it finally let me compile, so it was a problem on the DH-end! However, even with this new script, I get the same internal error: Illegal option AddHandler!

Any other ideas please?

Robin


#6

Okay 500 error… could… maybe… possibly… be due to a permissions error on your actual user account itself. Considering the issue with the quota you seem to have had just now it’s probably the next best thing to check out. Having said that, you can’t really check this out yourself.

You’ll need to contact Support telling them that you are receiving a 500 error on that user account and could they double check the system & folder permissions on that particular user account for you.

It might be an idea to create a test.domain.com subdomain while you’re waiting for a response, just to see what happens.

Maximum Cash Discount on any plan with MAXCASH


#7

Thanks, the problem was the editor I was using (giving ^M instead of a new line), this is what I got from DH support:

It looks like this is your problem,
all of your .htaccess rules are on one line! Seperated by a "^M"
character ((windows new line))

Options +ExecCGI^MAddHandler php-cgi .php^MAction php-cgi
/cgi-bin/php.cgi^M

Thanks for everything!

Robin


#8

In regard to that, you can run the command dos2unix [file] in shell on Windoze files.

For future reference :wink:

Maximum Cash Discount on any plan with MAXCASH


#9

you can help me?
my domain is terminiweb.com
i have tray all this script http://wiki.dreamhost.com/Installing_PHP5#Main_PHP_5_install_script
i have change php-5.2.5 to php-5.2.6 because my server use php-5.2.6

but receive error when the script config the imap


#10

If you just want access to your PHP.INI, see my signature.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#11

i want install eaccelerator or APC and for install it requires a Custom PHP install


#12

Make imap after openssl:

[code]#openssl
cd ${SRCDIR}/${OPENSSL}
./config --prefix=${INSTDIR} --openssldir=${INSTDIR}
nice -n 19 make
make install

#c-client
cd ${SRCDIR}/${CCLIENT_DIR}
nice -n 19 make ldb
cp c-client/c-client.a ${INSTDIR}/lib/libc-client.a
cp c-client/*.h ${INSTDIR}/include[/code]Edit in “PHPFEATURES”:

--with-imap=${INSTALLDIR} \ --with-imap-ssl=${INSTALLDIR}After php is installed, phpize the cache extension you choose and load it via extension= in the php.ini (I think you might need to have have your site running in fast cgi mode if you choose eaccelerator).

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#13

you refer to Main PHP 5 install script ?

another…

${INSTDIR} is ${INSTALLDIR} ?

look this is the sciprt terminiweb.com/installscript.sh

and after requesto of ipv6 (yse or no) i receive this error

make[3]: Leaving directory /home/kfiasche/source/imap-2007' make[2]: *** [ip6] Error 1 make[2]: Leaving directory/home/kfiasche/source/imap-2007’
make[1]: *** [OSTYPE] Error 2
make[1]: Leaving directory `/home/kfiasche/source/imap-2007’
make: *** [ldb] Error 2


#14

Yes, sorry. Typo.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost


#15

i receive this error, i try all version of imap (2004g, 2007, 2001), but always the usual error

make[3]: Leaving directory /home/kfiasche/source/imap-2007' make[2]: *** [ip6] Error 1 make[2]: Leaving directory/home/kfiasche/source/imap-2007’
make[1]: *** [OSTYPE] Error 2
make[1]: Leaving directory `/home/kfiasche/source/imap-2007’
make: *** [ldb] Error 2

or this error

configure: error: OpenSSL libs and/or directories were not found where specified!


#16

Remove imap from PHPFEATURES or use make ldb SSLTYPE=none in the build.

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost