GithubHelp home page GithubHelp logo

Comments (8)

brunnopleffken avatar brunnopleffken commented on May 28, 2024

@halojoy
I downloaded 0.5.1 directly from GitHub, created a new database and tried to install... Well, I couldn't reproduce this issue, so I need more details...

Instead "localhost", try to connect using 127.0.0.1. Seems like you're not using an username, are you connecting as anonymous? This first step when submitting the database settings it just run a basic mysqli_connect() query to verify the data, and it returns just true or false (install/tests.php).

from addictive-community.

halojoy avatar halojoy commented on May 28, 2024

THe error comes at this line:
$installer = new Installer;
I tracked it.
And yes, I have tried 127.0.0.1. I have tried everything I can.
Still I can not come any further than beginning of step 3.

I am using port 3306, username=root and my password.
Full error: "Access denied for user ''@'localhost' (using password: NO)"

from addictive-community.

brunnopleffken avatar brunnopleffken commented on May 28, 2024

I see... Seems like those parameters are not being passed to Installer() class, so the script is trying to connect to nowhere using empty values, otherwise you had seen "Access denied for user root@localhost (using password: YES)"...

I'll investigate this issue. Just to know, which PHP version are you running? I want to make some tests matching the same environment as you have as much as possible.

NOTE: may be related to #26

from addictive-community.

halojoy avatar halojoy commented on May 28, 2024

I actually run PHP 5.6.10, latest. On Apache 2.4.12, latest. MySQL is 5.6.16.
And I agree with you. Trying to connect with empty values.
This is happening before the real connection. Maybe in the database class.

from addictive-community.

halojoy avatar halojoy commented on May 28, 2024

The Database class has got a constructor. = _Connect
When the Installer implements Database and gets called, this constructor is run.

I got it working after hard work.
I made the Database class has no constructor.
Call to Database is now 2 steps:

$Db = new Database();
$Db->_Connect($config);
I also had to make the _Connect public, in the Database class.

from addictive-community.

brunnopleffken avatar brunnopleffken commented on May 28, 2024

Man, that's awesome! Can you send a PR with this fix?
And then I replace all other Database calls with this two steps to get everything else back to work...

By the way, you can remove the underscore before Connect(), as it's now public.

;)

from addictive-community.

halojoy avatar halojoy commented on May 28, 2024

I am sorry. I tried to make a Pull Request. But I don't know how :(
The strange thing is that the code 0.5.1 works for you, but not for me in PHP 5.6.10.

In Database.php. The Database class.

  • Block out the constructor (or delete it)
  • Make Connect public

Everywhere it is a database call:
$Db = new Database();
$Db->Connect($config);

That is all.

from addictive-community.

brunnopleffken avatar brunnopleffken commented on May 28, 2024

Yeah, that's the wierd part... I set my Apache to run 5.6.x and everything still works fine as should be... I need to see what's going on, because now I'm not relying on my dev environment that much...

OK, I'll do this modification and send the commit myself, and this fix will be credited to you in the changelog. ;)

from addictive-community.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.