Summary | horde-db-migrate and virtual |
Queue | Horde Base |
Queue Version | 4.0.11 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | jan (at) horde (dot) org |
Requester | dom.lalot (at) gmail (dot) com |
Created | 11/14/2011 (4993 days ago) |
Due | |
Updated | 11/30/2011 (4977 days ago) |
Assigned | 11/14/2011 (4993 days ago) |
Resolved | 11/30/2011 (4977 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
Add note how to set the vhost when running CLI scripts (
Bug #10758).1 files changed, 4 insertions(+), 3 deletions(-)
http://git.horde.org/horde-git/-/commit/e20ff021bef930e37f3a2401443e7e4226e90c7b
That's fine! Thank you
Dom
Assigned to Jan Schneider
[jan] Don't overwrite $_SERVER superglobals unconditionally, to allow
setting them through environment variables (
Bug #10758).2 files changed, 14 insertions(+), 6 deletions(-)
http://git.horde.org/horde-git/-/commit/6701ae30b684b1533f4aed06d38fd6777e47f410
Horde_Cli::init().
var_dump($GLOBALS['conf']['server']['name']);
in horde-db-migrate after the appInit() call? Does it output the
correct server name?
root@horde4:/var/www/horde/config# /usr/bin/horde-db-migrate
string(9) "127.0.0.1"
dig gives:
;; ANSWER SECTION:
etumeltest.univmed.fr. 86400 IN CNAME horde4.univmed.fr.
Apache:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName horde4.univmed.fr
ServerName etumeltest.univmed.fr
..
conf.php:
$conf['server']['name'] = $_SERVER['SERVER_NAME'];
$conf['server']['port'] = $_SERVER['SERVER_PORT'];
/etc/hosts
root@horde4:/var/www/horde/config# cat /etc/hosts
127.0.0.1 horde4.univmed.fr horde4 localhost
nothing to tell that etumeltest is 127.0.0.1
Strange!
var_dump($GLOBALS['conf']['server']['name']);
in horde-db-migrate after the appInit() call? Does it output the
correct server name?
command line:
SERVER_NAME=etumeltest.univmed.fr php -r 'echo $_SERVER["SERVER_NAME"];'
This should output "etumeltest.univmed.fr".
$_SERVER["SERVER_NAME"];'
etumeltest.univmed.frroot@horde4:~#
seems OK in php
root@horde4:/var/www/horde/config# php5 -v
PHP 5.3.6-13ubuntu3.2 with Suhosin-Patch (cli) (built: Oct 13 2011 23:09:42)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with XCache v1.3.2, Copyright (c) 2005-2011, by mOo
And conf-etumeltest.univmed.fr.php contains a different database:
$conf['sql']['socket'] = '/var/run/mysqld/mysqld.sock';
$conf['sql']['protocol'] = 'unix';
$conf['sql']['database'] = 'hordeetud';
$conf['sql']['charset'] = 'iso-8859-1';
State ⇒ Feedback
command line:
SERVER_NAME=etumeltest.univmed.fr php -r 'echo $_SERVER["SERVER_NAME"];'
This should output "etumeltest.univmed.fr".
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Base
Summary ⇒ horde-db-migrate and virtual
Type ⇒ Bug
Priority ⇒ 1. Low
I am trying to get horde-db-migrate working with virtual. I followed
Jan advice:
export SERVER_NAME=etumeltest.univmed.fr
Then horde-db-migrate on a new fresh import from horde3 and nothing happens
/var/www/horde/config
-rw-r--r-- 1 root root 6512 2011-09-09 15:38
conf-etumeltest.univmed.fr.php
conf.php:
$conf['server']['name'] = $_SERVER['SERVER_NAME'];
$conf['server']['port'] = $_SERVER['SERVER_PORT'];
The virtual is OK if I change manually conf.php then migrate. But I
can stay like this in production!
That's probably something I missed?
Dom