28, May 2012

Fatal error: Cannot instantiate non-existent class: access_user - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: Fatal error: Cannot instantiate non-existent class: access_user
« previous next »
Pages: [1] Print

Author Topic: Fatal error: Cannot instantiate non-existent class: access_user  (Read 1704 times)
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: Male
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.

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
My name is Bong, James Bong
*
Posts: 10
68 credits
Members referred : 0


« Reply #2 on: Mar 14, 2007, 05:30:16 pm »

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.
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Mar 14, 2007, 06:30:18 pm »

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:

VERSION THAT DID NOT WORK:
---------------------------------------------------------------------------------------------------
<?php
ini_set ( "display_errors" , 1 );
include("http://www.mywebsite.com/myfamily/classes/access_user/access_user_class.php");

$my_access = new Access_user(false);

// 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");

$my_access = new Access_user(false);

---------------------------------------------------------------------------------------------------

I hope this helps anybody else with the same problem.  And thank you Olaf for the help!

Chris Stephens
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #5 on: Mar 14, 2007, 06:57:40 pm »

yeah that has to do with some security settings in PHP Wink

Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=6225
Tags : fatal error instantiate non-existent class Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: Fatal error: Cannot instantiate non-existent class: access_user
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 06:54:09 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.