I have written an automatic installer and universal settings.php file that I would like to share back to the community if anyone is interested, but I don't know the best/right way to do that. How do I share it?
Inspired by danielc's script, this script does the following:
- Installs the default database for a new Drupal installation and all downloaded modules.
- Installs a new domain sharing the same code base as an existing installation.*
- Supports individual databases for each site or both fixed and array type db_prefix settings.
- Automatically installs custom database tables for any modules (supports multiple-domain methods).
- Can be re-run to install any new modules*
- Supports automatic multi-site settings.php file.
With this script on your site, adding a new Drupal site sharing the same code-base is as simple as:
- Create the database, with rights to the Drupal user.
- Add the new domain as a serveralias to the Drupal site.
- Browse to the web address http://host.yourdomain.com/database/build_db.php?pw=dbpass (you must know the database user password for security).
If you are using db_prefix, you can skip the first step. I prefer using separate databases just because it would make it a bit easier if I need to move the site to another code-base.
This installer is designed and tested for 4.6 only, 4.7 promises a totally new installer framework.
The associated universal settings.php file is designed for multiple database installation (uses databases like drupal_host_domain).
If someone can let me know how to upload this (it's too big to include) or the right place, I will. Until then, if you want it, feel free to email me through the system I will be happy to email it.
Comments
Nice addition
Finally u made the multiple installation process simple. Great.
Sunny
www.gleez.com
New Version
I have a much improved new version of the auto installer which now works for every module I have tested (including e-commerce, locale, chat, and more).
It also runs from a simple prompt.
So I don't need to email it to everyone, I have put it at:
http://www.lekei.ca/dl/files/drupfile/files/autoinstall.zip
It also has the option of installing under a different DBU/password in case your Drupal user does not have CREATE TABLE rights.
It has a test mode so that you can verify the SQL before executing it.
This install includes two universal settings.php files, one for shared database and one for unique databases.
This makes adding a new site to a Drupal installation a one-click process!
Some modules still have issues
A note: Since there are no warnings on modules that have install issues, I have found that there is an install issue with Amazon, and of course with Taxonomy access (or any other module that has dependencies or WORSE -- requires patches!!!
I will determine the work-around.
Most modules install just fine. If anyone finds others that don't work let me know.
Not really a problem with the installer.
The problem was not with the installer, but the fact that several of the Amazon modules are not self-contained.
They require that their .inc files be copied to the includes directory before they will work.
Submit as a contrib module?
Submit as a contrib module? This looks good.
Tried, but not permitted
I would have loved to, but I am not permitted because I would not make it GPL. I have released it under LGPL, because I do not want to be party to usurping anyones IP rights.
In fact, I have received a threatening email for attempting to release my code under LGPL. LGPL protects the code like GPL, ensuring that it and all derivatives are free and protected, but allows you to determine what you want to do with YOUR code.
Under GPL, any module or theme created for Drupal is forced to be GPL. While I accept this as a requirement for using Drupal, I do not want to be party to it. Because Drupal is GPL and not LGPL, no Drupal sites which I create using proprietary code can ever leave my server, including providing clients with backup copies, because doing so will commit such code to GPL.
First off, thanks for the
First off, thanks for the work on this project! Have you talked to the Bryght folks about this at, as I think they have built a similar product... no need for duplication if you can combine code to make a "definitive" version.
Second, I understand that you want to license this as LPGL, which is your choice and fine by me. Drupal contributions must be GPL, that is the rules which make a lot of sense. You have permission to contribute your work, you just don't agree to the terms. I just thought that I would clear this up on this thread so that people don't get the wrong idea about contributions being accepted.
-------------------------------------------------------------------
Rick Vugteveen | Image X Media (work) | Blog (personal)
-------------------------------------------------------------------
Rick Vugteveen |rickvug.com @rickvug on Twitter
You are free to use it under GPL
First off, thank-you I am happy to contribute, and would gladly do so voluntarilly. I have been involved with free software since the late 1990's.
You are free to use it under GPL and force others to do so, but your efforts will probably be thwarted by the fact that I have released this under LGPL as well. Since LGPL is GPL compatable, do as you feel you must.
The only difference is that LGPL does not force you do use only GPL work in a project for someone else, so if you want to use it in a project that contains some of the client's code under NDA or you want to use it in a project with some code you licensed from someone else, I will not force you to join the churh of Stallman.
I happily contribute what I can but will not force others to do so. That is against my personal code of ethics.
I believe in freedom in the Roddenberry sense (eg. Prime Directive and IDIC). That is not the same as the Stallman philosiphy of "freedom" to believe and think what you want as long as you believe and think and do what I want (or what the state wants, as in the case of American style "freedom" -- ask any cancer sufferer who wants relief from the nausia of chemotherapy if that is freedom).
Under LGPL, if you work on THIS code, you are required to return it to the community, which is only fair, but you can do whatever you want with YOUR OWN work, and you have the freedom to associate with and collaborate with whomever you want.
gpl only?
just a rebuttal here but http://ohloh.com/projects/3189 says that the gpl is not the only license being used in drupal. in fact, the dominant license is the "new bsd license". furthermore, there is lgpl code in drupal and apparently quite a bit too.
__________
http://namima.in-egypt.net اجدد اخبار ممثلين
http://www.echognumix.com
Sorry, I forgot.
BTW The Bryght provisioning system is proprietary.
Under GPL, they can do that because they wrote it and use it in-house, and choose not to release it to ANYONE.
They are releasing the
They are releasing the system back the community. I'm not sure if it will be GPL. Here's where I heard this from: http://drupal.org/node/65896
-------------------------------------------------------------------
Rick Vugteveen | Image X Media (work) | Blog (personal)
-------------------------------------------------------------------
Rick Vugteveen |rickvug.com @rickvug on Twitter
That looks cool
There is not much about it, but it looks cool.
I am not sure it does what this does, which is support an indefinite number of sites on one code base for someone who only has HSphere or CPanel plus FTP and/or Webshell plus PHPMyAdmin access to their site. Since quite a few people seem to have a problem with even doing a ServerAlias, I suspect it is common.
I offer hosting (http://hosting.lekei.ca) and even I do not have shell access to my servers (I use a managed server).
If the provisioning system requires special applications or languages, or even Apache2 or PHP5 I personally cannot use it at this time (that would require going back to every single site I have ever done and re-working it for free).
If it addresses all of the above, and handles modules that don't even implement the current limited installer functionality, great!
Thanks, btw.
Thanks, glad that I can give something back to the community.
thank-you
I just saw this thread and read it all. Thank you for sharing the installer even unofficially.
Great! I'll try it.
Great! I'll try it.
update?
lekei
got a couple of questions:
1. i used http://drupal.org/node/37177 to set up my multisite but i havent gotten round to the database yet when i found ur autoinstaller.
so, does the autoinstaller also do the 4 steps mentioned there ala salvatore's method?
2. once i placed the files in the necessary directories, i ran build_db.php and got
how do i continue? could u tell me in simple baby steps?
3. when's the next version/update of the autoinstaller going to appear?
thanks
__________
http://namima.in-egypt.net اجدد اخبار ممثلين
http://www.echognumix.com
Skipped files are already installed
The message "file skipped" means that the file has already been installed, so it stops installing that one and moves on to the next.
This is so if you add new modules to your site, you can re-run the program and it will install the new files.
If you get that message then you have either partially installed the site already or you are sharing tables with another site. See the settings.php files provided with the installer, they automatically provide all of the settings for multiple sites using either separated tables (using table prefixes) or databased (using a database prefix).
Of course you can use a manually configured settings.php for each site, but be sure that you change each one to use unique tables/databases
I have a new version which does more...
V3 also allows you to have a database file which sets the title, email address and timezone for your site. It also lets you manually install one site, enable the modules and other config options, then when you create another site it can update all of your preferred default settings.
It also includes each site in a global cron task.
I am documenting and packaging it. I will set it free in a couple of days.
bug?
i think i found a bug:
my domain name has a - (dash) in it.
danke
__________
http://namima.in-egypt.net اجدد اخبار ممثلين
http://www.echognumix.com
One of my domains has dashes
One of my domains has dashes (help-my-pc.com), and I tested the install script there.
There are some sql statements that the last version couldn't handle, although none of the modules I tested it on had any of those commands.
If you would send your your settings.php (xxx out the password) and the name of the module it was processing when the error occurred (preferably a copy of the output -- press ctrl-a ctrl-c and past it into an email I would appreciate it).
send it to drupal70249@lekei.ca (a special email address for this post).
settings.php
email sent. hope it will help with the debugging
ps. the drupal install is still the default install. no extra modules have been added yet.
thanks
__________
http://namima.in-egypt.net اجدد اخبار ممثلين
http://www.echognumix.com
Dashed
It turns out out that, contrary to the MySQL documentation, dashes are not permitted in table names. It worked fine with database names.
I have changed the regexp to strip dashes. This will have the added feature of making sites with and without dashes being the the same.
Anyone who installed their site with Version 1 or 2 of the installer will need to change the following line if they upgrade to the new version of settings.php
Change:
to
New Installer Version 3.2
I have considerably enhanced the installer and there is a new version (3.2) available at the same location:
http://www.lekei.ca/dl/files/drupfile/files/autoinstall.zip
NEW FEATURES IN VERSION 3:
- Single automatic / universal settings.php file only need to set-up once per server
- Handles either the table-prefix or unique database options with the same file.
- Automatically adds new sites to the cron chain. Only a single cron entry needed.
- Automatically suggests and sets site title, server email address, site timezone
- Automatically sets site and module options to match a reference site
- Tool-tip help on wizard screen
- Default settings for debug, install, and defaults
- Settings.php debug screen in case you are having trouble with settings
- Safe Mode with http://yourdomain?SAFE_SETTINGS
- Automatically prompts you to the create admin user or go to site home on completion
- New gui has wizard feel.
- Fixed issue with MySQL < 4.1 table names (dashes in file names)
- Automatic TMP and FILES settings
Improved documentation in the readme.txt file.
Amazing
Great job lekei, this is really useful.
--
Web Hosting
Thanks!
Glad I could contribute something back to the Drupal community.
v3.2
hi
thanks for the new version of the autoinstaller
1. what is the advantage of automatic tmp and files settings?
2. how do i change the default email without typing it in everytime?
3. u said in the readme "Add the new domain as a serveralias to the Drupal site (not needed if you use a catch-all domain). "
what is serveralias?
what is a catch-all domain?
4. why does the wizard ask for username and password while they are in the settings.php already?
5. it still says
unable to select database(see below 10.)6. does it still not support multisite via directories?
7. have u tried 4.7cvs yet? i had a look yesterday and apparently multisites have no changes
8. isnt it a security issue leaving settings.php in the root directory?
9. when i type the url http://domain.tld/settings.php i get this errror msg:
Parse error: parse error, unexpected ')' in /home/marafa/public_html/drupal/settings.php on line 24810. i uninstalled my database and files and started again. the tld domain works now.
11. how do i make a new multisite instance of drupal? when i go to
new.domain.tld/build_db.php it says domain not found also when i go to http://{domain}/settings/default/build_db.php.. same thing.
12. can u please release the files in autoinstall.VERSION.version.zip format? i got several on my disk now and am getting confused ;) . plus can u zip the directory within the files?
thanks
__________
http://namima.in-egypt.net اجدد اخبار ممثلين
http://www.echognumix.com
Re: v3.2
1. FILES appears to be an issue for multisite installations, and having TMP point to a directory visible to the web server appears to be a security risk. I have not yet received a response to http://drupal.org/node/38774 so while the capability is there, the options are currently turned off (see that post for details).
2. It is essential due to spam filters that your email come from a valid domain for your server (see: http://drupal.org/node/38510#comment-71180) If the default for your system is constantly different, simply change this line (about line 116):
Re: v3.2
Sorry... running around today, so I will answer these points as I have time and a hotspot...
3. ServerAlias is a directive in your httpd.conf file (Apache -- see: http://httpd.apache.org/docs/1.3/mod/core.html#serveralias)
If you have direct access to httpd.conf then add a serveralias for each host name you want to use such as:
or a catch-all like:
As your LAST DEFINITION IN httpd.conf you can even put:
Which will make ANYTHING NOT CAUGHT BY ANOTHER HOST DEFINITION go to your Drupal server.
If you don't have direct access to httpd.conf but use an interface like cpanel or hsphere, there will be a Domain Alias and/or a Host Alias setting.
I know that, at least for HSphere, you cannot define a catch-all unless you are on a static IP.
Re: V3.2
4. The wizard asks for the password to validate that you know the database password for the drupal server. Otherwise anyone could go to your site and mess it up. You might even want to add security above this (SSL, htaccess, etc.). Since there is no admin user at this point, the DB User is all it has to validate against.
As long as you are using the default database user, you don't need to enter the name.
The username is an optional database username in case you have restricted what the drupal database user (as specified in settings.php) has rights to. If you enter a password AND username, then those are the credentials used to access the database server instead of the ones in settings.php.
Re: v3.2
5. Your original settings.php file (that you sent me) had the database settings in the wrong places. Since you somehow got it to run part way, I suspect that some values were messed up.
Note to avoid confusion, if you had an older version of build_db.php installed in the /database folder please delete it.
also related - 9. and 10.
there should be no settings.php file in the document root folder (although this could be an artifact of clean urls).
settings.php, build_db.php, allcron.php and options.mysql (if used) should all be in the /sites/default folder
9. OOPS!
Thank-you for pointing out the small but significant typo in the documentation. The steps to running the wizard should be:
1) Create the database, with rights to the Drupal user (Not needed if you use the table-prefix method).
2) Add the new domain as a serveralias to the Drupal site (not needed if you use a catch-all domain).
3) Browse to the web address http://{domain}/sites/default/build_db.php (you must know the database user password for security).
4) Enter the password of the Drupal user (in your settings.php file). If the drupal user doesn't have table create rights, then enter the user name and password of a database user who does.
5) You should do a test run first with Show SQL Only checked to see if you have any problematic modules. When you are sure it works on your system, check RUN SQL.
6) Click Start.
Re: v3.2 -- 6)
Nearest I can tell there is no way to have Drupal function in multi-site mode using a common sites/default/settings.php file. If someone can show me how that can work, I will add support.
Right now, if you manually edit the settings.php file to add a hard coded table prefix, the installer will still handle the rest. If you use the Drupal version of settings.php with all manual settings, it will work fine, install all modules, build all databases, and even build the cron chain properly.
Of course only my settings.php file gives you safe mode and debug mode. Just copy it and set:
lgpl
hi again
doesnt lgpl mean that anyone can take the code and re-release it? as say gpl ?
__________
http://namima.in-egypt.net اجدد اخبار ممثلين
http://www.echognumix.com
Re v3.2
7. no, it can't be used, so I have to wait
8. settings.php shouldn't be in the root directory. Rememger that you can't "include" a file from another site (well.... if you do, it's output is included, not it's code.
12. The reason file names are not versioned is so the above dowload link will always give you the latest version. I always version the readme file to match the higest version in the file.
The Drupal licence agreement (GPL) requires that all files have the revision number and date.
Can we see screenshots
Can we see screenshots anywhere?
Sorry, I would love to
I would love to but they are blocked on drupal.org.
Even if I put them on my server they are stripped from the post.
Not true.......
Not accurate.
Drupal.org does not permit the use of
<img>tags. The entity known as Drupal.org is not preventing you from putting<a>hyperlinks that people can click on to go see screen shots on your site. You yourself successfully used<a>links in your intial post for this.At the bottom of your submission is the Input format's that are allowed for people to post. You may have previously missed it. I have copied it here with the use of the
<code>tag-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Emailed you
I emailed you but didn't realize you had created a newer version. By the way, does this new installer work with 4.7?
Perhaps I should just pose my other questions here:
Is TYPO3 similar to Drupal?
And can Drupal serve the purposes of an artist (writer/photographer) like myself?
I'm learning as I go
Version 4.7
I don't know if or when the auto-installer will work with 4.7
I am avoiding looking at 4.7 yet because I am sure it will be a huge amount of work (based on 4.5 to 4.6) to migrate to it and I have no compelling reason to do so, at least until all modules and themes have been migrated.
In the past whenever a minor revision (version + 0.1) occurred all modules and themes were not compatible.
I heard that 4.7 already has an installer so I doubt that this will be either compatible or necessary anyway.
If it is possible to migrate, I will likely need to write some sort of script to migrate an entire installation to 4.7 and I will let people know.
versioning
Please note the Drupal version scheme.
The X.Y is not a minor release. The Z position indicates a minor release version.
More information can be found here.
-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
Thank-you all for the feedback so far.
Version 3.3 (please consider this beta since more people with differend configurations are using it now) fixes some minor bugs and typos.
(the version # is in the readme and files).
Notibly, allcron hadn't been doing much usefull and now that error has been fixed.
I will put screenshots on a page as soon as I have time.
Back on...
The zip has been re-enabled (http://www.lekei.ca/dl/files/drupfile/files/autoinstall.zip)
I disabled it while checking out the issues with sites that use the form
http://yourdomain.com/site1, http://yourdomain.com/site2... and a few issues with the auto-install option.
This is still not supported (as of version 3.3.2) but I am working with marafa to add it in the next rev.
i cant find the line that
i cant find the line that says
which file is that?
__________
http://namima.in-egypt.net اجدد اخبار ممثلين
http://www.echognumix.com
i cant find the line that
i cant find the line that says
which file is that?
__________
http://namima.in-egypt.net اجدد اخبار ممثلين
http://www.echognumix.com
Build_db.php
The line that calculates the default email address is about line 116 of build_db.php.
It sets the default to system@{the domain you are accessing}.
system should be an email alias. It is always advisable to avoid using real email addresses for anything to do with a web site, That way you can change the email address later and point the one that was on your site to the bit bucket.
It is not recommended to change this to be your real, permanent, email address.
error in build_db.php
There's an error in build_db.php line 887
if( execute_arrays_queries(do_update_inserts(get_queries_for_settings($settings, $queries)))) $success++;
variable $success is undefined , moreover process_options() function should return a value an easy patch will be :
--- build_db.php 2005-11-25 19:18:56.000000000 +0100
+++ build_db.php.new 2005-12-14 06:08:28.000000000 +0100
@@ -859,7 +859,7 @@
global $site_name; $l_sn = strlen($site_name);^M
global $site_mail; $l_sm = strlen($site_mail);^M
global $date_default_timezone; $l_tz = strlen($date_default_timezone);^M
- ^M
+ $ret = 0; ^M
// system settings will get processed with options.mysql^M
$queries=array(^M
"UPDATE variable SET name = 'site_name', value = 's:{$l_sn}:\"{$site_name}\";' WHERE name = 'site_name'",^M
@@ -884,9 +884,9 @@
^M
}^M
}^M
- if( execute_arrays_queries(do_update_inserts(get_queries_for_settings($settings, $queries)))) $success++;^M
+ if( execute_arrays_queries(do_update_inserts(get_queries_for_settings($settings, $queries)))) $ret=1;^M
@flush(); // let user see what's going on in real time^M
- ^M
+ return $ret;^M
btw , great script !
You are right!
Thanks,
The line was moved from somewhere else and I missed that.
PHP4 doesn't complain, while it may be unclean, it auto-initializes the variable.
Being a fan of the simple solution though, I would just change it to:
$succes = (execute_arrays_queries(do_update_inserts(get_queries_for_settings($settings, $queries))))?1:0;
@flush(); // let user see what's going on in real time
return $success;
Which will be in the next version.
-Don
Does the installer works with civicrm 1.3 like in civicspace?
Happy new year to everyone! The autoinstaller module sounds impressive and powerful!
I am just wondering if it works fine with the civicrm1.3beta module in drupal4.7beta like in civicspace0.8.2 (with civicrm1.2)?
Also, how can one install extra modules after installation with the autoinstaller?
Will the autoinstaller allows multisites to use different modules? Just wondering. Thanks!
Stripping port numbers from URL
My sites have a non-stardard port in the URL, like www.example.com:8090. As you know, the script uses the URL to create the db name. But MySQL balks at having a ":" in the name of a database. What do I need to edit to have the port number ignored when the script is building the db name?
The magic is in one regexp
All you need to edit is the regexp that builds the prefix in settings.php.
It is currently:
If you want to ignore the port (ie. the port will not affect the database/table used) then change it to:
If you want to have different Drupal site on each port, simply change it to:
Tip: If you are playing with the file and want to debug what settings.php creates, simply edit line 11 to read:
then you can access your server with http://www.mydomain.com:8001?DEBUG_SETTINGS
and get debug information about settings.php
It now works.
I have tested it on a server with a different port and adjusted the examples above so they actually work! :)
Interesting though... without this auto-settings.php drupal doesn't use the settings file you would expect!
I like the idea of test sites on different ports so I will keep this change in the next version.
Thanks - I'll try that!
I am going to try and implement that this week.
Thanks again!
Neat stuff - already screenshots anywhere?
Hi Don,
Just by coincidence I found this post. It all sounds pretty neat and promising - if it already isn't! Can we see screenshots -or something- anywhere? Did you get some feedback from the core committers (as I'm just wondering if something like this can make it into the core download)?
___________________
UPDATE:
Sorry, too late read your post about GPL/LGPL. But still... In my opinion, something like this should be part of Drupal core. I've seen several people struggling while installing Drupal. It's not that difficult really, but if one is a 200% non-techie it can be be overwhelming and hard working. For these people, an installer will be a gift from heaven.
Instead of Wordpress's Famous 5 Minute Installation,
Drupal will compete with the Even More Famous Press A Button Installation, ha ha!
___________________
discover new oceans
lose sight of the shore
Screen shots
I haven't stripped the 4.0 version down for release but will very soon... I think it will be VERY soon.
I have slapped up some temporary screen shots for you, (screen shots are not permitted on Drupal.org).
The screen shots are at:
When you go to /sites/default/build_db.php
When you are done.. This example is when you are initializing a site which had no database created).
When you go to an uninitialized site after the main Drupal database has been created.
You need to enter the path to the installer the first time in Drupal 4.7 because Drupal 4.7 traps the initial database error and never goes to the installer.
Looks good!
Thanks mate, looks good!
Wish you loads of success with finishing this product!
___________________
discover new oceans
lose sight of the shore
not reliable- sql problem
I'v tried the script and found a main problem.
I made a test drupal site with almost all the modules in the modules directory ( about a hundred :) --> drupal 4.6.5) with empty database and run the script. As my experiences, the program omits some module's sql file. E.g: acidfree, buddylist, checkbox, css, folksonomy, interwiki, mailhandler. I needed to import these database schemas manually. Some of them named the srcitp "modulename.sql, not modulename.mysql, but some had modulename.mysql but the script cannot perform them either.
If you send me the list...
If you send me the list of ones it can't process I will check it out.
Don't count any that do not follow the Drupal convention of xxxx.mysql or xxxx.pgsql since those modules will not be processed unless you rename the file to the database you are using.
If the module's sql file results in an "exists" type warning, it will be taken as installed already and the rest of the file will not be processed.
There are also some uncommon alternate syntax formats for a few sql statements which result in the column name being in a non-standard location. You may need to modify the sql files for these modules using a regexp search and replace. Remember that this is just a script and not AI :)
Sorry, I am very busy on another project right now so it may take a while.
Invalid argument supplied for foreach()
Invalid argument supplied for foreach() in .... build_db.php line 727.
Getting the above error trying to install on clean system:
using version 4.6.5 both with and without installed modules
any ideas?
Mike
foreach problem solved ?
In case someone else is having a similar problem, I hope this may save a few hours of flustration, I made the following changes to test if the array of files is empty and it seems to have solved the problem, but I suspect if may not work if any extra modules are installed:
Replaced the following:
with
I also added the following to build_db.php to get round an invalid call to check_plain
Anyhow possible in a folder ?
What do i need to change, if the base URL is not $_SERVER['PHP_SELF'] !!!
I have mulitple websites under the www root, and i cannot make things more confusing by installing one web under the root !
So, what do i need to change with "search and replace" functions in the files to get it work under drupal wich is in a folder named "portal", and accessed like www.mysite.com/portal or subdomain www.porta.mysite.com .
2) Add the new domain as a serveralias to the Drupal site
As fot the aliases... i assume i can create these with CPanel... they are the same as subdomains, right ?
I dont have any permissions to change the server config files. I hope this is not a limitation for using this script. But im not sure how to handle ( set up ) these alias things..
I have been tryng to get it work in drupal which is in a folder, but all i get is:
Found no valid settings.php for site ***
***build_db.php on line 281
And this after i fixed the include paths with URL paths, because the script didnt find the settings, it looked for the settings uner www root / sites / default, but there should be "portal" also in the path.
non-trivial
What you ask is non-trivial.
I assume that you want to use the auto-installer AND the auto settings.php.
I had never considered putting drupal installations that start at a ceartain path.
What you should start with is enable debug mode by setting
$ALLOW_DEBUG_SETTINGS = TRUE;
This will allow you to access your site with http://yourdomain?DEBUG_SETTINGS and get a report of what is being passed to settings.php.
The hard part is that I have no idea how to make build_db.php work in those circumstances, since it would not know what site it is configuring.
If you get me information...
If you try DEBUG_SETTINGS and give me the reports for a couple of sites, I can include it in the new update of the installer.
It now works for 4.6 and 4.7 and has a few more features.
DEBUG_SETTINGS
DEBUG_SETTINGS ?
If you mean PHP settings, then i cant change them. I am using a hosting service, so i have no access to these settings. If it is somekind of other settings, then where do i need to change them ?
It is a feature of my settings.php
If you are using my settings.php look near the beginning, you will see a line:
$ALLOW_DEBUG_SETTINGS = FALSE;
change that line to:
$ALLOW_DEBUG_SETTINGS = TRUE;
Then access your web site with ?DEBUG_SETTINGS added to the end of the url (if you parameters in your url already then use &DEBUG_SETTINGS, of course). For example:
http://notarealdomain.com/pathtome/?DEBUG_SETTINGS
I have spent considerable time with one user (see above) trying to get relative paths to work, so I will not be supporting it in the foreseeable future (but things change).
Auto installer V4 released (supports Drupal 4.7)
The new version of the installer Works with both Drupal 4.6 AND 4.7.
It can be downloaded from the same location as before ( http://www.lekei.ca/dl/files/drupfile/files/autoinstall.zip ) and the readme file can be found at: http://www.lekei.ca/dl/files/drupfile/files/readme.txt).
New in Version 4
Can you use this to upgrade
Can you use this to upgrade a 4.6 installation to 4.7?
Do you mean a 4.6 multi-site to 4.7?
Do you mean a 4.6 multi-site installation to 4.7?
There really is no way that I can see to "upgrade" from 4.6 to 4.7. Before that statement get this discussion dragged off-topic, let me clarify:
Modules and themes are not portable from one version of Drupal to another. This is a long-standing core principal of Drupal, it has been covered in other threads.
That means that unless you use only those modules and themes that continue to be maintained AND you rewrite all of your custom modules and themes, you can't directly upgrade from 4.6 to 4.7. You are best to just build a parallel system and migrate one at a time as functionality is ported or replaced in 4.7.
This installer can make it a bit easier, however. You can do like I am doing: run a parallel server and migrate one site at a time by simply moving the serveralias from the drupal 4.6 installation to the 4.7 installation. If there are options you want to set, you should be able to use the options.mysql file to help set them on all sites.
Migrating content and user databases is another BIG challenge, way beyond the scope of this, because the autoincrement indexes and cross references tend to get messed up.
Maybe it's a job for Ethan in "MI:4.7", or perhaps just a topic for a different forum thread...
Auto Installer Looks Interesting
This Auto Installer looks interesting.
Stephen
winterssewing.com/drupal
where do you go?
Hey, wanted to download and try this but the links are dead anyone know where i can download the autoinstall
Problems with setting up
Thank you for your awesome job!
But I got some troubles. I can set up the database. After seting up the database, I click "add your admin user" and then I added my user. But the problem happens. after I added my user, it will turn to "http://localhost/user/1" without "?q=" and all the links will have the same problem. Every time I click the link of the website, the "?q=" will disappear. So the it always tells me that Object not found! Is it a bug? or do I miss anything?
Another question is that, how can I dicide the prefix of the database. Its default prefix is "localhost_". I don't know how to change it.
Any help would be appreciated.
Defaults
The defaults are set to clean urls.
If your system cannot support clean urls, then I would suggest that you do one or more of:
a) Clear the checkbox "use clean urls" on the wizard screen
b) DO NOT use options.mysql, the one provided is meant as a sample and it turns on clean urls
c) Change ISPs! There are many drawbacks to not having clean urls, including poor search engine placement
The database prefix is created from the domain you use. If you are developing a site testing it on your computer, I suggest editing your HOSTS file to to make a dev.domain.com version of your site. The auto default.php file provided will ignore dev. hosts and treat them as equivalent to www.
To allow you a staging server on your host, it also ignores new. in the same manner.
continuing development?
hi don
is the script still under continuing development?
if so there are a few things i found regarding the package
1. oops shoudl be changed to "Passwords do not match!"
2. shared tables across sites do not work
3. debug needs to be a little bit more descriptive
regarding points 1 and 3 .. i have done the changes.
other than that ..
thanks for an amazing piece of coding
__________
http://namima.in-egypt.net اجدد اخبار ممثلين
http://www.echognumix.com
Choices
Thanks for the comments. I continue to use and support the installer, although a bit over 1000 unique people have downloaded it, the Drupal core developers are not interested in permitting it to be contributed and one person in particular has prohibited my contribution. Now there is a different capability built into core.
Error messages are intentionally obscure. Just like any log-in system, where there should be no "wrong password" message, to reduce the information provided to unauthorized access attempts.
If you follow the instructions and you get everything right then it works.
Shared tables do work, you need to specify the tables to share in settings.php as normal.
The debug functionality is really intended as a "place your debug code here" kind of thing. Because I wanted to add this functionality without hacking and patching core, the only place to add this kind of function is in settings.php. I wanted to keep the inserted code to a minimum since it will be included on every page.
If you have some suggestions for additional debug info let me know.
debug info
all i did was added all the variables available into the html part of the settings.php script:
and in build_db.php on line 297
i strongly recommend changing the "oops" coz i spent quite a while before figuring it out :(
__________
http://namima.in-egypt.net اجدد اخبار ممثلين
http://www.echognumix.com
I just discovered your great
I just discovered your great code. It worked perfectly. It is a shame that you cannot contribuite it to the modules section. I don't want a get into this because there are some issues that I don't fully understand. I understand, however, your desire of releasing this as LGPL and that all Drupal contributions have to be GPL.
My question has already been made here but couldn't see an answer: would LGPL allow anyone to work on this code and re-release it as, lets say, GPL, thus as a Drupal module? Would that be possible?
Thanks for your time and work.
Of course
Thanks!
LGPL is not as restrictive as GPL. Anyone can include LGPL code in a GPL work.
The primary difference is that LGPL code can be used in a project along side proprietary code or code licenced under another licence (such as a commercial library) or any other code that you do not have the legal right to distribute.
You cannot, however, modify LGPL code and re-licence it as proprietary.
Thanks lekei. I also read
Thanks lekei. I also read about this somewhere else. I will give a try to implement this as a module.
---
Robert Garrigos
Professional site: robert.garrigos.cat
Catalan Drupal Users Group: drupal.cat
GPL vs. LGPL, why not GPL/LGPL instead?
Hi lekei,
I apologize if this is inappropriate here, as I came across this thread while looking for some multi-site setup help.
Please pardon the superficiality of my questions, as I don't have time to get into GPL = good/evil debate *ducking for cover*, nor did I thoroughly read the fiercely debated pros/cons of Drupal GPL discussed in other threads.
Couldn't you release this code under a dual GPL/LGPL license, effectively neutering this debate? Wouldn't that appease the Drupal gods and provide the holy grail of inclusion on drupal.org, while providing you with the "freedom" for client NDA that you desire?
I guess I'm not seeing why this has to be such a black/white issue. Is dual licensing not an option? As far as drupal.org is concerned, it would be included as GPL. Adding LGPL terms (as the author of your module) only adds to your "freedom" and that of your clients. As a developer that is required to modify a module for a client under NDA, you could then choose the LGPL for your client's fork and you and your client would be happy... no?
Again, sorry if this seems superficial, but I haven't had the need to scratch below the surface as of yet. Why does this have to be either or, if BOTH is an option?
Good luck, and I hope you get this cleared up for your benefit as well as the Drupal community.
shared tables
hi don
i dont know the database structure of drupal but i have come across an added feature request/help.
for every site that is created that does not use the default language (english). the translation files must be imported. that is imported for every site. that import process is time consuming, process consuming and repeated every time new translation files are released.
what i would like to do is have the translation tables shared across all the sites so i only have to import once.
so my question is .. in the settings.php what tables are required to be shared?
thanks
http://namima.in-egypt.net اجدد اخبار ممثلين
__________
http://namima.in-egypt.net اجدد اخبار ممثلين
http://www.echognumix.com
Unknown MySQL server host
Hi, On trying to run the script, I keep getting this error: Unknown MySQL server host '{localhost}' (1)
It doesn't matter if I put the actual IP address of the MYSQL server, or the actual server name in, the same error shows up.
Any ideas?
I have been using your
I have been using your muli-site for several months now and find it very useful. Thankyou greatly for this module. Too bad about the licensing issue. It is what it is though.
Any plans to upgrade to 5.1? Or any thought on upgrading a mulitsite installation to 5.1? To clarify, from 4.7 to 5.1.
All good things must come to an end, enjoy them before they do!
Check out DreamHost.com for down to earth hosting. If you like, use 'KarmaSpread' to save some $. 10% of my referral goes to charity.
No plans for V5 etc.
From what I understand Drupal 5 has it's own auto-installer. I assume that like everything Drupal it will seem easy to use once you spend a few weeks studying it and unlearn everything you have ever learned in your life thus far.
I have personally stopped using Drupal since they decided to change the module names for every revision of every module making it impossible to automate the process of keeping a Drupal server up to date.
The Drupal philosophy of throwing all your work away every few months and starting anew does not fit my lifestyle.
Note: The licence for the installer permits anyone to take the code and un-release it as GPL. ("Unrelease" because they are adding restrictions to it making it less free). My original code, of course, can be re-released as free software, GPL'd software, or kitty-litter for that matter because it is free.
Keep your Drupal 5.x site up to date with Update Status module
@don
Keep your Drupal 5.x site up to date with Update Status module
http://drupal.org/node/124187
__________
http://namima.in-egypt.net اجدد اخبار ممثلين
__________
http://namima.in-egypt.net اجدد اخبار ممثلين
http://www.echognumix.com
4.7.6 and 5.1
hi don
does the autoinstaller work with versions 4.7.6 and 5.1 ?
is there a new version of your autoinstaller?
_________
http://namima.in-egypt.net اجدد اخبار ممثلين
__________
http://namima.in-egypt.net اجدد اخبار ممثلين
http://www.echognumix.com
bug found
hi don
i just stumbled over a bug which is why i was asking if the autointaller worked in 4.7.6.
apparently, when you do a fresh install (as i was with 4.7.6) and want to use shared tables. it wont work with db_prefix.
the result is that ALL drupal core modules will be created without db_prefix (subdomain_domain_tablename) format. ie. with the default (tablename only)
__________
http://namima.in-egypt.net اجدد اخبار ممثلين
__________
http://namima.in-egypt.net اجدد اخبار ممثلين
http://www.echognumix.com