Heres what i found out, will be much easier if you follow these steps (just thanks for the help will do, dont need anything else)
1. edit the configuration variables inside the php script (look for setup.php or config.php or something like this in the readme.txt).
2. You will need to set absolute paths most likely to directories if the script will be doing any file writing. The absolute path is the full path from the server to the directory you are writing to. Something like this (shown in red/green):
/home/usr/htdocs/datadir
The RELATIVE path is the path from public or html portion of the directory (shown in green above):
/datadir
3. If the script utilyzes a mySQL database then you will need to create the tables associated with the mySQL database. If the script doesn't come with a helper table creation script then you can use telnet. There is instructions on how to use telnet to create a mySQL table in one of my prior diary entries: click here for 7-07-00 diary
4. You will likely need to set UNIX permissions for any file/directory that the script must access. In doing so you should be given the permission settings in the readme file. If there is no readme then you might try the following:
chmod 666 filename.txt (any file that needs to be read/written by the php script)
chmod 777 DIRECTORY (any directory that needs to be read/written by the php script)
5. If the script requires function froms php 4.0 and your version of php is less than 4+ then you will need to have your host compile php 4.0 on the server or rewrite the portions of the code calling those functions. You can check what version of PHP you are using by creating a simple test.php file with the following code:
<? phpinfo(); ?>
This will tell you a lot more than just what version of PHP you are running. Try it
6. upload all scripts in ASCII mode. Binary can really mess up script source files, so look into your FTP editor settings and ensure you are using ASCII mode for any scripts you try to upload.
7. Does the script require the gd library or other modules which are not included with the core php source? If the script does then these libraries must be compiled by your host (or you) prior to executing the script. Check the script readme documentation for more help on this.
I think this hits the high points in doing a php install. Fortunately the parser should help you by explaining the errors when you try to run the script.
Keep in mind that "parser error at line xxx" can be misleading. The error might actually be one or two lines off this parser error.
Also if it is an open loop in the code, the parser error can show up at the very last line of code (this should never happen with code you download to install elsewhere, but leaving an open loop can happen in your own code development).
it is easy to omit a semi-colon (
or closing quote (") in a variable assignment. Watch for these mistakes.
Most script install errors are the fault of the wrong paths being assigned in the configuation. Learn what your paths are to the following directories by either contacting your host or reviewing other scripts installed on your server:
1. absolute path to your cgi-bin
2. absolute path to your www or public html directory
3. absolute path to your NON public directory. Some scripts require loading password files and other secure files ABOVE the public directory for enhanced security from the web.
Some scripts require you to use .htaccess to protect the admin areas. You can use telnet to create .htpasswd style files but if you don't have telnet access then I've created a little program that you can use for free to create an encrypted password file. You can find it at: