Oct 11 2009
Posted by Webmasters-central.com as Tutorials
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.
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.
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.
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jan | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | ||||
2 Responses
Web Marketing Services
November 4th, 2009 at 7:44 am
1Good informatoion for us.
stacy
December 19th, 2009 at 12:54 pm
2Wow. I have been struggling to get the path for my php script.
thank you very much for the easy tutorial.