freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] FreeTDS XAMPP Install - cannot connect via PHP
- From: "Thomas, Christopher (LLU)" <cwthomas AT llu.edu>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] FreeTDS XAMPP Install - cannot connect via PHP
- Date: Thu, 15 Sep 2011 11:57:45 -0700
I'm not familiar with XAMPP, but usually one does not install PHP
extensions. Usually you compile them in. When you do a 'make install',
the extension gets copied to the directory that is in PHP's extension
library path. Whatever you installed is not in that path, so that is why
PHP complains it cant find the odbc.so file. Looking at the XAMPP site
confirms that. On this page
http://www.apachefriends.org/en/xampp-linux.html is a link to the
Development package which has all the PHP source needed to compile a PHP
extension. Please make sure you have the header files for UnixODBC
before compiling. After this is done, putting an entry in the php.ini
file should work.
I'm not a fan of XAMPP. I thought I read somewhere on their web site
that said don't use it in production. If you are looking for a turnkey
solution like XAMPP which has support for FreeTDS in PHP (mssql
extension in stead of the ODBC extension) I recommend trying Zend Server
CE. If you are on Debian/Ubuntu, or RHEL/Centos or SLES, they have a
repo. Or you can download the tar file.
http://www.zend.com/en/products/server-ce/downloads
Chris
> -----Original Message-----
> From: freetds-bounces AT lists.ibiblio.org [mailto:freetds-
> bounces AT lists.ibiblio.org] On Behalf Of Rick Bates
> Sent: Wednesday, September 14, 2011 8:47 PM
> To: freetds AT lists.ibiblio.org
> Subject: [freetds] FreeTDS XAMPP Install - cannot connect via PHP
>
> I can successfully connect to the database using isql command from the
> shell. But when I try to connect via php using the odbc_connect
method
> and the same dsn, I get this: Fatal error: Call to undefined function
> odbc_connect() in /opt/lampp/htdocs/includes/db_login.inc on line 8
>
> I installed PHP ODBC but I do not see any reference to odbc in the
php-
> info() page. I am wondering if the config files are in the wrong
> directory to be used by php. They are in /etc as per the default
install
> and online instructions. But I also see that in XAMPP, the root
directory
> is /opt/lampp. So I don't know if I need to build them in the
> /opt/lampp/etc directory to make them work?
>
> Also, when I put the extension=odbc.so directive in the php.ini in the
> /opt/lampp/etc directory I get an error starting and stopping XAMPP
> indicating that it cannot find that file. But it does not error with
that
> line in the php.ini in the /etc. directory.
>
> Any help would be greatly appreciated!
>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
-
[freetds] FreeTDS XAMPP Install - cannot connect via PHP,
Rick Bates, 09/14/2011
- Re: [freetds] FreeTDS XAMPP Install - cannot connect via PHP, Thomas, Christopher (LLU), 09/15/2011
Archive powered by MHonArc 2.6.24.