1 (edited by Remixful 2014-04-21 18:10)

Topic: censoring.php

I have never touched the censoring.php file itself, and when i try to go onto censoring.php, my host brings me to an error 404 page.
What is going on here?

Re: censoring.php

1. first of all, check if file admin/censoring.php really exists.
2. insert "die('something');" at the begining of censoring php, to check if file is invoked.

If you want to contact me quickly - send e-mail, not PM.
<?php $t='<?php $t=%c%s%c; printf($t,39,$t,39,10);%c'; printf($t,39,$t,39,10);

3 (edited by Remixful 2014-04-21 18:15)

Re: censoring.php

When I get onto the page now, it shows "something".
EDIT:
I removed die something now and my host gives me this:

[*****] [Mon Apr 21 18:14:17 2014] [error] [client 68.236.202.7] Premature end of script headers: censoring.php
Error 500: Script Execution Failure
Description: The server encountered an internal error or misconfiguration and was unable to complete your request.

Most common reasons for returning this error message are:

• File Upload Mode
When you upload Perl, CGI scripts via FTP you should use always ASCII mode. If you get "Error 500: Script Execution Failure" you should check whether your FTP client uses ASCII mode when uploading your scripts, because if it uses BINARY mode to upload your scripts they won't work on the server. The problem caused by wrong upload mode is associated with the way different operating systems handle the "end of line" character. Unix system uses a "line-feed" (LF), Windows uses a "carriage-return" (CR) and "line-feed" (LF) pair. That's why it is very important that you set the uploading mode to ASCII.

• File Permissions
When you upload scripts via FTP the file permissions are set by default to 755. If you get "Error 500: Script Execution Failure" you should check whether your scripts have 755 permissions. Otherwise your scripts have lower level of permissions and does not support execution upon request. The octal representation of the 755 permission is equal to the following textual format: -rwxr-xr-x
Most FTP clients support the CHMOD command which is used for setting file permissions. In case you have set improper permissions to your scripts, use your FTP client and set "Read, Write, Execute" permissions for the owner, "Read, Execute" permissions for the group and everyone else.

• Script Errors
This is the third well known reason for getting "Error 500: Script Execution Failure" upon execution of your scripts. Check your scripts for any obvious syntax or programming errors to make sure your code is not broken.


Remember: When you get a "Error 500: Script Execution Failure", you should always check for any file uploading problems (ASCII/BINARY) and the executable permission settings. Once those are checked and verified, it looks like there is a syntax error or some other problem in the script.

Then when I reload, it now goes to the error404 page

4 (edited by keeshii 2014-04-21 18:27)

Re: censoring.php

hm... and if you put the die instruction a little futher. f.e.  at 10-th line,  22-th line, 27-th line, etc.

<?php
/**
 * Word censor management page.
 *
 * Allows administrators and moderators to add, modify, and delete the word censors used by the software when censoring is enabled.
 *
 * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org
 * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
 * @package PunBB
 */

die('something');
If you want to contact me quickly - send e-mail, not PM.
<?php $t='<?php $t=%c%s%c; printf($t,39,$t,39,10);%c'; printf($t,39,$t,39,10);

5 (edited by Remixful 2014-04-21 18:33)

Re: censoring.php

keeshii wrote:

hm... and if you put the die instruction a little futher. f.e.  at 10-th line,  22-th line, 27-th line, etc.

<?php
/**
 * Word censor management page.
 *
 * Allows administrators and moderators to add, modify, and delete the word censors used by the software when censoring is enabled.
 *
 * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org
 * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
 * @package PunBB
 */

die('something');

Still displays something.

EDIT:
line 48, it shows the error404 page.

Re: censoring.php

Heh.... I am running out of ideas. Maybe cache directory is not writable/readable? You may try to chmod /cache and (if exists) /cache/cache_censors.php to 777.

If you want to contact me quickly - send e-mail, not PM.
<?php $t='<?php $t=%c%s%c; printf($t,39,$t,39,10);%c'; printf($t,39,$t,39,10);

Re: censoring.php

keeshii wrote:

Heh.... I am running out of ideas. Maybe cache directory is not writable/readable? You may try to chmod /cache and (if exists) /cache/cache_censors.php to 777.

What do you mean to 777?

8 (edited by Remixful 2014-04-21 19:04)

Re: censoring.php

Fixed!
What I basically did was delete all the censoring cache files, cleared the cache table in the database, and replaced cache.php and stuff with the original.
I think this all happened because I recently just moved to a new domain and host.