Installation errors in Aegir with php 5.3.1 update - Where to go for help

Events happening in the community are now at Drupal community events on www.drupal.org.
LittleLion's picture

What is a good forum to ask about / help correct problems found in the Aegir install scripts?

I am just starting out with drupal 6.17, but the current Aegir install scripts are generating errors under php 5.3.1:

strtotime(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone

profiles/hostmaster/modules/hosting/hosting.queues.inc on line 57
profiles/hostmaster/modules/hosting/hosting.queues.inc on line 58
profiles/hostmaster/modules/hosting/cron/hosting_cron.module on line 9
profiles/hostmaster/modules/hosting/hosting.queues.inc on line 116
profiles/hostmaster/modules/hosting/hosting.queues.inc on line 57
profiles/hostmaster/modules/hosting/hosting.queues.inc on line 58
profiles/hostmaster/modules/hosting/cron/hosting_cron.module on line 9
profiles/hostmaster/modules/hosting/hosting.queues.inc on line 116

Installation aborted.

Is there a separate group for the hostmaster profile? If not can someone here help me patch these files with correct code?

How do we submit a problem or a solution back to Aegir?

Thanks for any help,

Matt

Comments

Solution

LittleLion's picture

As nobody pointed me where to post the solution here is the fix in case someone else has run into this:

The first 8 errors were due to lack of TZ information in PHP, edit /etc/php.ini and add the timezone default. In my case it is:
date.timezone = 'America/Los_Angeles'

The 9th error was caused by a new restriction in PHP 5.3.1. You are no longer allowed to have spaces in command names and the Aegir install scripts use this. The fix is to temporarily accept spacey commands in a new drush preferences file:
cat >> ~/.drush/drushrc.php <<EOF
<?php
$options['allow-spaces-in-commands'] = 1;
EOF

php -v

whatdoesitwant's picture

Thanks for the pointer. I just set up a new dev box for Drupal 7.
Obviously supporting php5.3 is not a priority but it would be weird to roll back to php 5.2 when it's the default in Ubuntu Lucid and supported by D7.

Anyway, here's an example of a fast edit from the shell on Lucid to add the timezone (in my case Amsterdam):
#In PHP 5.3 the timezone may no longer be derived from the system clock. Specify it.
sed -i "s/;date.timezone =/date.timezone = 'Europe\/Amsterdam'/" /etc/php5/apache2/php.ini
sed -i "s/;date.timezone =/date.timezone = 'Europe\/Amsterdam'/" /etc/php5/cli/php.ini

I just installed aegir-0.4-alpha11 and it recovered from its errors during the installation. So although with a list of warnings, Ægir still seems to have supplied me with a working installation on php 5.3.2.

Hi whatdoesitwant, I was also

LittleLion's picture

Hi whatdoesitwant,

I was also able to install Drupal and Aegir under PHP 5.3.2. It appears to be running at this time.

I had to make a few small changes such as setting the TZ, installing Console_Table and allowing spaces in drush commands.

It looks like nobody has made it their personal priority to fix the things the php guys broke in this last update. It is easier to say 3.5 is not supported than to test it to make sure that production sites don't go down unexpectedly.

Matt

Well, a lot is going on

whatdoesitwant's picture

Well, a lot is going on ofcourse (with all the multiserver and dns stuff, copenhagen coming up and everyone busy on D7). I am sure that this will get solved in a later iteration.
However, I did notice that the nagging warning while running aegir on php 5.3 (you know, Parameter 1 to admin_menu_admin_menu() expected to be a reference) is mosttimes imported from the contrib module admin_menu.
Adjusting hostmaster.make from
-- projects[admin_menu][version] = "1.5"
++ projects[admin_menu][version] = "1.x-dev"
would fix that, now that the patch has been applied to the module branche's HEAD.

For the time being I just applied the patch straight to the aegir platform.
Find the module at
cd /var/aegir/hostmaster-0.4-alpha11/profiles/hostmaster/modules/admin_menu
and apply the patch from this issue.
wget -O - http://drupal.org/files/issues/615058-adminmenu-php53-D6-1.patch | patch -p0

Edit:
PS, no problems with spaces for me. I believe it's no longer necessary to make adjustments to drush. See also Adrian's remark below. Thanks for your help.

Another corollary regarding 5.3 support.

adrian's picture

We avoid depending on any external dependencies as much as possible, but when we do we have a strict policy of only depending on actual releases.

In this specific case, we would not be able to support 5.3 until the admin_menu project we depend on has a release with the required fix. This gets even trickier with cases like modalframe (as seen here:http://drupal.org/node/818900), which in turn depends on alpha releases of other projects.

5.3 support will get done, but it requires planning and testing.

personal priorities

adrian's picture

It looks like nobody has made it their personal priority to fix the things the php guys broke in this last update. It is easier to say 3.5 is not supported than to test it to make sure that production sites don't go down unexpectedly.

and it's easier to complain that it doesn't work on 5.3 (when we explicitly stated it doesn't), than it is to actually figure out why and contribute patches through the appropriate channels.

PHP 5.3 support is not a priority for the core team right now because you should still be able to use 5.2 for the time being, and significant amounts of contrib modules don't support it yet.

Running 5.3 at this point is going to force you to to run into many bugs , not just in aegir itself. In a nutshell, we probably wouldn't recommend running 5.3 in a production environment for the next few weeks, regardless of whether aegir supports it.

So, patches welcome : http://is.gd/edalY

PS: (personally, i am dreaming of the day i can have Aegir require php 5.3 , so we can write a proper daemon).

Re: personal priorities

LittleLion's picture

Hi Adrian,

Thanks for the fair response. I am not usually one to complain :).

This was my first exposure to the Drupal community and I was surprised that I had so much trouble installing the 'stable' release. Thanks for the link to submit patches. Now that I'm back in town I'll take a look and see what I can contribute.

Matt

we dont support php 5.3.1

adrian's picture

says so in the readme.

tells you to install php 5.2 instead.

Secondly, we dont use spaces in any of our command names. and that is a warning anyway.

Hi Adrian, thanks for

LittleLion's picture

Hi Adrian, thanks for responding.

Unfortunately I am on a shared hosting account so I do not have control of the version of PHP the sites run under. I was able to get it all up and working under 5.3.2 with the notes I provided.

The 'spaces in commands' appeared to be a hard error, at least the script stopped executing at that point and displayed an error. It may have finished it's work correctly, but when I added the php config to allow spaces the install ran without errors.

If there is anything here from my install experience that I can contribute to help others let me know. Starting from no knowledge it was a battle to get the software installed. The system looks like it is going to be very good, it would be nice if others had a better introduction to it.

Matt

Also from the

univate's picture

Also from the INSTALL.txt

The level of access required to be able to configure this system is very far
beyond what is commonly available to users with shared hosting. Commands are
assumed to be run as root user.

php as cgi

imadalin's picture

try to use your php 5.2.x compiled to be used as cgi module (.htaccess). for drush u can set the path in it's config.

apache

imadalin's picture

how do you get aegir to restart apache/ngix on shared hosting?

exactly right

adrian's picture

aegir does not support shared hosting. you need a vps or better to have the right permissions to be able to install it

unless your hosting company gives you root access to the complete shared hosting server, there are no exceptions to this rule.

virtuality...

John_Buehrer's picture

This sentiment is fair enough in terms of developer priorities, but virtuality and sharing are a fact of life these days - like apartments vs. houses. And a VPS itself is, by definition, a type of shared host. Rather than just saying no, it would be helpful to have a maintained list of topics like:

  • What Aegir does require from the "server", eg: root access, apache daemon restarts.
  • What's not required on the "server", eg: Aegir doesn't create user accounts.
  • What is known not to work, eg: conflicting admin from management systems, eg: CPanel / Plesk / MAMP.
    (eg: which product variants are worse than others?)
    (eg: and what about Solaris zones?)

I put "server" in quotes because I bet there are different requirements between the front-end management server and the remotely managed web servers. Eg, which one (or both?) needs to restart Apache? As an aside, generic "server" references in the docs are a bit confusing since there are multiple servers involved here. I know I get confused by this.

I also bet this issue won't go away no matter how boldly you state "no shared hosting". I don't mean to contradict your intentions here, instead I'm suggesting a consolidated discussion forum for this topic including lists like the above. Software management and provisioning are big topics in the industry these days, and with Drupal's emerging prominence in the real world, something like Aegir attracts a lot of attention.

Rather than waiting for Gartner group to make Tsk-Tsk's in their magic-quadrant comments (*), why not open up the discussion now and benefit from your potential customer's real world experiences in this area? I finally bet there is less work than you realize to support some of these sharing scenarios, and based on your VPS comments, clearly you already do. Thanks.

*: http://www.cmswire.com/cms/web-cms/gartner-calls-drupal-a-visionary-in-s...
*: http://www.gartner.com/it/content/1409700/1409713/august_18_trends_in_ss...
*: http://www.gartner.com/technology/media-products/reprints/microsoft/vol1...

My comments: Drupal is still only a "visionary", not yet a "leader", due to perceived limitations in ability to execute. Things like "no shared host" comments, and hardwired mysql port numbers in install scripts, will contribute to this perception when noticed.

Just to clarify. When you say

yautja_cetanu's picture

Just to clarify. When you say that the "no shared host" comments contribute to this perception. Are you suggesting that they should stop saying those comments because they should get aegir working in a shared hosting environment? Or are you suggesting that they should simple word "no shared host" in a different way?

(Or is "no shared host" fine as long as its on a page like you describe that also includes things like "works on VPS"?)

Because also the Gartner report is cool. The reality is that the majority of normal drupal users will not be part of large companies with access to dedicated servers. They will be small time people on shared hosting (which drupal is certainly built for). So therefore a large number of people coming to aegir will be coming from a shared hosting environment expecting it to work. Hence the comment being useful to these people (unless you're suggesting that Aegir should work on a shared hosting environment)

My suggestion

John_Buehrer's picture

I suggest the documentation & mindset change to something like Constraints on Shared Hosting with a link to a dedicated forum area (Wiki?) where the topic is discussed and refined. For starters it could say "best advice for now is don't, except with VPS, defined as..." and then let others take it from there.

I think a more accurate technical description will be built in short order by contributors, and it's likely that a list will emerge of small change-requests having outsized benefits towards this cause; eg, configurable mysql port numbers is quite enabling. (Of course, suggestions for large changes will appear too, that's life...)

With only a brief foray into Aegir, I have the impression that shared hosting support isn't a matter of technical limitations, but rather, a lack of awareness where are all the boundaries in the wide world of virtuality. This is where the user community can help, but there should first be a willingness to recognize & address this issue among the community.

BTW, shared hosting is all the rage in big companies in Gartner-land. That's because dedicated servers often run at much less than 50% utilization, every department & team wants at least one, and the only cost-effective solution is sharing as much as possible. VMware etc are big winners here, why not Drupal+Aegir too?

That adds more confusion

stevenwood's picture

"Constraints on Shared Hosting" To me, using that term implies that it can be used on shared hosting, but you are restricted/constrained and cannot perform certain actions.

"BTW, shared hosting is all the rage in big companies in Gartner-land"

Well Big companies are always a few years behind..

Who do they use the most Dreamhost, Bluehost, Godaddy? I just don't believe that any good company would be using commercial shared hosting, they may however be running their own company servers and creating a shared hosting platform for the individual dept.

which means some techie at the company will have root access to it..
which means some techie can install individual copies of aegir for each dept, if they wanted to.


A specific list of these

John_Buehrer's picture

A specific list of these actions needed by Aegir is what I'm looking for. It seems to me, Aegir only needs a few privileged commands, and knowing these is the way for to enable use of shared hosting in some form. It's not helpful to make generic "something doesn't work" comments; as usual, specific details are useful. And this is where the user community can help, testing these details across environments. Some requirements are already mentions in the docs, like ssh logins, which not every shared host offers. That's OK, but what about other requirements? Shared hosts which meet the collective requirements should be usable by Aegir, no?

In big companies, typically there's no "master installer" techie role as you describe. Root access is for setting up the containers and possibly for troubleshooting, but typically there's a separation of duties between doing that infrastructure stuff and actual work with the virtual host itself (ie, per user group of the container). Otherwise it's hard to guarantee application & data integrity across a large user base. So in this scenario, it's a good assumption that big companies have effectively the similar shared hosting restrictions as individual customers in the Internet world.

Anyway, I hope this doesn't delve into a philosophical debate why we users aren't supposed to want shared hosting. Instead, let's concentrate on the practical considerations of doing so, and by far the most important step is simply documenting the boundary points. Thanks...

we do not support anything less than vps

adrian's picture

You need to give aegir permissions that are in no way possible to make play nicely with other people on the server.

if you are in a situation where you have enough permissions to install aegir on a shared host, you need to change hosts because the server is being severely mismanaged, and all your data can be accessed by all the users on it.

This includes being given super user mysql access, in such a way that it can destroy databases of other users using the db server, and being able to manipulate apache virtual host configuration, including and up to overriding the configuration of other users on the shared server.

If you are really in gartner-land, getting a server or at least a virtual machine on a server provisioned should be the least of your problems.

Success with 5.3.2-1ubuntu4.2

barwonhack's picture

No luck yesterday. Something changed today - my birthday, no less!

Using Linode Ubuntu 10.4 with standard PHP have successfully installed Drush and Aegir (Alpha 12), applied updates using Drush, created platforms, created site, cloned site.

Something must have changed with the repositories because up until very late yesterday I couldn't get phpMyAdmin to install. Now it does.

Linode > Deploy a Linux Distribution > Ubuntu 10.04 LTS > update & upgrade.
PHP 5.3.2-1ubuntu4.2
MySQL database is 5.1.41

Is it feasible...

John_Buehrer's picture

I see this "shared hosting" topic is causing more distress than warranted here. Maybe it's best to leave these investigations under the hood for the time being, and note our experiences in other forums to avoid panic.

Still, there are (and will be) small changes needed to the release to get this to work cleanly. For example, to avoid the potential disruption of other databases on the same virtual machine, parallel database instances can easily be set up so Aegir has all the isolated root access it needs and no one's the wiser. This solves the concern above, and might be needed in corporate environments as department-specific VM's may well run other stuff needing undisturbed database access. But for this to work, the database configuration of Aegir (mostly embedded deep in drush include code, it seems) needs parameterized db connection values such as port number. (http://dev.mysql.com/doc/refman/5.0/en/multiple-servers.html)

Now, there are other reasons to support this - as evidenced in the forum group. Is it feasible we can make fix requests that are useful in general, without triggering denials or hostilities if it becomes apparent that such updates are also useful for shared hosting or perhaps originally driven by this desire?

I think of these requests towards shared hosting not as new features, but rather, non-functional requirements (http://en.wikipedia.org/wiki/Non-functional_requirements) for deployment which don't need big changes. In other words, NFRs are not what you do, but how well you do it - ie, Gartner's ability-to-execute criteria.

Aegir hosting system

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: