Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Technical

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 1st January 2006, 09:24
my5660 my5660 is offline
Junior Member
 
Join Date: Dec 2005
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Post Error: undefined symbol SQLAllocEnv at PHP

Hello,

I am not able to connect to a sybase database via unixODBC in PHP, but testing with isql its able to connect. my server is using based on the SuSE 9.3 distribution,

here my ODBC Setting
ODBC.ini stored in etc/unixODBC

[ODBC Data Sources]
ts_dsn=Adaptive Server Anywhere 9.0

[ts_dsn]
Userid=xxx
Password=yyy
ServerName=hsab_sbs2003
CommLinks=tcpip(host=192.168.0.12;port=2936)
Driver=lbdbodbc9.so

testing with isql its able to connect

For testing the connection I used this file: /srv/www/project/test.php
<?
echo "Begin";
$conn=odbc_connect("ts_dsn","xxx","yyy")
or die ("Failure");

echo "End";
?>

When calling this file, there ist only the text "Begin" displayed in the
browser window. No error. But an error is logged in
/var/log/apache2/error_log:
"/usr/sbin/httpd2-prefork: error while loading shared libraries:
/usr/lib/php/extensions/unixODBC.so: undefined symbol: SQLAllocEnv"

Do you have got an idea what went wrong?
Reply With Quote
Sponsored Links
  #2  
Old 1st January 2006, 12:13
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,389 Times in 4,234 Posts
Default

PHP cant load the unixODBC.so. Is the file:

/usr/lib/php/extensions/unixODBC.so

there?. Have you installed the unixODBC extension from your linux distribution or did you compile PHP manually?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 2nd January 2006, 11:48
my5660 my5660 is offline
Junior Member
 
Join Date: Dec 2005
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till
PHP cant load the unixODBC.so. Is the file:

/usr/lib/php/extensions/unixODBC.so

there?. Have you installed the unixODBC extension from your linux distribution or did you compile PHP manually?
yes i installed the unixODBC extension from my linux distribution, and yes unixODBC.so is in /usr/lib/php/extensions/unixODBC.so
Reply With Quote
  #4  
Old 2nd January 2006, 12:41
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by my5660
yes i installed the unixODBC extension from my linux distribution, and yes unixODBC.so is in /usr/lib/php/extensions/unixODBC.so
Have you enabled it in your php.ini? Don't forget to restart Apache afterwards.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 2nd January 2006, 12:49
my5660 my5660 is offline
Junior Member
 
Join Date: Dec 2005
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko
Have you enabled it in your php.ini? Don't forget to restart Apache afterwards.
its enabled by default

Last edited by my5660; 2nd January 2006 at 12:52.
Reply With Quote
  #6  
Old 2nd January 2006, 13:35
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Does it show up as enabled when you run
PHP Code:
phpinfo(); 
in a PHP script?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 2nd January 2006, 14:12
my5660 my5660 is offline
Junior Member
 
Join Date: Dec 2005
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

do you mean UnixODBC or ODBC..?
Reply With Quote
  #8  
Old 2nd January 2006, 14:28
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,389 Times in 4,234 Posts
Default

Please have a look here:

http://www.susewiki.org/index.php?title=PHP4_ODBC
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 3rd January 2006, 10:17
my5660 my5660 is offline
Junior Member
 
Join Date: Dec 2005
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Quote:
Originally Posted by till
wow,its working...thanks alot till
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[error] an unkown filter was not added: PHP Arien Installation/Configuration 12 7th October 2006 14:17
php safe mode warning sc0ut Installation/Configuration 18 22nd December 2005 23:32
Sharedip Ivan Installation/Configuration 3 7th December 2005 15:36
Installation Problems right after php building nagual Installation/Configuration 3 31st October 2005 10:28
Installation Problems right after php building nagual Installation/Configuration 1 31st October 2005 08:30


All times are GMT +2. The time now is 08:46.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.