When completing this form and clicking "agree and submit"it takes me to an error page. This is a new issue and I am unsure how to correct it and unsure what took place to make this happen between yesterday and today.

I did edit an info box within this form but I cannot see how this would effect the "agree and submit" portion.

I am not well versed in html and css. I am volunteering to keep a website up-to-date for a non-profit organization. My knowledge is limited. Anyone willing to help resolve this one issue. I am sure you may need more infomation.

Thank you in advance. Rhonda

Dani AI

Generated

Brief diagnostic note: a 404 on submit means the browser requested a server-side file that the server could not find. correctly pointed at a path mismatch; since only removed a nearby input field, this is far more likely to be a bad form action or a missing/misplaced server script than a simple form-field edit.

Quick checklist (in order of quickest checks to deeper fixes):

  • Inspect the form's action attribute in the HTML. A relative action (no leading slash) can resolve to an unexpected nested path depending on the page location; making the action an absolute path from the web root avoids that class of problem.
  • Try loading the script URL directly in a browser (use a placeholder name if necessary) to confirm whether the script itself is missing.
  • Verify the server filesystem: confirm the script file exists in the site's CGI directory and that the filename matches the action exactly.
  • Check permissions/ownership: CGI scripts typically require an executable bit and correct owner (common mode: 755).
  • Review any .htaccess or server rewrite rules that might prepend extra path segments.
  • Inspect server error/access logs for the exact request and server-side message.

Example terminal checks (replace placeholders with the real paths/names):

ls -l /home/username/public_html/cgi-bin
chmod 755 myscript.pl
dos2unix myscript.pl        # convert CRLF if file was edited on Windows
curl -I https://example.org/cgi-bin/myscript.pl

Final notes: if there is no direct file/SSH access, request that the host check the CGI folder and server logs and confirm CGI execution is enabled. Given the site had been stable, the most common fixes are correcting the action path to an absolute URL or restoring the missing script with correct permissions.

Recommended Answers

All 5 Replies

When I hit the submit button the web server generates a 404 error. That means that it could not find the file that was requested.

Verify that the following file is at that location. Looks like a path issue. You have cgi-bin twice in the path.

The requested URL /cgi-bin/cgi-bin/csvwrite.pl was not found on this server.

Jorge, I have not moved any files. I have no idea what file it is I am looking for b/c the page has been created for so long and has worked fine since I have been doing minor updates for this organization. Would you be willing to look at the code for this page to help me further?

It was set up to send an email of the information filled in...

I did look at the source code. My recommendation is for you to validate the path specified by the click event. I copied te path above. Based on te error message, it indicates that no file exists my that name at that location. Either the file is gone or the path is incorrect. Maybe renamed?

Scratch the note about the click event...i had responded via smartphone and was thinking about another post. In any event, related to your code, the "agree and submit" button is part of a form. The form action is as follows...

<form action="cgi-bin/csvwrite.pl" target="_top" method="post">

however, when you click on the submit button it takes you to

/cgi-bin/cgi-bin/csvwrite.pl

I am not very familiar with CGI myself, but based on the error code being a 404, its definately a path or file issue.

you mentioned that you made an edit to the form. did you possibly remove a "/" before "cgi-bin/csvwrite.pl"?

Thank you Jorge, I will look at it again. I did not make any changes to that area of the code. I removed one of the entry boxes next to the email box.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.