FAQ
Main »» Scripting| Table of Contents | |
|---|---|
| What is the path for Perl ? |
|---|
| The path for Perl is: /usr/bin/perl |
| What is the path for Sendmail ? |
| /usr/sbin/sendmail |
| Perl CGI - Testing if Perl CGI works |
| If you are having issues with Perl CGI files and you suspect that the server is to blame, you can try the following test. 1) Create a regular text file and call it test.cgi. 2) In the text file, enter the following lines: #!/usr/bin/perl print "Content-type: text/htmlnn"; print "Hello world!n"; 3) Save the file and upload it to your public_html or www Root folder. 4) Unix/Linux users: Make sure the permissions are set to 755. 5) Go to http://yourdomainname.com/test.cgi (do not forget to replace yourdomainname.com with your domain name) When you go to the URL in step 5, you should see the words "Hello World!". Note: Step 5 will work as long as the domain name is resolving and the test.cgi is in the public_html or www Root folder with appropriate permissions. |
| PHP - MySQL Connection String |
| You can use the MYSQL connection string for PHP as shown below. Please be sure to replace the database username (dbuser), password, and database name (dbname). The hostname should be localhost. Please note: Xdigitalnet Technical Support does not provide assistance with web scripting. $username = "dbuser"; $password = "password"; $hostname = "localhost"; $dbh = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); mysql_select_db ("dbname"); |
| Perl CGI - MySQL Connection String |
| You can use the code below to make a connection to MYSQL through PERL CGI. Please note: Xdigitalnet Technical Support does not provide assistance with web scripting. Please modify the values inside quotation marks below. These values include the DBNAME, DBUSER, and DBPASS. $DBHOST = "localhost"; $DBNAME = ""; $DBUSER = ""; $DBPASS = ""; $DB = Mysql->connect($DBHOST, $DBNAME, $DBUSER, $DBPASS); |
[ Back to Index ]
The comments are owned by the poster. We aren't responsible for their content.



