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
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(287) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/printthread.php(287) : eval()'d code 2 errorHandler->error
/printthread.php 287 eval
/printthread.php 117 printthread_multipage



UserSpice
Database connection unsuccessful - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: Database connection unsuccessful (/showthread.php?tid=157)

Pages: 1 2 3


Database connection unsuccessful - ppp - 06-09-2016

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.


Database connection unsuccessful - mudmin - 06-09-2016

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.


Database connection unsuccessful - brian - 06-09-2016

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?


Database connection unsuccessful - BrownBro - 11-15-2016

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.


Database connection unsuccessful - BrownBro - 11-15-2016

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/36913253/how-to-connect-to-mysql-using-php-pdo-in-easyphp-16-1-1




Database connection unsuccessful - mudmin - 11-15-2016

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.


Database connection unsuccessful - cjm1000 - 01-23-2017

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?



Database connection unsuccessful - mudmin - 01-26-2017

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?


Database connection unsuccessful - cjm1000 - 02-28-2017

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?


Database connection unsuccessful - mudmin - 02-28-2017

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