News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

500 Internal server error during registration

Started by [email protected], December 15, 2011, 07:17:33 AM

Previous topic - Next topic

[email protected]

Hi All,
 
   Recently, I have installed a new forum at hxxp:tcsers.co.in/interact [nonactive] but a little bit older version smf 2.0, everything is working fine here
   except Registation.
   When user submit registration form they redirected to page having content
   
   Internal Server Error

   The server encountered an internal error or misconfiguration and was unable to complete your request.

   Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you
   might have done that may have caused the error.

   More information about this error may be available in the server error log.

   Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


   in spite of that error when users login with same login details they get login hxxp:successfully.it [nonactive] means users are getting registered but
   not getting proper message.

   Please help me to resolve this problem, it is really urgent!

Akash Gupta


   

Illori


[email protected]

yes, there is huge number (72414) of entries for same error in error_log file.

[15-Dec-2011 06:17:45] PHP Warning:  mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/tcsersco/public_html/interact/Sources/Subs-Db-mysql.php on line 132

Illori

sounds similar to http://www.simplemachines.org/community/index.php?topic=423482 but the fix there may not work in 2.0 any longer, in the end it sounds like it is a server issue and finding a new host fixes the problem correctly.

SARANSH

what to do then ?
how this problem can be resolved?

Illori

i gave a solution to the problem. and please dont create multiple accounts.

SARANSH

missed the last answer...

haven't created multiple accounts, we were working together (me and akash), thus both registered here

[email protected]

@Illori  You said it is host server problem. could you please tell me what kind of problem it is from server side?



Illori

take a look at that thread, that is all i know about the issue where they say it is a server issue and changing host will fix it.

[email protected]

@Illori, I had taken a look at thread you specified earlier but here I didn't get any solution that will fix problem.
you are saying that changing host can resolve problem but I think it's not the right way to handle problems.

Illori

well that is what was posted in the thread on the last few pages. sometimes that is the only way to solve things.

[email protected]

If I will transfer forum to another host with same configurations then will it resolve problem?

Illori

with your same FILES and DATABASE yes it should help, but most hosts dont have the exact same configuration as another.

[email protected]

that one thing I want to know which different configuration of host server will resolve this problem?
because I think It's better to change configuration at same host server rather to change host.

Illori

i dont know what change is needed beyond what is in that thread i linked.

Alex' Manson

Quote from: [email protected] on December 15, 2011, 11:51:18 AM
that one thing I want to know which different configuration of host server will resolve this problem?
because I think It's better to change configuration at same host server rather to change host.

Just change the host.

If you want a free host try this : sisko-hosting.com
If you want paid ones, you can use the same one ^ or hostgator.com

They both work completely fine with SMF.

Illori

i would not recommend a free host, due to most of them being oversold and hostgator is an overseller as well and some people have issues with them due to that.

Alex' Manson

Quote from: Illori on December 15, 2011, 12:38:56 PM
i would not recommend a free host, due to most of them being oversold and hostgator is an overseller as well and some people have issues with them due to that.
I completely agree, but since most people want cheap things, they're the best way to go.

Illori

not everyone wants cheap, a lot of people want decent things especially with hosting since there are so many poor hosts out there.

Joker™

I haven't tested the fix that deeply, but just created enough conditions to produce the errors on my test forum.

Try this fix at your own risk.

Sources/Subs-Db-mysql.php (Make backup of the file before editing it)

Code (Find:) Select

return sprintf('\'%1$s\'', mysql_real_escape_string($replacement, $connection));



Code (Replace with it) Select

if (is_bool($connection))
{
  return sprintf('\'%1$s\'', mysql_real_escape_string($replacement));
}

else
{
  return sprintf('\'%1$s\'', mysql_real_escape_string($replacement, $connection));
}
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Advertisement: