• Hi,

    I am resuming the installation of WP 2.8.4 with GreenSooth theme.

    The site is working well.

    But today, when I try to save header.php or Function.php using the built-in Editor, I received a blank page with the errors http 505 and http 501.

    Curiously I am able to save any other php or CSS files without error.

    I also can save these files (Header and Function) with an external editor without (apparent) problems.

    Thanks for your comments and help.

    Jean Pierre Dagenais
    Montreal, Canada

Viewing 8 replies - 1 through 8 (of 8 total)
  • Make sure that the permissions of header.php and fuction.php are sme as other files. Also, check the error logs for your web site.

    Kailash

    Thread Starter imagiazone

    (@imagiazone)

    Hi Kailash1,

    Permissions was the first thing I have checked and these files have the same level than the others. And, as I tested, I can open and save them with an external editor.

    I gave a look at my provider errors log, and this is what I see. I only have copy 2 lines that seem to be related. It look like I have this pair of error for every attempt I have made.

    [Wed Sep 02 22:36:49 2009] [error] [client 96.21.20.29] ModSecurity: Access denied with code 501 (phase 2). Pattern match “(?:\\((?:\\W*?(?:objectc(?:ategory|lass)|homedirectory|[gu]idnumber|cn)\\b\\W*?=|[^\\w\\x80-\\xFF]*?[\\!\\&\\|][^\\w\\x80-\\xFF]*?\\()|\\)[^\\w\\x80-\\xFF]*?\\([^\\w\\x80-\\xFF]*?[\\!\\&\\|])” at ARGS:newcontent. [file “/etc/modsecurity2/modsecurity_crs_40_generic_attacks.conf”] [line “162”] [id “950010”] [msg “LDAP Injection Attack”] [data “(!(“] [severity “CRITICAL”] [tag “WEB_ATTACK/LDAP_INJECTION”] [hostname “www.imagiazone.com”] [uri “/wordpress/wp-admin/theme-editor.php”] [unique_id “QWnRXdEsfG4AADil2FYAAAAB”]

    [Wed Sep 02 22:36:49 2009] [error] [client 96.21.20.29] File does not exist: /home/imagiazone/domains/imagiazone.com/public_html/501.shtml, referer: http://www.imagiazone.com/wordpress/wp-admin/theme-editor.php?file=/themes/GreenSooth/functions.php&theme=GreenSooth

    Thanks for your time.

    Jean Pierre Dagenais

    It seems that mod_security is causing the problem. Add the following code in your .htaccess file (which is in your domain root):

    <IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>

    Kailash

    Thread Starter imagiazone

    (@imagiazone)

    Hi Kailash1,

    You see, I don’t have any .htaccess file in my root directrory.

    But I have one in a cgi.bin directory. I have inserted the lines of code that you gave me but it did not change anything. Still unable to save those 2 files with the theme-editor.

    Do you think that I could move the .htaccess file from the cgi-bin to the root ?

    Thanks

    Jean Pierre Dagenais

    .htaccess file always auto created. If not, you can create it manually with empty content.
    Then just put the code into the file. Maybe it can work after these.

    Thread Starter imagiazone

    (@imagiazone)

    Thanks talentluo but it didn’t change anything !

    A foolish tought I had. Could it be a kind of “protection” that the theme author has installed ?

    You see, I renamed my function.php file on my server and uploaded the original one from zip I kept, before installing.

    I try to open and save function.php (the original one) and still . . . this http 505 page !

    The theme I use is GreenSooth from SkinPress.

    Thanks

    Jean Pierre Dagenais

    I’m having the same problem. Saving CSS file is no issue, but trying to edit any other php files will OCCASIONALLY give me errors. Very weird! And I tried the .htaccess suggested fix, no change. All permissions are the same (644).

    Ok, talked to my hosting provider and found the error it was due to a backend upgrade on their part. They have fixed it (“a bad rule in mod_security”) and now everything’s fine.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Biult-in Editor http 501 / 505 when saving files’ is closed to new replies.