Forum Moderators: bakedjake
Fatal error: Call to undefined function: mysql_connect() in /var/www/html/config/config.php on line 7 now i have also tryed to log into phpmyadmin and get this message
cannot load mysql extension,
please check PHP Configuration and a link to this help section
To connect to a MySQL server, PHP needs a set of MySQL functions called "MySQL extension". This extension may be part of the PHP distribution (compiled-in), otherwise it needs to be loaded dynamically. Its name is probably mysql.so or php_mysql.dll. phpMyAdmin tried to load the extension but failed.
Usually, the problem is solved by installing a software package called "PHP-MySQL" or something similar. now i have looked everywear for these extentions but can not seem to be able to find them. is there someware i can get these and add them to the serer, or do i have to reload the hole thing and start from scratch. this server has been down for over a week now and i am running out of things to try. thanks for any help
kwick
Assuming you were using the default packages (and didn't recompile everything), have you tried simply reinstalling or removing/reinstalling MySQL?
urpmi MySQL (or
urpme MySQL to remove)? From your description, it looks as if you have simply wiped your MySQL installation by accident.
[edited by: kwick at 2:09 am (utc) on Aug. 30, 2005]
I wouldn't delete the file if mysql is running. No idea what happens if you did that. Can't imagine it would be pleasant.
You could also try something like:
urpmi php-mysql
but I don't think that's the problem.
If your urpmi database doesn't have a package by that name you probably need to update your mirror list. Here's what I'd do next as root:
urpmi.removemedia -a (kills your existing mirror list)
then browse to 'http://easyurpmi.zarb.org' go through step 1,2 and 3 and you'll end up with a series of commands you can run at the command prompt when logged in as root. That'll update your mirror list.
then once again enter 'urpmi php-mysql'.
Keep us posted.
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) and i get this error when i try to start mysql sh: line 1: /etc/rc.d/init.d/mysql: No such file or directory there has been a few other problems now also. like i cannot access system/congiguration/configure your computer adn also i can not access add and removr packages or even urmpi them when i try to urpmi from a terminal i get this message root@www root]# urpmi php
Can't locate urpmi.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.6/i386-linux /usr/lib/perl5/5.8.6
/usr/lib/perl5/site_perl/5.8.6/i386-linux
/usr/lib/perl5/site_perl/5.8.6
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.6/i386-linux
/usr/lib/perl5/vendor_perl/5.8.6
/usr/lib/perl5/vendor_perl/5.8.3
/usr/lib/perl5/vendor_perl/5.8.2
/usr/lib/perl5/vendor_perl/5.8.1
/usr/lib/perl5/vendor_perl .) at /usr/sbin/urpmi line
23.
BEGIN failed--compilation aborted at /usr/sbin/urpmi
line 23.
[root@www root]#now when i goto /usr/sbin/urpmi line line 23 = use urpmi; now i have tryed to delete the urpmi again and reinstall but i get this error
root@www root]# urpmi.removemedia
Can't locate URPM.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.6/i386-linux /usr/lib/perl5/5.8.6
/usr/lib/perl5/site_perl/5.8.6/i386-linux
/usr/lib/perl5/site_perl/5.8.6
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.6/i386-linux
/usr/lib/perl5/vendor_perl/5.8.6
/usr/lib/perl5/vendor_perl/5.8.3
/usr/lib/perl5/vendor_perl/5.8.2
/usr/lib/perl5/vendor_perl/5.8.1
/usr/lib/perl5/vendor_perl .) at
/usr/lib/perl5/vendor_perl/5.8.3/urpm.pm line 13.
BEGIN failed--compilation aborted at
/usr/lib/perl5/vendor_perl/5.8.3/urpm.pm line 13.
Compilation failed in require at
/usr/sbin/urpmi.removemedia line 25.
BEGIN failed--compilation aborted at
/usr/sbin/urpmi.removemedia line 25.
[root@www root]#
thanks so far for all the help
kwick
My first reaction is that you've deleted some perl libraries that you need. And I want to start suggesting installing CPAN and all that stuff but.....
How badly hung up are you right now? If I was in your situation with a bunch of stuff not working like this (and no easy way to figure out what's missing) I'd be thinking very hard about a bare metal install. Backup all your data and do a fresh install.
If you do that, and your mirrors are up to date, then as you find packages that aren't installed you can just use urpmi or CPAN to install them, knowing that all the versions are in sync.
Otherwise, I think you're in the position of having to figure out what package is causing the problem, install it, try again and see what breaks. Then find out what's causing that to break, install it, etc.
Sorry - not good news but that would be my approach right now.
then the file urpmi on line 23 i alos have use urpm;
was wondering if that was correct
also everything was working or at least seem to until i went to upgrade the mysql i updated the apache and php went to the url and got a message about not haveing permitions to view root@localhost this is when i upgraded the sql and all this stull above happened
kwick
At the same time, check if your /etc/php.ini file got overwritten. And for good measure, check /etc/http/conf/ files. If they look like default files, make a backup of them then try restoring these from a backup. Restart apache and mysql and see how that goes.
I've done urpmi updates and had the config files overwritten. That can make things interesting for a few minutes.
(I'm admittedly struggling here. Seems like you've got a number of things going wrong that are tough to check from afar).
kwick