views:

57

answers:

1

I'm integrating a framework (Kohana 2.3.4), into a web-app (IPB 2.3.4/2.3.6) via a third party bridge library (IPBWI 2.07), and I began seeing the string NOT FOUND at the top of the web-page output.

How can I turn that message off?

I narrowed it down to a call to class_exists(...) in IPB. The call is working correctly, except for the printing of the "NOT FOUND" message. When executed by itself (not invoked by Kohana via the IPBWI) the message is not printed. What is strange is that I've identified calls to the same method in Kohana which are invoked earlier, but do not print the message.

    echo 'Calling class_exists<br>';
    if ( ! class_exists( 'db_main' ) )
        echo 'class_exists returns false<br>';
        ...

results in:

    Calling class_exists()<br>NOT FOUND<br>class_exists() returns false<br>

Note that it is not only printing 'NOT FOUND' but following it with an html <br> tag as though intended for runtime debugging.

I'm not very familiar with PHP, but is there some global debug setting that is being enabled? What sorts of flags should I check?

+1  A: 

I don't think that internal functions, such as call_exists() will output that kind of debug message.

But note that, by default, calling class_exists for a class that's not be defined yet will result in the autoloader being called.


If there is an autoloader set somewhere in your application, maybe that autoloader is echoing "NOT FOUND" when it's not able to autoload a class.

For more informations about autoloading, see :


Now, to be sure, and know where this autoloader is defined, and what it's doing (and, possibly, find a way to remove that message), you could search for "NOT FOUND" in all the source files of your project -- it's a bit of a brute-force solution, but it often help ;-)

Pascal MARTIN
Thanks, I was hoping for this autoloader info, as I'd already grepped for `\bNOT_FOUND\b` with no results. See the mistake? Why on earth I was putting the underscore in that is beyond me - geek-typos.
Chadwick
:-D ;; glad you found the problem :-)
Pascal MARTIN