Revision [1689]
Last edited on 2008-10-28 11:25:51 by FrancoisBayartAdditions:
%%alias /mailinglist /var/www/phplist/install/directory/public_html/lists/%%
Revision [1688]
Edited on 2008-10-28 11:25:27 by FrancoisBayartAdditions:
case "mailinglist1":
case "mailinglist2":
case "mailinglist2":
Deletions:
case "/mailinglist2/":
Revision [1687]
Edited on 2008-10-28 11:24:58 by FrancoisBayartAdditions:
%%(php) eregi ( "/([a-z0-9_-]{1,})/(.*)", $_SERVER ['REQUEST_URI'], $regs);
$liste = $regs[1];
switch ($liste){
$liste = $regs[1];
switch ($liste){
Deletions:
Revision [1119]
Edited on 2007-04-22 16:19:29 by WilFis [Cleaned up a few typographic/grammatical errors.]Additions:
The following was tested on phplist-2.8.12 but it should work on any phplist version I am aware of, since PHPList has stored all its settings in config.php for quite some time now.
Deletions:
Revision [1118]
Edited on 2007-04-22 16:18:24 by WilFisAdditions:
===Method 2: deciding in your config.php file, depending on the host or url served, what config file to include===
Deletions:
Revision [612]
Edited on 2006-07-17 16:35:24 by HernoLAdditions:
[[PhplistHacks phplist Hacks]]
Multiple phplist installations running on one file setup and multiple databases
The following was tested on phplist-2.8.12 but it should work on any phplist version I am aware of, since they PHPList stores all its settings in config.php for quite some time now.
Multiple phplist installations running on one file setup and multiple databases
The following was tested on phplist-2.8.12 but it should work on any phplist version I am aware of, since they PHPList stores all its settings in config.php for quite some time now.
Deletions:
Multiple PHPList installations running on one file setup and multiple databases
The following was tested on phplist-2.8.12 but it should work on any PHPlist version I am aware of, since they PHPList stores all its settings in config.php for quite some time now.
Additions:
===Method 1: Using an environment variable pointing to the config file===
-copy ##config.php## from original source (preferably somewhere outside your webserver document root) and configure as required
-set up database for individual installation/list as normal
-use:
-setup url for list access. This can be done by either:
===Method 2: deciding in you config.php file, depending on the host or url served, what config file to include===
-save original ##config.php## as
~-config.setup1.php
~-config.setup2.php
~- ...
-setup url for list access. This can be done by either:
~1. using aliases in your apache conf file (or configuration interface)
~~then you'll have something like this in your config.php:
%%(php) switch (substr($_SERVER [ 'REQUEST_URI' ], 0, 14))
~2. using Apache virtual domains in your apache conf file (or configuration interface)
~~then you'll have something like this in your config.php:
%%(php) switch ($_SERVER [ 'SERVER_NAME' ])
-copy ##config.php## from original source (preferably somewhere outside your webserver document root) and configure as required
-set up database for individual installation/list as normal
-use:
-setup url for list access. This can be done by either:
===Method 2: deciding in you config.php file, depending on the host or url served, what config file to include===
-save original ##config.php## as
~-config.setup1.php
~-config.setup2.php
~- ...
-setup url for list access. This can be done by either:
~1. using aliases in your apache conf file (or configuration interface)
~~then you'll have something like this in your config.php:
%%(php) switch (substr($_SERVER [ 'REQUEST_URI' ], 0, 14))
~2. using Apache virtual domains in your apache conf file (or configuration interface)
~~then you'll have something like this in your config.php:
%%(php) switch ($_SERVER [ 'SERVER_NAME' ])
Deletions:
~-copy ##config.php## from original source (preferably somewhere outside your webserver document root) and configure as required
~-set up database for individual installation/list as normal
~-use:
~-setup url for list access. This can be done by either:
==Method 2: deciding in you config.php file, depending on the host or url served, what config file to include==
~-save original ##config.php## as
~~-config.setup1.php
~~-config.setup2.php
~~- ...
~-setup url for list access. This can be done by either:
~~1. using aliases in your apache conf file (or configuration interface)
~~~then you'll have something like this in your config.php:
%%switch (substr($_SERVER [ 'REQUEST_URI' ], 0, 14))
~~2. using Apache virtual domains in your apache conf file (or configuration interface)
~~~then you'll have something like this in your config.php:
%%switch ($_SERVER [ 'SERVER_NAME' ])
Revision [378]
Edited on 2005-08-21 15:00:16 by PascalVanHeckeAdditions:
%%switch (substr($_SERVER [ 'REQUEST_URI' ], 0, 14))
Deletions:
Revision [377]
Edited on 2005-08-21 14:59:20 by PascalVanHecke [rewritten because of complaint on http://www.phplist.com/forums/viewtopic.php?p=10505#10505]Additions:
==Method 1: Using an environment variable pointing to the config file==
~-copy ##config.php## from original source (preferably somewhere outside your webserver document root) and configure as required
~-set up database for individual installation/list as normal
~-use:
~-setup url for list access. This can be done by either:
1. using aliases in your apache conf file (or configuration interface)
2. using Apache virtual domains in your apache conf file (or configuration interface)
==Method 2: deciding in you config.php file, depending on the host or url served, what config file to include==
~-setup url for list access. This can be done by either:
~~1. using aliases in your apache conf file (or configuration interface)
~~~then you'll have something like this in your config.php:
case "/mailinglist1/":
case "/mailinglist2/":
die ("this directory not used to run phplist");
~~2. using Apache virtual domains in your apache conf file (or configuration interface)
~~~then you'll have something like this in your config.php:
~-copy ##config.php## from original source (preferably somewhere outside your webserver document root) and configure as required
~-set up database for individual installation/list as normal
~-use:
~-setup url for list access. This can be done by either:
1. using aliases in your apache conf file (or configuration interface)
2. using Apache virtual domains in your apache conf file (or configuration interface)
==Method 2: deciding in you config.php file, depending on the host or url served, what config file to include==
~-setup url for list access. This can be done by either:
~~1. using aliases in your apache conf file (or configuration interface)
~~~then you'll have something like this in your config.php:
case "/mailinglist1/":
case "/mailinglist2/":
die ("this directory not used to run phplist");
~~2. using Apache virtual domains in your apache conf file (or configuration interface)
~~~then you'll have something like this in your config.php:
Deletions:
~1) copy ##config.php## from original source (preferably somewhere outside your webserver document root) and configure as required
~1) set up database for individual installation/list as normal
~1) use:
4. setup url for list access. This can be done by either:
1. using aliases
2. using Apache virtual domains
==Alternate method==
~-in ##config.php##, put:
~-then you'll have something like this in your code:
case "/mailinglist/":%%
Additions:
====Multiple Databases====
==What==
Multiple PHPList installations running on one file setup and multiple databases
==When==
If you're hosting several installations on one machine (possibly for several clients, or several websites) but you want to save setup and maintenance time or simply disk space.
==Steps to perform==
The following was tested on phplist-2.8.12 but it should work on any PHPlist version I am aware of, since they PHPList stores all its settings in config.php for quite some time now.
~1) copy ##config.php## from original source (preferably somewhere outside your webserver document root) and configure as required
~1) set up database for individual installation/list as normal
~1) use:
%%SetEnv ConfigFile /path/to/config/file%%
in your host, ##vhost## or ##.htaccess## file
4. setup url for list access. This can be done by either:
1. using aliases
%%alias /mailinglist/ /var/www/phplist/install/directory/public_html/lists/%%
2. using Apache virtual domains
%%ServerName mailinglist.sitename.com
DocumentRoot /var/www/phplist/install/directory/public_html/lists/%%
==Alternate method==
~-save original ##config.php## as
~~-config.setup1.php
~~-config.setup2.php
~~- ...
~-in ##config.php##, put:
%%switch ($_SERVER [ 'SERVER_NAME' ])
{
case "setup1.com":
include_once("config.setup1.php");
break;
case "setup2.com":
include_once("config.setup2.php");
break;
default:
die ("server not used to run phplist");
}
?>%%
~-then you'll have something like this in your code:
%%switch (substr($_SERVER [ 'REQUEST_URI' ], 0, 13))
{
case "/mailinglist/":%%
==What==
Multiple PHPList installations running on one file setup and multiple databases
==When==
If you're hosting several installations on one machine (possibly for several clients, or several websites) but you want to save setup and maintenance time or simply disk space.
==Steps to perform==
The following was tested on phplist-2.8.12 but it should work on any PHPlist version I am aware of, since they PHPList stores all its settings in config.php for quite some time now.
~1) copy ##config.php## from original source (preferably somewhere outside your webserver document root) and configure as required
~1) set up database for individual installation/list as normal
~1) use:
%%SetEnv ConfigFile /path/to/config/file%%
in your host, ##vhost## or ##.htaccess## file
4. setup url for list access. This can be done by either:
1. using aliases
%%alias /mailinglist/ /var/www/phplist/install/directory/public_html/lists/%%
2. using Apache virtual domains
%%ServerName mailinglist.sitename.com
DocumentRoot /var/www/phplist/install/directory/public_html/lists/%%
==Alternate method==
~-save original ##config.php## as
~~-config.setup1.php
~~-config.setup2.php
~~- ...
~-in ##config.php##, put:
%%switch ($_SERVER [ 'SERVER_NAME' ])
{
case "setup1.com":
include_once("config.setup1.php");
break;
case "setup2.com":
include_once("config.setup2.php");
break;
default:
die ("server not used to run phplist");
}
?>%%
~-then you'll have something like this in your code:
%%switch (substr($_SERVER [ 'REQUEST_URI' ], 0, 13))
{
case "/mailinglist/":%%
Deletions:
=== What are hacks?===
Hacks are "quick and dirty" solutions. Solutions that probably could be nicely integrated into PHPList, if the author of the hack knew enough about the internal architecture of PHPList, and/or felt it was worth to integrate his or her solution into the PHPList code. The latter conditions are not always fulfilled... still it 's valuable to collect the experience of people fiddling with PHPList setups or code, because these simple solutions can be reused by anyone comfortable with php, and it may lead to proper PHPList code offering the same functionality.
===List of Hacks===
MultipleDatabases
Multiple PHPList installations running on one file setup and multiple databases
IntegratingPhpListWithOtherPackages
A lot of PHP/Mysql packages exist: cms'es, portals, online communities.... : a list of tested ways to integrate phplist into them



