Jump to content
wtrainer

Install error - Error: Exception: SQLSTATE[28000] [1045]

Recommended Posts

Hello there,

I am trying to install PW 2.4 on linux webserver

I can see the welcome message "Welcome. This tool will guide you through the installation process"

When i click "Get started" i am taken to "/install.php" with the following error:-

Error: Exception: SQLSTATE[28000] [1045] Access denied for user 'madabout'@'localhost' (using password: NO) (in /home/madabout/public_html/subdomain/wire/wire/core/ProcessWire.php line 143)

This error message was shown because /install.php still exists. Error has been logged.

I have looked in ProcessWire.php and it seems to me that incorrect mySQL config options have been passed in.

But the install hasn't asked me for any mySQL options, and i don't know where to provide them.

Could someone please help me with this error?

Many thanks,

West

Share this post


Link to post
Share on other sites

You might need to grab a fresh copy, as it sounds like you might have a partially installed copy where some settings are already present. What does the URL in your address bar show when the error occurs? You mentioned "/install.php" but what about the hostname and path?

Share this post


Link to post
Share on other sites

@wtrainer

What permissions does MySQL user "madabout" have? Make sure they can create and insert into tables. Also, is your web server on the same box as the MySQL server? If not, you probably need to widen madabout's login permissions to allow them to login from a different host.

Share this post


Link to post
Share on other sites

"madabout" isn't the user to create/edit/update the database.

PW has not asked me for any mySQL details (username, password, IP, port, etc)

Shouldn't PW ask for my credentials before trying to setup a database?

Cheers,

West

Share this post


Link to post
Share on other sites

Check your root/site/config.php for credentials. If they are there, you don't have a clean install. 

  • Like 1

Share this post


Link to post
Share on other sites

First of all, thanks for you help...

I'm downloading process wire from the PW download page using the link - Download ProcessWire 2.4 ZIP file

I'm not sure how the install can be anything but clean.

I have the following config.php files:-

~/wire/config.php

~/site_default/config.php 

None of them contain a reference to any database

Could you please specify the exact file and location to check?

PW seems to be using the main account on the server to try and access/create the database. But obviously this would require a password, which i have not been asked to enter.

Is there supposed to be a wizard where i enter my credentials when first accessing PW?

Share this post


Link to post
Share on other sites

Is it possible that you have an .htaccess file at the root of http://wire.madaboutbrighton.net/ that is not the one that comes with PW? I see that http://wire.madaboutbrighton.net/ looks just fine, but if you add anything to that url you get the error you mentioned, so I am wondering if it is loading some other content somehow via a rewrite rule or something.

Share this post


Link to post
Share on other sites

It is the default PW htaccess file. 

I simply renamed htaccess.txt to .htaccess

This really has me stumped!!

Share this post


Link to post
Share on other sites

Maybe some rewrite rules or other weird apache directives in the apache conf file?

I really don't know - sorry!

Share this post


Link to post
Share on other sites

@wtrainer

I'm just looking at the path reported in your error message; "(in /home/madabout/public_html/subdomain/wire/wire/core/ProcessWire.php line 143)." I suspect that the ".../wire/wire/core/..." should only be ".../wire/core/..." which makes me wonder if the zip extraction was to the right place. I don't know but it's the only lead I can give you at the moment.

Personally I install PW using "git clone" directly from the repos and that saves me having to worry about extracting to the right place.

Anyway, hope you get to the bottom of this.

  • Like 1

Share this post


Link to post
Share on other sites

The url of the site is: http://wire.madaboutbrighton.net/ (which works as expected BTW, until you proceed to the next step) so I think the two wires is correct, but maybe the wire subdomain is causing a conflict somehow?

  • Like 2

Share this post


Link to post
Share on other sites

yes, wire is the subdomain folder, so wire/wire is correct.

Thanks for your input though. 

I think i am going to scrap this for now, it's just too annoying.

Thanks again,

West

Share this post


Link to post
Share on other sites

But then no matter what you enter it does show the same error

http://wire.madaboutbrighton.net/klajsdlas

http://wire.madaboutbrighton.net/hello.php

...

Currently the installer shows at 

http://wire.madaboutbrighton.net/

which normally would be at

http://wire.madaboutbrighton.net/install.php

There's no way I see why PW is causing this issue. It could be an already installed PW or an .htaccess somewhere. The database credentials are stored in /site/config.php after you entered them and when PW was able to connect to DB. 

It doesn't matter what folder or sufolder PW is put. It doesn't try to connect to a db at that point as you haven't yet come to enter it. So something's wrong on the server and how you have set things up.

If htaccess is already enabled, it is somehow already trying to route to the index.php, that's maybe why it would somehow already tries to load ProcessWire.php core. But there's no way PW already knows you're database.

When I try to reproduce something alike, I can only get domain.com/randomstr to show a PW error but no sight of DB or ProcessWire.php. I can even delete the index.php and /core/ProcessWire.php and install PW fine to the very end.

Share this post


Link to post
Share on other sites

I read this over a few times and it seems to me that @wtrainer has not created the mySQL user and credentials prior to installing ProcessWire.

Edited by cstevensjr
  • Like 1

Share this post


Link to post
Share on other sites

@soma

Thanks for your comment 

If htaccess is already enabled, it is somehow already trying to route to the index.php

It made me realise what i had done. I had manually copied htaccess.txt to .htaccess before running the installer.

I've tried lots of CMS's over the past few weeks, and setting up the .htaccess before doing anything else seems to be the norm.

Very silly of me. Everything is working fine now. Thanks for all your help and sorry for wasting all your time!!!!!

  • Like 3

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By alanxptm
      Hi, I have already tried in different ways and many times to migrate but I always have issues at the end.
      Here's what I have done so far:
       
      case 1:
      1. Install PW on live server (all normal)
      2. Import local DB into live DB
      3. Front page site seems to work but I cannot login into admin page
      case 2 (I'm currently on this stage):
      1. Copied all files from local to live server
      2. Import local DB into live empty DB
      3. Front page works, but any other page and admin page are 404
       
      In both cases:
      - I have changed config.php info accordingly to live server (DB name, DB user and pwd, userauthsalt code)
      - Uncommented RewriteBase / and RewriteBase /pw/ lines on .htaccess
      - applied owner and group permissions to www-data for PW location
      - applied permissions to folders and files accordingly
      - applied a2enmod rewrite to apache2 on live server and restarted service
       
      I have read some posts (Ryan's too) about migration and it seems to me that I'm doing it fine, don't know what it fails-
      I'm on VMWare machine, Ubuntu Server 18.04, php 7.2, phpMyAdmin 5.0.1
      Hope you can help me, thanks in advance
    • By rushy
      Hi. I've been using Processwire for a few years now and installed it on a few different shared hosting servers without issues, but I'm now running into an issue on a Fasthosts shared server that I've not seen before. The installation goes ok and I have a working default site profile but I am unable to complete any uploads of images. It just hangs at the progress spinner during the upload. I thought it might be a priviledge issue so have temporarily set the dir / file privs. as 777 / 666 just to test that but it made no difference. I have no errors in the wire log. In server error log I have:
      set_time_limit() has been disabled for security reasons in ....htdocs/wire/core/ImageSizerEngine.php on line 1035 and i note in the assets/file dir. where the image is being stored the date on the file being created has a year of 1970 and 0 length. If I leave the page this file disappears and nothing has been stored. 
      Does anyone know how I can enable set_time_limit if this is likely to be the problem? 
      Many thanks! Paul
    • By Robin S
      After forgetting the class name of the wonderful AdminPageFieldEditLinks module for what feels like the 100th time I decided I needed to give my failing memory a helping hand...
      Autocomplete Module Class Name
      Provides class name autocomplete suggestions for the "Add Module From Directory" and "Add Module From URL" fields at Modules > New.
      Requires ProcessWire >= v3.0.16.
      Screencast

      Installation
      Install the Autocomplete Module Class Name module.
      Configuration
      Add Module From Directory
      Choose the type of autocomplete suggestions list: "Module class names from directory" or "Custom list of module class names". The latter could be useful if you regularly install some modules and would prefer a shorter list of autocomplete suggestions. The list of class names in the modules directory is generated when the Autocomplete Module Class Name module is installed. It doesn't update automatically (because the retrieval of the class names is quite slow), but you can use the button underneath when you want to retrieve an updated list of class names from the directory. Add Module From URL
      If you want to see autocomplete suggestions for the "Add Module From URL" field then enter them in the following format:
      [autocomplete suggestion] > [module ZIP url]
      Example: RepeaterImages > https://github.com/Toutouwai/RepeaterImages/archive/master.zip Awesomplete options
      The "fuzzy search" option uses custom filter and item functions for Awesomplete so that the characters you type just have to exist in the autocomplete suggestion item and occur after preceding matches but do not need to be contiguous. Uncheck this option if you prefer the standard Awesomplete matching. Custom settings for Awesomplete can be entered in the "Awesomplete options" field if needed. See the Awesomplete documentation for more information.  
      https://github.com/Toutouwai/AutocompleteModuleClassName
      https://modules.processwire.com/modules/autocomplete-module-class-name/
    • By gregg
      While trying to install 3.0.123, i encountered the following error: 
           Parse error: syntax error, unexpected '[' in /home/naucom5/public_html/wire/core/FunctionsAPI.php on line 469
      In cPanel, i extracted the zip file to 'public_html', which created the directory 'processwire-master', and then moved the files from 'processwire-master' to 'public_html' (which previously had 1 unrelated directory).
      Installation went well choosing Uikit profile, including connecting to database. Compatibility check ok (mod_rewrite error cleared after recheck), successful database connection, config.php saved, unchecked a few cleanup items, then the error message.
      Any suggestions appreciated. 
    • By Inxentas
      I love the option to export fields via the CMS, and wondered about using that export data in a module. Basicly, I'd want to configure a field using the CMS and then paste it's export data in the module code as a string, or save it in a seperate file I can read from the module code. Once I have that string as a variable or file, I'd want to run the same code the import option does... but then from my module code's install method!
      Is that possible? It would save a lot of time configuring fields through the API.
×
×
  • Create New...