Forum Moderators: coopster

Message Too Old, No Replies

PHP Notice Message

         

BrianC

7:11 pm on Apr 18, 2005 (gmt 0)

10+ Year Member



I am running PHP (4.3.10) on an Windows XP machine and I am getting a message on my output that I don't know where it is coming from.

PHP Notice: Constant ODBC_BINMODE_PASSTHRU already defined in Unknown on line 0 PHP Notice: Constant ODBC_BINMODE_RETURN already defined in Unknown on line 0 PHP Notice: Constant ODBC_BINMODE_CONVERT already defined in Unknown on line 0 .....

Any ideas why I am getting this message at the end of my output?

Thanks.
Brian

jatar_k

8:08 pm on Apr 18, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld BrianC,

hmm, looks like constants are being redefined.

[php.net...]

The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.

below it lists both of the constants you named. It sounds like it is double loading the extansion. Not really sure if that is the case though. Something is definitely trying to redefine those constants.

BrianC

8:16 pm on Apr 18, 2005 (gmt 0)

10+ Year Member



Go it.

It was an option in the PHP.INI file to show notices or not.

This is fun.

Brian

coopster

11:04 am on Apr 19, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Hopefully you didn't just turn the error-reporting down and call that the fix, BrianC. The messaging levels are a valuable tool for you during development. Yes, it is good to turn them off once you move the code to a live server, but during development those messages help you write good, clean code.

jatar_k

4:53 pm on Apr 19, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



and if the case is it is somehow loading the extension twice the problems you have later could be much more infuriating and time consuming.

BrianC

5:21 pm on Apr 19, 2005 (gmt 0)

10+ Year Member



I only removed the Notices... the rest of the errors will still appear. How can I tell if the extension is gettnig loaded twice?

jatar_k

6:24 pm on Apr 19, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



the key would be to track down why the constant is being defined twice

maybe look at your php.ini and see if there are multiple libraries being loaded, this page tells you which odbc libs there are

[php.net...]