NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
odbc_connect issue while running debugger


Joined: 18 Feb 2021
Posts: 3
Reply with quote
I'm trying to run the PHP Debugger (Personal Version 19.5 Build 19538) and I'm using PHP 7.4.2. I've started a new project that will use ODBC. When I run the debugger, I get this error: "Fatal error: Uncaught Error: Call to undefined function odbc_connect() in....". If I run the same piece of code in a browser, it runs just fine. Since it runs in a browser, the ODBC DSN must be working just fine. PHP.ini I do have 'extension=odbc' enabled, and the extension_dir is set correctly to my PHP installation, and not to PhpED's extension directory.

1. I have used PhpED before to develop ODBC projects, but now it's not working. Can anyone help?
2. Does PhpED us my PHP or its installed PHP?

_________________
DM
View user's profileFind all posts by dmalcolmSend private message


Joined: 30 May 2006
Posts: 92
Reply with quote
This has nothing to do with PhpEd.
Your browser runs in HTTP mode.
From your description you are running PHP in CLI mode (command line).
Those modes each one loads different version of php.ini settings.
Most likely your PHP in CLI mode won't load ODBC extension, while it loads in HTTP mode.
Execute in console
Code:
php -m

to see loaded PHP extensions.
If missing enable ODBC extension for CLI mode.
Find what php.ini is loaded via saving phpinfo into local file e.g. execute in CLI:
Code:
php -i >> info.txt

and find Loaded Configuration File.
Lookup at stackoverflow, there are plenty of answers about this, e.g. https://stackoverflow.com/questions/8954964/how-should-i-to-set-the-error-log-for-php-cli/30823469#30823469.
View user's profileFind all posts by lubosdzSend private message


Joined: 18 Feb 2021
Posts: 3
Reply with quote
lubosdz
Actually it kinda does. PhpED was not set up for my project correctly so it was involved but was not a PhpED problem.

But your reply lead me to the solution, so thank you. The problem did turn out to not using my IIS web server (Win10). Once I did that I found a permissions problem that has existed for quite a while but had not shown up until now. Thank you again.

_________________
DM
View user's profileFind all posts by dmalcolmSend private message
odbc_connect issue while running debugger
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic