Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem:
When I activate "Site aliasing" from Hosting->Features and Aegir verifies itself it throws (in the Modalframe) the:
preg_match(): Unknown modifier '/' hosting_alias.module:493
The same is happening when I try from the modules menu and then try to create a site:
warning: preg_match(): Unknown modifier '/' in /var/aegir/hostmaster-6.x-2.0/profiles/hostmaster/modules/hosting/alias/hosting_alias.module on line 493.
I try to fix the regular expression but with no results.
Clean install of:
Aegir 6.x-2.0
PHP 5.3.3
Apache 2.2.15
OS Centos 6.4
Comments
Comment #1
ergonlogicThe preg_match() looks fine. Did you perhaps add a '/' in the 'Domain used for automatic subdomain hosting' field? Perhaps we need some validation there.
Comment #2
tvl CreditAttribution: tvl commentedThanks for the fast respond!
You are absolutely correct! I had add a '/' in Hosting->Site aliases->"Domain used for automatic subdomain hosting"
After the correction everything works smooth.
Comment #3
tvl CreditAttribution: tvl commentedComment #4
ergonlogicWe still need to validate this field, since it's throwing un-helpful PHP errors.
Comment #5
chertzogHere is a patch that validates the domain.
http://drupalcode.org/sandbox/chertzog/2088757.git/patch/c98ef8c
Comment #8
helmo CreditAttribution: helmo commentedI've committed the patch from #5. (new url http://cgit.drupalcode.org/sandbox-chertzog-2088757/commit/?id=c98ef8c)
I'm not sure the use of valid_url() is strict enough, but it's a good start.
The commit from #7 adds quoting to avoid "Unknown modifier '/'" erros being possible.