WordPress.org

Make WordPress Core

Opened 9 months ago

Last modified 5 days ago

#42362 reopened defect (bug)

WordPress database error Unknown column 'wp_mywordpresssite' in 'field list'

Reported by: lazam786 Owned by:
Milestone: 4.9.9 Priority: normal
Severity: normal Version: 4.6
Component: Database Keywords: has-patch needs-testing
Focuses: Cc:

Description

I am trying to install wordpress 4.8 on PHP 5.6 and Windows 7 IIS 7.5. During new installation, I gave my database details adnd table prefix as wp_mywordpresssite. It throws an error as below.

WordPress database error Unknown column 'wp_mywordpresssite' in 'field list'.

Please let me know fi anybody has any solution to move forward with my installation.

I am using old PHP version to mimic my production instance. If that be the issue please let me know.

Attachments (1)

42362.diff (665 bytes) - added by pento 5 days ago.

Download all attachments as: .zip

Change History (22)

#1 @SergeyBiryukov
9 months ago

  • Component changed from General to Database
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Hi @lazam786, welcome to WordPress Trac!

Thanks for the report, we're already tracking this issue in #40655.

#2 @lazam786
8 months ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened

Hi SergeyBiryukov,

The ticket #40655 is all about changing the error message displayed. I am getting this error irrespective of my database connection is good and it stops with this message after I provide my db creds.

http://mywordpresssite.com:8090/wp-admin/setup-config.php?step=2

WordPress database error Unknown column 'wp_' in 'field list' for query SELECT wp_

It is not able to move forward after thsi step and no DB setup is performed.

I see 40655 is close as fix provided but I dont find a fix for the above issue. COuld you please help me in this regard.

#3 @Velochicdunord
7 months ago

I also ran into this error. I've asked a question about it at the users install forum. https://wordpress.org/support/topic/problems-w-local-installation-of-wordpress-4-9-1-within-mamp-4-2-on-mac-10-11-6/

The details for my installation error as follows:

Setting up WordPress 4.9.1 within MAMP 4.2 on a Mac 10.11.6 OS for a friend to do some testing.

The installation is hanging up on the install.php file and not finishing. When I abort the installation, the files are installed, but I’m getting the white screen of death.

I’ve been using the MAMP logs to track the errors – the error message is: WordPress database error Unknown column ‘customprefix_’ in ‘field list’ for query SELECT customprefix_

While we’re using PHP version 7.1.8 within MAMP, the Mac OS is running PHP 5.5.38. I was wondering if there has been a significant change in some of the PHP call properties.

Last edited 7 months ago by Velochicdunord (previous) (diff)

#4 @SergeyBiryukov
4 months ago

  • Milestone set to Awaiting Review

#5 @SergeyBiryukov
4 months ago

#43167 was marked as a duplicate.

#6 @SergeyBiryukov
4 months ago

  • Milestone changed from Awaiting Review to 4.9.5

Let's try the suggestion from comment:2:ticket:43167.

#7 @audrasjb
4 months ago

  • Milestone changed from 4.9.5 to 4.9.6

Bumping to 4.9.6 due to 4.9.5 beta release.

#8 @blackawxs
4 months ago

I'm also having this issue as of today. Please let me know if anything appears as a red flag but I believe I have done everything correctly....

My Specs:

  • I'm working within a Windows 2016 Server.
  • I have MySQL Community (Server only installed). Version 5.7.2.1.0 Tested it and its running
  • I have PHP 5.6.35 installed. Tested it and its running
  • I have IIS10 running with FastCgiModule running to serve the PHP. No issues there.
  • I created a virtual directory on my development machine, so I am able to go to mysite.sanbox/v01/wordpress and see the default wordpress page to pick a language. That is fine. I click next.
  • I then use phpmyadmin to create my new database table. That is fine.
  • I then go back to mysite.sanddbox/v01/wordpress and I put in my database information.
  • I then click next. The next page is white and says WordPress database error Unknown column 'wp_' in 'field list' for query SELECT wp_. I have attempted a different database name and different prefix, but no luck.
  • I have attempted to install WordPress versions wordpress-4.9.5.zip, wordpress-4.9.4.zip and also tried wordpress-4.8.1.zip. Same issue in all three cases.

Would anyone have a clue as to why this is happening?

Last edited 4 months ago by blackawxs (previous) (diff)

#9 @blackawxs
4 months ago

An unexpected behavior occurred...I went into my php.ini file and set an error_log directory, and set display_errors = On. From that moment, the wp-config.php was created and I was able to complete the installation process. I'm not sure if this solved it, but I'm working again now.

...I also made sure IUSR AND IIS_IUSRS had proper permissions on the directory....

Last edited 4 months ago by blackawxs (previous) (diff)

This ticket was mentioned in Slack in #core by desrosj. View the logs.


3 months ago

This ticket was mentioned in Slack in #core by desrosj. View the logs.


3 months ago

This ticket was mentioned in Slack in #core by desrosj. View the logs.


3 months ago

#13 @desrosj
3 months ago

  • Keywords needs-patch added
  • Milestone changed from 4.9.6 to 4.9.7

Punting due to lack of patch.

#14 @desrosj
2 months ago

  • Milestone changed from 4.9.7 to 4.9.8

Moving all tickets in 4.9.7 to 4.9.8.

#15 @codewhy
2 months ago

@desrosj Can you please advise if there is any recommended workaround for this problem (I just noticed a fix has been pushed back further from 4.9.7 to v4.9.8)? I've lost a couple of days systematically trying to fix this issue, finding it mentioned in various forms, scattered across the web. I eventually decided to log it as a bug and came across this ticket when searching on the PHP error.

My situation is very similar to @Velochicdunord - I have Mac OSX 10.11.6, MAMP 4.4.1 (PHP 7.2.1) and Wordpress 4.9.5. After clicking the Install Wordpress button, the same PHP error is logged and the browser is left hanging waiting for a response.

The main difference for me is that if I then navigate to the wordpress local hosting URL, the the basic website appears and I can log in to the Wordpress editor. So the database tables are also created - BUT I have no way of knowing if the installation has completed successfully - and if it hasn't, then what issues this will cause downstream if I continue regardless.

This has stopped me in my tracks in trying to setup a local dev instance of Wordpress. Would really appreciate any advice in how I can workaround it (other than setting up a virtual private server in the cloud), or how I can determine if the local installation has in fact completed successfully and won't cause problems later.

#16 @psykro
2 weeks ago

@codewhy have you made any changes to the PHP error reporting settings on your MAMP install?

I have just tried to replicate this on a clean MAC OSX 10.11 install and a clean MAMP 4.4.1 install and the install worked as expected. So I'd like to try and find out if there's any differences between your setup and mine that would help me replicate the problem.

This ticket was mentioned in Slack in #core by jon_bossenger. View the logs.


2 weeks ago

#18 @codewhy
2 weeks ago

@psykro Thanks for looking into this.

I worked through a simple installation of wordpress and only started changing settings like the PHP error logging when I encountered the problem, for troubleshooting purposes. I did increase logging verbosity purely to try to obtain the most detailed logging possible about the problem occurring (ie. the browser hanging after clicking 'Install Wordpress' with 'Waiting for localhost' displayed on the status bar).

The last error I was able to find that was logged was: "[21-May-2018 13:19:29 UTC] WordPress database error Unknown column 'wp_' in 'field list' for query SELECT wp_"

I tried an array of other things to get to the bottom of this but without success.

Not sure if this sheds any light on the problem for you? If not, can you please advise if there is any way I can determine with certainty if the wordpress installation has in fact completed successfully?

This ticket was mentioned in Slack in #core by jon_bossenger. View the logs.


12 days ago

@pento
5 days ago

#20 @pento
5 days ago

  • Keywords has-patch added; needs-patch removed
  • Version changed from 4.8.2 to 4.6

This message is occurring because [41631] wasn't suppressing all errors, 42362.diff suppresses the error more aggressively. We want this error to be triggered (it proves that it's an appropriate table prefix), but we don't want it to be displayed at all.

This should also fix the problem where the install process appears to stall. After this error messages is displayed, setup_config_display_header() is called, which has a header() call. I suspect some browsers get confused when they're sent content, then a header, then more content.

As a workaround, you should ensure display_errors is set to 0 in your php.ini file. This will prevent errors from being displayed in the browser.

#21 @pento
5 days ago

  • Keywords needs-testing added
  • Milestone changed from 4.9.8 to 4.9.9

As this patch still needs testing, I'm moving it to 4.9.9. If an existing commenter can confirm that the bug is fixed in the next day or two, it can potential be moved back to 4.9.8.

Note: See TracTickets for help on using tickets.