admin login 404 error

Greetings all.

Back when we used 1.5.1, getting to the admin login screen was as easy as going to "domain.org/admin."

A month or two ago we upgraded to 2.0.2 and discovered that we now had to use "domain.org/admin/users/login." If we just put in "domain.org/admin," it would show the default theme on the top and left, but the body would show "404 Page Not Found. /admin is not a valid URL."

As per advice on the forums, we checked our .htaccess files to see if we could get back to the shortcut, but we couldn't figure it out quickly, we got busy, and just got used to the longer way.

A couple of days ago, we upgraded again to 2.0.3, hoping this would somehow fix the problem. No luck.

We've wondered if it's an open_basedir problem and hamfistedly played around with some possible solutions there, but to no avail.

We even tried the set_include_path('.'); in bootstrap.php--alas, nada.

Everything on the site is working great--kudos to the dev team!--except for this one tiny thing.

Suggestions? We're guessing this is an easy fix but that we're just missing some crucial detail.

Thanks in advance,

ken.

--UPDATE--

Just discovered how to retrieve error messages in 2.0 (see http://omeka.org/codex/Retrieving_Error_Messages_2.0) and can now give a bit more info.

By uncommenting SetEnv APPLICATION_ENV development in the root .htaccess file, I see now that the site is throwing tons of open_basedir restriction warnings, almost all of which are in the various /omeka/application subdirectories.

By changing the value of debug.exceptions to true in 'application/config/config.ini', I see that the 404 /admin error that I started this thread with generates this error:

Omeka has encountered an error

Zend_Controller_Dispatcher_Exception
Invalid controller specified (admin)

#0 /home/mesmer2/public_html/omeka/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#1 /home/mesmer2/public_html/omeka/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#2 /home/mesmer2/public_html/omeka/application/libraries/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#3 /home/mesmer2/public_html/omeka/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#4 /home/mesmer2/public_html/omeka/index.php(23): Omeka_Application->run()
#5 {main}

I'm not sure what to do about either these warnings or the Zend Controller errors.

Advice is most welcome.

ken.

What happens when you go to /admin/, with the trailing slash?

How funny--that works!

We can adapt to that, for sure...but is there a file where we can fix it so that it's just /admin?

I don't suppose this fix also addresses the open_basedir warnings....

Many thanks, John.

Apache will normally add that slash for you (though we should still be able to work without it, that's a minor bug).

Try adding DirectorySlash on to your .htaccess for Omeka.

If you're getting open_basedir problems all the time, that's usually just a problem with the default PHP include path not matching up with the open_basedir paths. I don't see that you've really described that problem here though (and it would really be a separate thread thing).

Adding DirectorySlash on to .htaccess in /omeka generates an internal server error, both for domain.org/admin and domain.org/admin/ (the latter of which pushes out to /admin/users/login).

Other ideas? It's my understanding that the DirectorySlash defaults to on so it's curious that manually setting it to on generates an error....

I'll poke around on the open_basedir issue for a bit to see if I can figure it out.

Cheers,

ken.

Hmm, it may not exactly be the problem I was thinking of.

In Omeka 2, you shouldn't have an .htaccess in the admin folder anymore. Do you still have the old one from your 1.5 install in there?

Not anymore. I did have it, but that was one of the first problems I solved when we moved to 2.0.2.

Also, FYI, I got the open_basedir problem solved by adding set_include_path('.'); to /omeka/bootstrap.php (thanks to you on a post elsewhere in the forum).

ken.

Any more thoughts on the trailing slash problem? I'm open to suggestions from anyone--I know John's super-busy.

Cheers,

ken.

I realise this issue may be dead, but as a new user who has also faced this problem (in our case oursite/omeka gave an error, where oursite/omeka/ didn't) and who is not using an Apache version that reads DirectorySlash, I thought it might be useful to know that putting this code snippet into the .htaccess in the omeka directory worked here, below RewriteEngine On:

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteCond %{REQUEST_URI} !/$

RewriteRule ^ http://other.com%{REQUEST_URI}/ [redirect=temp,last]

This was culled from http://stackoverflow.com/questions/14283762/how-to-redirect-users-to-another-domain-htaccess/14390435#14390435 and thanks to the author of that page.

Thanks for passing this on!