Ticket #1483912 (closed Feature Requests: fixed)

Opened 2 years ago

Last modified 6 months ago

Install script

Reported by: thomasb Owned by: thomasb
Priority: 9 Milestone: 0.1-stable
Component: Core functionality Version: svn-trunk
Severity: normal Keywords:
Cc:

Description

Implement install script for new RoundCube installations. There already exists one, see http://lists.roundcube.net/mail-archive/roundcube.dev/2006/06/12/

Attachments

requirements.php (6.0 kB) - added by jpingle 16 months ago.
Simple script to check requirements

Change History

  Changed 21 months ago by bpat1434

  • owner set to bpat1434

Implement install script for new RoundCube installations. There already exists one, see http://lists.roundcube.net/mail-archive/roundcube.dev/2006/06/12/

I'm the one that started this little endeavor, and it's come to a halt because I didn't have time to devote to it anymore. I'll continue working on it as I can. I finish my semester in the coming weeks, and will be able to develop it much quicker soon. So I'll develop it again. Maybe make it better ;)

  Changed 19 months ago by jpingle

I'd also like to suggest that during the install script, the script should also:

  1. double check that the DB schema matches the current schema, perhaps offer to rebuild
  2. Check for required PHP modules such as MySQL, Sessions, Sockets, and OpenSSL.
  3. Offer to send a test message to be sure their SMTP/PHP Mail() settings actually work
  4. Offer a login test to help determine if their IMAP setup is right.

  Changed 19 months ago by thomasb

  • milestone changed from 0.1-rc1 to 0.1-rc2

  Changed 19 months ago by jpingle

I have a "requirements check" page working. I'll post it when it's a little more polished.

I also noticed that the existing work-in-progress install script is no longer at that URL. We may need to contact Brett to see if he still has the source somewhere. That way if he doesn't have the time to finish it up, someone else can pick up where he left off.

  Changed 19 months ago by jpingle

Someone posted another potential installation script in #1484242

  Changed 19 months ago by bpat1434

  • owner changed from bpat1434 to jpingle

Feel free to take it over Jim. I was going to work on it; however, I just don't really have all that much time. The forum is killing me, and way over-due for an update. I can't dig up the source, it seems to have gone away. Here's what I was thinking though:

1.) Just keep it simple, make it 2 install files: (1) Collect the information and such, and (2) Take submitted values put them in the session, and send back (in either JSON or XML) the next form to be completed.

That was my basic idea. I had planned on there being like 5 steps: 1.) Prereqs & checks (PHP version, DB, schema (for upgrade) 2.) Collect Server information & Optionals (SMTP server, IMAP server, Auth Type, Footer message, Pretty Dates, etc.) 3.) Execute DB modifications and such (Create tables / update schema) 4.) Double check everything is working properly by connecting to IMAP server, connecting to DB etc. 5.) Send them on their merry way, and have a check-box to "delete" (unset()) the two install files.

That was my basic idea / implementation. If you think of something better, go ahead. I was planning on using some XMLHttpRequest stuff so it fits into RC better. But of course, that's up to you. If you need my help on it, feel free to ask. I just wish I had the files.... not sure what happened to them.

Changed 16 months ago by jpingle

Simple script to check requirements

  Changed 16 months ago by jpingle

  • owner jpingle deleted
  • version changed from 0.1-beta to svn-trunk

Unfortunately I have not been able to dedicate any time to this, and it's not clear when I will have time. I did write a simple proof-of-concept script to check for requirements. This works fine, and could be used as is either as part of an install script or as a diagnostic tool for helping people in the forums, etc.

If my schedule clears up any I may try to work on it again, but in the meantime I thought I'd put the ticket back out there in case someone else wanted to try.

  Changed 14 months ago by thomasb

  • owner set to bpat1434

  Changed 11 months ago by thomasb

  • milestone changed from 0.1-rc2 to 0.1-stable

Not ready for the 0.1-rc2 release.

in reply to: ↑ description   Changed 9 months ago by tvk

It might also be a good idea to use the PEAR Installer. It can do automatic dependency resolution on PEAR packages (if we decide to use any, at some point) and other things that could be useful.

An interesting introduction to this topic is http://hades.phparch.com/ceres/public/article/index.php/art::pear::using_the_pear_installer::part1 http://hades.phparch.com/ceres/public/article/index.php/art::pear::using_the_pear_installer::part2

follow-up: ↓ 14   Changed 7 months ago by till

@tvk PEAR is also on my wishlist.

In general, I have a "check.php" in trunk/ which does the same. I started collecting "tests" for the more simple obstacles.

in reply to: ↑ 13   Changed 7 months ago by seansan

Let me know when a simple script (including template/HTML) is available - ie the framewrok. I can maybe help development and start testing/providing feedback.

If we can get at least a draft out there to test then I am sure that development effort will increase

Replying to till:

@tvk PEAR is also on my wishlist. In general, I have a "check.php" in trunk/ which does the same. I started collecting "tests" for the more simple obstacles.

  Changed 7 months ago by till

  • priority changed from 5 to 9

@seansan: It's in trunk/roundcubemail/check.php - give it a whirrl.

I'll try to add a check if imap/smtp works later. If you have changes, additions, please let me know.

  Changed 7 months ago by till

  • owner changed from bpat1434 to till
  • status changed from new to assigned

I am taking this ticket since no one else seems to be responding.

I didn't use any of the code, instead I started from scratch. Based on support-experience on the mailinglist, trac and IRC. This is not meant as a replacement for a real installer but more a helper to troubleshoot you.

Getting closer:
http://trac.roundcube.net/browser/trunk/roundcubemail/check.php-dist

The code is not pretty, but so far I check config files, settings and so on. The file has to be renamed to be used (as a security measure) since you can technically send emails with this and maybe annoy people.

On my todo is the IMAP check, but I need to untangle code with Thomas first because I don't know all the dependencies to load our IMAP backend on a new page without the rest.

check.php-dist also has to be edited at the very top - you need to supply an email address. We have to add a note that people don't leave this file on the server, maybe we should add something where people cannot login when check.php is in the "root"?

  Changed 7 months ago by till

Maximilian (the_glu) adds this:
http://www.pastebin.ca/901664

Will work this in tomorrow, thanks a lot!

  Changed 7 months ago by till

And another (unified): http://www.pastebin.ca/902247

  Changed 7 months ago by till

IMAP check is added in r1070.

  Changed 7 months ago by till

  • owner changed from till to thomasb
  • status changed from assigned to new

Giving back to Thomas since he wants to work on an installer.

  Changed 7 months ago by seansan

great to see the install script being developed. Should we also add some notes for the users how to fix the errors (or ate least where) when ther is a NOK?

  Changed 6 months ago by till

  • milestone changed from 0.1-stable to 0.1.1

@seansan Well, maybe. ;-) I am trying to echo errors, so that should be descriptive. I think for 0.1stable we are set.

The rest can come in 0.1.1.

If you have urgent last minute additions, I'll commit them. Let me know - otherwise we'll continue with this later.

  Changed 6 months ago by thomasb

  • status changed from new to assigned
  • milestone changed from 0.1.1 to 0.1-stable

Let's add this to 0.1-stable - work is in progress

  Changed 6 months ago by yllar

login page should redirect to installer if installer directory is not deleted (with error message) so people must delete installer to be able to log in.

  Changed 6 months ago by till

@yllar +1

Same for the check.php-dist.

Btw, there are two now. One in "root", one in "installer".

  Changed 6 months ago by seansan

Some feedback after testing: From not set correctly is a little vague to the new user where this is set (I only just found out that it is not in config - as the header referes to - but in the script.

Great work on the check!!!

  Changed 6 months ago by thomasb

Installer script to test in SVN trunk (r1156)

  Changed 6 months ago by thomasb

  • status changed from assigned to closed
  • resolution set to fixed

Fixed for now :-)

Note: See TracTickets for help on using tickets.