1
chudy
confirm database settings
  • 2004/2/24 19:16

  • chudy

  • Just popping in

  • Posts: 2

  • Since: 2004/2/24


I have install XOOPS 2. Went I clikc next on page "confirm database settings", i see that:

Parse error: parse error in /home/httpd/vhosts/freepgs.com/httpdocs/chudy/include/functions.php on line 684

Parse error: parse error, expecting `T_VARIABLE' or `'$'' in /home/httpd/vhosts/freepgs.com/httpdocs/chudy/class/database/mysqldatabase.php on line 347

Fatal error: Cannot instantiate non-existent class: xoopsmysqldatabaseproxy in /home/httpd/vhosts/freepgs.com/httpdocs/chudy/class/database/databasefactory.php on line 30

Sorry, for my "English" but it not my native langue.

2
wcrwcr
Re: confirm database settings
  • 2004/2/24 22:45

  • wcrwcr

  • Home away from home

  • Posts: 1114

  • Since: 2003/12/12


Any chance of the files been corrupted?
Did you try another install?
[]?s

3
chudy
Re: confirm database settings
  • 2004/2/25 13:24

  • chudy

  • Just popping in

  • Posts: 2

  • Since: 2004/2/24


NO, i didn't chance any file.
What another install?

4
robekras
Re: confirm database settings
  • 2004/2/25 13:34

  • robekras

  • Documentation Writer

  • Posts: 187

  • Since: 2002/12/10


Try to upload the XOOPS files again,(maybe in binary mode) and do the install again.

5
Jan304
Re: confirm database settings
  • 2004/2/25 15:20

  • Jan304

  • Official Support Member

  • Posts: 520

  • Since: 2002/3/31


It sometimes happens a file gets corrupt while uploading. So just re-upload include/functions.php and hoping that is the only that gots corrupted while uploading...

6
NiclasH
Re: confirm database settings
  • 2004/2/26 22:43

  • NiclasH

  • Just popping in

  • Posts: 7

  • Since: 2004/2/26


Hi,
I have exactly the same problem and have traced it to the class/database/mysqldatabase.php.
In
function connect($selectdb = true)
{
if (XOOPS_DB_PCONNECT == 1) {
$this->conn = @mysql_pconnect(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS);
} else {
$this->conn = @mysql_connect(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS);
}
:
:
It enters one of the connect() but doesn't return...

I am running;
httpd-2.0.40-21
php-4.2.2-17
MySQL-3.23.57-1


Anyone have a clue (I am not PHP literate)...

Cheers
Niclas

7
Dave_L
Re: confirm database settings
  • 2004/2/27 2:02

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


The first thing I would check are the connection parameters.

This should dump them to the display. If this is on a "live" server that other people can use, be aware that it will reveal the information. If that's an issue, you could dump them to a file instead.

[color=ff0000]var_dump('pconnect'XOOPS_DB_PCONNECT'host'XOOPS_DB_HOST'user'XOOPS_DB_USER'pass'XOOPS_DB_PASS);[/color]
    if (
XOOPS_DB_PCONNECT == 1) {
        
$this->conn = @mysql_pconnect(XOOPS_DB_HOSTXOOPS_DB_USERXOOPS_DB_PASS);
    } else {
        
$this->conn = @mysql_connect(XOOPS_DB_HOSTXOOPS_DB_USERXOOPS_DB_PASS);
    }

8
NiclasH
Re: confirm database settings
  • 2004/2/27 19:51

  • NiclasH

  • Just popping in

  • Posts: 7

  • Since: 2004/2/26



The dump shows;

string(8) "pconnect" int(0) string(4) "host" string(9) "localhost" string(4) "user" string(5) "xoops" string(4) "pass" string(11) "SplendidDay"

And then verifying that those works;
[niclas@f1 niclas]$ MySQL -h localhost -u XOOPS -pSplendidDay -D xoops
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1090343 to server version: 3.23.57

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show tables;
Empty set (0.00 sec)


So there is something more to it...

9
NiclasH
Re: confirm database settings
  • 2004/2/27 20:10

  • NiclasH

  • Just popping in

  • Posts: 7

  • Since: 2004/2/26


What does the @ mean in @mysql_connect???

(As I said, I am not PHP literate... )

I wrote;

<?php
$conn = mysql_connect("localhost", "xoops", "SplendidDay" );
?>

I ran
[niclas@f1 portal]$ php niclas.php

And I get the error message;

PHP Warning: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/niclas/www/portal/niclas.php on line 2
PHP Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)


which is indicating that PHP is trying to use Unix Sockets instead of TCP/IP to connect.
If I add the "@" to
$conn = @mysql_connect("localhost", "xoops", "SplendidDay" );

no message is output, and if I change the hostname to an invlaid one, I still get nothing...


10
Dave_L
Re: confirm database settings
  • 2004/2/27 20:28

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


The @ suppresses any error messages. It's typically used on expressions for which the result will be checked in some other way.

I'm not sure why the connection is failing.

Login

Donat-O-Meter

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