dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: php files work everywhere except cgi-bin! get a "500 internal server error"

  1. #1
    Running Plodding & Limping SpockBert's Avatar
    Join Date
    Jun 2002
    Location
    London
    Posts
    593

    php files work everywhere except cgi-bin! get a "500 internal server error"

    I thought it might be a permissions issue but everything I try doesn't work.

    Tried 755, 644, 200, 750, 777!

    dont worry its not an error in the script, for testing purposes, all the php does is print "this is a test"

    http://www.nitrovortex.com/fla/test.php
    works

    but same file
    http://www.nitrovortex.com/cgi-bin/test.php
    doesn't

    any ideas? should I contact my webhost you reckon?

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,044
    Hi,

    it is done on purpose - do you really need php files in the cgi-bin?

    Musicman

  3. #3
    Running Plodding & Limping SpockBert's Avatar
    Join Date
    Jun 2002
    Location
    London
    Posts
    593
    I was talking to someone else about it and they said: "Yes, tell your host to remove the ScriptAlias directive for /cgi-bin"

    No idea what that means but anyway!

    So its supposed to be like that? why is that then?

    I wanted the scripts inside the cgi-bin because I dunno, I got it into my head they would be more secure there.

    I've got a couple of php files using an include.inc file to store all the important bits but I didn't like the way that www.myurl/blahblah/myinclude.inc let me open it and see all the data!

    I thought that kind of defeated the point of an include file, I tried moving the file to the cgi-bin and was happy to see it couldn't be viewed there. It was only when I moved all my stuff there I realised it wasn't working.

    You reckon I shouldn't bother with the cgi-bin then? keep all the php stuff in with the flash files?

    cheers for your time btw

  4. #4
    Registered User
    Join Date
    Feb 2001
    Posts
    13,044
    Hi,

    about .inc files - I consider them bad practice: if a server configuration is changed by accident to allow viewing of .inc files, it will take a while (and maybe some black hat has seen it long before you notice)
    If the same server were accidentally changed to view rather than process php files, customers would probably start calling the admin on the phone within minutes
    So I believe it is better to use .php extension for these files as well

    If you can use .htaccess files, you can of course restrict access to .inc files - or you can move them to a protected subdir

    Musicman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center