Ask a Question related to PHP Development, Design and Development.
-
jbottero #1
Problems with mysql support in PHP
I recently installed Red Hat Enterprise Advanced Server 3. As part of the
install, I asked it to install MySQL and Apache 2. I have discovered that
PHP does not seemed to have been installed with MySQL support:
Fatal error: Call to undefined function: mysql_connect() in
/var/www/html/test.php on line 6
But when I look at <? phpinfo(); ?> is see:
I see that it has been configured with --with-mysql=shared,/usr.
Within php.conf (which gets included in the httpd.conf), is this line:
LoadModule php4_module modules/libphp4.so
Also when I run phpinfo() is see that --with-mysql=shared,/usr is there, so
when php was installed it should have been compiled with MySQL support.
php.ini says this about MySQL:
[MySQL]
; Allow or prevent persistent links.
mysql.allow_persistent = On
; Maximum number of persistent links. -1 means no limit.
mysql.max_persistent = -1
; Maximum number of links (persistent + non-persistent). -1 means no limit.
mysql.max_links = -1
; Default port number for mysql_connect(). If unset, mysql_connect() will
use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order). Win32 will only
look
; at MYSQL_PORT.
mysql.default_port =
; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
mysql.default_socket =
; Default host for mysql_connect() (doesn't apply in safe mode).
mysql.default_host =
; Default user for mysql_connect() (doesn't apply in safe mode).
mysql.default_user =
; Default password for mysql_connect() (doesn't apply in safe mode).
; Note that this is generally a *bad* idea to store passwords in this file.
; *Any* user with PHP access can run 'echo
get_cfg_var("mysql.default_password")
; and reveal this password! And of course, any users with read access to
this
; file will be able to reveal the password as well.
mysql.default_password =
; Maximum time (in secondes) for connect timeout. -1 means no limimt
mysql.connect_timeout = -1
; Trace mode. When trace_mode is active (=On), warnings for table/index
scans and
; SQL-Erros will be displayed.
mysql.trace_mode = Off
Also, I see mysql.so at
../usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/DBD/mysql/mys
ql.so
Do I need to declare this in php.ini? Such as:
extension=mysql.so
Any HELP would me appreciated!
jbottero Guest
-
#39369 [NEW]: PHP 5.2.0 will not compiled with MySQL support
From: nathan at officelink dot net dot au Operating system: FreeBSD 6.1-RELEASE-p10 PHP version: 5.2.0 PHP Bug Type: Compile... -
#25447 [Opn->Bgs]: No built-in support for MySql
ID: 25447 Updated by: magnus@php.net Reported By: ondrejspilka at centrum dot cz -Status: Open +Status: ... -
#25447 [Opn]: No built-in support for MySql
ID: 25447 User updated by: ondrejspilka at centrum dot cz -Summary: No built-in support fro MySql Reported By: ... -
Where do I activate mysql support?
I run php pages in IIS in cgi-mode(only pointing them to PHP.exe). But I can't connect to database: Fatal error: Call to undefined function:... -
PHP5 and MySQL support
Anyone knows how i can run PHP5 with mysql support under win2k? Do i have to compile it? isnt there any other solution? Thanks in advance -
Jamie Isaacs #2
Re: Problems with mysql support in PHP
Had the same problem with debian.
apt-get php4-mysql
It solved the problem.
-JI
jbottero wrote:> I recently installed Red Hat Enterprise Advanced Server 3. As part of the
> install, I asked it to install MySQL and Apache 2. I have discovered that
> PHP does not seemed to have been installed with MySQL support:
>
> Fatal error: Call to undefined function: mysql_connect() in
> /var/www/html/test.php on line 6
>
> But when I look at <? phpinfo(); ?> is see:
>
> I see that it has been configured with --with-mysql=shared,/usr.
>
> Within php.conf (which gets included in the httpd.conf), is this line:
>
> LoadModule php4_module modules/libphp4.so
>
> Also when I run phpinfo() is see that --with-mysql=shared,/usr is there, so
> when php was installed it should have been compiled with MySQL support.
>
> php.ini says this about MySQL:
>
>
> [MySQL]
> ; Allow or prevent persistent links.
> mysql.allow_persistent = On
>
> ; Maximum number of persistent links. -1 means no limit.
> mysql.max_persistent = -1
>
> ; Maximum number of links (persistent + non-persistent). -1 means no limit.
> mysql.max_links = -1
>
> ; Default port number for mysql_connect(). If unset, mysql_connect() will
> use
> ; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
> ; compile-time value defined MYSQL_PORT (in that order). Win32 will only
> look
> ; at MYSQL_PORT.
> mysql.default_port =
>
> ; Default socket name for local MySQL connects. If empty, uses the built-in
> ; MySQL defaults.
> mysql.default_socket =
>
> ; Default host for mysql_connect() (doesn't apply in safe mode).
> mysql.default_host =
>
> ; Default user for mysql_connect() (doesn't apply in safe mode).
> mysql.default_user =
>
> ; Default password for mysql_connect() (doesn't apply in safe mode).
> ; Note that this is generally a *bad* idea to store passwords in this file.
> ; *Any* user with PHP access can run 'echo
> get_cfg_var("mysql.default_password")
> ; and reveal this password! And of course, any users with read access to
> this
> ; file will be able to reveal the password as well.
> mysql.default_password =
>
> ; Maximum time (in secondes) for connect timeout. -1 means no limimt
> mysql.connect_timeout = -1
>
> ; Trace mode. When trace_mode is active (=On), warnings for table/index
> scans and
> ; SQL-Erros will be displayed.
> mysql.trace_mode = Off
>
>
> Also, I see mysql.so at
> ./usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/DBD/mysql/mys
> ql.so
>
> Do I need to declare this in php.ini? Such as:
>
> extension=mysql.so
>
> Any HELP would me appreciated!
>
>Jamie Isaacs Guest



Reply With Quote

