Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP error message

Status
Not open for further replies.

TTA23

MIS
Sep 26, 2006
41
US
Hi
I am getting the following error:


Fatal error: Call to undefined function: odbc_do() in /mnt/145/sdb/9/1/contact.alysee/login.php on line 5


For inf the line 5 of the code is:

$sql = odbc_do($source,"select * from T_Adherent where NomEntreprise = '".$_POST['login']."' and (Association = 'AEVE' or Association = 'ASFIE' or Association = 'AIM' or Association = 'OZEN' or Association = 'FASE' or Association = 'PARTENAIRE')");


I am niot very familiar with PHP, but I will assume that the '$source' is not defined.

Any info to direct me?

Thanks in advance




 
PHP's not complaining about $source. It's complaining about your attempt to invoke odbc_do(). PHP is telling you that the function is not available in that installation.

It's odd that your code only barfs on odbc_do(). It should have barfed at your necessary invocation of odbc_connect(), which would have set $source prior to this line of code.



Want the best answers? Ask the best questions! TANSTAAFL!
 
Actually, this is not my code. Just got this from a friend asking me to check why his web site is not working anymore. They cannot get in touch with the programmer.
It is my understanding that they used to have this site on their machine, but they installed it after on an outside ISP machine.
It could be why some is missing.
All seems to be working until there is a call to the db. At this point there are all sort of errors related of db connection.

Are you telling me that php has functions that could exist on some machine and not on other? Therefore functions that would not be standard and need to be added to the install?
 
It is entirely possible for one PHP installation to support a function and another PHP installation to not support that function.



Want the best answers? Ask the best questions! TANSTAAFL!
 
Thanks. I never had (and never want) to touch PHP. I usually have a problem with free stuff.
Anyway, thanks. I just read a little about and I can see what the problem is and I can fix it. It seems that there is a DSN but I don't think they ever did the setup in the ISP. Also , they may not have loaded the odbc PHP module.
Actually your answer put me on the right track.
Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top