On Installation, Redirects toLogin Page

Having problems installing EM? Let's fix that
Forum rules
DO NOT give out any FTP passwords to anyone! There is no reason to do so! If you need help badly enough, create a temporary FTP account that is restricted to only the files that you need help with and give the information for that. Giving out FTP information can be very dangerous!
Locked
ivenms
Posts: 6
Joined: Tue Sep 12, 2006 6:08 am

On Installation, Redirects toLogin Page

Post by ivenms »

I cant install EM 3 on my board. After logged in as admin, i given the install url, then the page will be redirects to the login page. Then i can access to the install page. On the install page, after submitting he form, again the page is redirects to the login page.

Again after login, the page goes to the previous install page. ie. I cant submit installation forms of EM 3. The admin area only works when the url having the logged sid. How can I solved this problem.

Nightrider
Registered User
Posts: 7219
Joined: Tue Nov 16, 2004 8:54 pm
Location: Florida, US
Contact:

Re: On Installation, Redirects toLogin Page

Post by Nightrider »

Looping Login Problem

What is the Cookie path in General Admin Configuration in your ACP? If it isn't set to / you might want to try it. Changing this setting will force all of your members to have to clear the cookies to your board in their browsers...

Image

If that doesn't work, then you can edit your easymod_install.php file and remove the following section, which causes more harm than good:

Code: Select all

//
// Only administrators here, please
//
if( !$userdata['session_logged_in'] )
{
	redirect(append_sid("login.$phpEx?redirect=admin/mods/easymod/easymod_install.$phpEx", true));
}
if( $userdata['user_level'] != ADMIN )
{
	message_die(GENERAL_MESSAGE, $lang['Not_admin']);
}
Let me know how it goes...

Image

ivenms
Posts: 6
Joined: Tue Sep 12, 2006 6:08 am

Re: On Installation, Redirects toLogin Page

Post by ivenms »

The cookie path is correct

----------------------------

easymod_install.php file as you said but it gives error message:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/thinkbib/public_html/board/admin/mods/easymod/easymod_install.php on line 1661

Nightrider
Registered User
Posts: 7219
Joined: Tue Nov 16, 2004 8:54 pm
Location: Florida, US
Contact:

Re: On Installation, Redirects toLogin Page

Post by Nightrider »

The parse error is saying that you removed too much or too little. You have a syntax error now. So restore the file and be careful to follow the code removal instructions to the letter...

Image

ivenms
Posts: 6
Joined: Tue Sep 12, 2006 6:08 am

Re: On Installation, Redirects to Login Page

Post by ivenms »

The error is not going. I checked and i only delete the codes:

Code: Select all

if( !$userdata['session_logged_in'] )
{
   redirect(append_sid("login.$phpEx?redirect=admin/mods/easymod/easymod_install.$phpEx", true));
}
if( $userdata['user_level'] != ADMIN )
{
   message_die(GENERAL_MESSAGE, $lang['Not_admin']);
}
Nothing else. When i calls this file without removing the code, it is ok, every time after removing the code, the page shows the same error message.

Check the line error plz.

Nightrider
Registered User
Posts: 7219
Joined: Tue Nov 16, 2004 8:54 pm
Location: Florida, US
Contact:

Re: On Installation, Redirects toLogin Page

Post by Nightrider »

LOL Let me see a text link to the file after you have modified it. Lot's of other people have made the same modification without any problems. If you remove the code that I suggested, there are no parse errors. I bet you're forgetting to take out the last } from the second if statement...

Creating text Links for phpBB files

First create a duplicate of the phpBB file on your PC, then rename the file by adding .txt to the end of the file name. Next upload the file to a location on your FTP Server accessible to the public and provide a link back here for us to analyze it...

The path to your file could look something like this now:

Code: Select all

http://yourdomain.com/downloads_folder/easymod_install.php.txt

ivenms
Posts: 6
Joined: Tue Sep 12, 2006 6:08 am

Re: On Installation, Redirects toLogin Page

Post by ivenms »

The code is removed. The text link of the file is as follows: http://blogproject.phpnet.us/EM_install.txt" target="_blank

Check the file and please give the replay. Iam waiting for the last 4 hours.
Last edited by ivenms on Tue Sep 12, 2006 1:42 pm, edited 1 time in total.

Nightrider
Registered User
Posts: 7219
Joined: Tue Nov 16, 2004 8:54 pm
Location: Florida, US
Contact:

Re: On Installation, Redirects toLogin Page

Post by Nightrider »

Could you please remove that clutter that you posted and provide a text link to your modified easymod_install.php file???

Image

ivenms
Posts: 6
Joined: Tue Sep 12, 2006 6:08 am

Re: On Installation, Redirects toLogin Page

Post by ivenms »

Why no replay yet?

I dont think that the problem causing by that part. Ithink there is another page which redirects all request going on to admin page. I can login to those admin page in which the url have sid field. The problem is with the form's action field on the page, i think. the action attribute page points to itself without including the sid field. How to include the sid on thie action pointed url?

This is only my guss. Plz help me.

Nightrider
Registered User
Posts: 7219
Joined: Tue Nov 16, 2004 8:54 pm
Location: Florida, US
Contact:

Re: On Installation, Redirects toLogin Page

Post by Nightrider »

I used UltraEdit to compare your modified version to an unmodified version and found this problem. It looks like you either intentionally or accidentally made a couple of other modifications to the file, one of which is invalid...

Ok, do this:

OPEN
easymod_install.php

FIND - Line 1652

Code: Select all

em_db_insert('EM_write', str_replace("'", "''", $write));
REPLACE WITH

Code: Select all

em_db_insert('EM_write', str_replace("'", "''", $write));
Save and upload to your admin/mods/easymod folder, then try again installing EM again...

Image

Locked