Admin section not working

Zaraza

Joined: 2009-08-11
Posts: 11
Posted: Fri, 2009-10-30 09:48

Just installed the latest experimental code, installation worked OK, but when I try to open any of admin sections I receive the following message:

Quote:
So here's the error:
The requested view, admin.html, could not be found
File: system/core/Kohana.php, line: 1170

And here's how we got there:
system/libraries/View.php [84]:
Kohana::find_file( views, admin.html, 1 )
system/libraries/View.php [50]:
View_Core->set_filename( admin.html )
modules/gallery/libraries/MY_View.php [27]:
View_Core->__construct( admin.html )
modules/gallery/libraries/Admin_View.php [36]:
View->__construct( admin.html )
modules/gallery/controllers/admin_maintenance.php [40]:
Admin_View_Core->__construct( admin.html )
Admin_Maintenance_Controller->index( )
modules/gallery/controllers/admin.php [50]:
call_user_func_array( Array
(
[0] => Admin_Maintenance_Controller Object
(
[theme:private] =>
[uri] => URI Object
(
)

[input] => Input Object
(
[use_xss_clean:protected] => 1
[magic_quotes_gpc:protected] => 1
[ip_address] =>
)

)

[1] => index
)
)
Admin_Controller->__call( maintenance )
system/core/Kohana.php [291]:
ReflectionMethod->invokeArgs( Admin_Controller Object
(
[theme:private] =>
[uri] => URI Object
(
)

[input] => Input Object
(
[use_xss_clean:protected] => 1
[magic_quotes_gpc:protected] => 1
[ip_address] =>
)

)
, Array
(
[0] => maintenance
[1] => Array
(
)

)
)
Kohana::instance( )
system/core/Event.php [209]:
call_user_func( Array
(
[0] => Kohana
[1] => instance
)
)
system/core/Bootstrap.php [55]:
Event::run( system.execute )
index.php [86]:
require( system/core/Bootstrap.php )

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Fri, 2009-10-30 15:28

Works fine for me so I can only guess you've fallen victim to Kohana's cascading file system and that some files have been renamed/deleted/rearranged and the upgrader doesn't deal with those. If you're using Git all of that would be handled.

Follow the tips for unpacking the code on this page (unpacking the code into a new directory, moving your var directory into the new directory, renaming the directories, etc)
http://codex.gallery2.org/Gallery3:Upgrading

That'll ensure that your code is current and doesn't have any old files hanging around.

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Zaraza

Joined: 2009-08-11
Posts: 11
Posted: Sun, 2009-11-01 16:00

But I did not make the upgrade, I installed completely new system from the latest experimental code!

What could be the problem? I have tried several experimental versions during the past few days and problem remains the same.

Any comments/suggestions?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sun, 2009-11-01 16:29

Double check that under your /themes/admin_wind/views directory that admin.html.php exists.

Right now, admin_wind is the only admin theme available so I know you have to be using that theme :)
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
ElHonkitonk

Joined: 2009-06-23
Posts: 16
Posted: Sat, 2009-11-07 15:49

The very same thing happens to me since about ten days. I made several fresh installs from git and the admin-section is gone as described above. The file /themes/admin_wind/views/admin.html.php does exist. The only thing i customized in the whole process - as always - was to add two lines to the .htaccess-file:
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php

that's because my installation is hosted on shared 1&1 webspace.

 
AndrewRH
AndrewRH's picture

Joined: 2009-02-05
Posts: 52
Posted: Sun, 2009-11-08 01:15

"Me too" but just on my 1&1 website (http://gallery.reeves-hall.net), not on another host for another site.

Uploaded current development build (gallery-gallery3-95ffb39.zip), unzipped it, moved the var directory over. Going into anything under the 'admin' drop-down causes a crash.

The directory "themes/admin_wind/views" contains the file "admin.html.php" (as well as two others)

A second crash (related? seems not) is when I click on an album called "Friends & Family" which is only visible to particular users, I get this crash:

Quote:
The page you requested, Friends_&_Family, could not be found.
File: system/core/Kohana.php, line: 849

~Andrew~

---
http://Reeves-Hall.net
http://WhitchurchForums.org.uk

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-11-09 14:12

Just saw a post by someone else. Please make sure that you do not have any 3rd party themes in your themes directory. Delete any themes that are not wind, night_wind or admin_wind

@AndrewRH, Make sure that your albums do not have & or () or other characters in the Internet Address. Edit the "Friends & Family" album for instance and remove any non-alpha numeric characters from the Internet Address. You can leave them in the directory, just not the internet address part.

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
AndrewRH
AndrewRH's picture

Joined: 2009-02-05
Posts: 52
Posted: Mon, 2009-11-09 14:37

Thank you nivekiam...but it was a clean install from the gallery website without anything added, except copying my 'var' directory across.

Second, shouldn't gallery make sure that illegal characters are not allowed? I just fixed issue manually as you suggested. Thanks.

~Andrew~

---
http://Reeves-Hall.net
http://WhitchurchForums.org.uk

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-11-09 14:46
Quote:
Second, shouldn't gallery make sure that illegal characters are not allowed?

The current version do, but didn't earlier and things have changed along the way. If you tried to add those now, it would sanitize those characters properly.

So going to the admin section still crashes Gallery? Are you using PHP 5.2.3 or newer at 1&1?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
AndrewRH
AndrewRH's picture

Joined: 2009-02-05
Posts: 52
Posted: Mon, 2009-11-09 14:59

I host Wordpress on there too, and WP-ServerInfo plugin for it says this:

Quote:
General
* OS: Linux
* Server: Apache

PHP
* v5.2.11
* GD: bundled (2.0.34 compatible)
* Magic Quotes GPC: On
* Memory Limit: 64.0 MiB
* Max Upload Size: 20.0 MiB

MYSQL
* v4.0.27-max-log
* Maximum No. Connections: 240
* Maximum Packet Size: 10.0 MiB

---
http://Reeves-Hall.net
http://WhitchurchForums.org.uk

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2009-11-11 17:03

Is there anything in your var/logs directory?

Could you PM me login details for your G3 install? I still can't duplicate this. I just installed a fresh install (not an upgrade) and can't get that error.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Wed, 2009-11-11 22:41

AndrewRH, got your PM and replied.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2009-11-12 00:36

I got some detailed log info from AndrewRH.

I see a TON of entries like this:
2009-11-07 20:52:26 -05:00 --- alert: in gallery::user_menu

Which makes me think you guys (at least AndrewRH) has an old file lying around that has some debug code in it that has since been fixed.

Try this:

1) download the latest experimental version of Gallery3:
http://github.com/gallery/gallery3

2) unpack (unzip) that into a NEW directory on your server do NOT overwrite existing files

3) move your var directory into the new Gallery3 directory

4) rename/delete directories as you see fit to move the new "install" of gallery to where you old install was.

(see unpacking the code tips here for more details: http://codex.gallery2.org/Gallery3:Upgrading)
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
AndrewRH
AndrewRH's picture

Joined: 2009-02-05
Posts: 52
Posted: Thu, 2009-11-12 11:44

Hi,

Your procedure is what I always follow - I rename my gallery directory to 'gallery-old' then I unpack the new experimental build into 'gallery'. Then I move the 'var' directory across.

Perhaps there is an issue in my database and/or var directory?

Shall I just wipe it all and try a fresh install (including empty database)?

~Andrew~

---
http://Reeves-Hall.net
http://WhitchurchForums.org.uk

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Thu, 2009-11-12 12:20

I'd try a fresh install then and see if this still happens. It doesn't make any sense.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
ElHonkitonk

Joined: 2009-06-23
Posts: 16
Posted: Sun, 2009-11-15 15:28

I just made a fresh install from git - dang ... something went wrong (as described above). This problem does exist since several weeks and i have no idea what to do about it. Must have to do with 1&1 webspace and some code changes since the latest beta3. Does anybody have an idea to fix this?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sun, 2009-11-15 19:48

Post a link to phpinfo:
FAQ: How do I create a phpinfo page?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
revsmitty

Joined: 2007-05-11
Posts: 15
Posted: Mon, 2009-11-16 19:54

Hmm, I'm having the same issue also with a fresh install. I'm also using 1&1 as a web host.

I had an earlier version of the beta software working at one time. Unfortunately that is now gone.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-11-16 20:05

Post a link to phpinfo:
FAQ: How do I create a phpinfo page?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
revsmitty

Joined: 2007-05-11
Posts: 15
Posted: Mon, 2009-11-16 20:16

Here is the link for me:

http://www.chacaltana.com/phpinfo.php

Let me know if you need anything else.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-11-16 20:30

Do you know what version of Apache is running on your server?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
revsmitty

Joined: 2007-05-11
Posts: 15
Posted: Mon, 2009-11-16 20:38

Sorry, I do not know the version of Apache they are using. I'm fairly new to this web host but will poke around till I get an answer. The only Apache related info I have found is here:

http://www.faq.1and1.com/scripting_languages_supported/configuring_apache_server_using_htaccess/index.html

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-11-16 20:44

Looks like 1&1 is using an older version of Apache:
http://faq.1and1.com/miscellaneous/13.html

I don't know if that page it up to date or what, but G2 is only supported on Apache 2.2 or newer.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
revsmitty

Joined: 2007-05-11
Posts: 15
Posted: Mon, 2009-11-16 20:48
nivekiam wrote:
Looks like 1&1 is using an older version of Apache:
http://faq.1and1.com/miscellaneous/13.html

I don't know if that page it up to date or what, but G2 is only supported on Apache 2.2 or newer.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Bah, just my luck. Glad the beta version was working when I need to post some family photos 2 months ago. :) Thanks for the info.

 
revsmitty

Joined: 2007-05-11
Posts: 15
Posted: Mon, 2009-11-16 21:09

Yup, I just called them and they have verified that the Apache is at this version.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2009-11-17 01:34

At which version? 1.3.34 or 2.2?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
revsmitty

Joined: 2007-05-11
Posts: 15
Posted: Tue, 2009-11-17 02:34

The older version from that document you found. Time to find another web space provider. LOL I have to have my photos.

 
ElHonkitonk

Joined: 2009-06-23
Posts: 16
Posted: Tue, 2009-11-17 17:08

Oh no, does that mean I cannot run G3 in this environment? - Strange thing is that it worked until a few weeks ago. G2 is also running smoothly on 1&1.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2009-11-17 17:12

G2 was developed and supported under older environments. G3 is developed for the future :)
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
ElHonkitonk

Joined: 2009-06-23
Posts: 16
Posted: Tue, 2009-11-17 19:45

That's sad. :-( I liked to take part in testing G3. Hope this digital divide will be bridged some day.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2009-11-17 19:59

Vote with your money, switch to a host who keeps up with the times.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
jeffmmiller

Joined: 2007-03-01
Posts: 71
Posted: Tue, 2009-11-17 20:52

I had g3b3 running with some bugs, tried to upgrade but that didn't work, so I started a fresh/clean install from the latest code 11-16-2009 and the admin doesn't work. Could it be anything with directory permissions?

-jeff

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2009-11-17 21:12

There is no admin directory for G3.

Who's your host? Still at GoDaddy? You need to be running Apache 2.2 or newer.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
andrewk
andrewk's picture

Joined: 2009-11-21
Posts: 5
Posted: Sat, 2009-11-21 22:31

At least for 1&1, the problem is that in modules/gallery/helpers/theme.php in load_themes(), the method used to determine the path, which determines whether to add the admin theme or the normal theme to the Kohana modules doesn't work, so it always adds the normal theme and then can't find the admin views. PATH_INFO and kohana_uri are both empty. As a workaround, if you enable the mod_rewrite section in .htaccess, PATH_INFO stays empty, but kohana_uri has the correct value, and everything seems to work. There is another variable, ORIG_PATH_INFO, that has the correct value when the rewrite rules are off, but it is wrong when they are on.

On another server I checked (running Debian unstable), PATH_INFO is correct and kohana_uri empty with rewrite off, and PATH_INFO is empty and kohana_uri correct with rewrite on. ORIG_PATH_INFO is empty for both.

So, this patch works on both, with both rewrite on and off. I don't think it will break on any other setup (only if PATH_INFO is empty and kohana_uri is empty does it use ORIG_PATH_INFO - so if it still fails, it would have failed anyway):

--- theme.php.orig	2009-11-21 09:36:58.000000000 -0600
+++ theme.php.fix	2009-11-21 15:49:25.000000000 -0600
@@ -31,6 +31,9 @@
   static function load_themes() {
     $input = Input::instance();
     $path = $input->server("PATH_INFO");
+    if (empty($path) && !$input->get("kohana_uri")) {
+      $path = $input->server("ORIG_PATH_INFO");
+    }
     if (empty($path)) {
       $path = "/" . $input->get("kohana_uri");
     }
 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sun, 2009-11-22 04:06

Which most likely has to do with 1&1 not using current software and still using Apache 1.3.x
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
andrewk
andrewk's picture

Joined: 2009-11-21
Posts: 5
Posted: Sun, 2009-11-22 07:07

Yep, probably so, and I'm aware it is an unsupported platform for g3, but I have no interest in changing hosts at the moment. I also found that setting cgi.fix_pathinfo = 0 in php.ini will fix it for rewrites off without patching anything (but breaks it for rewrites on), so that's another workaround, though just enabling the rewrite rules seems like the easiest way to go.

Kohana itself seems to deal with PATH_INFO/ORIG_PATH_INFO and then some without any trouble, in system/libraries/Router.php, but unfortunately load_themes() runs before that is initialized.
EDIT: ah, in beta 3 load_themes() ran after routing was initialized, and it used those functions, which explains why it used to work on 1&1.

 
TopCat_ism
TopCat_ism's picture

Joined: 2007-07-16
Posts: 22
Posted: Sun, 2009-11-22 20:56

I began following this thread earlier today when I did a clean install of one of the development versions that I downloaded yesterday. After much ado, my host service verifies that the shared hosting uses the older apache version.

The install looks great http://topcatlive.com/tcgalleryand I really hate to give it up. AndrewK refers to a patch. Is there a working patch? If there isn't can any of the admin functions be done in myphp? I looked at the htaccess discussion and it is not clear to me. I am novice at best, but I really like the g3. It fits my site. Any advice or direction regarding this matter would be greatly appreciated.

TopCat
www.topcatlive.com

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2009-11-23 00:08
Quote:
Any advice or direction regarding this matter would be greatly appreciated.

For a supported solution, find a different host that keeps up to date with their software. There is not going to be a supported solution that works on older versions of Apache. There is absolutely no legitimate reason why any shared host can't upgrade to Apache 2.2.

My shared host has rolled out major operating system upgrades twice since I've been with them, in 6+ years, without so much as a hiccup including upgrades to Apache, PHP, MySQL, etc. As well as moving to different servers when I upgraded my account.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2009-11-23 02:07

From a support perspective... the first question we should ask is: "1&1?" and if the answer is 'yes' then let the rest of the community help out.
I will start to unsubscribe from posts that have 1&1 mentioned. I simply don't have time to continue on a path that leads to the abis.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
TopCat_ism
TopCat_ism's picture

Joined: 2007-07-16
Posts: 22
Posted: Mon, 2009-11-23 10:44

Thanks for the candid reply. I will begin working immediately to modify the situation with my host.

TopCat
www.topcatlive.com

 
TopCat_ism
TopCat_ism's picture

Joined: 2007-07-16
Posts: 22
Posted: Sat, 2009-12-05 15:36

Once again thanks for the candid reply. I have great respect for those who are willing to step up and give the tough answers. Your advice has been heeded and I updated to GDaddy VDS (virtual) server. I am out a few dollars but my gallery admin works well and in general, my site performance is noticeably improved. Farewell to this particular thread, but you will see me in other discussions as I fine tune and customize my gallery. Peace.

TopCat
www.topcatlive.com

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sat, 2009-12-05 17:54

Glad that it worked out for you. virtual servers are the way to go.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
grievousangel
grievousangel's picture

Joined: 2009-06-23
Posts: 110
Posted: Thu, 2009-12-31 04:30

i too have run into a fatal error after upgrading to G3B3! Yea, i use 1&1!

is there a fix or patch? what should i do?

thanks,
billy

William Johnson - Billy
Statesboro, GA. 30461 USA

 
buchenbr

Joined: 2010-12-03
Posts: 2
Posted: Fri, 2010-12-03 17:50

I've been having the same problem as many others (using GoDaddy with no support for Apache 2.x) where the admin pages at first wouldn't work at all, and then when that was fixed had no formatting.
The first problem was the infamous "Hey wait, you're an admin! We can tell you stuff. Kohana_Exception [ Framework Error ]: The requested views, admin.html, could not be found" problem that has been seen on so many different threads because the host is using older Apache. This was fixed by following the steps on this thread:http://gallery.menalto.com/node/98698. Specifically, Copy "admin.html.php" from "themes/admin_wind/views" to "modules/gallery/views".

This allowed all of the admin pages to now "work". However, I was left with almost no formatting; the admin theme was not working. After living with this for a bit, I saw the suggestion above to try and add a couple of lines in theme.php. While that didn't work either, it pointed me in the right direction. Using phpinfo() I noticed the following:

_GET["kohana_uri"] = admin
_SERVER["PATH_INFO"] = /photo/gallery3/index.php

Now, I don't know how this is supposed to work, but the code as written (below) was leaving the $path variable equal to "/photo/gallery3/index.php", which did not satisfy the check for $self::is_admin.

$path = $input->server("PATH_INFO");
if (empty($path)) {
$path = "/" . $input->get("kohana_uri");
}
...
...
self::$is_admin = $path == "/admin" || !strncmp($path, "/admin/", 7);
self::$site_theme_name = module::get_var("gallery", "active_site_theme");
if (self::$is_admin) {

So, I simply swapped the two "$path = " statments so that it would use the kohana_uri variable if it existed, and lo and behold I now have my admin theme working!
$path = "/" . $input->get("kohana_uri");
if (empty($path)) {
$path = $input->server("PATH_INFO");
}

I hope this helps others on GoDaddy and 1&1. I haven't played with Gallery3 much yet (been using Gallery2 for a while now and didn't want to move to Gallery 3 until the kinks were worked out for me. I'll be trying to import by Gallery2 data later today. Hopefully, all goes well.

 
Captain_Storm
Captain_Storm's picture

Joined: 2010-11-16
Posts: 12
Posted: Thu, 2010-12-09 20:01

Thanks! This was everything I needed to get The admin working fully on godaddy with Gallery 3.

Storm
Web Design & Graphics
http://www.webtempest.biz