Hi All,

I have upgraded my PHP to version 5.3.8.

I now cannot make any connections to the MySQL database. Having read articals and post I am getting nowhere.

I have read that if I run phpinfo.php I should see a section regarding the MySQL but I don't.

In my php.ini file I have:

[MSSQL]
; Allow or prevent persistent links.
mssql.allow_persistent = On

; Maximum number of persistent links.  -1 means no limit.
mssql.max_persistent = -1

; Maximum number of links (persistent+non persistent).  -1 means no limit.
mssql.max_links = -1

; Minimum error severity to display.
mssql.min_error_severity = 10

; Minimum message severity to display.
mssql.min_message_severity = 10

; Compatibility mode with old versions of PHP 3.0.
mssql.compatability_mode = Off

; Connect timeout
;mssql.connect_timeout = 5

; Query timeout
;mssql.timeout = 60

; Valid range 0 - 2147483647.  Default = 4096.
;mssql.textlimit = 4096

; Valid range 0 - 2147483647.  Default = 4096.
;mssql.textsize = 4096

; Limits the number of records in each batch.  0 = all records in one batch.
;mssql.batchsize = 0

; Specify how datetime and datetim4 columns are returned
; On => Returns data converted to SQL server settings
; Off => Returns values as YYYY-MM-DD hh:mm:ss
;mssql.datetimeconvert = On

; Use NT authentication when connecting to the server
mssql.secure_connection = Off

; Specify max number of processes. -1 = library default
; msdlib defaults to 25
; FreeTDS defaults to 4096
;mssql.max_procs = -1

Can anyone please help before I need to start looking for another job

    Few things:

    1. Which O/S are we talking about?

    2. How did you go about doing the upgrade?

    3. You've shown us a bunch of text from the php.ini that relates to MSSQL, but nothing that relates to MySQL.

    4. Even if you had shown us the correct section for MySQL, none of that would be relevant at all if you don't enable the MySQL extension itself (after all, those options are simply defined for the sake of the extension - the PHP core couldn't care less about them).

      As such, did you make sure to enable the appropriate "extesion=" line?

    5. Finally, note that the [man]mysql[/man] extension has fallen out of favor and replaced (some time ago) by the [man]MySQLi[/man] extension. You might want to consider switching to using it (or perhaps even [man]PDO[/man]) sometime in the near future.

      If you compiled PHP from source, you have to either
      a) specify that you want to include the mysql extensions
      b) configure your PHP.ini to load the mysql extensions from a shared library (e.g., mysql.so).

      Note that in case b, your extensions may not work unless you recompile each one of them using the current PHP code base.

        Also; have you compared the old and new versions of php.ini?

          22 days later

          Depending on what OS you're using, and what repo you got 5.3.8 from, you may have modified MySQL's dependencies and PHP's by accident. As a result, you have a broken installation of MySQL. You can back up your data, uninstall MySQL, and re-install it. That would, in my opinion, be the easiest way.

            Write a Reply...