SEO-Board: Free, Fast and Search Engine Optimization Friendly Forum Script
»User: »Password:   Remember Me? 
SEO-Board Forum Software Community / General / Programming / Internal Server Error (500)
Posted:  01 Mar 2007 01:49
I called my hosting company to find out what the problem was. I was told that there is a problem with the PHP.

I have not made any changes to any code since I moved to my new host.

This error message came up while I was logged into the forums adding a new sub-forum. When I clicked to add, I immediately got the 500 Internal Server Error.

I've checked the error logs and I'm not sure I want to post that information here. I needed, I can email to you.

What happened and how can I fix this?
__________________
Posted:  01 Mar 2007 16:46
Post the error log.
__________________
Are you looking for an SEO Consultant?
Email me: hristo at seo-board dot com
Posted:  01 Mar 2007 20:37
Code:

FATAL:  emalloc():  Unable to allocate 286610 bytes
[Thu Mar  1 07:32:43 2007] [error] [client 65.54.188.103] Premature end of script headers: /var/chroot/home/content/h/e/r/herpmaster/html/forum/index.php
FATAL:  emalloc():  Unable to allocate 286610 bytes
[Thu Mar  1 07:46:08 2007] [error] [client 212.104.110.68] Premature end of script headers: /var/chroot/home/content/h/e/r/herpmaster/html/forum/index.php
[Thu Mar  1 07:46:08 2007] [error] [client 212.104.110.68] File does not exist: /var/chroot/home/content/h/e/r/herpmaster/html/forum/favicon.ico
[Thu Mar  1 07:46:08 2007] [error] [client 212.104.110.68] File does not exist: /var/chroot/home/content/h/e/r/herpmaster/html/forum/missing.html
FATAL:  emalloc():  Unable to allocate 286610 bytes
[Thu Mar  1 08:43:50 2007] [error] [client 65.54.188.103] Premature end of script headers: /var/chroot/home/content/h/e/r/herpmaster/html/forum/index.php
FATAL:  emalloc():  Unable to allocate 286610 bytes
[Thu Mar  1 08:44:52 2007] [error] [client 131.107.0.96] Premature end of script headers: /var/chroot/home/content/h/e/r/herpmaster/html/forum/index.php
[Thu Mar  1 09:48:14 2007] [error] [client 65.54.188.102] File does not exist: /var/chroot/home/content/h/e/r/herpmaster/html/robots.txt
FATAL:  emalloc():  Unable to allocate 284450 bytes
[Thu Mar  1 11:02:29 2007] [error] [client 209.167.50.27] Premature end of script headers: /var/chroot/home/content/h/e/r/herpmaster/html/forum/index.php
[Thu Mar  1 11:25:53 2007] [error] [client 65.54.188.102] File does not exist: /var/chroot/home/content/h/e/r/herpmaster/html/forum/robots.txt
[Thu Mar  1 11:25:54 2007] [error] [client 65.54.188.102] File does not exist: /var/chroot/home/content/h/e/r/herpmaster/html/forum/robots.txt
[Thu Mar  1 11:25:53 2007] [error] [client 65.54.188.102] File does not exist: /var/chroot/home/content/h/e/r/herpmaster/html/forum/missing.html
[Thu Mar  1 11:25:54 2007] [error] [client 65.54.188.102] File does not exist: /var/chroot/home/content/h/e/r/herpmaster/html/forum/missing.html
FATAL:  emalloc():  Unable to allocate 286610 bytes
FATAL:  emalloc():  Unable to allocate 286610 bytes
[Thu Mar  1 11:26:03 2007] [error] [client 65.54.188.102] Premature end of script headers: /var/chroot/home/content/h/e/r/herpmaster/html/forum/index.php
[Thu Mar  1 11:26:03 2007] [error] [client 65.54.188.102] Premature end of script headers: /var/chroot/home/content/h/e/r/herpmaster/html/forum/index.php
FATAL:  emalloc():  Unable to allocate 286610 bytes
[Thu Mar  1 11:26:24 2007] [error] [client 65.54.188.102] Premature end of script headers: /var/chroot/home/content/h/e/r/herpmaster/html/forum/index.php
FATAL:  erealloc():  Unable to allocate 85356 bytes
[Thu Mar  1 11:33:26 2007] [error] [client 68.108.183.162] Premature end of script headers: /var/chroot/home/content/h/e/r/herpmaster/html/forum/index.php

__________________
Posted:  01 Mar 2007 22:27
The bug means php does not have enough memory. 286610 bytes = 279 kb = 0.27 MB. Have in mind that by default php memory has 8MBs and many hosts have 32MB. The problem is clearly not in the script since 0.27MB of memory is a ridiculously low amount. It is probably a php misconfiguration, which should be fixed by your web host.
Another thing is to check the MySQL database, for there may be a huge chunk of data inserted that clogs the memory. Also, inspect the info returned by phpinfo() for the amount of memory given to php.
__________________
Are you looking for an SEO Consultant?
Email me: hristo at seo-board dot com
Posted:  03 Mar 2007 08:51
This is what the phpinfo() returned for PHP 4.3.11 and 5.1.4
Code:

post_max_size    8M    8M (local & master value

I am not real familiar with databases, I found a process and the user is the name of my data base. I am not really sure what or where to look for it.
__________________
Posted:  03 Mar 2007 13:13
It very difficult for me to spot anything like that. I can only speculate. Try checking out the mysql tables whose names end with _forums and _users to see if there's some extra large amount of data in it. Your control panel should provide browsing of the MYSQL records. These 2 tables are mainly used for generating the index page of a forum and there might somehow be a lot of records that don't fit into memory.
Also check the memory_limit variable in php.ini or phpinfo(). It reveals how much memory can a script allocate.
__________________
Are you looking for an SEO Consultant?
Email me: hristo at seo-board dot com
Posted:  03 Mar 2007 19:47   Last Edited By: b_mcclister
I've check the php.ini and the phpinfo for both versions and there is no memory_limit variable listed.

I've checked the database and there is nothing that suggests there is a "huge" chunk of data.
Code:

Space Usage:
_bans Data 0 bytes Index 1024
_forums Data 21,730 bytes Index 2048
_posts Data 4732 bytes Index 10,240 bytes
_search Data 80 bytes Index 2128 bytes
_topics Data 620 bytes Index 4096 bytes Overhead 72 bytes Effective 4644 bytes (there is a link here to optimize table)
_users Data 720 bytes Index 2048 bytes

As you can see it is not a large forum.

I've contact support through the hosting company but it could be another day to get there email reply.

Here is the link to my web host's "help" page on this error  Internal Server Error
__________________
Posted:  04 Mar 2007 12:19
Have you tried renaming the .htaccess? SEO-Board uses it for mod_rewrite but the web host might have imposed restrictions, in which case you'll need to use the non-rewritten urls.
__________________
Are you looking for an SEO Consultant?
Email me: hristo at seo-board dot com
Posted:  04 Mar 2007 22:16   Last Edited By: b_mcclister
I checked the seo-board_options.php file to see if that was setup for modrewrite here is the line:
Code:

$modrewrite = 0; // 0- no mod_rewrite; 1- search engine friendly urls, requires .htaccess ...
So the .htaccess doesn't apply in this situation.
I did however receive an email from hosting company,
Quote:
Due to its complex nature, your issue has been relayed to our Advanced Technical Support Team. Our most skilled technicians will be working to resolve your issue quickly and completely. You will be notified promptly upon resolution.
So I am not sure what I am supposed to do in the mean time.
__________________
Posted:  05 Mar 2007 00:46
I have given the link to this post to the Advanced Technical Support Team from my hosting company. I believe it will aid them in determining the problem.

I am also still open to suggestions on how to resolve this problem.
__________________
Posted:  05 Mar 2007 09:16
If you don't mod_rewrite the urls, then you don't need the .htaccess file. Erase it to see if it will work.
__________________
Are you looking for an SEO Consultant?
Email me: hristo at seo-board dot com
Posted:  06 Mar 2007 02:18
I've looked, there is no file...
__________________
Posted:  08 Mar 2007 22:36
Well according to my post with the size of my tables, I am not even using a megabyte yet (54182 Byte = 0.051672 Megabyte (MB))

Here is the resolution I received from my hosting company Advanced Support Team:
Quote:
Thank you for contacting customer support.

You are able to modify the PHP environment variables in the php.ini file included with your hosting account. As such, we recommend adjusting the post_max_size variable from 8M to the amount required by your application. In order to view the tables for the underlying MySQL databases we recommend accessing the phpMyAdmin client available in your hosting control panel. Log in with the database user credentials created with the account and select the database Structure in order to view it.

Unfortunately, we cannot guarantee that all third party software applications will run flawlessly on our shared hosting environment and are thus unable to provide troubleshooting for such applications. We appreciate your patience and understanding in this regard.

Please let us know if we can help you in any other way.


What else could be the problem? Is the data base corrupt? phpinfo() states I have the standard 8 MB allocated. Do you recomend that I increase the size (I don't see how this would help)?

I am at a loss.
__________________
Posted:  09 Mar 2007 01:45
Update:

I decided to create a new db and my hosting company now gives you the option of 2 MySQL versions so I used 5.0 (instead of 4.1).

Once I imported all my tables over the forum page was up but the _forums were not showing. So I went back to MySQL Admin and there was nothing in _forums.

I imported this table again and when I refreshed my forums, BAM! 500 Internal Server Error came back!

There is something wrong in this table now I guess it is just trial and error.

No, I made no modifications to php.ini...
__________________
Posted:  09 Mar 2007 03:30
Ok, I found the problem.

It started when I was adding a child forum (via the forums). It's not placing the forum id's correctly. I had to manual fix this in the DB. So now I have to manually add via the DB.

I'm not sure where the code is going wrong but it has.
__________________
Posted:  09 Mar 2007 15:48
Quote:
It's not placing the forum id's correctly.
Can you elaborate on that part?
__________________
Are you looking for an SEO Consultant?
Email me: hristo at seo-board dot com
Posted:  09 Mar 2007 20:30
ok, if i log into my forums as admin and try to add a forum, i get the "forum added successfully" and click the link to go back to main site and automatically get the Internal Server Error.

So, I logged into my DB and browsing _forums on the second page at the bottom would be my "test" forum listed with no ID. It stopped issuing forum_id after number 53 so when I add a new forum or sub forum I must go into DB and ad this number myself...
http://www.hotherper.com/images/DB_screenshot.gif

Sorry for such a large image...
__________________
Posted:  09 Mar 2007 20:58
Now I can't post! The post title is there but the message text is not! This is really tickin' me off. Should I scrub the whole thing and start from scratch?
__________________
Posted:  10 Mar 2007 10:21
There's sth totally wrong with the database. When the script adds a forum/subforum, the MySQL datase must automatically issue a forum_id to it (the forum_id has an autoincrement attribute).
I guess it would be easiest to start from scratch, since tracking what's wrong with the database would be difficult.
__________________
Are you looking for an SEO Consultant?
Email me: hristo at seo-board dot com
Posted:  05 Apr 2007 01:00
Well I started from scratch like you said and guess what, its dead still.. I installed 1.1.0RC3 used a new DB and after putting all the forums, post, users, etc., I get the same Internal Server Error.
__________________
Posted:  06 Apr 2007 09:28
If you wiped everything and started from a fresh install and it still doesn't work, then the problem has to be with the specific server settings.
__________________
Are you looking for an SEO Consultant?
Email me: hristo at seo-board dot com