"Site Admin" not working

skyfranky

Joined: 2006-12-12
Posts: 7
Posted: Tue, 2006-12-12 06:21

Installed the latest version of Gallery2, and after login as admin and clicking the "site admin" link trying to set the local server upload path, nothing showed up but the first page only.

what's going on here?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2006-12-12 23:49

- so what URL / link to you try to follow and what exactly do you see instead?
- we'll need more information:
FAQ: What information is required when I ask for help in the forums?
and please include a phpinfo link.

 
skyfranky

Joined: 2006-12-12
Posts: 7
Posted: Wed, 2006-12-13 01:24

thank you for your fast response.

I found my G2 so strange that:
1) site admin not working
2) uploaded photos can't be dislplayed

Here is my site http://lostsheeps.com/soniawedding/

EDIT BY VALIANT: removed login information.

Feel free to upload and test, I will del this whole site later.

thanks.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-12-13 01:29

never post the admin account information in the public!
i've removed it from your post for you.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-12-13 01:32

please disable the url rewrite module manually. the admin/ rule doesn't seem to work for you.

see:
FAQ: Images don't show up and the album / photo links don't work, what can I do?

 
skyfranky

Joined: 2006-12-12
Posts: 7
Posted: Wed, 2006-12-13 09:19

thanks valiant.

I followed all the steps below, and still can't have it working. I couldn't disable the URL rewrite by doing the following and http://www.example.com/gallery2/lib/support/phpinfo.php shows nothing. I don't know how to hack modules/core/classes/GalleryUrlGenerator.class function getCurrentDomain() to return the correct value or to ignore HTTP_X_FORWARDED_SERVER

--------------------------------------------------------------------------------------------
G2's URL rewrite module is active but doesn't work correctly
Fîx: browse to http://www.example.com/gallery2/main.php?g2_controller=core.AdminModules&g2_moduleId=rewrite&g2_action=deactivate (replace www.example.com/gallery2/ with the URL of your own Gallery2 installation)

If you get a Error (ERROR_PERMISSION_DENIED), then you're not logged in into your G2 and thus can't access the admin pages. In this case you have to login first and then use the above link. If the login view doesn't work, you can try to login manually with http://www.example.com/gallery/main.php?g2_view=core.UserAdmin&g2_subView=core.UserLogin&g2_controller=core.UserLogin& g2_form[formName]=UserLogin&g2_form[action][login]=Login&g2_form[username]=admin&g2_form[password]=secret (replace "secret" with your own password)

If you still get an error (ERROR_MISSING_OBJECT), go to http://www.example.com/gallery/lib/support/. Click the "Cache Maintainance" link, and clear all your db caches except for g2data/cache/derivative. Then, try the login link above, and finally, the deactivation link above that.

Your webserver is not properly configured and returns not the correct values for HTTP_HOST / HTTP_X_FORWARDED_SERVER
You can find out whether this is the case by looking at the http://www.example.com/gallery2/lib/support/phpinfo.php page, look for the values of HTTP_HOST and HTTP_X_FORWARDED_SERVER. If HTTP_X_FORWARDED_SERVER is missing, that's fine. If HTTP_X_FORWARDED_SERVER or HTTP_HOST have another value than the real host name (the part after http:// of your G2 URLs), then this is a problem.

If you or your admin can't change the webserver configuration (hostname in httpd.conf for HTTP_HOST for apache webservers) such that it returns a correct value, you can hack modules/core/classes/GalleryUrlGenerator.class function getCurrentDomain() to return the correct value or to ignore HTTP_X_FORWARDED_SERVER, what ever you need.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-12-13 12:09

your problem is the URL rewrite module which doesn't work correctly for you.
your problem is *NOT* HTTP_X_FORWARDED_SERVER.

what exact step when trying to disable URL rewrite did not work for you?

 
skyfranky

Joined: 2006-12-12
Posts: 7
Posted: Thu, 2006-12-14 02:07

I don't know how to disable the URL rewrite. Can you kindly provide me the steps?

thanks for your help again.

 
skyfranky

Joined: 2006-12-12
Posts: 7
Posted: Thu, 2006-12-14 02:10

I tried to disable the URL rewrite by entering the following with my site domain, but PERMISSION DENIED: http://www.example.com/gallery2/main.php?g2_controller=core.AdminModules&g2_moduleId=rewrite&g2_action=deactivate

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2006-12-14 02:36

usually it shows that error only if you are not logged in as administrator.

 
skyfranky

Joined: 2006-12-12
Posts: 7
Posted: Thu, 2006-12-14 02:56

I finally get it working, thanks so much.

Valiant, I must say you support is the best I even had.

 
Noob86

Joined: 2006-12-31
Posts: 34
Posted: Sun, 2006-12-31 03:01

Um, how did you get it working? Would be very helpful, as i just foolishly actived Mod_Rewrite myself, and now have NO ACCESS whatsover, to the /gallery2 directory, therefore NONE of the above links are helping, as i cant access the directory at all anymore. :-(

I do have MyPHPAdmin and FTP access, if that helps at all?

Sorry if i dont reply straight away to any helpers, but i'm walking out the door now, and will be back to check this thread late tomorrow.

Site (now without gallery) is here
www.bikesnstuff.net
www.bikesnstuff.net/gallery2

Gallery was installed this morning, from the latest safe version 2.12 and was working perfectly, before i activated mod_rewrite module.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2006-12-31 03:49

Noob86

delete the .htaccess file which is in the gallery2/ folder.
then disable the rewrite module:
FAQ: Images don't show up and the album / photo links don't work, what can I do?

 
Noob86

Joined: 2006-12-31
Posts: 34
Posted: Mon, 2007-01-01 05:31

Thanks valiant, that fixed it, sorry i didn't get that from the FAQ.
Once back into admin i delted the rewrite module, as it wont be required anyhow, once i do the Joomla Bridge.
Do i need a .htaccess file for anything? as currently there isnt one.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2007-01-02 15:51

No, the .htaccess file is only required for mod_rewrite (the URL rewrite engine you have been using).