php isn't seeing mysql at installation
Posted: Mon Nov 03, 2003 6:07 pm
Hello everybody.
My research shows it to be a common problem but most of the posting don’t have the end results or it goes on and on and on to never never land.
I get the following message accessing MYSQL database with PHP:
Fatal error: Call to undefined function: mysql_connect() in /var/www/html/test2/index.php on line 16
What I have: redhat9, php4, mysql and no firewall setup on linux box.
Independently both php and mysql works fine.
Has anyone recently experienced this that we can talk about. weeks worth of research and fixs hasn’t worked. But from what I can see it has something to do with the path or php doesn’t see where mysql is located at \\wwwroot\mysql..
There has to be an easer way to fix this without reinstalling everything over again.
The structure of apache,php, and mydql
/wwwroot/apache
/wwwroot/php
/wwwroot/mysql
part of the <?info();?>
kerberos=/usr/kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '—enable
tried recompiling... the configuration ran through fine but when i ran the "make" it failed...copy/pasting the part where it failed..
-ldl -lnsl -lcrypt -lcrypt -o sapi/cli/php
ext/mysql/php_mysql.lo(.text+0x22dc): In function `zif_mysql_create_db':
/downloads/php-4.3.3/ext/mysql/php_mysql.c
undefined reference to `mysql_create_db'
ext/mysql/php_mysql.lo(.text+0x2513): In function `zif_mysql_drop_db':
/downloads/php-4.3.3/ext/mysql/php_mysql.c
undefined reference to `mysql_drop_db'
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
[root@localhost php-4.3.3]#
this is the config file that i ran:
./configure --prefix=/wwwroot/php --with-apxs2=/wwwroot/bin/apxs --with-config-file-path=/wwwroot/php --with-mysql=/wwwroot/mysql
but failed when i ran the make command...
any help u can give me would be greatly appreciated..
My research shows it to be a common problem but most of the posting don’t have the end results or it goes on and on and on to never never land.
I get the following message accessing MYSQL database with PHP:
Fatal error: Call to undefined function: mysql_connect() in /var/www/html/test2/index.php on line 16
What I have: redhat9, php4, mysql and no firewall setup on linux box.
Independently both php and mysql works fine.
Has anyone recently experienced this that we can talk about. weeks worth of research and fixs hasn’t worked. But from what I can see it has something to do with the path or php doesn’t see where mysql is located at \\wwwroot\mysql..
There has to be an easer way to fix this without reinstalling everything over again.
The structure of apache,php, and mydql
/wwwroot/apache
/wwwroot/php
/wwwroot/mysql
part of the <?info();?>
kerberos=/usr/kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-pgsql=shared' '--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '—enable
tried recompiling... the configuration ran through fine but when i ran the "make" it failed...copy/pasting the part where it failed..
-ldl -lnsl -lcrypt -lcrypt -o sapi/cli/php
ext/mysql/php_mysql.lo(.text+0x22dc): In function `zif_mysql_create_db':
/downloads/php-4.3.3/ext/mysql/php_mysql.c
ext/mysql/php_mysql.lo(.text+0x2513): In function `zif_mysql_drop_db':
/downloads/php-4.3.3/ext/mysql/php_mysql.c
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Error 1
[root@localhost php-4.3.3]#
this is the config file that i ran:
./configure --prefix=/wwwroot/php --with-apxs2=/wwwroot/bin/apxs --with-config-file-path=/wwwroot/php --with-mysql=/wwwroot/mysql
but failed when i ran the make command...
any help u can give me would be greatly appreciated..