Professional Web Applications Themes

mysql_connect on Win2k machine with php5 - PHP Development

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...

  1. #1

    Default mysql_connect on Win2k machine with php5

    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
    Philliph Guest

  2. #2

    Default Re: mysql_connect on Win2k machine with php5

    Adam schrieb: 
    >
    >
    > 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.[/ref]

    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 Guest

  3. #3

    Default Re: mysql_connect on Win2k machine with php5

    Adam schrieb:
     
    >
    >
    > 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.[/ref]

    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
    Philliph Guest

  4. #4

    Default Re: mysql_connect on Win2k machine with php5

    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.
    Adam Guest

  5. #5

    Default Re: mysql_connect on Win2k machine with php5

    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.[/ref]
    >
    >
    > 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[/ref]

    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
    Stefan Guest

  6. #6

    Default Re: mysql_connect on Win2k machine with php5

    Stefan Rybacki schrieb: 

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

    phil
    Philliph Guest

  7. #7

    Default Re: mysql_connect on Win2k machine with php5

    Philliph Mau wrote: 

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

    Aaron
    nitehawk Guest

Similar Threads

  1. Replies: 5
    Last Post: December 17th, 11:24 PM
  2. Problems intalling DBD::InterBase in a Win2k machine
    By Eduardo Sampaio in forum PERL Modules
    Replies: 1
    Last Post: December 2nd, 06:03 AM
  3. Horrible Speed issues? Win2k P4 2Ghz Machine
    By bshroyer webforumsuser@macromedia.com in forum Macromedia Fireworks
    Replies: 3
    Last Post: September 26th, 03:22 PM
  4. [PHP] PHP4 and PHP5 at one machine
    By Milan Reznicek in forum PHP Development
    Replies: 2
    Last Post: July 9th, 02:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139