List:General Discussion« Previous MessageNext Message »
From:Martin Edelius Date:October 15 1999 3:36pm
Subject:MySQL+PHP installation problems...
View as plain text  
Hi all.

I have an installation problem that's not stricly MySQL but since I know
that you guys and girls are pretty skilled in troubleshooting a wide
variety of problems related to MySQL I decided to give it a try. 8)

This probably a very common error but I can't find a solution to it in
my archives of the mailing list nor the archives on the web.

When installing the latest PHP with MySQL support I did as outlined
here:
1) gunzip apache_1.3.x.tar.gz
2) tar xvf apache_1.3.x.tar
3) gunzip php-4.0.x.tar.gz
4) tar xvf php-4.0.x.tar
5) cd apache_1.3.x
6) ./configure --prefix=/www
7) cd ../php-4.0.x
8)
./configure --with-mysql --with-apache=../apache_1.3.x --enable-track-va
rs
9) make
10) make install
11) cd ../apache_1.3.x
12)
./configure --prefix=/www --activate-module=src/modules/php4/libphp4.a
13) make
14) cd ../php-4.0.x
15) cp php.ini-dist /usr/local/lib/php.ini

The only problem is that I can't get past step 9. After running 'make' I
get:
---------------------------------------------------
In file included from mysql.c:60:
/usr/src/php-4.0b2/../mysql-3.22.27/include/mysql.h:46: mysql_com.h: No
such file or directory
/usr/src/php-4.0b2/../mysql-3.22.27/include/mysql.h:47: mysql_version.h:
No such file or directory
make[2]: *** [mysql.o] Error 1
make[2]: Leaving directory `/usr/src/php-4.0b2/ext/mysql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/php-4.0b2/ext'
make: *** [all-recursive] Error 1
---------------------------------------------------

After poking around a bit I found files called "mysql_com.h.in" and
"mysql_version.h.in". I copied these to "mysql_com.h" and
"mysql_version.h" and got a little bit further:
---------------------------------------------------
In file included from mysql.c:60:
/usr/src/php-4.0b2/../mysql-3.22.27/include/mysql.h:166: parse error
mysql.c:70: parse error
mysql.c:432: parse error
mysql.c:458: parse error
mysql.c:497: parse error
mysql.c:554: parse error
mysql.c:830: parse error
mysql.c:895: parse error
make[2]: *** [mysql.o] Error 1
make[2]: Leaving directory `/usr/src/php-4.0b2/ext/mysql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/php-4.0b2/ext'
make: *** [all-recursive] Error 1
---------------------------------------------------

Something is still wrong. I found this fix from Sascha for the exact
same problem in the mailing archives:
---------------------------------------------------
Here is a quick and dirty fix:

ln -s wherever_you_mysql_base_dir_is/include/mysql.h
/usr/include/mysql.h
ln -s wherever_you_mysql_base_dir_is/lib/libmysqlclient.a
/usr/lib/libmysqlclient.a

A cleaner solution would be to dig through your configure options and
make sure that it compiles with the correct paths that include mysql
directories in -I and -L
---------------------------------------------------

My problem is that the files missing does not exist anywhere on the
server so I can't even link to them/copy them to the right place. I gave
the configure script the option "--with-mysql=../mysql-3.22.27", before
this it didn't get far at all and would complain about no MySQL support.

Any ideas? Our old development server borked and we need to get the new
one up asap. I was planning on getting some work done this weekend but
now I don't know... 8(

We're running on Redhat 6.1 with MySQL installed from RPM's. The MySQL,
PHP and Apache source was downloaded today and should be the latest
versions available (PHP4 beta 2, MySQL 3.22.27 and Apache 1.3.9).

*Please mail me directly with any ideas you might have since I can't
participate on the list any more.*

Thanks a lot in advance for any help you can provide.


Best regards,
Martin Edelius

Spirex Digital Design

--------------------------------
www: http://www.spirex.se
Mail: martin.edelius@stripped
Phone: +46-31-514651, 0708-113711
Fax: +46-31-514331
S-422 43 Hisings Backa
--------------------------------
If I haven't gotten back to you or done what I'm supposed to, let me
know again as I have too much to do for my own good...


Thread
MySQL+PHP installation problems...Martin Edelius15 Oct
  • Re: MySQL+PHP installation problems...Davor Cengija19 Oct