Forum Moderators: bakedjake
just received the ssh login for our new redhat server. so am busy installing the necessary stuff, which in my case is mysql and php.
mysql was installed from an rpm and went perfectly. i then logged in and changed the mysql root password. (and jamie looked down and he was pleased)
i then downloaded the newest version of php:
php-4.3.0.tar.gz
uploaded and unzipped to /usr/local/src/ and then (following a guide i found online) tried the following:
# ./configure --with-mysql=/usr/local/mysql --enable-track-vars --with-xml --with-apxs=/usr/local/apache/bin/apxs
# make
# make install
however the server returned a ./configure: command not found
a) why might this be?
b) do the installation instructions look ok to an expert?
c) might it be easier for me as a novice to install a php rpm?
many heartfelt thanks
c) might it be easier for me as a novice to install a php rpm?
Absolutely. In most cases I would reccomend it for an expert as well. My theory is that package management systems were invented for a reason, and you might as well benefite from them. They make upgrades much, much easier, and I rarely find a good reason not to use them - most such purposes are adequately filled by building the package from source. But I digress.
Notwithstanding my reccomendation that you use an RPM to get php installed, knowing why your configure command didn't work is probably a good thing, so I'll explain my best guess as to what happened.
'./configure' means "the file in this directory named 'configure'". When it is the only thing in a command, or the first thing in the command, it will be interpreted as "run the file in this directory that is named 'configure'". Most likely "this directory" was /root rather than /usr/local/src/<php-source-directory>, and since the 'configure' file you were trying to run was part of the PHP source distribution, it was in the same directory that all the other PHP source code was in.
Again, using an RPM is almost certainly the best way for you to install PHP, and to upgrade it in the future. But understanding how things work in *nix land is generally useful. I'm glad to help.
[edited by: dingman at 4:21 pm (utc) on Jan. 21, 2003]
i have just downloaded the latest rpm from rpmfind and have run
rpm -i php-4.1.2-7.2.6.i386.rpm
but it now gives me
error: failed dependancies:
libcurl.so.1 is needed by php-version
libmm.so.11 is needed by php-version
libpspell-modules.so.1 is needed by php-version
libpspell.so.4 is needed by php-version
i have looked online and it seems as though i have to install each one individually. e.g. rpmfind has the following available for download:
curl-7.8-1.i386.rpm (for libcurl.so.1)
mm-1.1.3-8.i386.rpm (for libmm.so.11)
pspell-0.12.2-3.i386.rpm (for libpspell-modules.so.1 and libpspell.so.4)
is it simply case of installing each .rpm and then trying to install the php.rpm again?
and to install them would i use the -i operator or the -U:
rpm -U pspell-0.12.2-3.i386.rpm?
much appreciated dingman
<added>will definitely register - thanks for tip</added>
php -v gives me 4.1.2
thing is when i upload phpinfo.php to the htdocs directory, my browser tries to download the file as opposed to displaying it.
the following line is in my httpd.conf
AddType application/x-httpd-php .php .php3 .phtml
something else is obviously missing ;)
many thanks
[edited by: jamie at 6:28 pm (utc) on Jan. 21, 2003]
i have just added the LoadModule, so it now looks like
LoadModule php4_module /usr/lib/apache/libphp4.so
AddType application/x-httpd-php .php .php3 .phtml
AddType application/x-httpd-php-source .phps
AND IT WORKS!
i have just printed out 'hello world' (oddly enough phpinfo didn't seem to work, but echo hello world did)
wow - that only took 8 hours :):):)
i have learnt more about webservers today than i would have believed possible. we'll make a sys admin out of me yet!
good night all, thanks for support
back again....
up this morning to load phpmyadmin:
i unzipped to folder, changed the config.inc.php correctly and then got following message when i call it in the browser:
cannot load MySQL extension, please check PHP Configuration
this tells me that i need the php-mysql package. ok
> then download and install php-mysql-4.1.2-7.2.6.i386.rpm
this gives me
failed dependancies of libmysqlclient.so.10
> find the appropriate .rpm at rpmfind - this actually happens to be the full mysql package:
mysql-3.23.54a-3.72.i386
> now i already installed a mysql package yesterday, the :
mysql-3.23.54a-1.i386.rpm
> i now try a rpm -i mysql-3.23.54a-3.72.i386 and it gives me a
MySql conflicts with mysql-3.23.54a-3.72 error
i think it has something to so with incorrect versions? shall i uninstall the mysql i installed yesterday and do a fresh install with the newest package?
thanks
p.s. the mysql rpm which i installed yesterday appears to work correctly. but obviously i doesn't work with php without the php-mysql rpm
yes you should. mysql two time rpm'ing will bite each other.
but for the failed dependencies prob, you've to check which the dependencies of libmysqlclient.so.10 are and which you'll need to update.
i don't think it's the mysql server, because the libmysql only communicates with the server, they don't share binaries (if i'm not completely wrong).
i am unable to uninstall the mysql .rpm's installed yesterday - it says that
MySql-3.23.54a-1-i386.rpm is not installed
and
MySql-client-3.23.54a-1-i386.rpm is not installed
hmmmm..
and yet i can log in perfectly to mysql with the root password, and it tells me vesion 3.23.53 is running and database test exists.
i think maybe the correct versin of mysql is installed, i just need to download the libmysqlclient.so.10 and install it.
but for the failed dependencies prob, you've to check which the dependencies of libmysqlclient.so.10 are and which you'll need to update.i don't think it's the mysql server, because the libmysql only communicates with the server, they don't share binaries (if i'm not completely wrong).
what exactly to you mean?
thanks
<added>
the only way of installing the libmysqlclient.so.10 is apparently to install the full mysql-3.23.54a-3.72.i386.rpm
but as stated above i get the error:
MySql conflicts with mysql-3.23.54a-3.72
obviously i need some other way of uninstalling mysql than trying the rpm -e package.rpm
that way i can do a complete reinstall. do you know how?
rpm -qa ¦ grep -i mysql the following are returned:
MySql-client-3.23.54a-1
MySql- 3.23.54a-1
these are the packages i installed yesterday.
yet no ammount of
rpm -e package.rpm can uninstall them
it simply says package.rpm is not installed?
furthermore i am unable to update using -Uvh, for reasons explained above.
is there a way to manually uninstall?
and yet i can log in perfectly to mysql with the root password, and it tells me vesion 3.23.53 is running and database test exists.
It appears that MySQL-3.23.53 is installed on your server
the only way of installing the libmysqlclient.so.10 is apparently to install the full mysql-3.23.54a-3.72.i386.rpm
The client and/or development packages for MySQL-3.23.53 may not have been installed on your server. That could be why you originally had libmysqlclient.so.10 errors.
---------------------------------------------
To upgrade from MySQL-3.23.53 to MySQL-3.23.54a you will need the following packages
MySQL-3.23.54a-1.i386.rpm
MySQL-client-3.23.54a-1.i386.rpm
MySQL-devel-3.23.54a-1.i386.rpm
MySQL-shared-3.23.54a-1.i386.rpm
Upgrade each package separately using the following commands
--no-deps will stop the dependency errors
rpm -Uvh MySQL-3.23.54a-1.i386.rpm --no-deps
rpm -Uvh MySQL-client-3.23.54a-1.i386.rpm
etc, etc
If nothing happens when doing rpm -Uvh for a package it might not have been installed. Use rpm -ivh to install the package
eg
rpm -ivh MySQL-client-3.23.54a-1.i386.rpm
When MySQL is Upgraded your server may appear to hang after restarting. Press ENTER if it appears to hang. Then you can Upgrade/install the other packages.
cannot load MySQL extension, please check PHP Configuration
Um, guys 'n gals, should we maybe ask Jamie whether 'extension=mysql.so' exists in the php.ini file, and if so whether the file exists in a directory that PHP will look for it in? It seems like the easiest possible problem to fix. Not that I think there's been rapant bad advice given, just that a good starting point was skipped.
i now try a rpm -i mysql-3.23.54a-3.72.i386 and it gives me aMySql conflicts with mysql-3.23.54a-3.72 error
rpm -U mysql-3.23.54a-3.72.i386 might work better. If you have a bunch of interdependent packages, it also works to do 'rpm -Uvh package-1.rpm package-2.rpm package-3.rpm', and that way rpm will sort out what order to do it in in order not to have dependency problems. I'm always warry of options to ignore dependency information. Sometimes they are necessary, but use them with great caution.
dingman, here is my /etc/php.ini
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=modulename.extension
;
; For example, on Windows:
;
; extension=msql.dll
;
; ... or under UNIX:
;
; extension=msql.so
;
; Note that it should be the name of the module only; no directory information
; needs to go here. Specify the location of the extension with the
; extension_dir directive above.
so it seems as though extension=mysql.so does not exist.
I have now uncommented the extension=msql.so and changed it to
extension=mysql.so
i then restarted apache and tried to log into phpmyadmin and the browser again gave me a
"cannot load MySQL extension,
please check PHP Configuration."
If it were me I would rpm -e (thats remove) all non redhat rpms and go to the redhat site and select the packages you need. Redhat will then package them in a tar file and you can download them and and install. rpm -Uvh
I could never feel comfortable with dependancy errors on mission critical Apps.
the problem is that -e does not work on the mysql rpm anymore
Is that just your own experience hakre or could you cite any source explaining why and on what systems the erase option does not work.
rpm -e -v -v --nodeps --test mysql returns erase: mysql-3.23.54a-3.70 has 162 files, test = 1. So I guess erase would work on this box. Andreas
I manually installed php, perl, apache, mod_ssl, aspell on my redhat 7.0 distribution, since I needed some features not provided with the redhat 7.0 versions. Running up2date and keeping those packages up2date was a major hassle afterwards. I reverted back to the original rpms.
I´m downloading debian right now in the hope that maintaining an up2date system will become easier.
i can't locate mysql.so
It seems that php-mysql is not installed. Check using
rpm -q php-mysql. Andreas
going on with debian now? tought guy. make an update everyday and fix the probs after update fast then. if you want to be uptodate, that's really an everyday job with debian. ;)
I´m downloading debian right now in the hope that maintaining an up2date system will become easier.
It is. :) That's why I've been relatively quiet about the RPM discussion.
make an update everyday and fix the probs after update fast then. if you want to be uptodate, that's really an everyday job with debian.
Depends on how bleeding edge you want to be. I have two machines on Debian right now, a server and my workstation. On the server, I value stability and security over the newest features in every piece of software, so it runs "stable" - which is very deserving of the name. I also subscribe to debian-security-announce, so I get an e-mail every time there is a security-related update to "stable". Most of the time, the update is for a package I don't even have installed on the server. When it is something I have installed, upgrading is as easy as 'apt-get update; apt-get install'.
Of course, on the workstation I follow the "unstable" branch, which does change every day, update much more often, and have problems with the updates from time to time. But frankly that's just because I want to play with the new stuff. It has nothing to do with maintaining a usable or secure system. I'd be crazy to try to run a production server that way.
rpm -e and that you were simply citing what Jamie said in msg 15. David is right though that to erase packages you just use the package name without extension.
If somehow the rpmdb got out of sync with the real situation
rpm --rebuilddb n´sync it again ;) that's really an everyday job with debian
... but a scriptable one I guess.
That sounds good Andrew. :)
Andreas
connect to phpmyadmin BUT.. i get the following
Welcome to phpMyAdmin 2.3.3pl1Error
MySQL said:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
*groan*
It looks as though david is right when he says stick to the redhat versions, and to be honest I am thinking: delete everything to do with php and mysql and start again - but this still leaves me with the problem of how to delete mysql.
I need some way of uninstalling the versions of MySql which I presently have, or, forcing an upgrade. these are the current php/mysql packages which i have manually installed since yesterday:
MySQL-client-3.23.54a-1
MySQL-3.23.54a-1
MySQL-shared-3.23.54a-1
MySQL-devel-3.23.54a-1
webmin-1.050-1.noarch.rpm
php-mysql-4.1.2-7.2.6
(the next 4 are the extras i installed because of failed dependancies)
curl-7.8-1.i386.rpm
pspell-0.12.2-3.i386.rpm
mm-1.1.3-8.i386.rpm
webmin-1.050-1.noarch.rpm
really appreciate the help - i feel sure we are getting somehwere :)