undefined function: mysql_connect() TAKE TWO

  • Willy
  • Graduate
  • Graduate
  • Willy
  • Posts: 199

Post 3+ Months Ago

Ok, i have done a redhat 8 install on my mmachine, it has apache and php version info can be seen here : http://www.brahh.com

The only last thing i want to do is get MYSQL working with php, as seen by the info it is supported --with-mysql=shared

i have downloaded mysql rpms:
MySQL-client-4.0.13-0.i386.rpm
MySQL-server-4.0.13-0.i386.rpm

after rpm -Uvh on these i have a mysql version that works from shell on my box...
connecting from the web provides the error
Fatal error: Call to undefined function: mysql_connect() in /var/www/html/brahh.com/softball/index.php on line 28

I have tried including(mysql.so) to no avail....

numerous people have told me that a simple php-mysql rpm file should do the trick

i rpm try to rpm
php-mysql-4.2.2-17.i386.rpm
but need dependancy
libmysqlclient.so.10 is needed by php-mysql-4.2.2-17


so to solve this i do the following:
rpm -Uvh php-mysql-4.2.2-17.i386.rpm perl-DBD-MySQL-2.1017-3.i386.rpm mysql-3.23.56-1.80.i386.rpm

ok, everything looks rpm'd however!

[root@localhost dload]# mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)


so now mysql dosent work, i cant seem to find alternative rpms to be using, i dunena, if anyone has any links or has solved this problem with a specific set of rpms i would greatly appricate it, this probelm has been slowign em down quite some time now

:x
j
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9089
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

And you started the MySQL daemon? or tried to?
  • Willy
  • Graduate
  • Graduate
  • Willy
  • Posts: 199

Post 3+ Months Ago

mysql starts and is running BEFORE i try to update, i created tables modified data and everyhting.. after the php-mysql rpm, nothing works, and i cant start the deamon, it actually removes it from my /etc/rc.d/init.d file i thikn

so i end up ahving to unistall the depended pacakages, and putting mysql back on
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9089
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

When you installed your server did you check the php-mysql package so that you wouldn't have to install it manually? It would also make sure you have all the depencies too during setup and would be the simpliest way.

Another option when you install is to just install every single package that exists on the server. That way you do not leave anything out and maybe you can test if it works then.
  • Willy
  • Graduate
  • Graduate
  • Willy
  • Posts: 199

Post 3+ Months Ago

i actually installed redhat 2x so far, and the cd's are an hour away so i really dont wanna do a third one. The first time i did it i just did the "give me a server" install, and it was only 7.3, On my second install i got RH 8 cd's and did custom. I defiently clicked that i watned databasing {although i didnt go into the specific breakdown of each piece, i thought that was for the super technical gurus} I find it strange also that php says it is supporting it??


do you think finding an older version of mysql is a viable option? This is reall bumming me out, cuz i just sit and play with the same old problems day in and day out. I want new problems to give me ulcers damn it!!!

i feel like there must be a way? Perhaps dl'ing and compiling from source all 3 apache, php and mysql? if i do that i'd like a nice idiot proof tutorial

thx
Justin
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9089
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

I really think you are just missing some packages, but I am not sure exactly what you are missing. Thatis why I recommend you trying to reinstall for one last time and install every single package. That means go into the custom mode and make sure every single package is checked. Now if that fails you know there is something definetely wrong. If it works then you know you were just missing some packages.

The main problem is that we cannot figure out exactly what is causing the problem, and that is leaving us guessing.

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 20 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.