My name is Bong, James Bong
Posts: 10
68 credits Members referred : 0
« on: Mar 14, 2007, 05:15:03 pm »
I have tried for weeks now to make the access_user class work on my server. I used an older version (1.72) of the class for one of my other websites (on a different host) and it worked perfectly. No problems whatsoever. Once I tried to use the new version of Access_user (1.96) on my website hosted on Yahoo! it does not work! I have gotten a whole slew of errors in trying to troubleshoot the problem, but nothing will fix it. I have been reading through this forum to find an answer but haven't found anything yet.
It started off as a problem with my mysql database. I fixed all of the hostname, username and password problems. Then it found out there was a problem with the DOCUMENT_ROOT, it was only printing out "/" and not the whole rootname. So i had to re-link all of those to my full domain address (in all the files mind you). Still no go. I am not at a dead end with this error:
Fatal error: Cannot instantiate non-existent class: access_user in /myfamily/login.php on line 5
Any suggestions where to start troubleshooting from here?
Thanks Chris Stephens
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 5799
46391 credits Members referred : 3
« Reply #1 on: Mar 14, 2007, 05:25:19 pm »
Quote
Fatal error: Cannot instantiate non-existent class: access_user in /myfamily/login.php on line 5
This is probably because the class file is not included by the login.php. I guess this has to do with the DOCUMENT_ROOT problem.
Well ya, that is what I thought at first too. However when I write some obscure code in the 'access_user_class.php' such as:
echo "blah!";
It prints it on the page! I seriously get this error:
blah! Fatal error: Cannot instantiate non-existent class: access_user in /myfamily/login.php on line 6
It doesn't make sense. It must either have something to do with a setting somewhere or some incompatability with my host server.
try the script as provided with this structure and tell us if the error still exists:
this is the default dir structure
your_root/classes/access_user/
place all files there an try it again
My name is Bong, James Bong
Posts: 10
68 credits Members referred : 0
« Reply #4 on: Mar 14, 2007, 06:54:06 pm »
Holy cow, Olaf you are amazing! That completely fixed the problem.
Ok here is what I did for all those who have the same problem. I though that my server/host was not going to work using the 'DOCUMENT_ROOT' server definition because it only came up with "/" when called upon. If document root does not for some reason work for you, just use the basic directory link like Olaf mentioned above. Here is what I changed to make it work:
// NOTICE HOW I HAD THE FULL WWW? THAT DIDNT WORK ---------------------------------------------------------------------------------------------------
VERSION THAT DID WORK: --------------------------------------------------------------------------------------------------- <?php ini_set ( "display_errors" , 1 ); include("/myfamily/classes/access_user/access_user_class.php");