Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Compile Mysql 5 with PHP 4.2.2 1

Status
Not open for further replies.

WebBoyo

MIS
Jul 23, 2005
13
YU
Hi,
I've installed RedHat 9, with PHP 4.2.2, but I need MySQL 5 instead version 3... from RedHat install CD.
Apache, Mysql 5 and PHP 4.2.2 works fine but I can't compile Mysql modules with php-mysql that is on RHL CD. When I install php-mysql, httpd can't start.
Can anybody help me to solve this situation.
PLEASE POST!
 
Hi slepnir,
I'm glad that my post draw your attention.
I also concluded that problem might be in PHP 4.2.2, so I've renistaled RHL, but without PHP.
Right now I'm downloading PHP 4.4.2 source tarball.
What do you think how will this version work with MySQL 5.1.
Thanks!
 
I know of no reason why PHP 4.4.2 will not work with MySQL 5.1. But why not install PHP 5.1.2?

You will have a choice to make as to whether to use the mysql_* or mysql[red]i[/red]_* family of functions. mysqli_* will give you greater functionality, but a lot of apps aren't ready to use it yet.



Want the best answers? Ask the best questions! TANSTAAFL!
 
Hi slepnir,
Now I have problem to find "apxs", needed to configure PHP installation.
I'm using Apache 2 from RedHat install CD.
Should I download and install another Apache 2?
 
You've installed Apache from RPM, and you didn't install the development package. Look for a "-dev" package that matches the name of the RPM package which installed Apache.

Or you can install Apache from source tarball. It's not hard and you can keep your installation current more quickly than the package maintainers can.



Want the best answers? Ask the best questions! TANSTAAFL!
 
I think that installing from source tarball is beter choice, so I installed from source t:
1. PHP v4.4.2;
2. Apache v2.0.55;
3. MySQL v5.1.

And again I have problem to connect PHP with MySQL.
When I try to configure PHP with:
"./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr" (or any other path)
I get:
"configure: error: Cannot find MySQL header files under /usr"

Browsing through other posts gaved me idea that I need mysql-devel.
Where can I find mysql-devel (source tarball) that matches with versions of MySQL, Apache and PHP that I've installed.
 
Is there anything that I can do with installing to avoid this problem?
In the Reference manual "mysql-dev" is mentioned only as RPM. How can I configure source tarball to get "MySQL headers"?
 
Don't install MySQL from source. The page in MySQL's site where you can download the tarball has the warning: For maximum stability and performance, we recommend that you use the binaries we provide.

Uninstall your current MySQL RPM, download the "server", "client programs", and "libraries and headers" binaries from MySQL and install those. There are RPM versions for Enterprise RedHat, SuSE, and generic Linux RPMs.





Want the best answers? Ask the best questions! TANSTAAFL!
 
I'm glad to report that everything works just fine.

THANK YOU SLEIPNIR!!! Have a star on me!

For the other visitors of this post I give a summary:
1. Download php-4.4.2.tar.bz2 and php_manual from 2. Download httpd-2.0.55.tar.gz from 3. Download MySQL-client-standard-5.0.18-0.rhel3.i386.rpm, MySQL-devel-standard-5.0.18-0.rhel3.i386.rpm, MySQL-server-standard-5.0.18-0.rhel3.i386.rpm and refman-5.0-en.pdf (reference manual) from 4. I uninstalled previous versions of PHP, MySQL, HTTPD, than installed and configured MySQL RPMs following instructions from "refman-5.0-en.pdf".
5. For installing and configuring Apache and PHP I used "php_manual".

I hope that this post will help visitors who has problem with installing MySQL 5.0.18 on RedHat (or another OS).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top