For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > August 2005 > mysql_connect on Win2k machine with php5









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author mysql_connect on Win2k machine with php5
Philliph Mau

2005-08-15, 10:00 pm

I updated php4.3.10 to php 5.04 tonight, but now I receive a

Fatal error: Call to undefined function mysql_connect() in {file} on
line {n}

I activated "extension=php_mysql.dll" in php.ini
The file "libmysql.dll" is in the c:\php directory stored.
So I just added "c:\php" to the $PATH environment variable of my Win2k.

Any Ideas, why the mysql doesn't work though?


By the way, I installed Php5 support to apache2 by module and not as CGI
Binary.



-phil
Adam

2005-08-16, 3:59 am

On Sun, 14 Aug 2005 02:58:48 +0200, Philliph Mau wrote:

>I updated php4.3.10 to php 5.04 tonight, but now I receive a
>
>Fatal error: Call to undefined function mysql_connect() in {file} on
>line {n}
>
>I activated "extension=php_mysql.dll" in php.ini
>The file "libmysql.dll" is in the c:\php directory stored.
>So I just added "c:\php" to the $PATH environment variable of my Win2k.
>
>Any Ideas, why the mysql doesn't work though?
>
>
>By the way, I installed Php5 support to apache2 by module and not as CGI
>Binary.


Does phpinf() show MySQL as active? There should be a fairly large
section for it showing.

Did you reboot the the machine ior restart Apache?

Adam.
Philliph Mau

2005-08-16, 3:59 am

Adam schrieb:
> On Sun, 14 Aug 2005 02:58:48 +0200, Philliph Mau wrote:
>
>
>
>
> Does phpinf() show MySQL as active? There should be a fairly large
> section for it showing.
>
> Did you reboot the the machine ior restart Apache?
>
> Adam.


no, phpinfo() does not list anything about mysql. Only slqlite is
listed. :-(
Sure. I rebooted the machine and restarted apache as well.

I don't understand it! I downloaded the current release 5.0.4 as zip file.


For extension dir, I specified:

---------
; Directory in which the loadable extensions (modules) reside.
extension_dir = "ext/"
---------

The extension section is:

---------
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=modulename.extension
;
; For example, on Windows:
;
; extension=msql.dll
;
; ... or under UNIX:
;
; extension=msql.so
;
; Note that it should be the name of the module only; no directory
information
; needs to go here. Specify the location of the extension with the
; extension_dir directive above.


;Windows Extensions
;Note that ODBC support is built in, so no dll is needed for it.
;

;extension=php_bz2.dll
;extension=php_cpdf.dll
;extension=php_curl.dll
;extension=php_dba.dll
;extension=php_dbase.dll
;extension=php_dbx.dll
;extension=php_exif.dll
;extension=php_fdf.dll
;extension=php_filepro.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_ifx.dll
;extension=php_iisfunc.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_java.dll
;extension=php_ldap.dll
;extension=php_mbstring.dll
;extension=php_mcrypt.dll
;extension=php_mhash.dll
;extension=php_mime_magic.dll
;extension=php_ming.dll
;extension=php_mssql.dll
;extension=php_msql.dll
extension=php_mysql.dll
;extension=php_oci8.dll
extension=php_openssl.dll
;extension=php_oracle.dll
;extension=php_pdf.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
;extension=php_snmp.dll
;extension=php_sockets.dll
;extension=php_sybase_ct.dll
;extension=php_tidy.dll
;extension=php_w32api.dll
;extension=php_xmlrpc.dll
;extension=php_xsl.dll
;extension=php_yaz.dll
;extension=php_zip.dll
---------


All the other settings are unchanged (from recommended ini file).


Is there still any other setting I have to set?
Philliph Mau

2005-08-16, 3:59 am

Adam schrieb:

> On Sun, 14 Aug 2005 02:58:48 +0200, Philliph Mau wrote:
>
>
>
>
> Does phpinf() show MySQL as active? There should be a fairly large
> section for it showing.
>
> Did you reboot the the machine ior restart Apache?
>
> Adam.


Oh! I see!!
When I enable PHP in apache NOT as module, it works fine!
But I like to use php5 as module in Apache, if that is possible.
I was told, that CGI Binary is more unsecure...

Any ideas, what I have to do?

-phil
Stefan Rybacki

2005-08-16, 3:59 am

Philliph Mau wrote:
> Adam schrieb:
>
>
>
> Oh! I see!!
> When I enable PHP in apache NOT as module, it works fine!
> But I like to use php5 as module in Apache, if that is possible.
> I was told, that CGI Binary is more unsecure...
>
> Any ideas, what I have to do?
>
> -phil


Since PHP5 mySQL support is not shipped with PHP you have to install and activate it by
yourself. Go to the PHP download page and read the instructions!

Regards
Stefan
Philliph Mau

2005-08-16, 5:01 pm

Stefan Rybacki schrieb:
>
> Since PHP5 mySQL support is not shipped with PHP you have to install and
> activate it by yourself. Go to the PHP download page and read the
> instructions!
>
> Regards
> Stefan


Thanks for the tip ;-)
....but it does NOT work for php integration via apache module!
As CGI Binary is okay. But no documentation tells me, how to activate
mysql when I use this as apache module.

phil
nitehawk

2005-08-20, 2:55 am

Philliph Mau wrote:
> I updated php4.3.10 to php 5.04 tonight, but now I receive a
>
> Fatal error: Call to undefined function mysql_connect() in {file} on
> line {n}
>
> I activated "extension=php_mysql.dll" in php.ini
> The file "libmysql.dll" is in the c:\php directory stored.
> So I just added "c:\php" to the $PATH environment variable of my Win2k.
>
> Any Ideas, why the mysql doesn't work though?
>
>
> By the way, I installed Php5 support to apache2 by module and not as CGI
> Binary.
>
>
>
> -phil


I had the same problem, so followed the intructions and ended up
reinstalling MySQL which worked fine.

Aaron
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com