Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38900 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 98815 invoked from network); 10 Jul 2008 13:26:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jul 2008 13:26:49 -0000 Authentication-Results: pb1.pair.com header.from=danielc@analysisandsolutions.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=danielc@analysisandsolutions.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain analysisandsolutions.com from 166.84.1.73 cause and error) X-PHP-List-Original-Sender: danielc@analysisandsolutions.com X-Host-Fingerprint: 166.84.1.73 mail2.panix.com Received: from [166.84.1.73] ([166.84.1.73:52398] helo=mail2.panix.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7B/35-24522-71E06784 for ; Thu, 10 Jul 2008 09:26:49 -0400 Received: from panix3.panix.com (panix3.panix.com [166.84.1.3]) by mail2.panix.com (Postfix) with ESMTP id 3C8213481F; Thu, 10 Jul 2008 09:26:45 -0400 (EDT) Received: (from analysis@localhost) by panix3.panix.com (8.11.6p3/8.8.8/PanixN1.1) id m6ADQj625376; Thu, 10 Jul 2008 09:26:45 -0400 (EDT) Date: Thu, 10 Jul 2008 09:26:45 -0400 To: Gergely Hodicska Cc: "internals@lists.php.net" Message-ID: <20080710132645.GA10959@panix.com> References: <4875821E.9020504@avalon.aut.bme.hu> <20080710045418.GA22262@panix.com> <487599FA.9000207@avalon.aut.bme.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <487599FA.9000207@avalon.aut.bme.hu> User-Agent: Mutt/1.5.10i Subject: Re: [PHP-DEV] strange autoload behavior From: danielc@analysisandsolutions.com (Daniel Convissor) Hi Gergely: > You totally missed the point. Please try the code first. I didn't write > but I thought that it is obvious that the files are in the same directory. The error was clear: the file containing the class foo was not found. But before I made my post, I did run your test, just to make sure. It worked fine[1] -- because my include_path is set to look at the current directory first. Just because something is in the same directory doesn't mean it gets included first. If the path is not specified (either by fully qualified path (/var/www/test) or by relative path (./) the include_path is used. The include path can specify that locations other than the current directory are searched first. If you add the following in your bootstrap.php I suspect you'll find that to be the case. echo '

' . ini_get('include_path') . "

\n"; Good luck, --Dan [1] error_handler: Use of undefined constant oops_i_left_the_quotes - assumed 'oops_i_left_the_quotes' -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409