php script permissions - need major help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cathode
    Member
    • Oct 2004
    • 88

    php script permissions - need major help

    Hello,
    I am having a really hard time getting a script to run- specifically a Wordpress plugin. I have searched and read everything that has been posted here on this topic - and as a result know that folders should be set to 755 and php scripts set to 755 or 644.

    But I have been trying every combination I can think of and cannot get a script to work. It returns a 404 error when I try to update the plugin options- which writes to the mySQL database.

    The 404 error location (at .../wp-admin/options-general.php?page=wp_myscript.php) leads me to believe that this is a permissions thing- one php file is calling another one and one of them is writing to the database, but the server puts the kabosh on it because a file somewhere doesn't have the right permissions.

    So I have been going thru my Wordpress admin directory, plugins directory, and tried every combination of 755 and 644 that I can think of. This has taken two days- so here I am
  • AndrewT
    Administrator
    • Mar 2004
    • 3653

    #2
    A 404 error would mean that the URL that you are trying to access does not exist. A 500 internal server error would display if the permissions were wrong.

    Comment

    • cathode
      Member
      • Oct 2004
      • 88

      #3
      That makes sense, but according to the URL, all of the files are in place, that I can see. one file is addressed via a php script though.

      404:
      Code:
      http://www.mydomain.com/wp-admin/options-general.php?page=wp_myplugin.php


      This page exists:
      Code:
      /wp-admin/options-general.php
      And this page exists:
      Code:
      /wp-content/plugins/wp_myplugin.php
      And- I just installed this plugin onto another server without trouble. I think now I'll go back and do a visual inspection of each file on the two unique servers... just to triple-check if they match up.

      Comment

      • AndrewT
        Administrator
        • Mar 2004
        • 3653

        #4
        If you submit a ticket with the actual domain in question I can take a look. I certainly can't offer any promises though as this is well outside the scope of our support.

        Comment

        • cathode
          Member
          • Oct 2004
          • 88

          #5
          I have verified that all files are in place about 6 times now, and deleted /re-uploaded everything several times, changed the permissions of the whole WP-install (breaking other things in the process)... I just can't find the problem...

          Comment

          • AndrewT
            Administrator
            • Mar 2004
            • 3653

            #6
            Submit a ticket per above

            Comment

            • JackT
              Junior Member
              • Nov 2006
              • 16

              #7
              Look in the error logs to see if its calling for an alternate file.

              Comment

              • Frank Hagan
                Senior Member
                • Mar 2004
                • 724

                #8
                Originally posted by JackT
                Look in the error logs to see if its calling for an alternate file.
                I was just going to suggest that. The "Error Log" in Cpanel can be invaluable in these cases. I had a similar problem, and it was a missing file that wasn't named in the error message written to screen. The error log showed what one it was.

                Comment

                • AndrewT
                  Administrator
                  • Mar 2004
                  • 3653

                  #9
                  This turned out to be a mod_security rule that was being triggered and WP was making this far more difficult by showing a 404 error when it wasn't.

                  Comment

                  • cathode
                    Member
                    • Oct 2004
                    • 88

                    #10
                    Big props to Andrew for helping me on this. He's a master detective when it comes to this stuff

                    Comment

                    Working...