
PHP Links 1.3 - Install 

System requirements
1. You must have PHP 3 or 4 installed and able to recognize the file extension php as a php file.
	a. if you do not have php installed to recognize the .php file extension you will need to rename
	   all of the files to end in .php or .phtml or what ever you have it set up to use. then
	   change all of the forms in the files to find the new extensions.
2. You must have MySQL installed.
	mysql version 3.23.23 or grater is recomended for taking advantage of fulltext indexing	
	the script should work in older versions of mysql if you have a problem please let me know.   
	if you dont know what version of mysql you are running try the folowing sql statment.
	
	select version();
	
	that will tell you the version of mysql.

3. You must of course have some kind of web server.
4. All of the above must be working.

operating system -

unix/linux running - runs fine.
win32 (Apache/php/MySQL) - possible problem with the display of dates if you get your dates showing up like
	%05.%20.%2000 %17:18:18:%18 with % signs where they shouldn't be edit the files and remove the %
	in the date_format function remove only the %'s.  Note: this is due to a problem with older versions
	of MySQL running on win32 I'm not sure if it happens on the newer versions of win32 MySQL


Installing:

1. Extract the file.
2. Import links.sql into your database either by loading it or simply copy past.
	loading:
	upload links.sql and do the folowing
	
	open links.sql there 	


	mysql -u username -p database_name < links.sql
	
	you will be prompted for your password.
	

	If you get an error from doing this it is becouse your version of mysql is to old to use full text indexing
	
	Use the folowing statment insted

	mysql -u username -p database_name < old_links.sql
	
	you will be prompted for your password.
	
3. Edit the database.inc.php file to include your database login, password and database name.
4. go to /admin and add some link types.
5. load links.php in a browser to see and add new links


Upgrading.

1. backup all existing files.
2. take a dump of your existing database.

	mysqldump -u username -p database > file.sql
	you will be prompted for your password.
3. extract the new version into your webdiectory.
4. alter the tables as follows
	alter table links add indexed date;
	alter table links add approved set ('Y','N') default 'N' not null;
	alter table links add meta_key varchar(255) default 'No Keywords';
	alter table links add meta_desc varchar(255) default 'No Description';
	alter table links add search_text varchar(255) default 'No search text';
	create FULLTEXT INDEX link_full_index on links (meta_key,meta_desc,search_text);
5. Edit the database.inc.php file to include your database login, password and database name.
6. go to the admin directory and index and approve all your old links.	You may index them all
 at once but warning this may take some time.
	


Possible problems

if you get a message something like Warning: 0 is not a MySQL result index in with a file name.  
Check links.inc and make sure that you have put in the correct user name,password and database to
connect to MySQL. and check to be sure that you uploaded both tables to your database the 
tables are in links.sql 

Running php-links

everthing you need to do can be done in the admin diectory. from adding updating and deleting link 
types and links to indexing and moving links around between link types.


if you come across any problems please contact me at kill-9@kill-9.dk.