Gallery2 Problem with access main.php

xchido
xchido's picture

Joined: 2004-02-20
Posts: 24
Posted: Mon, 2007-09-10 15:28

I have one of those questions that may seem easy for some of you guys but for me it’s like a whole new language.

I have a embedded Gallery2 working perfectly in my site. Whenever people try to access the main page directly (http://zacatecas.net/modules/mGallery2/gallery2/main.php) this is due to the embedded only aspect of this gallery. I do not wish to have people access the gallery without the PN part of it. This is my problem. Once people access the direct link to the gallery they are stuck on an error page that does not give enough instructions as to what to do to access the site. There is no link that takes the visitor to the main PN site. There is NOTHING other than the error message telling the visitor that they cannot perform the request.

Is there a way to have a re-direct on that page to send visitor to the main PN-Gallery page.

So in short, I would like to have visitors going to (http://www.zacatecas.net/modules/mGallery2/gallery2/main.php) Be redirected to (http://www.zacatecas.net/index.php?name=mGallery2&file=index )

Any help you guys can provide will be greatly appreciated.

Jorge

Security Violation

The action you attempted is not permitted.

Back to the Gallery
Error Detail -
Error (ERROR_PERMISSION_DENIED)

* in main.php at line 312 (gallerycoreapi::error)
* in main.php at line 87
* in main.php at line 80

System Information
Gallery version 2.1.1
PHP version 4.4.7 cgi
Webserver Apache/1.3.33 (Unix)
Database mysql 5.0.45-log
Toolkits Gd
Operating system Linux infong 2.4 #1 SMP Thu Jan 13 08:59:31 CET 2005 i686 unknown
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2007-09-10 16:26

sorry, just leaving the house. i guess you want to switch the "mode.embedded" value in config.php.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
xchido
xchido's picture

Joined: 2004-02-20
Posts: 24
Posted: Mon, 2007-09-10 17:25

No, I do want the gallery to be embedded and any visitors that land in the old main page be re-directed to the main page of the new gallery with the PN wrap.

 
xchido
xchido's picture

Joined: 2004-02-20
Posts: 24
Posted: Mon, 2007-09-10 17:30

I found a solution. I just don't know if it is the best solution but is working like I want it to work.

I am using the redirect command in my htaccess file.

That way anybody visiting http://www.zacatecas.net/modules/mGallery2/gallery2/main.php are automatically re-directed to http://www.zacatecas.net/index.php?name=mGallery2&file=index

Again, I don't know if it is the best solution but it works for me.

 
xchido
xchido's picture

Joined: 2004-02-20
Posts: 24
Posted: Mon, 2007-09-10 18:10

Nope!

That does not work either. I guess the same path is used for the images links. So using the re-direct only makes all images disappear.

Any ideas outhere????? Please!!!!!!

 
xchido
xchido's picture

Joined: 2004-02-20
Posts: 24
Posted: Tue, 2007-09-11 03:02

Using the redirect 301 command in my htaccess file makes all of the image links disappear. Since they use the same old path.

Using this method visitors to http://www.zacatecas.net/modules/mGallery2/gallery2/main.php are redirected to http://www.zacatecas.net/index.php?name=mGallery2&file=index - There is no problem there. But when I look at the images I find that their path is set to /modules/mGallery2/gallery2/main.php thus being redirected to the new address, in dong this all links for the images in the gallery are broken.

This is what I added in the htaccess file:

Redirect 301 /modules/mGallery2/gallery2/main.php http://www.zacatecas.net/index.php?name=mGallery2&file=index

Are there any other solutions I could try????

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2007-09-11 11:15

in config.php, change the value for 'mode.embed.only' from true to 'http://www.zacatecas.net/index.php?name=mGallery2&file=index'.

you need to upgrade to gallery 2.2 to use that feature though. in gallery 2.1.x, you can only use true|false for mode.embed.only.
since gallery 2.2, you can also enter a redirection URL.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
xchido
xchido's picture

Joined: 2004-02-20
Posts: 24
Posted: Thu, 2007-09-13 04:34

Well, I think I just open a can of asswiping!!!! I think I got it upgraded correctly. I went through all the steps and I made it to the a successful end. I am running into another problem. Well, is the original problem compounded with this.

In addition to the site not being re-directed I get this error message:

Debug Redirect
Not automatically redirecting you to the next page because we're in debug mode
Continue to the next page
--------------------------------------------------------------------------------

file_exists(/homepages/25/d93254464/htdocs/tz/modules/mGallery2/gallery2/g2data/albums/cache/module/_all/0/0/GalleryFactoryHelper_loadRegistry.inc)
Unimplemented: GalleryUrlGenerator
getParameter language.useBrowserPref for core plugin
file_exists(/homepages/25/d93254464/htdocs/tz/modules/mGallery2/gallery2/g2data/albums/cache/module/core/0/0/0.inc)
getParameter default.language for core plugin
controller , view
Loading plugin core
Class not defined, trying to include it.
file_exists(/homepages/25/d93254464/htdocs/tz/modules/mGallery2/gallery2/modules/core/module.inc)
core plugin successfully instantiated
file_exists(/homepages/25/d93254464/htdocs/tz/modules/mGallery2/gallery2/g2data/albums/versions.dat)
file(/homepages/25/d93254464/htdocs/tz/modules/mGallery2/gallery2/g2data/albums/versions.dat,
)
getParameter id.anonymousUser for core plugin
[1189657084] can't guarantee 5 -- extending!
file_exists(/homepages/25/d93254464/htdocs/tz/modules/mGallery2/gallery2/g2data/albums/cache/entity/0/0/5.inc)
Loading plugin core
core plugin successfully instantiated
Check the version of the core plugin
file_exists(/homepages/25/d93254464/htdocs/tz/modules/mGallery2/gallery2/g2data/albums/cache/module/_all/0/0/GalleryPluginHelper_fetchPluginStatus.inc)
The version of the core plugin is ok
file_exists(/homepages/25/d93254464/htdocs/tz/modules/mGallery2/gallery2/modules/core/ShowItem.inc)
Loading plugin core
core plugin successfully instantiated
Check the version of the core plugin
The version of the core plugin is ok
getParameter id.anonymousUser for core plugin
getParameter language.useBrowserPref for core plugin
getParameter default.language for core plugin

AFTER I CLICK ON THE LINK TO TAKE ME TO THE REDIRETED PAGE I GET THIS ERROR:

Notice: Use of undefined constant mGallery2_helper_term - assumed 'mGallery2_helper_term' in /homepages/25/d93254464/htdocs/tz/modules/mGallery2/g2helper.php on line 74

Security Violation
The action you attempted is not permitted.

Back to the Gallery

Error Detail -
Error (ERROR_BAD_PARAMETER) : Smarty error: unable to read resource: "file:includes/classes/Smarty/debug.tpl"
in modules/core/classes/GallerySmarty.class at line 76 (gallerycoreapi::error)
in /homepages/25/d93254464/htdocs/tz/includes/classes/Smarty/Smarty.class.php at line 1584 (gallerysmarty::trigger_error)
in /homepages/25/d93254464/htdocs/tz/includes/classes/Smarty/Smarty.class.php at line 1410 (gallerysmarty::_fetch_resource_info)
in /homepages/25/d93254464/htdocs/tz/includes/classes/Smarty/internals/core.display_debug_console.php at line 41 (gallerysmarty::_compile_resource)
in lib/smarty/plugins/function.debug.php at line 30
in modules/core/classes/GalleryTemplateAdapter.class at line 725
in g2data/albums/smarty/templates_c/%%2657533387/%%3A^3A8^3A818B59%%theme.tpl.php at line 71 (gallerytemplateadapter::debug)
in /homepages/25/d93254464/htdocs/tz/includes/classes/Smarty/Smarty.class.php at line 1258
in modules/core/classes/GallerySmarty.class at line 61 (smarty::fetch)
in modules/core/classes/GalleryTemplate.class at line 186 (gallerysmarty::fetch)
in main.php at line 479 (gallerytemplate::fetch)
in main.php at line 94
in modules/core/classes/GalleryEmbed.class at line 179
in /homepages/25/d93254464/htdocs/tz/modules/mGallery2/g2helper.php at line 100 (galleryembed::handlerequest)
in /homepages/25/d93254464/htdocs/tz/modules/mGallery2/pnuser.php at line 76
in /homepages/25/d93254464/htdocs/tz/includes/pnMod.php at line 735
in /homepages/25/d93254464/htdocs/tz/index.php at line 108

This is the link if you want to check it out! http://www.zacatecas.net/modules/mGallery2/gallery2/main.php

Any ideas on what to do?

Thanks

 
xchido
xchido's picture

Joined: 2004-02-20
Posts: 24
Posted: Fri, 2007-09-14 03:36

Two re-upgrades procedures and using the cleaup.sh did the job. My gallery is fully integrated into PN and my main stand-alone gallery page is now re-directed beautifully to the PN integrated main gallery.

Thank you Valiant for your help.

Next item on the agenda? Remembering what customization I had on the original files. No big deal, Is mostly cosmetic.