DooPHP IRC channel


Restricted area - DooPHP Admin

Discussion about installation and environment issues.

Restricted area - DooPHP Admin

Postby jmx33 » Mon Jun 07, 2010 9:41 am

Hi

I'm new to doo php, and i am trying to follow this tutorial from learn.doophp.com.
http://learn.doophp.com/2009/09/create-a-simple-to-do-list-in-doophp-part-1/

I keep gettin this Authenticaton window with , username and password are being requested by http://localhost. The site says: "Restricted area - DooPHP Admin"
when i try to generate the models

I have checked, double checked, and reset my id and password for mysql.
But the authentication window keeps comming up, asking for username and password.

Am i missing something?

I am using WinXP with XAMPP
jmx33
 
Posts: 1
Joined: Mon Jun 07, 2010 5:25 am

Re: Restricted area - DooPHP Admin

Postby RichardM » Mon Jun 07, 2010 2:01 pm

Hi,

Keep reading to the end of the paragraph :)
Now that DooPHP knows about our databases we can make use of the Model Generator tool supplied with the Base application in the DooPHP download package to generate the models automatically for us. Simply navigate back to the DooPHP website http://localhost/ and click on the “Generate Models” link. At this point you may be asked for a username and password, its currently set to “admin” and “1234″



Regards,

Richard
Note: code samples my not be 100% accurate.
RichardM
 
Posts: 1329
Joined: Sun Aug 30, 2009 6:03 pm
Location: Cumbria, UK

Re: Restricted area - DooPHP Admin

Postby leng » Mon Jun 28, 2010 2:50 am

Or you can turn off that authentication stuffs altogether in routes.conf.php
Just Doo IT!
leng
 
Posts: 1482
Joined: Thu Jul 16, 2009 11:33 pm

Re: Restricted area - DooPHP Admin

Postby wrlee » Mon Jul 05, 2010 8:37 pm

I'm just getting started and am simply trying to use the "app" as is, in a subfolder on a remote server (so I think I've set the SUBFOLDER value correctly). I am getting the same Restricted msg when I try to have it "Save Routes" or "Save Routes & Generate Controllers".

I looked at the routes file and I see the references to variables and parameters regarding authentication/authorization, but on single setting to enable/disable the feature. To "turn off that authentication stuff", does that mean just rip all those references out? Or, is there a simpler way than that?

Bill...
wrlee
 
Posts: 52
Joined: Sun Jul 04, 2010 7:48 pm

Re: Restricted area - DooPHP Admin

Postby RichardM » Mon Jul 05, 2010 10:01 pm

Have a look in protected/routes.conf.php and you will see an array at the top of the code (below the initial code doc) and it defines this 'user'. You login as them OR if not can remove the references to the array from the routes found further below it...read the code docs at the top if you can't figure out what to remove...from what I recall its pretty obvious what to do once your in the file.


Richard
Note: code samples my not be 100% accurate.
RichardM
 
Posts: 1329
Joined: Sun Aug 30, 2009 6:03 pm
Location: Cumbria, UK

Re: Restricted area - DooPHP Admin

Postby wrlee » Tue Jul 06, 2010 10:09 pm

As, is, the app would prompt for the username/password. I would enter admin/1234. But I continue to get the authentication prompt over and over.

Despite the references to the $admin array in the routes.conf file, simply commenting it out disables the authentication checks. Fine, for now, but, ultimately still a problem that I need to sort out. Any additional tips would be readily appreciated.

(I will need to figure out how to use the authentication part of the framework, anyway, since my app will also need to verify users--but I will probably want to invoke a separate web page for authentication. )
wrlee
 
Posts: 52
Joined: Sun Jul 04, 2010 7:48 pm

Re: Restricted area - DooPHP Admin

Postby RichardM » Tue Jul 06, 2010 10:43 pm

Hmm...sounds like its a php / apache settings issue from the sounds of things...your best bet would be to confirm if basic authentication works without involving the framework at all...if this works then seems more likely a DooPHP problem but more likely to be issue with the hosting...its all worked on WAMP, XAMPP and MAMP along with 3 different web hosts I have run the code on...hence belefe of server config issue.

Also I would suggest making use of Sessions etc for more user friendly authentication than the authentication used in this example. You may want to check out: viewtopic.php?f=7&t=1241 to help get you going with this...


Richard
Note: code samples my not be 100% accurate.
RichardM
 
Posts: 1329
Joined: Sun Aug 30, 2009 6:03 pm
Location: Cumbria, UK

Re: Restricted area - DooPHP Admin

Postby wrlee » Tue Jul 06, 2010 10:57 pm

I am pretty sure that the server supports basic auth, but will check, later.

When I was trying to track down what Doo component is taking in those extra route array values and doing something with them. I started looking in DooUriRouter, but didn't see anything specific to auth handling there... how/where is the auth actually being triggered and handled?

Then, in general, is there a page that describes what other "extra" route array values are there that various Doo components use?

Thanks for all your help, thus far.
wrlee
 
Posts: 52
Joined: Sun Jul 04, 2010 7:48 pm

Re: Restricted area - DooPHP Admin

Postby RichardM » Tue Jul 06, 2010 11:28 pm

Hi,

The authentication stuff can be found in DooUriRouter's execute function

As for what you can put in routes I think most of its in the example routes file...excluding any comments in there on the new params option which I added this evening...will get it added in though.


Richard
Note: code samples my not be 100% accurate.
RichardM
 
Posts: 1329
Joined: Sun Aug 30, 2009 6:03 pm
Location: Cumbria, UK


Return to Installation & Setup

Who is online

Users browsing this forum: No registered users and 0 guests

cron