error - object not found

68 views
Skip to first unread message

jjames

unread,
Feb 18, 2012, 1:12:35 PM2/18/12
to Simple PHP Framework
I put the latest version of the framework in a subdirectory of my
site. I can access the login page, but when I try to logout, or access
anything not logged in, I get a Object not Found error -The requested
URL was not found on this server. It looks like I need to modify my
path, but I'm not sure where. Changing loginUrl doesn't seem to help.

I'm currently testing the framework on localhost, and it's located in
a login directory (localhost/mysite/login/login.php).

Also, I'm not sure what the best way to check the logged in status and
credentials is. Right now, I've included the following in my index
page (localhost/mysite/index.php).

<?php
require 'login/includes/master.inc.php';

$Auth->requireUser('login/login.php');

if($Auth->loggedIn() ==true)
echo 'hi ' . $Auth->user->username;

?>
<br /><a href="login/logout.php">Logout</a>

If I'm logged in, it works, but I don't know how to restrict the page
to a admin. If I'm logged out, it tries to redirect me to
http://localhost/login.php?r=http://localhost/mysite/index.php

Tyler Hall

unread,
Feb 20, 2012, 12:50:36 PM2/20/12
to simple-php...@googlegroups.com
Here's a sample project that uses the framework extensively. It's a good example of how everything ties together. Take a look at index.php, login.php, and logout.php.


Tyler

--
You received this message because you are subscribed to the Google Groups "Simple PHP Framework" group.
To post to this group, send email to simple-php...@googlegroups.com.
To unsubscribe from this group, send email to simple-php-frame...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-php-framework?hl=en.


Reply all
Reply to author
Forward
0 new messages