Weird Redirection

themafia69

Joined: 2006-02-28
Posts: 36
Posted: Tue, 2006-02-28 16:07

Please fill out the following form and take a look at the linked pages. The more information you supply, the better we can help you.
- What information is required when asking for help in the forums? See:
http://codex.gallery2.org/index.php/Gallery2:faq#What_information_is_required_when_I_ask_for_help_in_the_forums.3F
- You can copy and paste a lot of the required information from "Site Admin" -> "Maintenance" -> "System Information" if your G2 is up and running.
- Also visit http://codex.gallery2.org for: Frequently Asked Questions, Debugging Instructions, Known Issues and much more
- And try your luck with the search function of this website

my gallery is located at www.kush.ca/gallery2/ i installed it without a problem, now when i go to the site it redirects me to a weird site that has nothing to do with my site, why is that? http://members.fortunecity.com/xe1bef/w0.htm this is the site it takes me to

Gallery version 2.0.2
PHP version 5
PHPInfo Link (see FAQ):
Webserver (e.g. Apache 1.3.33):
Database (e.g. MySql 4.0.11):
Activated toolkits (e.g. NetPbm, GD):
Operating system (e.g. Linux):
Browser (e.g. Firefox 1.0):

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-03-01 05:31

your webserver is probably not configured correctly.
in your phpinfo, you'll see that http_host or http_x_forwarded_ ... has a wrong value.

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Wed, 2006-03-01 05:38

im a n00b at this, can you give me step by step instructions on how to do this please? sorry to be annoying but i know no near nothing about php

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2006-03-05 02:56

so is it your own server at home or is the website hosted on a webhserver? if at home, make sure the servername etc in your httpd.conf file is correct and restart the webserver. else talk to your webhost.

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Sun, 2006-03-05 11:48

no its a professional server, netfirms is hosting it, it is using the same database as my wordpress because i get only one database, is that a problem?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2006-03-05 17:28

it has nothing to do with databases or wordpress or so.
just tell them that gallery 2 relies on a correct value for HTTP_X_FORWARDED_SERVER and if it has no value, it uses HTTP_HOST.

in G2.1 (the current nightly snapshot), you can overrride the autodetected server string in config.php

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Sun, 2006-03-05 17:38

thanks for replying, im a noob, so can u give me detailed instructions on how to do any of that? the more reliable the better, i dont mind opening up the config.php and editing it thanks again

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2006-03-05 17:53

as i said, either upgrade to g2.1 (current nightly snapshot) and read the instructions in config.php of g2.1 or contact your webhost with the above information.

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Sun, 2006-03-05 18:09

i am installing it fresh so no need for an update, and where is the config.php? ill call my host now and see if they can help

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2006-03-05 18:31

config.php in a installed and running g2 is in your gallery2/ folder. you have to download the file once g2 is installed, edit it with a texteditor and reupload it to the server.

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Sun, 2006-03-05 19:32

like this? $gallery->setConfig('galleryBaseUrl','http://www.kush.ca/gallery/');
still doesnt work weird

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2006-03-05 19:59

baseUrl is for multisite.
you want to set the baseUri in gallery 2.1 (not 2.0.1).

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Sun, 2006-03-05 20:08

ahh ok opps, thanks ill do that now

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Mon, 2006-03-06 03:56

ok i did that and the front page works, but then i click login and takes me to the same site! :s
this is what i set it to $gallery->setConfig('baseUri', 'http://www.kush.ca/gallery/index.php');

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2006-03-06 05:57

so from http://www.kush.ca/gallery/modules/core/module.inc i see you're using rc-1a.
from main.php i see it's working.
from index.php i see it's redirecting to a weird German page.

and the last thing is a bug. i just have committed a fix such that the index.php -> main.php or / -> main.php redirects are correct.

but if change your baseUri from http://www.kush.ca/gallery/ to http://www.kush.ca/gallery/main.php and browse to to your website, it should be fine.

get tomorrows nightly snapshot to get the index.php fix.

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Mon, 2006-03-06 06:10

nope, same thing btw does gallery2 create 3 folders outside the gallery folder called _vti_cnf _vti_pvt and _vti_txt?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2006-03-06 06:22

maybe that's due to the broken index.php redirect. please get tomorrows nightly snapshot and let's talk then again.

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Mon, 2006-03-06 06:38

thanks thats great, am i the first person to have this problem? i just got off the phone with netfirms, and they put a request into the admins to see if they have incorrect settings, the guy sounded like he knew what type of information i was giving him, so sounds like i should have my gallery running soon, also i saw ffmpeg while installing and i know thats some sort of codec thing, does that mean i can also upload videos? and if so i read i have to configure it, is it easy to do? btw thanks for your help, btw are you the creator of gallery2?

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Tue, 2006-03-07 02:42

hi again, i got an email back from them telling me to do this, but i guess it was for 2.0.3 because its not exactly the same in 2.1 i hope this helps with anything, i dont really know what it would help with but incase

Hello,

Thank you for your e-mail.

For gallery2 to work, you will need to download the file located at
modules/core/classes/GalleryUrlGenerator.class and change the following:

function getCurrentDomain() {
if ($httpXForwardedServer =
GalleryUtilities::getServerVar('HTTP_X_FORWARDED_SERVER')) {
return $httpXForwardedServer;
} else {
return GalleryUtilities::getServerVar('HTTP_HOST');
}
}

To read:

function getCurrentDomain() {
if ($httpXForwardedServer = GalleryUtilities::getServerVar('HTTP_HOST')) {
return $httpXForwardedServer;
} else {
return GalleryUtilities::getServerVar('HTTP_HOST');
}
}

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Tue, 2006-03-07 23:30

ok i followed their instructions and got the gallery 2.0.3 to work thanks a million

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Wed, 2006-03-08 02:55

ok now that its installed, i can post images using the windows xp, but i tried to go to site admin and click on modules to enable the upload feature, and it gives me an internal server error, what could be the problem?

 
bkandor

Joined: 2006-03-07
Posts: 17
Posted: Wed, 2006-03-08 03:11

Hi Thema,

I'm having the same problem with netfirms and as far as I can tell the problem is that netfirms has too little memory allocated for php. Apparently it's only 4mb where 16mb is about the min. req. for this type of app. See this thread. And I did email netfirms and asked them to increase it and they said 'No'.

http://gallery.menalto.com/node/43923?highlight=netfirms

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Wed, 2006-03-08 03:23

wow, thanks for the reply, well ill call them back now and let them know, and if they dont do it then i will simply change host, but i think they will because they are really nice with me, and they have been messing up a lot with me latley

 
bkandor

Joined: 2006-03-07
Posts: 17
Posted: Wed, 2006-03-08 03:32

Ok, if your successful please let me know: here is an excerpt from their reply.

At the moment, we do not offer custom PHP settings. It has been added to our list of client requested features and may be included in a future service upgrade. Thank-you for your suggestion.

Kandor

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Wed, 2006-03-08 03:37

umm just called them, he escalated it HMM. god i might have to switch know of any good hosting services? that offer good bandwidth/space and price?

 
bkandor

Joined: 2006-03-07
Posts: 17
Posted: Wed, 2006-03-08 05:02

No - but if you find one let me know and vice versa. Netfirms seems fine to me except for this one issue of memory headroom.

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Wed, 2006-03-08 05:07

what about load times, my site i think has a slow ping, i think it might have to do with im behind a firewall in a dorm, but it was similarly slow on other connections

 
pcsmith

Joined: 2006-03-08
Posts: 6
Posted: Wed, 2006-03-08 16:00

I have the same host, and had the same problem. I changed the file and continued past that step. Did you have any issue connecting to a database? I am getting this error:

Quote:
Warning: mysql_connect(): Access denied for user 'u70222999'@'10.8.8.1' (using password: YES) in /mnt/.../www/gallery2/lib/adodb/drivers/adodb-mysql.inc.php on line 348
mysqlhost: Access denied for user 'u70222999'@'10.8.8.1' (using password: YES)

I manually installed wordpress since I didn't like where they kept installing it and didn't have any issues connecting to the DB or with permissions so I'm not really sure if I'm missing something...

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Wed, 2006-03-08 16:07

nope never got that one i also installed wordpress manually but had no problems there

 
pcsmith

Joined: 2006-03-08
Posts: 6
Posted: Wed, 2006-03-08 17:22

did you use the same DB or a seperate one?

 
bkandor

Joined: 2006-03-07
Posts: 17
Posted: Thu, 2006-03-09 00:01

I used seperate db's for all my apps - drupal, gallery and 2 others. I never thought of using the same db for fear of overwrites etc. I wonder if this affects the memory issue. I ran the phplimit script again today and this time netfirms responds with:

allocated 0 Mega Bytes...and rising
allocated 1 Mega Bytes...and rising
allocated 2 Mega Bytes...and rising
allocated 3 Mega Bytes...and rising
allocated 4 Mega Bytes...and rising
allocated 5 Mega Bytes...and rising

Whereas yesterday it stopped at 4mb??????

Kandor

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Thu, 2006-03-09 01:06

they said that having many applications in one database doesnt affect anything its ok

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Thu, 2006-03-09 09:58

you know what, seriously im ganna stick with netfirms, i just wish they take it upon themselves to update that php problem and all will be fine, they have great customer support in my opinion, and i think if you guys call and also have a rep escalate it that they will implement the change, because seriously i have not found any other host that comes close to netfirms prices, for a .ca account, all others give u tiny webspace like 5 or 15 mb and like 1gb of montrhly trasnfer for the same price we are getting 6gb space and 300gb monthly transfer

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Thu, 2006-03-09 17:36

hey this might help if you wanna see something valiant
http://kush.ca/phpinfo.php

 
bkandor

Joined: 2006-03-07
Posts: 17
Posted: Fri, 2006-03-10 02:04

I agree - it's fine it every regard except the php memory limit. I have now had several emails back and forth and they claim that they cannot adjust individual php memory limits as it is a overall server setting. Please advise if you have had different results because I got no where and I 'really' tried.

Thanks

ps - where did you find that php program? I'd like to try it. Also, does it show your memory limit in there (sorry I don't have time to read all that at the moment)

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Fri, 2006-03-10 02:22

you can get that program from their site,here ive attached it, if you open it up and see its only one line of code, also i dont know if it displays the php memory size on there

 
bkandor

Joined: 2006-03-07
Posts: 17
Posted: Sat, 2006-03-11 16:03

Hi themafia,

Netfirms wrote back to me about the memory limit. They provided a script which they say shows that the memory limit is actually 16mb, if this is the case why can't I open the modules page of the site admin tool. Maybe this is a wild goose chase and there is something else wrong?

Here is the output from the script:

cpu time (seconds, -t) 10
file size (512-blocks, -f) unlimited
data seg size (kbytes, -d) 15360
stack size (kbytes, -s) 15360
core file size (512-blocks, -c) 0
max memory size (kbytes, -m) unlimited
locked memory (kbytes, -l) unlimited
max user processes (-u) 5
open files (-n) 16
virtual mem size (kbytes, -v) unlimited
sbsize (bytes, -b) unlimited

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Sat, 2006-03-11 17:16

so what are we suppose to do? call them back and tell them then why cant i open the modules, and complain tell them im not the only use having this problem maybe they will do something about it when a lot of people complain, ill try to do the same

 
bkandor

Joined: 2006-03-07
Posts: 17
Posted: Sat, 2006-03-11 18:46

I suppose, or hope someone here who is more knowledgable about gallery itself to look into it. The other thread about the module page not opening is focused solely on lack of php ram as the culprit. Now it appears it must be something else. Tricky.

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Sat, 2006-03-11 18:57

the sooner we solve it the better, because i need to have my gallery because its ganna be a big part of my site, allowing friends, family, and web friend upload pics etc

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Sun, 2006-03-12 23:03

ok guys, i just erased my install of gallery 2.0.3 and installed 2.1 second rc and the install picks up the right installation directory hopefully it wont have the same error, when i try to go into the modules

 
bkandor

Joined: 2006-03-07
Posts: 17
Posted: Mon, 2006-03-13 18:45

Let me know - I also installed 2.1 rc but it was almost 2 weeks ago. Hopefully something has changed?

Kandor

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Mon, 2006-03-13 18:52

that was rc1, the new version is rc2

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Tue, 2006-03-14 03:23

ok i got everything working, what i did was just download the typical installation and install the modules that i wanted separatly

 
themafia69

Joined: 2006-02-28
Posts: 36
Posted: Tue, 2006-03-14 03:58

ok i get internal server errors when i try to delete pics, and thumbnails and resizes don't work, no matter how i upload the pics, help!

 
bkandor

Joined: 2006-03-07
Posts: 17
Posted: Thu, 2006-03-16 19:59

themafia69,

Well persistance pays off, I had a very pleasent email exchange back and forth with netfirms over the course of 2 weeks and they have now upped the memory limit on their servers, so everything is working right now - it's a global change so it's probably why your new install is working ok. Their customer service is really most excellent.

Now I need to get a drupal gallery.module working.... Always something.