dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: form.php / phpinfo.php - getting internal server error

  1. #1
    Senior Member
    Join Date
    Sep 2000
    Posts
    133

    form.php / phpinfo.php - getting internal server error

    hi

    i'm using this actionscript: loadVariablesNum("http://www.myserver.com/cgi-bin/form.php", 1, "POST");

    and a basic php form (see script below), which works fine for me on other sites but isn't working on my current flash site.

    form.php is stored in the cgi-bin folder, as required.
    permissions are set to 755 (on file and folder), as required.

    unfortunately nothing happens when i click the send button!

    when i tried to directly link to the php file in my browser (http://www.myserver.com/cgi-bin/form.php) i got the following error message:

    "Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, webmaster@myserver.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
    More information about this error may be available in the server error log."

    the same happens if i target phpinfo.php in my browser. if i move phpinfo.php to another directory (not the cgi-bin) i can then access it. with form.php in another directory the page remains blank.

    has anyone got any ideas why the form isn't working and what might be happening? thanks for any help!

    here is the form.php script:

    <?php

    $adminaddress = "me@myserver.com";
    $siteaddress ="http://www.myserver.com";
    $sitename = "myserver.com";

    $date = date("m/d/Y H:i:s");

    if ($REMOTE_ADDR == "") $ip = "no ip";
    else $ip = getHostByAddr($REMOTE_ADDR);

    $name = $HTTP_POST_VARS['name'] ;
    $phone = $HTTP_POST_VARS['phone'] ;
    $email = $HTTP_POST_VARS['email'] ;
    $comments = $HTTP_POST_VARS['comments'] ;

    mail ("$adminaddress","Info Request",
    "A visitor at $sitename has left the following information\n
    Name: $name
    Telephone: $phone
    Email: $email\n
    User Enquiry:
    --------------------
    $comments

    Logged Info :
    --------------------
    Using: $HTTP_USER_AGENT
    Hostname: $ip
    IP address: $REMOTE_ADDR
    Date/Time: $date","FROM:$adminaddress" ) ;

    ?>
    Last edited by darren; 09-21-2005 at 04:34 PM.

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

    it is highly unlikely that anybody can help you there, without even looking at your server.
    Would you mind to post url of your phpinfo file (outside cgi-bin) and flash form using the form php (also outside cgi-bin)
    For the files in the cgi-bin, please make sure they are uploaded in TEXT mode

    Musicman

  3. #3
    Senior Member
    Join Date
    Sep 2000
    Posts
    133
    hi

    the php files have been done using my software's auto setting which says it transfers text files, including .php, in ascii mode.

    after searching through the host's support pages i came across some further info..

    You should put your scripts in subdirectory cgi-bin, or they can be given the extension .cgi and called anywhere within your webspace.

    i renamed the form.php file as form.cgi and put it in the same directory as the swf (also changing the loadVariablesNum target) to see if this would help but it didn't seem to make any difference.

    I just wrote a CGI which should mail something. What's your mail agent?
    - You should use either sendmail (whose absolute directory is /usr/lib/sendmail) or mailx (whose absolute directory is /bin/mailx).

    i'm not sure if the above is relevant? i included the following: $mailprog = '/usr/lib/sendmail -oi -t'; as the 1st line of my form.php but again it didn't seem to make any difference.

    would it be ok to send you the urls for form.php and phpinfo.php privately?

  4. #4
    Registered User
    Join Date
    Feb 2001
    Posts
    13,044
    No problem, just use the board email

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