1
Grundle
xoops db + install error
  • 2006/6/1 16:56

  • Grundle

  • Just popping in

  • Posts: 4

  • Since: 2006/6/1 1


Hi I just downloaded and am trying to install

xoops-2.0.14-rc1

on my Arch Linux system.

I am currently using

MySQL 5.0.18
PHP 5
Apache 2.0.55

I am currently running into a blank page after the Confirm Database Settings page. I checked all of the debug settings in the FAQ and set them all on, but I am still not receiving any error messages.

I decided to do some more investigation and by doing some tracing with print statements I have found that the error is occurring in the file mysqldatabase.php around line 96. Specifically the following line of code

$this->conn = @mysql_connect(XOOPS_DB_HOSTXOOPS_DB_USERXOOPS_DB_PASS);


When I saw this I figured that my PHP was not compiled for the MySQL functions so I recompiled but I am continuing to fail at the same place. I decided to check even more thoroughly to make sure that this was the problem so I ran the following test script.

        // Connecting, selecting database
        
$link mysql_connect('localhost''username''password')
           or die(
'Could not connect: ' mysql_error());
           echo 
'Connected successfully';
           
mysql_select_db('gobandb') or die('Could not select database');

           
// Performing SQL query
           
$query 'SELECT count(*) FROM b_move';
           
$result mysql_query($query) or die('Query failed: ' mysql_error());

           
// Printing results in HTML
           
echo "n";
           while (
$line mysql_fetch_array($resultMYSQL_ASSOC)) {
                    echo 
"tn";
                    foreach (
$line as $col_value) {
                    echo 
"ttn";
            
                }
                echo 
"tn";
           }
     
           echo 
"
$col_value
n"
;

           
// Free resultset
           
mysql_free_result($result);

           
// Closing connection
           
mysql_close($link);
   
?>


This script ran perfectly proving that my php is compiled correctly. I even used the same database_user, password, and host as my XOOPS setup. At this point I do not know what else to try. Does anyone have any suggestions for me?

2
leostotch
Re: xoops db + install error
  • 2006/6/1 17:44

  • leostotch

  • Just popping in

  • Posts: 76

  • Since: 2006/4/1 1


Quote:
At this point I do not know what else to try. Does anyone have any suggestions for me ?


At this point there are not many things to suggest... Did you check if XOOPS didn't corrupt your credentials before saving them (echo them from mysqldatabase.php, or look in mainfile.php) ?

3
xuser
Re: xoops db + install error
  • 2006/6/1 17:45

  • xuser

  • Just popping in

  • Posts: 73

  • Since: 2002/11/26


maybe sth wrong with your MySQL configuration,

remove @ before mysql_connect to see what happened ?

4
Grundle
Re: xoops db + install error
  • 2006/6/1 18:04

  • Grundle

  • Just popping in

  • Posts: 4

  • Since: 2006/6/1 1


I removed the @ from the function and actualy got an erro O_O. The following was returned

Fatal error: Call to undefined function mysql_connect() in /home/httpd/html/wuxia/class/database/mysqldatabase.php on line 97

That is very suspicious since the same function call worked in my test script.

I just had a brilliant thought, though. I bet it is related to apache, because when I ran my test script I did the following.

$ php test.php

Obviously the commandline circumvents apache altogether.

I got the brilliant idea to copy the test.php to my install directory. After running it through the browser voila, it gives me that same error. Apparently apache isn't too happy, I am not quite sure where too look now, or how php running from apache is different than the command line?

I have the libphp5.so being loaded correctly. Could it be that when I recompiled my PHP5 that this module did not get updated???

5
Grundle
Re: xoops db + install error
  • 2006/6/1 20:36

  • Grundle

  • Just popping in

  • Posts: 4

  • Since: 2006/6/1 1


My suspicion was indeed correct. I had to recompile PHP once again, but with the following.

$ ./configure --with-apxs2=/usr/sbin/apxs --with-mysql=/usr


Apache had an outdated version of the libphp5.so that was not supporting mysql. Make sure you take that into account when you are re-compiling for apache support.

Login

Who's Online

202 user(s) are online (110 user(s) are browsing Support Forums)


Members: 0


Guests: 202


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits