Results 1 to 5 of 5

Thread: Warning with PHP scripted form

  1. #1
    Join Date
    Jan 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Warning with PHP scripted form

    Can anyone help me.
    I've published a form on my website, in php scripting, where the form directs to either a confirmaiton page or a failure page, through a processform page (if that makes sense).
    I have altered the CHMOD to 755, as the host suggests and the form now sends me the information via email.
    However, it doesn't re-direct to the confirmation page, and instead come up with the error:

    Warning: main(cgi-bin/confirmation.php): failed to open stream: No such file or directory in /files/home2/allcockgrieves/cgi-bin/processform.php on line 76

    Warning: main(): Failed opening 'cgi-bin/confirmation.php' for inclusion (include_path='.') in /files/home2/allcockgrieves/cgi-bin/processform.php on line 76

    Any ideas? I'd be very greatful.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    "No such file or directory" kind of gives this away. I daresay ~/cgi-bin/cgi-bin/confirmation.php doesn't exist. Try just including "confirmation.php".
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jan 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ...and then putting the files in the root directory, rather than the 'cgi-bin' folder?

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    No.
    Warning: main(cgi-bin/confirmation.php): failed to open stream: No such file or directory in /files/home2/allcockgrieves/cgi-bin/processform.php on line 76
    processform.php is in cgi-bin. Inside processform.php, you have done something like
    Code:
    include("cgi-bin/confirmation.php");
    . This means that, when translated to an absolute path, you are attempting to include /files/home2/allcockgrieves/cgi-bin/cgi-bin/confirmation.php, rather than /files/home2/allcockgrieves/cgi-bin/confirmation.php as you probably should be. Moving the file so that it is /confirmation.php isn't going to help matters.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Jan 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you, I've solved the issue - finally! It's taken some time.
    You were right, I was directing it to the folder 'cgi-bin' when it was already looking in that folder, and therefore confusing it.
    It's all sorted and works perfectly! The feedback form emails me the details and then re-directs the viewer to the confirmation page.
    Marvellous!
    Just got work out why some boxes are yellow and some are white on the feedback form now!
    Computers have a mind of their own I reakon!

Bookmarks

Posting Permissions

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