Using scripts:
- Using PHP4
- CGI scripts placement and settings
- Access rights
- Scripts external connections
- CR/LF Error
- Path to useful programs
Please notice that scripts will not run until you activate them in the Control Panel of your site.
- Using PHP4
You can use PHP immediately after registration.
PHP directives are processed in files with *.php extension.
If you want your site to start with index.php, upload it to the server
and delete index.html, created during registration.
Store your PHP scripts in the "WWW" folder.
Folders with PHP scripts should have "755" ("drwxr-xr-x") access rights,
and PHP scripts -- "644" ("-rw-r--r--").
- CGI scripts placement and settings
All CGI scripts should be placed in "cgi" directory. Otherwise they will not work.
Absolute path to this directory is
/home/y/your_domain.siteburg.com/cgi, where "y" is first letter of your domain name.
URL for this folder is
http://your_domain.siteburg.com/cgi-bin/script.cgi
- Access rights
Permissions for CGI scripts must be 700 (-rwx------), and for "cgi" folder -- 771.
First row of Perl script points to Perl interpreter. It must looks as
#!/usr/bin/perl or #!/usr/local/bin/perl
If scripts writes data to file (counters, forums, guest books),
this file must be placed in the "WWW" folder and have permissions "777" or "775".
- Script outgoing connections
Keep in mind, that outgoing connestions are prihibited. For example, your scripts will be unable to work with "whois" procedure.
- CR/LF Error
Windows and UNIX use different way to define end of row. Most of Windows test editors
add simbol #13 (Carriage return). This invisible simbol results in error in UNIX.
To avoid this, use special editors, wich can save files in UNIX format.
Also you can use special script, removing inappropriate simbols.
Type in shell:
$ tr -d '\r' < ScriptName.pl >a; mv a ScriptName.pl
where ScriptName.pl is name of your script.
- Path to useful programs:
Several useful programs:
sendmail -- /usr/sbin/sendmail
perl -- /usr/local/bin/perl or /usr/bin/perl
date -- /bin/date
- If you still have any quesions, Contact us
.
|
|