Results 1 to 4 of 4

Thread: cannot connect to PHP/ODBC

  1. #1
    Join Date
    Oct 2010
    Posts
    158

    cannot connect to PHP/ODBC

    I am using Mandrake 9.1 with Xampp 1.66 installed on my computer. I also installed UnixODBC and the MYsql connector to connect to the system. I can successfully connect to Mysql test database using the command isql –v. Using PHP script such as mysql_connect I can connect to Mysql. I have recently installed the PHP ODBC extension from the php5-odbc-5.0.2-1mdk.i586.rpm. Now the php will not able to run the line odbc_connect() an any script. It just displays the error log.

  2. #2
    Join Date
    Feb 2010
    Posts
    530

    Re: cannot connect to PHP/ODBC

    I think the main reason you are getting this issue because the odbc extension you have installed is not supported by the current php5 version. Check manually that whether the extension odbc.so is installed on “/usr/lib/php5/extensions/” this location or not. The php.ini expects you to put the link to it in opt/lampp/lib/php/extensions/non-debug-non-zts-20060613/ and a line extension=odbc.so in php.ini. After linking try to run the same command, it will definitely work I think.

  3. #3
    Join Date
    Feb 2010
    Posts
    641

    Re: cannot connect to PHP/ODBC

    I searched many times over the net using Google search. At last I found the 2 php5-odbc packages which hare specifically for Mandriva in this link .The packages versions are
    php-odbc-5.2.5-13mdv2008.1.i586.rpm
    php-odbc-5.2.5-14.7mdv2008.1.i586.rpm

    These are really made for your php version and definitely going to suit it and I hope that it will going to fit the php installation also.

  4. #4
    Join Date
    Feb 2010
    Posts
    532

    Re: cannot connect to PHP/ODBC

    mysql_connect command or script needs several parameters to connect Mysql to the server. The parameters are
    • Server -It includes port number and also the Mysql server. Ex. Hostname:port and for PHP script mysql.default_host is set by deafualt
    • Username- the value if defined by mysql.default_user. It is the default value.
    • Password- mysql.default_password
    • New link
    • Client flags

Similar Threads

  1. Using 32 bit ODBC driver in x64?
    By Jemond in forum Windows x64 Edition
    Replies: 13
    Last Post: 27-03-2012, 03:33 AM
  2. How to use Database ODBC in PHP?
    By Xylina in forum Software Development
    Replies: 4
    Last Post: 25-02-2010, 05:55 AM
  3. ODBC Drivers 64-Bit
    By NMahmoud in forum Windows Server Help
    Replies: 4
    Last Post: 13-10-2009, 01:51 PM
  4. To add query parameters using ODBC.
    By Capper in forum Software Development
    Replies: 1
    Last Post: 23-07-2009, 08:06 PM
  5. 32 bit app on a 64 bit machine ODBC?
    By Pine Le in forum Windows x64 Edition
    Replies: 1
    Last Post: 07-02-2008, 03:38 AM

Tags for this Thread

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
  •  
Page generated in 1,716,481,685.44884 seconds with 17 queries