Menu

500 internal server error and such

Help
mitch
2007-08-01
2013-06-03
  • mitch

    mitch - 2007-08-01

    well, i installed this program, i did everything exactly like the instructions told me to do, to include making everything read write accessible etc , but for some reason when i try to submit the form i created, it gives me a 500 internal server error, and tells me to contact the administrator.

    unfortunately, ... thats me....

    and when i try to get to the admin page, same thing happens..

    any thoughts or ideas? miracle cures? 

    thx

     
    • TNTEverett

      TNTEverett - 2007-08-01

      I'm not sure where the instructions for setting file permissions came from but they can cause more problems than they can solve.  I do know that in some cases when the generator gets installed and then creates a new form the generated files have the wrong file ownership and permissions assigned.  This needs to be corrected before you get to far using the generator to prevent forms from being created with the wrong permissions. 
      My recommendation has always been to set php files to (755, or 775) and html and graphic files to (644 or 664).  According to the text below this should work but is not the most secure.  I have personally never experienced this issue so I can not confirm that these changes will fix your problem but it's a start.  Let me know how it works for you. 
      In any case here is some more secure choices for setting php file permissions.  Give this a try and se what happens. 

      From:
      http://webmaster.iu.edu/PHPlanguage/index.shtml

      III. Troubleshoot
      If you get 500 Internal Server Error message,

      1. Check whether the file permission is set to 700. If your file permission is set to something else (e.g., 777 or 644), you will get a 500 - Internal Server Error.

      Note: Setting the file permission to 711 or 755 will not give you a 500 error, but we strongly recommend using 700 for security reasons.

      Search tools such as Google Code Search make it simple to find Web sites vulnerable to attacks by enabling users to search for regular expressions, exact strings and even restrict their searches to code written in specific programming languages. The tool searches all of the publicly available source code it can find. So you should not set the permissions of your files 755.

      2. Check the Directory (folder) permission. Setting it to 777 will give you a 500 - Internal Server Error.
      Set it to 711.

      3. When the file/directory permissions are set correctly, and you are still getting a 500 error, you need to work with the file on Unix.

      Using SSH, connect to your account. For instructions on how to use SSH, please see How to use SSH
      Move to the directory where your php file is using the cd command.
      Open the file using pico and save it (Ctrl+o).
      This simple steps may solve your problem because it converts Windows CR/LF (carriage return/line feed) to Unix LF (line feed) or Mac CR to Unix LF.

      To prevent this problem, you need to change settings/preferences in the program you are using to develop php files. To set preferences in Dreamweaver, go to Edit => Preferences. Select Code Format or HTML Format (depending on the versions). Change Line Breaks to LF (Unix).

       
    • mitch

      mitch - 2007-08-01

      :) :) :)

      well i went through and re-changed all the permissions to what you said, and am very happy to say the script works as it should!

      Thank you very much!! 

      mitch

       
    • Antonimo

      Antonimo - 2007-08-12

      I had the same errors. Applying the permissions suggested (700) did the trick.

      However, the files that needed to have their permissions changed were the ones created when I created my first form.

      After creating the form , there is a link to admin of the new form :
      http://domain.com/phpForm/use/Contact/admin/index.php
      but this gave a 500 internal server error.

      Does this mean that the permissions need to be changed every time a form is created?

      Are there some alterations that can be made to the script so that the newly created php files are given the appropriate permissions?

      Regards,

       
      • TNTEverett

        TNTEverett - 2007-08-15

        Check the permissions of the files under the default folder and default/admin.  When a form is created, obviously the new files are copied to the new form folder, but there are admin files that are the same for every form so they are just blindly copied.  If the permissions are wrong to begin with, then a copy will also copy file permissions. 

         
    • Scott A

      Scott A - 2007-08-29

      Just tried the fix mentioned by Bill in http://www.lunarforums.com and it worked.

      The specific link for the fix is at
      http://www.lunarforums.com/index.php?PHPSESSID=c5bdc788694dcde47e61204f837362f8&topic=29616.0;wap2

      Of here is the key excerpt:

      "...you can change the "copyfunc.php" file in your main phpform directory. Look for the line:
      chmod($flto, 0777);

      Replace the 0777 with 0755. That seems to have made everything better for me. There is also a "mkdir($wto, 0777)" line, but I didn't need to change that one.. "

      Scott

       
  • James Black

    James Black - 2011-01-23

    http://1-818-547-5777.com/formhelp/help.html

    I put a help guid together with screen shots and some directions. I used a Just Host account and Fantasico for the install. I also used the Cpanel file manager.

    James Black CSE
    Computer Science Engineer

     
  • Anonymous

    Anonymous - 2011-02-21

    Goodness !
    Why doesn't the form generator simply set the permissions to 644 for PHP files, 755 for graphics files and 711 on folders ???
    That's all that needs doing - but it is a royal pain to have to research AND then fix the thing after installing a script that says it 'does it all automatically'.
    Woof.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.