Hang up with running PHP script
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Re: Hang up with running PHP script
Hang up with running PHP script
22-12-2008 9:10 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
currently working on setting up my website and wish to use a feedback form that utilizes a small php script i obtained online. Problem is, having put the script in my cgi-bin and set the permissions to 755 when i go to my website and try a test send of my form i get the message: Not Found
The requested URL /FormToEmail.php was not found on this server.
I wonder whether the 'form action' code i'm using is defective and would appreciate if someone could give it the once over and let me know:
<form action="http://ccgi.ker001.plus.com/FormToEmail.php" method="post">
Alan
Re: Hang up with running PHP script
22-12-2008 9:44 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Re: Hang up with running PHP script
23-12-2008 12:22 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
action="/cgi-bin/FormToEmail.php"
on the CCGI platform?
Re: Hang up with running PHP script
23-12-2008 8:25 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Phil
Edit: Yep, as I thought. If you manipulate the url in the OP to include the cgi-bin directory you can see the PHP source code.
Superusers are not staff, but they do have a direct line of communication into the business in order to raise issues, concerns and feedback from the community.
Re: Hang up with running PHP script
23-12-2008 9:09 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
firstly thanks to you all for taking the trouble to post. Having made the best fist i can of understanding your comments (not really in my comfort zone with this stuff) here's an update: my action line in my page code now reads: <form action="http://ccgi.ker001.plus.com/FormToEmail.php" method="post">. Having moved the script up one level out of the cgi-bin folder, now, when i try to test the form i see a page basically showing the text of the php script ... as i also see if i enter the following in my browser: http://ccgi.ker001.plus.com/FormToEmail.php. An improvement i feel on an error message but still obviously not quite right?
Alan
Re: Hang up with running PHP script
24-12-2008 1:08 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
What I did is as follows:
Downloaded the FormToEmail.php source to a folder on my PC below my PAYH website httpdocs (for convenience)
Created a hack webpage HTML file in the same folder
Copied the Form code unchanged into my hack HTML file and saved it (step1)
Typed my email address in place of the dummy string (step2)
Made no other changes to FormToEmail.php, saved the file.
Uploaded the webpage and PHP file to the same folder on PAYH.
Loaded the hack webpage into IE7, and the form displayed.
Filled in the form and clicked Send
Got the Thank You acknowledgement of successful send.
Clicked the "continue" link and the display returned to my home page (the stated default).
The email created by the form arrived in my mailbox.
Note: I didn't make any change to the "action=" content of the form (or any other part of the form definition).
This is obviously a different installation from CCGI but does my narrative give you any clues?
David
Re: Hang up with running PHP script
24-12-2008 3:13 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
with the script reverted to the default action line and located in my htdocs folder with my webpages, when i run a test form i get the following message: URL requested (/"FormToEmail.php") not found. The entry in the address bar at the top of my browser page reads: http://www.ker001.plus.com/"FormToEmail.php". All of which begs the question: why is the form not being found? I have no knowledge whatsoever of how HTML/Websites work but it strkes me if i apply basic logic that a script located in the same folder as the page that is trying to call it, shouldn't be that hard to find ... fun and games ...
Alan
Re: Hang up with running PHP script
24-12-2008 5:22 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I suspect you might have " escapes round the "action=" filename so that the filename looked for starts and ends with a "quote", but it doesn't and shouldn't.
However, there is one difference between your set-up and mine that I'd forgotten. Your HTML page is on homepages whereas the PHP script has to be on CCGI - in my case both were in the same PAYH webspace. This is why you had to change the "action=" line.
Having looked at a friend's HTML code that works and references a CCGI PHP file from HTML homepages (though not through a form), the PHP call-up is http://ccgi.domainname/subdir/filename.php which apart from use of a sub-directory is similar to the format you had for the action in your opening post. However at the time I think you had the file in the /cgi-bin folder so it wasn't found. Phil mentioned PHP files wouldn't work in /cgi-bin so you tried moving it up a level when it was found but not interpreted. Speculating it's possible that the interpretation problem also extends to the level above.
I suggest you try putting FormToEmail.php in a CCGI subdirectory of your choice then reference it via action="http://ccgi.your-domain/your-subdir/FormToEmail.php"? You might want to change "/" in the FormToEmail.php $continue = "/"; line to "http:/www.your-domain/" so that it returns to your homepages HTML file rather than the top level on CCGI.
David
Re: Hang up with running PHP script
24-12-2008 5:40 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- Re: Hang up with running PHP script