Page 1 of 1

Error "cannot redeclare class Auth in php/pear/Auth.php"

PostPosted: 16. August 2014 06:47
by maspai
I use XAMPP both in Linux and Windows (ver 1.8.3).
Opening in Windows a PHP website I write in Linux results error as in topic title. I create a class named Auth used in my program, and no error in Linux.
I tried uninstall and install older version of Windows XAMPP, 1.8.1. Same error. Also after I change name of the class to auth.
Thanks for help.

Re: Error "cannot redeclare class Auth in php/pear/Auth.php"

PostPosted: 16. August 2014 10:36
by Nobbie
Either delete pear Package (what i do not recommend) or rename your own class from Auth to a different name. Auth is already used by pear, maybe pear is not installed on your Linux version or comes with a different release.

Re: Error "cannot redeclare class Auth in php/pear/Auth.php"

PostPosted: 16. August 2014 15:03
by maspai
Nobbie wrote:Either delete pear Package (what i do not recommend) or rename your own class from Auth to a different name. Auth is already used by pear, maybe pear is not installed on your Linux version or comes with a different release.

I did change the class name, from Auth to auth, as I already said in first post. But same error appears. Maybe I'll retry it, restart XAMPP in the Windows box. Thanks anyway.

Re: Error "cannot redeclare class Auth in php/pear/Auth.php"

PostPosted: 16. August 2014 16:16
by Nobbie
PHP Class Names are NOT case sensitiv (so changing from upper to lower does not change anything).