Problem installing PHP with MySQL on RedHat 9
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
Bewildered and confused MySQL and PHP newb