Re: __autoload() no workie on my 5.2 install...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nathan Hawks wrote:
> Hey all.  This is my first post, 'coz it's the first time I've ever had
> such a confusing problem with PHP.
> 
> I recently got a VPS and compiled PHP 5.2.1 with the following options:
> 
> --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs
> --with-config-file-path=/etc/php5 --with-curl
> --with-curl-dir=/usr/local/lib --with-gd --with-gd-dir=/usr/local
> --with-gettext --with-jpeg-dir=/usr/local/lib --with-kerberos
> --with-mcrypt --with-mhash --with-mysql=/usr --with-pear
> --with-png-dir=/usr/local/lib --with-xml --with-zlib
> --with-zlib-dir=/usr/local/lib --with-zip --with-openssl --enable-bcmath
> --enable-calendar --enable-ftp --enable-magic-quotes --enable-sockets
> --enable-track-vars --enable-mbstring --enable-memory-limit
> --with-freetype-dir=/usr/include/freetype2 --enable-soap
> --with-mysql-sock=/tmp/mysql.sock
> 
> Apache is 2.2.4 and was also hand-compiled.
> 
> Meanwhile, at home, I have PHP 5.1.6 and Apache 2.2.3.
> 
> At home, __autoload() works great.

so you have 2 different version of php - try running 5.2.1 at home and see if that breaks
too.

sometime/somewhere __autoload functionaltiy became a chained affair - this has to do
with SPL - I have no idea whether the functionality was meant to change so that
you now have explicitly register your autoloader if you only
define __autload() ... that seems backassed but it may be the case, wouldn't be the first
time an arbitrary change to php5's OO functionality had it's BC broken.

try this page and do what it says on the tin - it may help:

	http://php.net/manual/en/function.spl-autoload-functions.php

> 
> On the VPS, it doesn't work at all.
> 

I very much doubt this has to do with the fact that it's a VPS.

...

> No clues whatsoever in my Apache error_log.  When I try throwing:
> echo("Got here!\n");
> ..into my __autoload() function, it reveals that __autoload() is never
> being fired.

not sure if echo can output inside of __autoload().

> 
> Please help.
> 
> Nathan
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux