HELP PLZ! UNABLE TO INSTALL MYSQL WITH PHP on my Red Hat :(

Forum for you who has PHP installation issues

Moderators: macek, egami, gesf

d3army
New php-forum User
New php-forum User
Posts: 2
Joined: Fri Jul 09, 2004 9:39 am

HELP PLZ! UNABLE TO INSTALL MYSQL WITH PHP on my Red Hat :(

Postby d3army » Fri Jul 09, 2004 9:57 am

Hi there everyone

This has been a really frustrating quagmire for me for the past week. I want to install PHP 4.3.7 and MySQL 4.0.20 on my Red Hat 9.0.


I downloaded PHP 4.3.7 from the php.net site and installed smoothly and it worked immediately. I checked using the phpinfo() function as well. Maybe this was a bad move, since I later found out that I shouyld install MySQL first before PHP

But then, I started out using RPMs for MySQL and I rpm-ed the server tar only since I didn't think I would have needed any of the other RPMs(like devel, client) Once the server RPM was done, I could start up mysqld (not mysqld_safe) without fail and also use "mysql" to log into the database as the root and such.

Then I decided to recompile the PHP. I did "./configure --with-mysql" and didn't specify a source directory for the MySQL since I have no idea where the RPM put it. However, after re-compiling the PHP, iit is apparent that MySQL still isn't properly installed because it won't even recognize the mysql_connect() function at all.

Thus, I deciided to manually compile the MySQL package which I downloaded. I removed the server RPM and then did ./configure , make ,make install for MySQL and had it installed in the /usr/local/mysql folder. Then, I tried to re-compile PHP again this time knowing where the dam thing is , the command becomes "./configure --with-mysql=/usr/local/mysql" . Everything went well, but PHP still won't recognize the mysql_connect function afterwards!

With this manually installed MySQL 4.0.20, I can only start mysqld_safe since mysqld is nowhere in sight, and I am unable to mysql to this database even though it is apparently running in the background(show by the ps command). There is this constant error about not being able to connect with the file "mysql.sock" whenever I use the mysqladmin and mysql commands.

By the way, in the output generated by the phpinfo() function, in the sectiion "Configure Command" near the very beginning, I noticed this entry : '--with-mysql=shared,/usr' and this just dosn't bode well.

Can someone please tell me how I can rectify these problems? Should I reinstall Red Hat and then work everything out again from scratch? Just wondering if anyone has had problems like this before with MySQL 4.0.20 and PHP 4.3.7. I am pretty sure that Apache is working fine and it came installed with Red Hat 9

Thank you!
Bewildered and confused MySQL and PHP newb

User avatar
frogrocker
New php-forum User
New php-forum User
Posts: 98
Joined: Mon Jul 07, 2003 10:30 pm
Location: Manchester
Contact:

Postby frogrocker » Sun Jul 11, 2004 8:25 am

I experienced these problems with RedHat but still don't know how to fix them. Take my advice, try Mandrake - it works straight from the install.

Otherwise, try Linux Questions, they'll be able to sort you out.

Image
The dog's nads.

d3army
New php-forum User
New php-forum User
Posts: 2
Joined: Fri Jul 09, 2004 9:39 am

Postby d3army » Sun Jul 11, 2004 2:16 pm

frogrocker wrote:I experienced these problems with RedHat but still don't know how to fix them. Take my advice, try Mandrake - it works straight from the install.

Otherwise, try Linux Questions, they'll be able to sort you out.

Image
The dog's nads.


Hi, thz for the advice, but I am just curious about Mandrake. Do you mean that MySQL, PHP and Apache will all come pre-installed and functional when I install the OS itself?

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Postby ruturajv » Sun Jul 11, 2004 7:20 pm

yes, why mandrake, but as well with redhat 9.0 , select custom options while installing and in the databases, server, select apache, php and mysql, and pgsql as well if you want..
Since with redhat 9.0 you have decent gui, just go to installed applications, and add php, mysql as well.... but would require the linux instal. disks.

User avatar
frogrocker
New php-forum User
New php-forum User
Posts: 98
Joined: Mon Jul 07, 2003 10:30 pm
Location: Manchester
Contact:

Postby frogrocker » Mon Jul 12, 2004 2:08 am

ruturajv wrote:yes, why mandrake, but as well with redhat 9.0 , select custom options while installing and in the databases, server, select apache, php and mysql, and pgsql as well if you want..
Since with redhat 9.0 you have decent gui, just go to installed applications, and add php, mysql as well.... but would require the linux instal. disks.


I'm sure you can, but in my experience Mandrake is just easier to use. The package manager is really good, and when I tried RedHat even though I selected PHP and mySQL at install it didn't work straight away as it did with Mandrake.


Return to “PHP Installation”

Who is online

Users browsing this forum: No registered users and 1 guest