Welcome! Log In Create A New Profile

Advanced

MySQL and php compatibility issue?

Posted by Ruthmore 
MySQL and php compatibility issue?
March 26, 2011 11:01PM
I am running MySQL version 5.5. It would seem that there is a compatibility issue with Sphider (version 1.3.5). In order to get to the point where I have the "Welcom to Sphider" page, I had to do the following (I share this because I suspect it will be the clue to my problem):

1. I had to go into "admin.php", "install.php", etc., and change the mysql_[command] to mysqli_[command] (please note the added "i" after "mysql" )

2. I had to add a parameter to mysqli_error() to be mysqli_error($success) -- and the same for mysqli_ernno and mysqli_query -- all this because errors were coming up demanding one additional parameter than what Sphider was feeding MySQL

3. The table query_log was not being created. I edited the file "tables.sql" and changed the following:

time timestamp(14), --- I changed to --- time timestamp,
elapsed float(2), --- I changed to --- elapsed float,

By removing the parenthetical numbers, the table query_log is created.

At this point, from the command prompt I can see that tables have in fact been created, and I have compared the list there to what is in the "tables.sql" file and they are all there.

Thus the installation script ("install.php" ) seems to have been successful. I move on to "admin.php" to start indexing.

I notice in this "welcom" screen the statement "Currently in database: sites, links, categories and keywords." I believe it should give some numbers in there? No matter, I "ADD SITE" and get the message "site added" but it still shows nothing for "Currently in database: sites, links, categories and keywords."

I go to the "Database" tab, and it confirms that the database connection has been established, but it also says, "ERROR: Database contains no tables". But I know it does! I've seen them with the "show tables" MySQL command.

At this point, I'm wondering if I'm just killing myself trying to make Sphider compatible with my version of MySQL. I don't want to dummy down MySQL (especially after going through all this work to try and make this work).

Has anyone else figured out how to make Sphider work with this version of MySQL? At each step here I keep thinking I've fixed things, and then I hit another block, it's getting frustrating. I can't imagine I'm the only person who's been hit with this issue, but I've spent hours trolling through forums (and phorums) and coming up with nothing.
Re: MySQL and php compatibility issue?
April 03, 2011 04:11PM
Not sure that I can really help you Ruthmore. I am looking for a simple Search Engine to add to one of my web sites and thought that sphider would be ideal; I don't want anything sophisticated. However, reading your post makes me uneasy.

I have recently upgraded one of my computers and hit similar problems. On two of my computers I still run PHP 5.0.4 and MySQL 4.1.11. The third computer has PHP 5.2.17 and MySQL 5.5.9. I found a whole host of differences (including those that you noted above). Admittedly some of the problems were because I had taught myself MySQL/PHP from the book "In Easy Steps" and, not being a programmer (but having some good logical skills), I did fall into the trap of using some code that perhaps was not totally recommended (though was used in the book).

If it is of any help I can send you a PM or email you with my findings or, if it is of general use then I can post it on this Forum.
Re: MySQL and php compatibility issue?
May 13, 2011 08:17PM
I sent you a PM Ruthmore some weeks ago with my list of differences/issues that I had found moving from PHP 5.0.4 to PHP 5.2.17. Did you receive it? I have made some progress and have now submitted a further post to seek some help. If you want clarification of what I have done so far then let me know.
Re: MySQL and php compatibility issue?
July 13, 2011 06:44PM
Hi Ruthmore, I too am having problems with the coding referencing mysql statements and not mysqli. It is very frustrating because I see this alot with other PHP based packages using mysql when the "I"mproved link mysqli has been out for ages now.

Did you get anywhere with a work around?

cheers

Rob



Edited 2 time(s). Last edit at 07/13/2011 06:57PM by printwell.
Sorry, only registered users may post in this forum.

Click here to login