Help - Search - Members - Calendar
Full Version: PHP Ugrade troubles
The Planet Forums > System Administration > Server Hardware > RaQ Support
RaQMan
Hi Folks,

well i ran the php 4.1.2 pkg and it ran fine until the 4:00am cron jobs, when it stopped taking apache down with it.

I can only restart apache if I comment out the php modules lines.

If i restart apache othwerwise i get this error:

Cannot load /etc/httpd/modules/libphp4.so into server: /etc/httpd/modules/libphp4.so: undefined symbol: gdImageCreateFromGif
/usr/sbin/httpd

So tried to recompile php-4.1.2 from source. When i do the make part, it returns

libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.

So it looks like I have messed up some libraries.

Is there anyway I can bring these libraries back, or reinstall the gd libraries?

desperate for help, any suggestions welcome
icon_sad.gif icon_sad.gif
imin
I think what your problem is that the php .pkg installs the latest gd and that does not support .gif anymore. Perhaps try upgrading webalizer to version 2? Im 100% sure if this will solve all your problems.
joseph
Simple instruction for installing php 4.1.2

1. Make sure you have OS2.0 installed.
2. Disable chiliasp3.6 if you want to have OS2.0 installed.
3. uninstall php4.06
4. install php4.1.2

That's it.
RaQMan
well, i ended up doing rpm -e on a whole gang of graphics libs, then went and put them all back.

then i compiled php-4.1.2 from source and it went sweet!
And I compiled it with the main module I wanted --ftp-enabled.
icon_smile.gif

won't be waiting on anymore php .pkgs
Marty
RaQMan,

You have done exactly what I have been wanting to do. Can you provide a step by step on what you have done. I have done all the cobalt updates, but cannot now seem to recompile php from source to get --enable-ftp to work. My configure command will not let me do --with-imap unless I do --with-imap-ssl also, but then the make chokes on finding -lcrypto.

I am stumped. I would like to see what you did to get php with --enable-ftp.

Thanks
RaQMan
Hi Marty,

sounds like you ran into the exact same problems as me.
I needed php with ftp enabled, but after the os2 update putting my php back to 4.0.3, i couldn't compile php from source, so I installed the 4.1.2 pkg, except that doesn't have ftp enabled!, so I tried recompiling from source and ran into those same crypto errors.

So I decided to get rid of some of the stuff the pkg puts there,

as root i typed:
rpm -qa | sort

this brought up all the rpms installed. I saw the php-4.1.2PM1 rpms, and typed:
rpm -e php-4.1.2PM1

(don't type extensions, also do the devel php rpm if its there)

Then I went to this page:
http://www.uk2raq.com/raqfaq/raqfaqshow.php?faq=43
and started their instructions from the top,
problem with this is you'll find some errors installing them syaing their already installed, well they need to be removed and reinstalled, otherwise no dice.

I started at the top of the list typing:
rpm -e libjpeg-6b-16

this will bring up a message saying there are dependencies and you can't remove. So just take note of the dependent rpms, and go remove them.

Basically you'll end up at the end of that list at the libtiff-devel rpm alot of rpms removed.

Then I started at the top of the list again installing them in the order listed starting with:

rpm -Uvh http://www.uk2raq.com/updates/php/libjpeg-...-6b-16.i386.rpm

I follwed those instructions through to the phpinfo page and all worked great.

I didn't need to install Zend. It's seems all installed.

Also make sure to edit the php.ini file for safe mode settings etc.

Hope this helps,

Big thanks to uk2raq.com:)
mouse
been wondering that myself, can we just edit the php.ini which I know where its located, or do we have to re-run the ./configure command and if so, where would I find the one that is run from the pkg from cobalt? currently running php-4.1.2 smoothly thankfully.. Mouse
RaQMan
Hi Mouse,

you have to do the configure command again to get ftp enabled, if only it was in the php.ini file:(,

which means make, make install, you know the deal icon_smile.gif
RaQMan
to check the configure command from the package;

either create a phpinfo page and call it up,
do this by creating a file with this tag in it:


and call the file phpinfo.php



or check pkgmaster.com/phpinfo.php, thats their install from the 4.1.2pkg so they reckon:)

i seriously dislike what i heard about that pkg emailing back to them the servername etc.mad.gif
mouse
I know where my php.ini is currently from a phpinfo page i have on my server, would the ./configure command be in the same folder as well? Mouse
RaQMan
if you view that there phpinfo page, you'll see up the top a copy of the configure command that was used when compiling your php

phpinfo from pkgmaster:

'./configure' '--prefix=/usr' '--with-apxs=/usr/sbin/apxs' '--with-gd' '--with-gettext=/usr' '--enable-safe-mode' '--with-config-file-path=/etc/httpd' '--with-exec-dir=/usr/bin' '--with-zlib' '--enable-magic-quotes' '--with-regex=system' '--with-ttf' '--with-db' '--with-gdbm' '--with-mbstring' '--with-mbstr-enc-trans' '--enable-track-vars' '--enable-wddx=shared' '--enable-mm=shared' '--enable-xml' '--disable-debug' '--with-libdir=/usr/lib' '--with-db3' '--with-interbase=shared' '--with-pgsql=shared' '--with-ldap' '--with-imap' '--with-curl=shared' '--with-pdflib=shared'

this is what mine looks like:

'./configure' '--with-mysql' '--with-apxs=/usr/sbin/apxs' '--with-jpeg-dir=/usr/lib' '--with-png-dir=/usr/lib' '--enable-track-vars' '--enable-trans-sid' '--with-imap' '--with-gd' '--enable-ftp' '--enable-magic-quotes' '--enable-inline-optimization' '--with-zlib-dir=/usr/lib' '--enable-gd-native-ttf' '--with-ttf'

to use it, simply take out the single quotes
mouse
aye RaqMan, getting a configure command isnt a problem,

where oh where do I run the blasted thing though??
mouse
also, you by chance know anything about mhash or mcrypt, seems that php will deal with them and i guess they have something to do with encryption for php?? any clues? Mouse
RaQMan
mouse,

you can only run the configure command if you are going to do make etc,

so if want to do this, you'd find the source folder where php files are, don't know where they are from the pkg install.

you'll find the configure command after you untar the php tarball somewhere.

all i know about mhash is not much at all icon_smile.gif
more concerned about ftp being enabled,

btw, php encryption worked before and still works now,
mouse
thats my whole problem, is finding where the source files are from the pkg install, ive got no problems running all the commands, thats how I had run from first install of PHP, was from command line via Eva2000's how-to, but the pkg files install it god only knows where.. what would some of the source files be so that i may be able to Find or locate them?? Mouse
Marty
QUOTE
Originally posted by RaQMan
Hi Marty,

sounds like you ran into the exact same problems as me.
I needed php with ftp enabled, but after the os2 update putting my php back to 4.0.3, i couldn't compile php from source, so I installed the 4.1.2  pkg, except that doesn't have ftp enabled!, so I tried recompiling from source and ran into those same crypto errors.

So I decided to get rid of some of the stuff the pkg puts there,

as root i typed:
rpm -qa | sort

this brought up all the rpms installed. I saw the php-4.1.2PM1 rpms, and typed:
rpm -e php-4.1.2PM1

(don't type extensions, also do the devel php rpm if its there)

Then I went to this page:
http://www.uk2raq.com/raqfaq/raqfaqshow.php?faq=43
and started their instructions from the top,
problem with this is you'll find some errors installing them syaing their already installed, well they need to be removed and reinstalled, otherwise no dice.

I started at the top of the list typing:
rpm -e libjpeg-6b-16

this will bring up a message saying there are dependencies and you can't remove. So just take note of the dependent rpms, and go remove them.

Basically you'll end up at the end of that list at the libtiff-devel rpm alot of rpms removed.

Then I started at the top of the list again installing them in the order listed starting with:

rpm -Uvh http://www.uk2raq.com/updates/php/libjpeg-...-6b-16.i386.rpm

I follwed those instructions through to the phpinfo page and all worked great.

I didn't need to install Zend. It's seems all installed.

Also make sure to edit the php.ini file for safe mode settings etc.

Hope this helps,

Big thanks to uk2raq.com:)


Wow!! How long did that take you? I take it for every dependency that I uninstall, I will have reinstall them.

Thanks for the help.
RaQMan
Marty,

correct, you are basically taking them out and replacing them with the same version.

all your dependencies will end up being the modules listed on the uk2raq page i mentioned earlier, then it's just a matter of putting them back in the order stated.

After that, no compile errors.

Mouse,

don't know where them files are. i guess update your locate db and locate it??
Marty
RaQMan,

Thanks, I will probably give it a try real soon.
webbcite
QUOTE
Originally posted by RaQMan
So tried to recompile php-4.1.2 from source. When i do the make part, it returns  

libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.
libtool: link: warning: library `/usr/lib/libgdbm.la' was moved.

So it looks like I have messed up some libraries.


I recompiled 4.1.2 from source yesterday and received the same "warning". It had no effect on my webalizer and have not had any trouble with GD.
mouse
k, appears I have to recompile the php4.1.2 from a tar or RPM, seeing as eva2000 has a how to from tar, would it just be the same process, just with 4.1.2 instead of the 4.0.6 that was iused in his tutorial? secondly, do I have to/should I uninstall the 4.1.2 .pkg version I installed from pkgmaster.com first? all this for --with-ftp sheesh.. what will clients think of next.. Mouse
webbcite
I would uninstall the pkg version first. Then search for Cyborgs 4.1.0 instructions. That will give you a bunch of good stuff. I compiled with the following config options:

'./configure' '--with-apxs=/usr/sbin/apxs' '--enable-safe-mode' '--enable-magic-quotes' '--with-mysql' '--enable-ftp' '--enable-shared-pdflib' '--with-pdflib=/usr/local' '--with-jpeg-dir=/usr/local/lib' '--with-png-dir=/usr' '--with-regex=system' '--with-zlib' '--with-exec-dir=/usr/bin' '--with-gd=/usr/local' '--with-ldap' '--enable-sysvsem' '--enable-sysvshm' '--with-pgsql' '--disable-debug' '--with-gdbm' '--with-db2' '--enable-track-vars--enable-xml' '--with-libdir=/usr/lib' '--with-ttf'

Which is a combination of what I had and what I added. Remember to remove the ' and make sure the config is all on one line...
mouse
muchas gracious amigo.. will do.. Mouse
microlinx
I installed OS2 update per instruction...then installed PHP 4.1.2
both installs using the Cobalt Maintenance GUI...(upload)

When I try to pull up a .php or php3 or php4 file in my broswer, I get a "file download page" can someone provide a guide to trouble shooting this?
I have looked at httpd.conf and I see several lines commented out:

These are under
# Extra Modules
# LoadModule...mod_php.so
# LoadModule...libphp3.so
# LoadModule...libphp4.so

and...
#Extra Modules
#AddModule mod_php.c
#AddModule mod_php3.c
#AddModule mod_perl.c
...

finally under each domain I DO have the following entries...
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php

Apache has been restarted...but still no luck!

TIA
webbcite
You should have the following in /etc/httpd/conf/httpd.conf in their relevant sections:
QUOTE
LoadModule php4_module modules/libphp4.so
LoadModule php4_module        lib/apache/libphp4.so
AddModule mod_php4.c


You should have the following in /etc/httpd/conf/srm.conf:
QUOTE
AddType application/x-httpd-php .php3 .php .php4 .phtml


Make sure you restart apache if you make any changes:

/etc/rc.d/init.d/httpd restart
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.