Page 38 of 42

internal server error upon execution of import.php

Posted: Sun Nov 27, 2005 1:26 am
by loco63
im having major problems doing this conversion.

first, when i execute my import.php file i get the dreaded 500 internal server error.

so, i tried some workarouds. i noticed that this converter uses .wri files so i converted them to .txt files. used phpmyadmin to import the .txt files. the topics were there, and the post headers were there, however no actual posts existed.

i feel that if i could somehow get around this 500 internal server error problem and actually get the script to execute, i feel the conversion and import would work. any ideas why i would get this error ? any ideas how i can get around it ??

Posted: Sun Nov 27, 2005 4:57 am
by loco63
further......

i now beleive that something has to be wrong with either my backup from ikonboard or the conversion. i have installed a test phpbb on a totally different server. the test board is a completly fresh install. i received the same 500 internal server error.

now im really stumped. any ideas ?

i have a backup of my ikonboard via phpmyadmin in a .sql file. can i somehow use this file ?

i also read the warning.txt file. it states that there are no posts within my forums. this is definatly no true unless somehow they are not being backed up properly.

Posted: Sun Nov 27, 2005 9:10 pm
by loco63
i read in this post that someone has converted their ikonbard to phpbb manually.

how would you do a manual conversion ?

Posted: Sun Nov 27, 2005 10:01 pm
by vHiker
I noticed your host was buffering the output from import.php which was preventing you from seeing the restart links before you got an internal server error message. When the import times out you need to click on the last "restart" link to restart the import a few records before where it died. I've patched the converter to get around the buffering issue. I suspect most of your conversion headaches are related to strange things like this that your host is doing.

Posted: Mon Nov 28, 2005 12:58 am
by loco63
great script, great converter and great support.

thanks so much vhiker ! hopefully one day i can repay you.

Posted: Fri Dec 02, 2005 10:41 pm
by TheAceking
I am soooooo close to completing this. I added this code:

Code: Select all

if ( (crypt($password, substr($row['user_password'], 0, 2)) == 

$row['user_password']) || (md5($password . strtolower($row['username'])) 

== $row['user_password']) || ($row['user_password'] == 

'Reset2WhateverTheyFirstLoginWith') )
'   {
'       $row['user_password'] = md5($password);
'       $sql = "UPDATE " . USERS_TABLE . "
'       SET user_password = '" . $row['user_password'] . "'
'       WHERE user_id = " . $row['user_id'];
'       if ( !($result = $db->sql_query($sql)) )
'       {
'           message_die(GENERAL_ERROR, 'Could not update users table');
'       }
'   }
to login.php and now I'm getting this error:

http://www.ohiosportsfans.com/bbs/login.php

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/ohiospor/public_html/bbs/login.php on line 84

Any help you can give me would be MUCH appreciated. THANKS!

Ace.

Posted: Fri Dec 02, 2005 11:19 pm
by D¡cky
Your first statement is not complete

Code: Select all

if ( (crypt($password, substr($row['user_password'], 0, 2)) == 

$row['user_password']) || (md5($password . strtolower($row['username'])) 

== $row['user_password']) || ($row['user_password'] ==
What is

Code: Select all

|| ($row['user_password'] ==
supposed to be equal to?

You have an odd number of quotes in your UPDATE statement

Code: Select all

$sql = "UPDATE " . USERS_TABLE . " 
'       SET user_password = '" . $row['user_password'] . "' 
'       WHERE user_id = " . $row['user_id'];
Try this

Code: Select all

$sql = "UPDATE " . USERS_TABLE . " SET user_password = '" . $row['user_password'] . "' WHERE user_id = '" . $row['user_id']"'";
But what you should be doing is updating the password with an MD5 hash of the password the user entered. Like this:

Code: Select all

$sql = "UPDATE " . USERS_TABLE . " SET user_password = '" . md5( $HTTP_POST_VARS['password'] ) . "' WHERE user_id = '" . $row['user_id'] . "'";

Posted: Mon Dec 05, 2005 4:40 am
by vHiker
TheAceking wrote: and now I'm getting this error


You need to remove the tick marks (') at the beginning of each line. Sorry, it's buried in the converter instructions and may not be that visible if you speed read and miss the *AND* bit...
*** INSERT THE FOLLOWING LINES *AND* REMOVE THE TICK MARKS TO THE LEFT ***.

Posted: Mon Dec 05, 2005 5:13 am
by TheAceking
Actually, I did try removing the hash marks. This is what I have now:

Code: Select all

		if( $row = $db->sql_fetchrow($result) )
		{
			if( $row['user_level'] != ADMIN && $board_config['board_disable'] )
			{
				redirect(append_sid("index.$phpEx", true));
			}
			else
			{

if ( (crypt($password, substr($row['user_password'], 0, 2)) == $row['user_password']) || (md5($password . strtolower($row['username'])) == $row['user_password']) ||($row['user_password'] ==  Reset2WhateverTheyFirstLoginWith') )
   {
       $row['user_password'] = md5($password);
       $sql = "UPDATE " . USERS_TABLE . "
       SET user_password = '" . $row['user_password'] . "'
       WHERE user_id = " . $row['user_id'];
       if ( !($result = $db->sql_query($sql)) )
       {
           message_die(GENERAL_ERROR, 'Could not update users table');
       }
   }	
		
				if( md5($password) == $row['user_password'] && $row['user_active'] )
				{
					$autologin = ( isset($HTTP_POST_VARS['autologin']) ) ? TRUE : 0;
Thanks for responding!

Posted: Mon Dec 05, 2005 4:45 pm
by TheAceking
If it's possible, could you put a working login.php file somewhere for me to download?

Still can't get it to work.

THANKS!

Posted: Mon Dec 05, 2005 5:48 pm
by Opus
vHiker wrote:
Opus wrote:Can this be modified to change over a *.sql file?

Thanks,


It could, but might take some time. It's been a long time since I coded the converter and my database was DBM, so I have no idea what the sql database structure looks like, but should be similar. If you want to pm a link to your sql backup I could take a look at it and see if it's doable.

Actually, I got it to work.

Seems I had a corrupt cell in my calendars table. Fixed that and I was able to export my database.

I have a rather large database (130+MB) and was able to use this script to transfer everything over.

This is an awesome script. Thanks for the hard work on it.

Posted: Mon Dec 05, 2005 6:23 pm
by D¡cky
TheAceking,

Copy & paste the following code. Your code has too many ticks removed. I am at work and can't test, otherwise I would put up a login.php for you.

Code: Select all

   if ( (crypt($password, substr($row['user_password'], 0, 2)) == $row['user_password']) || (md5($password . strtolower($row['username'])) == $row['user_password']) || ($row['user_password'] == 'Reset2WhateverTheyFirstLoginWith') )
   {
       $row['user_password'] = md5($password);
       $sql = "UPDATE " . USERS_TABLE . "
       SET user_password = '" . $row['user_password'] . "'
       WHERE user_id = " . $row['user_id'];
       if ( !($result = $db->sql_query($sql)) )
       {
           message_die(GENERAL_ERROR, 'Could not update users table');
       }
   }

Posted: Mon Dec 05, 2005 7:58 pm
by TheAceking
Thanks! I'm getting there. Now, I get the login box successfully, but above it, it says:
Warning: Cannot modify header information - headers already sent by (output started at /home/ohiospor/public_html/bbs/login.php:1) in /home/ohiospor/public_html/bbs/includes/page_header.php on line 475

Warning: Cannot modify header information - headers already sent by (output started at /home/ohiospor/public_html/bbs/login.php:1) in /home/ohiospor/public_html/bbs/includes/page_header.php on line 477

Warning: Cannot modify header information - headers already sent by (output started at /home/ohiospor/public_html/bbs/login.php:1) in /home/ohiospor/public_html/bbs/includes/page_header.php on line 478


When I click login, I get a blank page that says:
Warning: Cannot modify header information - headers already sent by (output started at /home/ohiospor/public_html/bbs/login.php:1) in /home/ohiospor/public_html/bbs/includes/sessions.php on line 206

Warning: Cannot modify header information - headers already sent by (output started at /home/ohiospor/public_html/bbs/login.php:1) in /home/ohiospor/public_html/bbs/includes/sessions.php on line 207

Warning: Cannot modify header information - headers already sent by (output started at /home/ohiospor/public_html/bbs/login.php:1) in /home/ohiospor/public_html/bbs/includes/functions.php on line 803


But, when I hit back twice and then refresh, I can see that I'm logged in.

Any ideas?

Posted: Tue Dec 06, 2005 3:35 am
by vHiker
TheAceking wrote: Any ideas?

I have no idea. Here is a pre-modded login.php for phpbb 2.0.18
Opus wrote: This is an awesome script. Thanks for the hard work on it.

No problem. Glad to hear you got the ikonboard backup feature to work. There seems to be a flurry of ikonboard conversions these days. I'm guessing they finally pulled the plug.

Posted: Tue Dec 06, 2005 2:23 pm
by TheAceking
THANK YOU THANK YOU THANK YOU!

This is really great work. You saved me big time.

Not sure if you knew this, but Ikonboards all over the country started dying on December 1st.