Ticket #5235 (assigned enhancement)

Opened 11 months ago

Last modified 4 months ago

Add Pre-flight checks to install

Reported by: westi Assigned to: pishmishy (accepted)
Priority: normal Milestone: 2.9
Component: General Version:
Severity: normal Keywords: has-patch dev-feedback
Cc:

Description (Last modified by westi)

It would be nice for the installer to do some pre-flight checks and warn the users of things that will stop WordPress working (either completely or partially)

Candidates for the pre-flight checks:

  • Functions which may be disabled - See #3014
  • Memory limit #5235

Attachments

5235-functions.php.patch (1.7 kB) - added by pishmishy on 11/06/07 12:05:56.
A rough draft
5235.2.patch (3.6 kB) - added by pishmishy on 05/06/08 15:20:16.
Improved, extendable pre-flight checks
5235.patch (5.6 kB) - added by pishmishy on 05/07/08 13:09:51.
Final draft of pre-flight checks

Change History

10/19/07 17:43:21 changed by westi

  • description changed.

(follow-up: ↓ 7 ) 10/20/07 01:24:40 changed by DD32

AFAIK WordPress still uses mail() by default unless a plugin is loaded to replace it.

One check which would be good is to check if mail() is disabled.

if( null === @mail('','','') )

false will be raised if mail() is available, as the email is incorrect.
null will be raised if mail() is disabled.

11/05/07 17:03:16 changed by pishmishy

  • owner changed from anonymous to pishmishy.
  • status changed from new to assigned.

11/06/07 12:05:56 changed by pishmishy

  • attachment 5235-functions.php.patch added.

A rough draft

11/06/07 12:06:53 changed by pishmishy

I've added a rough draft of a potential preflight check. I don't know if this is the sort of direction people would like to see it take, so I'd appreciate any feedback.

11/07/07 09:48:58 changed by pishmishy

  • keywords changed from needs-patch to has-patch.

11/07/07 15:27:02 changed by santosj

There should be more logic to make sure they have Allow_Fopen_URL or the PHP configuration to get URLs. That is important, but not required.

I was thinking about perhaps having levels (green, yellow, red) that the other installers have (OpenAds?). Instead of displaying all of them, just display the yellow and halt on red (ask to continue with message saying "Hey, yo some parts of WordPress won't function correctly. Get bettre [intentionally misspelled] host."

Since I don't have any involvement, I would rather like anything that is done. The above just suggestion, if I had a chance to do something.

(in reply to: ↑ 2 ) 11/10/07 21:58:25 changed by darkfate

@DD32: Yes, there should also be check for mail()

I don't think WP should recommend a different host, but do like what's in the patch already. There should obviously be a check again button so that a person who operates their own server can change it and just hit check again and have the next button turn into a link if everything is good to go.

11/22/07 16:30:17 changed by pishmishy

I've taken some of the suggestions into consideration and I've attached a new patch. Checks can throw warnings or stop the installation completely if necessary. I've had to alter install.php too.

I've deliberately avoided adding new, more thorough checks for now and concentrated on the larger view.

05/06/08 10:53:40 changed by pishmishy

I think I need to be doing this in a more 'pluggable' style - the current patch isn't easily extended with new checks.

05/06/08 15:20:16 changed by pishmishy

  • attachment 5235.2.patch added.

Improved, extendable pre-flight checks

05/06/08 15:21:55 changed by pishmishy

  • keywords changed from has-patch to has-patch dev-feedback.

New draft of preflight check system - using hooks and functions to make it easily extensible. Note overloading of error code to distinguish between fatal problems and warnings.

To do:

- Highlighting of errors using fade box - MySQL version check

I'd appreciate some feed back on this.

05/07/08 13:09:51 changed by pishmishy

  • attachment 5235.patch added.

Final draft of pre-flight checks

05/07/08 13:11:11 changed by pishmishy

I've added my final draft for the pre-flight checks. Someone could probably do a better interface and I'm sure there are more checks we can perform, but the ground work is here.

Feedback welcomed :-)