This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Dreamweaver > March 2004 > CGi Scripts
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| tradeya101 webforumsuser@macromedia.com 2003-12-03, 12:04 pm |
| Help! I am a first timer using cgi scripts in dreamweaver. How do you upload the script onto the server? I have asked other people, but no one seems to know.
| |
| August Malson 2003-12-03, 12:04 pm |
| There is probably a CGI-BIN directory on your server. You should upload
your cgi files into this directory. Once you have uploaded the file, you
will need to modify the file permissions. For this part you will need
another FTP program or a telnet program (depending on your access). Anyway,
you will need to run the chmod command on your file and modify the
permissions so that it includes Execute rights. chmod 777 (read write
execute - for user, group, everyone).
Hope this information helps.
--
--
Augie Malson
Certified Macromedia Developer
ICQ: 5619136
-------
Web Design Tips, Tricks, and News
http://www.thearchgu.com/web_design/
--------
"tradeya101" <webforumsuser@macromedia.com> wrote in message
news:bqkt54$cbh$1@forums.macromedia.com...quote:
> Help! I am a first timer using cgi scripts in dreamweaver. How do you
upload the script onto the server? I have asked other people, but no one
seems to know.quote:
>
>
| |
| mick_white 2003-12-03, 12:04 pm |
|
August Malson wrote:
quote:
>There is probably a CGI-BIN directory on your server. You should upload
>your cgi files into this directory. Once you have uploaded the file, you
>will need to modify the file permissions.
>
> For this part you will need
>another FTP program or a telnet program (depending on your access).
>
Or you could use DW to modify permissions... Site>FTP log
Mick
quote:
> Anyway,
>you will need to run the chmod command on your file and modify the
>permissions so that it includes Execute rights. chmod 777 (read write
>execute - for user, group, everyone).
>
>Hope this information helps.
>
>
>
| |
| tradeya101 webforumsuser@maczomedia.com 2003-12-03, 1:00 pm |
| okay-so from what I understand, I need to change the permissions in my ftp host-that host is sjc-do you know anything about that?
| |
| Alan Ames _TMM_ 2003-12-03, 1:00 pm |
| go to the mm exchange (under the help menu)
register or log in, and then search in dreamweaver extensions for
set permissions
after it's installed, upload the file, find it in remote side of Site
Manager, and right-click it and choose "set permissions"
control-click on mac.
quote:
> I have dreamweaver 4, how do you modify it in the ftp log?
>
>
>
--
Team Macromedia Volunteer for Dreamweaver
Certified Dreamweaver MX Developer
yes, it's a real email address- but it's filtered to trash
| |
| tradeya101 webforumsuser@macromedia.com 2003-12-03, 1:00 pm |
| I have dreamweaver 4, how do you modify it in the ftp log?
| |
| nt0x webforumsuser@macromedia.com 2003-12-03, 1:00 pm |
| ok first: a CGI Script is server side, and runs from the server it is uplaoded to. Your host should have a directory within your 'public-html' that says cgi-bin. Permissions for that file (usually range from 666 to 755 for most) need to be set in order fo
r your host server to execute the script. So let me start with a basic tutorial/runthru:
1-) You uploaded the script to your cgi-bin directory.
2-) Usually most cgi-scripts come with an install.readme or README.txt, read that and find the permissions of the certain files the script will use. Usually msot files with a '.cgi' extension will ne to be chmodded to 755.
3-) You need to obtain an FTP Client, there are many out there, but I recommend using WSFTP Pro, which you can get a free 'fully-working' trial at www.ipswitch.com. This allows you to open a 'door' sort to speak between your computer and your hosting serv
er, during which you can swap files back and forth. (CGI Scripts cannot be edited, nor setting permissions, with DW*) In WSFTP, or whatever FTP Client you choose, there should be a spot, or if you rightclick the filename, you will see properties, or searc
h their included help for how to 'Set Permissions' or rather chmod (if its a unix run server).
4-) if its a visited CGI Script, meaning the end user has to actually visit it, then you would execute it by visiting your site at www.yourname.com/cgi-bin/filename.cgi.
If its an include, your page must be '.shtml' (allowing server side includes) and you can call it by using one of the following inserts into your html code:
<!--#include virtual="/path/to/cgi-bin/file_of_exec_cgi.cgi">
Usually it would look something like: <!--#include virtual="/cgi-bin/mycgiscript.cgi"> or it might be '.pl' if it was written in PERL.
Another way is:
<!--#exec cgi="/path/to/my/cgi-bin/mycgiscript.cgi"> Again, if its PERL written, replace '.cgi' with '.pl'
Anything else, feel free to contact me sheyz@sheyz.net.
Regards,
nT0x
| |
| mick_white 2003-12-03, 6:57 pm |
| Why do you need the extension?
Mick
Alan Ames _TMM_ wrote:
quote:
>go to the mm exchange (under the help menu)
>
>register or log in, and then search in dreamweaver extensions for
>
>set permissions
>
>after it's installed, upload the file, find it in remote side of Site
>Manager, and right-click it and choose "set permissions"
>
>control-click on mac.
>
>
>
>
>--
>Team Macromedia Volunteer for Dreamweaver
>Certified Dreamweaver MX Developer
>
>yes, it's a real email address- but it's filtered to trash
>
>
>
| |
| mick_white 2003-12-03, 6:57 pm |
| Go to site> FTP log > command line (top of log)
And place something like the following in the command line:
site chmod 777 /home/milesmus/public_html/guestbook/gbsrc.php
Mick
"tradeya101" webforumsuser@macromedia.com wrote:
quote:
>I have dreamweaver 4, how do you modify it in the ftp log?
>
>
>
>
>
| |
| mick_white 2003-12-03, 6:57 pm |
| Why do you need another FTP client?
Mick
"nt0x" webforumsuser@macromedia.com wrote:
quote:
>ok first: a CGI Script is server side, and runs from the server it is uplaoded to. Your host should have a directory within your 'public-html' that says cgi-bin. Permissions for that file (usually range from 666 to 755 for most) need to be set in order f
or your host server to execute the script. So let me start with a basic tutorial/runthru:quote:
>
>1-) You uploaded the script to your cgi-bin directory.
>2-) Usually most cgi-scripts come with an install.readme or README.txt, read that and find the permissions of the certain files the script will use. Usually msot files with a '.cgi' extension will ne to be chmodded to 755.
>3-) You need to obtain an FTP Client, there are many out there, but I recommend using WSFTP Pro, which you can get a free 'fully-working' trial at www.ipswitch.com. This allows you to open a 'door' sort to speak between your computer and your hosting ser
ver, during which you can swap files back and forth. (CGI Scripts cannot be edited, nor setting permissions, with DW*) In WSFTP, or whatever FTP Client you choose, there should be a spot, or if you rightclick the filename, you will see properties, or sear
ch their included help for how to 'Set Permissions' or rather chmod (if its a unix run server).quote:
>4-) if its a visited CGI Script, meaning the end user has to actually visit it, then you would execute it by visiting your site at www.yourname.com/cgi-bin/filename.cgi.
>
>If its an include, your page must be '.shtml' (allowing server side includes) and you can call it by using one of the following inserts into your html code:
>
><!--#include virtual="/path/to/cgi-bin/file_of_exec_cgi.cgi"> Usually it would look something like: <!--#include virtual="/cgi-bin/mycgiscript.cgi"> or it might be '.pl' if it was written in PERL.
>
>Another way is:
><!--#exec cgi="/path/to/my/cgi-bin/mycgiscript.cgi"> Again, if its PERL written, replace '.cgi' with '.pl'
>
>Anything else, feel free to contact me sheyz@sheyz.net.
>
>Regards,
>nT0x
>
>
>
>
>
| |
| Michael Fesser 2003-12-03, 6:58 pm |
| August Malson wrote:
quote:
>Anyway,
>you will need to run the chmod command on your file and modify the
>permissions so that it includes Execute rights. chmod 777 (read write
>execute - for user, group, everyone).
Write for everyone?! Do you really want everyone with a server-account
be able to kill, or even worse, modify your scripts?
755 (owner all rights, group and public only read + execute) is more
than enough.
Micha
| |
| tradeya101 webforumsuser@macromedia.com 2003-12-03, 6:58 pm |
| okay- I am confused. Help me out-do I need an ftp client or can i just use an extension of dreamweaver? I am trying to run a form on my website that allows a user to fill out the form and it comes back in am email to me.
| |
| mick_white 2003-12-03, 6:58 pm |
| You need neither. You may assign permissions within DW.
Mick
"tradeya101" webforumsuser@macromedia.com wrote:
quote:
>okay- I am confused. Help me out-do I need an ftp client or can i just use an extension of dreamweaver? I am trying to run a form on my website that allows a user to fill out the form and it comes back in am email to me.
>
>
>
>
>
| |
| mick_white 2003-12-03, 6:58 pm |
| Well that's an example for a guestbook, and it's just an example,you
could use appropriate permissions.
site chmod 755 /home/milesmus/public_html/secret_stuff.php
Mick
Michael Fesser wrote:
quote:
>August Malson wrote:
>
>
>
>
>Write for everyone?! Do you really want everyone with a server-account
>be able to kill, or even worse, modify your scripts?
>
>755 (owner all rights, group and public only read + execute) is more
>than enough.
>
>Micha
>
>
| |
| Infiniti webforumsuser@macromedia.com 2003-12-03, 6:59 pm |
| 1) Open CGI (.cgi,.pl) scripts in a text editor, like MS Notepad.
2) Modify script as per the "readme.txt" or included comments to reflect a) location of script within remote directory structure on server (ie. the path to the script on the REMOTE server), b) location of PERL on the remote server (you may have to check
with your hosting provider or their documentation to find the path to Perl), c) any variables that need to be or can be altered (ie. referrer, e-mail address, etc).
3) Save file with any added modifications.
4) Upload file (in ASCII, not Binary) via FTP to remote site. (Other posters have given advice already)
5) Change permissions (chmod) on uploaded file to allow execution by public viewers.
6) Hit "Reload" on your browser window. Important if you've already tried (and failed) to execute your script today. You'll keep loading the same (failed) cgi script from your browser cache, (even if it now really works), if you've set preferences that wa
y. Most people do.
7) Try to execute your script. If this is a mail form, the action item of the form will be a reference to this script (ie. mailme.pl, or mailme.cgi) through POST method. Just hit the form's " SUBMIT" button and your script should now execute. Somewhere in
Step 2) above, you will have modified a variable within the script itself to reflect your own e-mail address. So, in other words, you execute the script by opening the .html form in your browser window, fill in the form, and hit submit. Then check your e
mail. If it works, "you've got mail". Some mail clients don't refresh instantly - every 10-15 minutes maybe, depends on settings, so be forewarned, it may be your mail client that makes you wait. Your script still works.
8) If the script ultimately doesn't execute, rename the file (ie. if it is mailme.cgi, rename it: mailme.pl) and try again and upload as per the instructions above.
9) If it still doesn't work, check your error logs, which hopefully you have access to.
Hope this helps.
Let me know.
| |
| april floyd 2004-03-18, 5:29 pm |
| How do I set chmod 755 from the ftp command line in dmx. I get a does not understand message
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|