Most of the webmasters install scripts on their sites at some point of time and it will be annoying to configure the script with correct script paths. If you don’t configure these paths properly, script fails to execute and this could be very frustrating.

The following is an easy way to get the path to your script directory.

GET PATH TO PHP SCRIPT:

1. Download phpinfo.php.
http://www.webmasters-central.com/images/phpinfo.zip

2. Unzip and upload to YOUR SCRIPT folder.

3. Now access the phpinfo.php like this:
http://www.yoursite.com/script/phpinfo.php

4. Scroll down the page almost to end. You will see this:
ENV["SCRIPT_FILENAME"]

5. Next to it, you will see path to this phpinfo.php file. Replace it with yourscript.php

Ex: If you see path like this:
/home/LOGINNAME/public_html/TEST-FOLDER/phpinfo.php

Change it to:
/home/LOGINNAME/public_html/TEST-FOLDER/yourscript.php
Use this path in your script files as ‘Server path’ to the script.

GET PATH TO CGI SCRIPT:

1. Download env.pl.
http://www.webmasters-central.com/images/env.zip

2. Unzip and upload to YOUR SCRIPT folder which is in cgi-bin. Chmod the env.pl to 755 to make it executable. Otherwise you will ‘500 Internal Server’ error.

3. Now access the env.pl like this:
http://www.yoursite.com/cgi-bin/script/env.pl

4. Scroll down the page almost to end. You will see this:
SCRIPT_FILENAME

5. Next to it, you will see path to this env.pl file. Replace it with yourscript.cgi or yourscript.pl

Ex: If you see path like this:
/home/LOGINNAME/public_html/cgi-bin/TEST-FOLDER/env.pl

Change it to:
/home/LOGINNAME/public_html/cgi-bin/TEST-FOLDER/yourscript.cgi (for .cgi extention)
OR
/home/LOGINNAME/public_html/cgi-bin/TEST-FOLDER/yourscript.pl (for .pl extention)
Use this path in your script files as ‘Server path’ to the script.

Author: Radhika (c)
http://www.webmasters-central.com/




Related Posts

  • No Related Posts Found