Get a VPS that offers 2 or more IP addresses.
From the WHM cPanel, find the menu item Service Configuration
, select Apache Configuration
and then click on Reserved IPs Editor
.
# This is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
<?php | |
/** | |
* Custom configuration bootstrap file for ExpressionEngine | |
* | |
* Place config.php in your site root | |
* Add require(realpath(dirname(__FILE__) . '/../../config_bootstrap.php')); to the bottom of system/expressionengine/config/config.php | |
* Add require(realpath(dirname(__FILE__) . '/../../config_bootstrap.php')); to the bottom of system/expressionengine/config/database.php | |
* If you have moved your site root you'll need to update the require_once path | |
* |
<?php | |
/* | |
EE2 hidden configuration variables | |
Last updated: Jun 20 2010 | |
Obtain this list by putting print_r($this->EE->config->config); on a PHP-enabled template. | |
See: http://eeinsider.com/tips/view/config-overrides-for-ee-1-and-2/ | |
*/ |
<?php | |
/* | |
|-------------------------------------------------------------------------- | |
| ExpressionEngine Config Items | |
|-------------------------------------------------------------------------- | |
| | |
*/ | |
$protocol = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") ? "https://" : "http://"; |
/* | |
| Helps determine which settings to use based on the current server. | |
| Add this to the top of the constants.php file just under the | |
| opening php tag and copy it over everything down to just above | |
| the 'File Stream Modes' section. Modify the switches below as | |
| needed, and add as many switches as your setup requires. | |
*/ | |
switch($_SERVER['HTTP_HOST']) | |
{ |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
// Multiple if statements, or a switch statement, | |
// can handle as many environments as you need | |
if ($_SERVER['HTTP_HOST'] == "local-site.dev") { | |
$active_group = 'expressionengine'; | |
} else { | |
$active_group = 'enginehosting'; | |
} |
I'm describing my workflow in these articles, before I start my next Symphony project. Mostly for myself, to iron out my recurring problems, it is based on solid git techniques, taking heed of advice learned from Symphony community members, many many tips on the web, and flicking through the pages of O'Reilly's Version Control with git.
The core aim of this article, is to get a good Symphony development and deployment environment using git as the basis for the organisation, and have it written down for reference.
This workflow can be applied to any project, in theory, that has a starting point being a private remote git repo.
Forms have been an integral part of any interactive site since the dawn of time, they promote interactivity and are usually the most common way users interact with a site. It's commonplace that when a form is submitted, the website will take 'action' and do something with the data and then provide a user with the result. Symphony provides this logic layer via Events.
This tutorial assumes you have a basic understanding of how Events work in Symphony (if not, this may be a good introduction) and are semi comfortable writing some PHP code. I'll be showing you some of the lesser known features of Symphony Events, including event priority, event chaining and a brief demonstration of how to write a custom Event. The difficulty level progresses as we go through, but with any luck you'll be able to learn a thing or two :)
Our client requires a form that allows a user to submit some details about their new car purchase. Th
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>example crossroads + hasher</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
</head> | |
<body> | |
<div id="wrapper"> | |
<ul> |