473,411 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

I'm a total novice - please help - File not found!

6
I hope that you don't get too offended by the stupidity of my question - but I wasn't sure where else to go.

Basically, I'm not a programmer but I have a website which was set up by an internet designer company that has now closed down! It is hosted on a server which is not our own but one of these webhosting servers that you can pay.

Basically, I need to change a page with an html form (i'm ok with limited html code) which links to a perl programme sitting in a cgi-bin.

I run windows xp pro on my own system and I understand that the website's server is probably UNIX (though I don't know how I would go about being sure). I have managed to download perl on to my computer and run a 'hello world' program using the dos window. I have uploaded on to the web server the html version of the hello world program (which I got from here: http://perl.about.com/od/perltutorials/a/hellocgi.htm) using Core FTP and changed the permissions so that anyone can read/write/execute. When I try and look for it on the web it says 'File not found' & "The requested URL was not found on this server"

I'm sure I'm doing something really silly or it might be that I have to call the people that host the site to ask them about permissions?

Thank you for reading and any help you might be able to offer.
Jan 26 '07 #1
8 6035
KevinADC
4,059 Expert 2GB
OK, what that code is, is it's a simple perl script, not an html document:

Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2. print "Content-type: text/html\n\n";
  3. print <<HTML;
  4. <html>
  5. <head>
  6. <title>A Simple Perl CGI</title>
  7. </head>
  8. <body>
  9. <h1>A Simple Perl CGI</h1>
  10. <p>Hello World</p>
  11. </body>
  12. HTML
  13. exit;
  14.  
you would save it as "test.pl" or "test.cgi" or any other name you prefer. Upload it into the cgi-bin folder of your hosted website using your FTP program in ASCII (or text) mode to transfer the file from your computer to the webserver. See the help files of your FTP client if you are unsure about how to set the transfer mode. The using your FTP client set the permission (chmod) of the test.pl file to 755 (rwxr-xr-x). See the help files of yout FTP client for chmod if necessary. Then you access the script from the url in your browser:

www.yoursite.com/cgi-bin/test.pl

and hopefully is prints "Hello World" in the browser.
Jan 26 '07 #2
tik33
6
Thanks Kevin,

I have tried all that and when I go to my site and type the url of the file (hello1.pl) the message is still saying 'file not found'.

reuploaded - changed permissions, still stuck.

Any further ideas?

Thanks a lot for your time,

Gus
Jan 28 '07 #3
KevinADC
4,059 Expert 2GB
have you spelled the name of the file correctly in the browser? Whats the name of your website and whats the name of the file?
Jan 28 '07 #4
tik33
6
the website is www.solidspace.co.uk and I have put the file called hello1.pl in /web/cgi-bin/ and in /web/ to see if it makes any difference.

when I go to www.solidspace.co.uk/web/hello1.pl it tells me that there is no file found, however, when I miss out /web/ it tells me a different error message:

"CGIWrap encountered an error while attempting to execute this script:

Error Message: Permission denied
Error Number: 13

This message usually indicates there is a problem with the script itself. Often this indicates either that the #! line of the script is incorrect, or the script was uploaded in binary mode instead of ascii mode. Check to make sure that the script does not have control-M's at the end of every line. That will prevent it from executing. An easy fix that takes care of this most of the time is to put '#!/.../perl --' instead of '#!/.../perl' on the first line of the script. This is typically a problem if the script was edited or uploaded from a DOS/Windows/Macintosh station to a unix based server."

are we getting somewhere???

Thanks Kevin.
Jan 29 '07 #5
KevinADC
4,059 Expert 2GB
your files are here:

http://www.solidspace.co.uk/cgi-bin/

"web" is probably the root folder of your site, which is "http://www.solidspace.co.uk", you don't include it in the url.

Make sure you have followed the suggestions in the message:

This message usually indicates there is a problem with the script itself. Often this indicates either that the #! line of the script is incorrect, or the script was uploaded in binary mode instead of ascii mode.


Check to make sure that the script does not have control-M's at the end of every line. That will prevent it from executing. An easy fix that takes care of this most of the time is to put '#!/.../perl --' instead of '#!/.../perl' on the first line of the script. This is typically a problem if the script was edited or uploaded from a DOS/Windows/Macintosh station to a unix based server.
if you are sure you have, you will need to contact tech support and ask them what the problem is.
Jan 29 '07 #6
tik33
6
Thanks Kevin,

I have tried all that - when you say tech support - do you mean the tech support of the web hoster?

Best,

Gus
Jan 31 '07 #7
tik33
6
Kevin,

Just tried again and it worked!

I think it must have something to do with the way I am editing the file in windows (I am using notepad).

Thanks for your help - really appreciate it - now I've got to try and make the others work!

Best, Gus
Jan 31 '07 #8
tik33
6
Just an update - have got everything to work!

just for others that want to try this and are working in windows uploading to a UNIX server:

Write the file in the notepad.

When you save, use 'save as'.

File name box: Type the name of the file eg. test and add a .pl extension - so test.pl

Save as type box: Change the save as type from text file to 'all files'

Encoding box: Use Ansii.

then follow Kevin's instructions to upload using Ansii and change permissions (rightclick on the file name does it with CoreFTP).

That then worked for me - so if you're having a similar problem - try that!

Best, Gus
Jan 31 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Ewa | last post by:
Hello I have inherited a www service after someone, I have problems with PHP parts. As I am complete novice. I will be very greatful for your help - I did not managed to find an answer myself....
6
by: AMT2K5 | last post by:
Hello guys. I have a function, cleanSpace . I was told from another source that the problem is, is that the function is acting on constant string literal. To fix this I was told to take the...
5
by: fwells11 | last post by:
Hi there. As you will see from my questions, I am an SQL newb. I dabble but never get to spend enough time to get proficient so base any feeedback on that basis please. This is all theoretical...
10
by: giancarlodirisioster | last post by:
Can someone help me modify this for future Usenet archival and to help me solve what I don't know? <form name="addform" method="POST" action="./submit.php"> <input type="text" name="Box 1"...
76
by: Alan Connor | last post by:
-- Alan C this post ends with w q From K&R: #include <stdio.h> main()
2
by: sean | last post by:
Hi there, I am trying to call a C# web service from an aspx page, I have the asmx file, a user control file ascx and the aspx file. I have verified that the web service is returning correct...
5
by: simondsm | last post by:
I have a video tape library that we use at work here in a MS-Access database. When originally desgined, we never thought ot convert the time on the fly into total seconds, but instead, we stored...
23
by: casper christensen | last post by:
Hi I run a directory, where programs are listed based on the number of clicks they have recieved. The program with most clicks are placed on top and so on. Now I would like people to be apple to...
1
by: txguy | last post by:
as a novice I can't get this one figured out and would appreciate any advice or help you could offer. am trying to pass a php derived total to a html form that passes the info to paypal. our form...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.