Re: Punbb site 500 error

Changing hosts would work if it's an issue with the server, which it appears to be, since PunBB runs fine elsewhere wink
And no, although if you did (ie: you compiled without the basic support for preg_* functions), you would see an errors about missing functions.

27

Re: Punbb site 500 error

I have been doing some investigation and I think I have found out the cause of the error!

By creating a new document and copying bits, slowly into the new file, i was able to find out what coding was causing the 500 error, i used search.php. ( modified )... the errror was created by 

require PUN_ROOT.'footer.php';

Doing further investegations into the footer.php file the code causing the problem is

 $db->close();

on line 210. It is the last command before exit($tpl_main). If I comment out the db$->close; the page displays.

Could it be that the database is already closed? How can I check this? Is it a configuration of MySQL so that it closes on a commit of a transaction?

Sorry. Unactive due to personal life.

Re: Punbb site 500 error

PunBB doesn't use transactions AFAIK. And closing a non-existant connection should issue a mere warning.

Re: Punbb site 500 error

That doesn't make much sense, since $db->close is called on every page hmm

Re: Punbb site 500 error

matt1298 wrote:

I have been doing some investigation and I think I have found out the cause of the error!

By creating a new document and copying bits, slowly into the new file, i was able to find out what coding was causing the 500 error, i used search.php. ( modified )... the errror was created by 

require PUN_ROOT.'footer.php';

Doing further investegations into the footer.php file the code causing the problem is

 $db->close();

on line 210. It is the last command before exit($tpl_main). If I comment out the db$->close; the page displays.

Could it be that the database is already closed? How can I check this? Is it a configuration of MySQL so that it closes on a commit of a transaction?

Hi All, I'm new to PunBB.

I had the same problem as matt1298, and and his above fix also worked for me. Has anyone else found this? What problems can be cause by commeting out the above line: 

 $db->close();

.

Juan

Re: Punbb site 500 error

There shouldn't be any problems. However, if you have access to the error_log, I'd love to see what error it's giving.
Also, if you could try uncommenting that line and commenting out various parts of the $db->close function for your dblayer to see what's causing the issue, that would be awesome

Re: Punbb site 500 error

Right, below is the error_log. Hope that helps.

Now last night I went into the admin side, and when I tried to save the changes, I got the same error. So even though commenting out that line on the index.php file worked for the index.php file, I may need to look at the other files.

So I am assuming this is something to do with the host. I am waiting for a reply from their support team.

Thanks

Juan

[Mon Jun 04 15:58:09 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:22:57 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:22:57 2007] [error] [client 90.197.27.133] File does not exist: /home/sites/introductiontopolitics.co.uk/public_html/favicon.ico
[Tue Jun 05 23:27:55 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php, referer: http://www.introductiontopolitics.co.uk/install.php
[Tue Jun 05 23:28:10 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:28:14 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:28:14 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:28:17 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:28:17 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:28:17 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:28:17 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:28:17 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:28:17 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:28:17 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:28:18 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:28:18 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:28:18 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:28:18 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:28:18 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:28:18 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:28:18 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:28:18 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:28:18 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:28:18 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:28:18 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:28:19 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:28:20 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:28:20 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:28:20 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:28:20 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:28:20 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:28:20 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:28:20 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:28:20 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:28:20 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:28:21 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:28:21 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:28:21 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:28:21 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:29:12 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:29:12 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:29:13 2007] [error] [client 90.197.27.133] File does not exist: /home/sites/introductiontopolitics.co.uk/public_html/favicon.ico
[Tue Jun 05 23:30:57 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:30:58 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:30:59 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:30:59 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:30:59 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:30:59 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:30:59 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:30:59 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:30:59 2007] [warn] Cannot get media type from 'cgi-script'
[Tue Jun 05 23:30:59 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:31:04 2007] [error] [client 90.197.27.133] File does not exist: /home/sites/introductiontopolitics.co.uk/public_html/index.html
[Tue Jun 05 23:31:08 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:39:26 2007] [error] [client 82.110.105.8]   adding: introductiontopolitics.co.uk-access_log
[Tue Jun 05 23:39:26 2007] [error] [client 82.110.105.8]  (deflated 93%)
[Tue Jun 05 23:39:26 2007] [error] [client 82.110.105.8]   adding: introductiontopolitics.co.uk-error_log
[Tue Jun 05 23:39:26 2007] [error] [client 82.110.105.8]  (deflated 92%)
[Tue Jun 05 23:43:11 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Tue Jun 05 23:59:59 2007] [error] [client 90.197.27.133] File does not exist: /home/sites/introductiontopolitics.co.uk/public_html/favicon.ico
[Wed Jun 06 00:00:08 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php, referer: http://www.introductiontopolitics.co.uk/install.php
[Wed Jun 06 00:02:11 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php, referer: http://www.introductiontopolitics.co.uk/forum/install.php
[Wed Jun 06 00:02:16 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:04:43 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:21:23 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:23:36 2007] [error] [client 82.110.105.8]   adding: introductiontopolitics.co.uk-access_log
[Wed Jun 06 00:23:36 2007] [error] [client 82.110.105.8]  (deflated 94%)
[Wed Jun 06 00:23:36 2007] [error] [client 82.110.105.8]   adding: introductiontopolitics.co.uk-error_log
[Wed Jun 06 00:23:36 2007] [error] [client 82.110.105.8] \tzip warning:  file size changed while zipping introductiontopolitics.co.uk-error_log
[Wed Jun 06 00:23:36 2007] [error] [client 82.110.105.8]  (deflated 92%)
[Wed Jun 06 00:29:49 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:29:52 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:29:53 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:29:53 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:29:53 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:29:53 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:29:53 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:29:54 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:29:54 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:29:54 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:29:54 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:29:54 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:29:55 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:29:55 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:29:55 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:29:56 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:29:56 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:29:56 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:29:56 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:29:57 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:29:59 2007] [warn] Cannot get media type from 'cgi-script'
[Wed Jun 06 00:30:00 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:31:45 2007] [warn] Cannot get media type from 'cgi-script'
[Wed Jun 06 00:31:45 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:31:51 2007] [error] [client 90.197.27.133] Premature end of script headers: index.php
[Wed Jun 06 00:44:47 2007] [warn] Cannot get media type from 'cgi-script'
[Wed Jun 06 00:48:06 2007] [error] [client 90.197.27.133] Premature end of script headers: admin_options.php, referer: http://www.introductiontopolitics.co.uk/admin_options.php
[Wed Jun 06 00:48:24 2007] [warn] Cannot get media type from 'cgi-script'
[Wed Jun 06 00:48:36 2007] [error] [client 90.197.27.133] Premature end of script headers: admin_options.php, referer: http://www.introductiontopolitics.co.uk/admin_options.php
[Wed Jun 06 01:09:16 2007] [warn] Cannot get media type from 'cgi-script'
[Wed Jun 06 01:09:17 2007] [error] [client 84.9.186.178] File does not exist: /home/sites/introductiontopolitics.co.uk/public_html/favicon.ico
[Wed Jun 06 01:09:17 2007] [error] [client 84.9.186.178] File does not exist: /home/sites/introductiontopolitics.co.uk/public_html/favicon.ico
[Wed Jun 06 01:09:18 2007] [error] [client 84.9.186.178] File does not exist: /home/sites/introductiontopolitics.co.uk/public_html/favicon.ico
[Wed Jun 06 01:09:29 2007] [warn] Cannot get media type from 'cgi-script'
[Wed Jun 06 01:09:29 2007] [error] [client 84.9.186.178] File does not exist: /home/sites/introductiontopolitics.co.uk/public_html/favicon.ico
[Wed Jun 06 01:09:29 2007] [error] [client 84.9.186.178] File does not exist: /home/sites/introductiontopolitics.co.uk/public_html/favicon.ico
[Wed Jun 06 01:09:30 2007] [error] [client 84.9.186.178] File does not exist: /home/sites/introductiontopolitics.co.uk/public_html/favicon.ico
[Wed Jun 06 01:13:42 2007] [error] [client 84.9.186.178] File does not exist: /home/sites/introductiontopolitics.co.uk/public_html/favicon.ico
[Wed Jun 06 01:13:43 2007] [error] [client 84.9.186.178] File does not exist: /home/sites/introductiontopolitics.co.uk/public_html/favicon.ico
[Wed Jun 06 08:16:16 2007] [warn] Cannot get media type from 'cgi-script'
[Wed Jun 06 08:21:33 2007] [error] [client 82.110.105.8]   adding: introductiontopolitics.co.uk-access_log
[Wed Jun 06 08:21:33 2007] [error] [client 82.110.105.8]  (deflated 95%)
[Wed Jun 06 08:21:33 2007] [error] [client 82.110.105.8]   adding: introductiontopolitics.co.uk-error_log

Re: Punbb site 500 error

Update from my host:

Thank you for your ticket, however when I visit either link you provided the forum comes up fine for me without 500 Internal Server Error - have you already resolved this? Most common cause for such install is the usage of 777 permissions on files and directories which is not permitted on our servers - make sure directories are 755 or 711, and HTML/PHP files are 644 (755 is OK for PHP, but not as secure).

So should I go through the files and folders and change them? If they are as they say.

Juan

Re: Punbb site 500 error

Yeah, try it out

Re: Punbb site 500 error

I tried what my host suggested and no luck. All the files and folders are ok.

I dont know what to do now. My host sayd they wont do any further support on this issue.

Juan

Re: Punbb site 500 error

I'm afraid we can't really help you either: a 500 error is too generic for us to see what the issue is. As I said though, keep trying to comment out things and see what helps