The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database connection unsuccessful
#1
Hey there,

I just wanted to try out UserSpice and hit this error on Page3:

Database connection unsuccessful! Please try again.

Even though my host, username, password, database is correct. I've tried a couple now.


I checked the nginx error logs and found this:

2016/06/09 16:44:28 [error] 74248#0: *55 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected end of file, expecting ')' in /usr/local/www/int.drf/users/init.php on line 26" while reading response header from upstream, client: 121.121.107.13, server: xxxx.xxxx.com, request: "GET /install/install/js/vendor/modernizr-2.8.3-respond-1.4.2.min.js HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "xxxx.xxxx.com", referrer: "https://xxxx.xxxx.com/install/step3.php"


Init.php ends like that:

// Set config
$GLOBALS['config'] = array(
'mysql' => array(

---- it looks like something went missing?


Any ideas..?


Edit: Oh I tried to download the zip file off the main page twice, I still get an what it looks like an incomplete init.php..

Thanks.
  Reply
#2
Let me tag @brian in this. He's the one who's been testing our nginx stuff. It definitely looks like something went wrong in writing those files. I need to provide a complete init file so people can just make their own in those situations because it isn't complicated. Let us get back to you on this one.
  Reply
#3
That is a bit peculiar since init.php is not used or loaded as a php file at that point. During the installer, the init.php file is constructed from several chunks with the various user inputs being inserted in the right places. What you are seeing is correct for the init.php file at that stage. After the installation is successful, the complete init.php will be written.

Does the (I think first page) installer show that the folders are writable?
  Reply
#4
Hi guys,
I am facing the same problem.
The init.php has the same ending as above and the installer does show that the folders are writable.
And I did connect to the database through another php file I made just to check that the connection is possible. I even created a table.
But the installer can't connect and I don't know why.

Thanks.
  Reply
#5
I tinkered a little bit and found out that PDO MySQL extension disabled by default in the local server software am using which is (Devserver from easyPhp). I enabled it and it connected immediately.

I found the solution here:
http://stackoverflow.com/questions/36913...php-16-1-1

  Reply
#6
Awesome. Glad it worked. There is a backup way to install userspice if your normal install fails. How many lines do you have in your users/init.php file now? Just making sure something else isn't missing that will cause you problems down the road.
  Reply
#7
Hello, I am having this same issue. I installed this fine on WAMP server. However, when i tried to install this on my remote server, i got the error..

Database connection unsuccessful! Please try again.

Everything is ok on the install welcome page. My host support also mentioned this file couldn't be found.

/install/install/js/vendor/modernizr-2.8.3-respond-1.4.2.min.js

Any ideas?
  Reply
#8
It sounds like you're using an old version. We took out composer a while ago.

If your server uses "localhost" as the host, you can also try 127.0.0.1 and see if that helps. The db connection is a pretty basic thing, so if the username/pw/db/host are right, it should connect. What version are you using?
  Reply
#9
My hosting provider cannot locate the issue. I am using the latest version at the time of this posting. Still the message from my hosting providor....

File does not exist: ...../install/install/js/vendor/modernizr-2.8.3-respond-1.4.2.min.js

Please, is there anyway you can provide access for a manual install?
  Reply
#10
Can you tell me what version you're using? In the older versions the filename you downloaded will tell you, in the newer versions it's in users/includes/user_spice_ver.php
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)