Welcome! Log In Create A New Profile

Advanced

PHP Error

Posted by keweli 
PHP Error
June 04, 2009 05:18AM
I have set up PHP with IIS and installed MySql, but for some reason I get this when running the install.php:

Sphider installation script.
0) { print "Error: "; print mysql_error(); print "
\n"; $error += mysql_errno(); } mysql_query("create table `".$mysql_table_prefix."links` ( link_id int auto_increment primary key not null, site_id int, url varchar(255) not null, title varchar(200), description varchar(255), fulltxt mediumtext, indexdate date, size float(2), md5sum varchar(32), key url (url), key md5key (md5sum), visible int default 0, level int)"winking smiley; if (mysql_errno() > 0) { print "Error: "; print mysql_error(); print "
\n"; $error += mysql_errno(); } mysql_query("create table `".$mysql_table_prefix."keywords` ( keyword_id int primary key not null auto_increment, keyword varchar(30) not null, unique kw (keyword), key keyword (keyword(10)))"winking smiley; if (mysql_errno() > 0) { print "Error: "; print mysql_error(); print "
\n"; $error += mysql_errno(); } for ($i=0;$i<=15; $i++) { $char = dechex($i); mysql_query("create table `".$mysql_table_prefix."link_keyword$char` ( link_id int not null, keyword_id int not null, weight int(3), domain int(4), key linkid(link_id), key keyid(keyword_id))"winking smiley; if (mysql_errno() > 0) { print "Error: "; print mysql_error(); print "
\n"; $error += mysql_errno(); } } mysql_query("create table `".$mysql_table_prefix."categories` ( category_id integer not null auto_increment primary key, category text, parent_num integer )"winking smiley; if (mysql_errno() > 0) { print "Error: "; print mysql_error(); print "
\n"; $error += mysql_errno(); } mysql_query("create table `".$mysql_table_prefix."site_category` ( site_id integer, category_id integer )"winking smiley; if (mysql_errno() > 0) { print "Error: "; print mysql_error(); print "
\n"; $error += mysql_errno(); } mysql_query("create table `".$mysql_table_prefix."temp` ( link varchar(255), level integer, id varchar (32) )"winking smiley; if (mysql_errno() > 0) { print "Error: "; print mysql_error(); print "
\n"; $error += mysql_errno(); } mysql_query("create table `".$mysql_table_prefix."pending` ( site_id integer, temp_id varchar(32), level integer, count integer, num integer )"winking smiley; if (mysql_errno() > 0) { print "Error: "; print mysql_error(); print "
\n"; $error += mysql_errno(); } mysql_query("create table `".$mysql_table_prefix."query_log` ( query varchar(255), time timestamp(14), elapsed float(2), results int, key query_key(query))"winking smiley; if (mysql_errno() > 0) { print "Error: "; print mysql_error(); print "
\n"; $error += mysql_errno(); } mysql_query("create table `".$mysql_table_prefix."domains` ( domain_id int auto_increment primary key not null, domain varchar(255))"winking smiley; if (mysql_errno() > 0) { print "Error: "; print mysql_error(); print "
\n"; $error += mysql_errno(); } if ($error >0) { print "Creating tables failed. Consult the above error messages."; } else { print "Creating tables successfully completed. Go to admin.php to start indexing."; } ?>


Obviously it is not being looked at as a PHP. Any ideas?
Re: PHP Error
June 04, 2009 11:22AM
Try this:

Open your admin/install.php.

Look for
<html>
	<head>		
	<title>
	Sphider installation script.
	</title>
	<LINK REL=STYLESHEET HREF="admin.css" TYPE="text/css">
	</head>
<body>
<h2>Sphider installation script.</h2>
<?

Find at the very end of that block of code
<?

Change it into
<?php

Greetings.
Sorry, only registered users may post in this forum.

Click here to login