PHP and CGI

ImageMagick
File Permissions
Think CGI isn't working? Use this.
PHP & CGI (including modules) Information
What is the path to...?

BACK

 

 

 

 

 

 

 

ImageMagick

ImageMagick 6.0.2 is installed and can be located in /usr/local/bin

The perl module Image::Magick is also installed.
Back to Top

 

File Permissions

Many time a script's installation instructions or readme file will tell you that you need to change permissions on or chmod a file/directory so that the script can execute or write to the file/directory. You'll need to make these changes through the file manager or through ftp.

Usually programs will display permission in an odd way such as this:
_rwxrwxrwx

In number form that's 777. You may or may not have the _ at the beginning. If you do, that means it's a file that has those permissions. If it's a directory you'll see a d there (drwxrwxrwx) instead of the underscore.

Each group of 3 characters are the permissions for the user, the group and finally others (everyone else). In addition, each group of 3 characters make up one number. The following is what each letter stands for:
r (read) = 4
w (write) = 2
x (execute) = 1

To give some examples of some common permission converted from the letters to numbers (with the first character removed to avoid some confusion):
rwxrwxrwx -> 777
rwx_r_xr_x -> 755
rw_rw_rw_ -> 666
rw_r__r__ -> 644

As you see above, you just add up what each letter is equal to in each group to form the numbers.
Back to Top

 

Think CGI isn't working? Use this.

Here is a small test script that you should be able to upload to your directory, chmod (change permissions) to 755 and then access via the web to see if an account's cgi access is working.

code:--------------------------------------------------------------------------------
#!/usr/bin/perl
print "Content-Type: text/html\n\n";
print "All is working. :)";
--------------------------------------------------------------------------------


You may put the above code into a .cgi file or a .pl file. If you get a 500 internal error, then check to make sure you uploaded it in ascii mode and that it's been given the correct permissions. If you're sure everything is correct, then please send in a support desk ticket with the username of the account experiencing the problems, the servername of the server the account is on, and the url to this test script you uploaded to that account.

The problems are usually with permissions to folders or cpanel/whm creating improper ownership of some of the directories. It's best to let us just fix the problem than to wipe out the account and recreate it again.
Back to Top

 

PHP & CGI (including modules) Information

Should you need to find out what cgi modules are installed on the server you reside on or information on php, the following urls should give you the information you require:

Perl info - http://216.193.213.78/perldiver.cgi
PHP info - http://216.193.213.78/phpinfo.php
Back to Top

 

What is the path to...?

Sendmail: /usr/sbin/sendmail
Perl: /usr/bin/perl
Date: /bin/date
Whois: /usr/bin/whois

Web directory: /home/username/www
or /home/username/public_html
Cgi-bin: /home/username/www/cgi-bin

Replace username with the cpanel username for the account the script is under. The previous 3 paths may be asked for in the script as an absolute path or a system path. Please note that the paths only go as far as the directories above and you may need to add on to them for the specific file or directory your script is calling for.
Back to Top

 

 

©2004 Solid Hosting. All rights reserved