This section describes how to upgrade your existing eZ Publish 4.6 installation to version 4.7. Make sure that you have a working backup of the site before you do the actual upgrade, and make sure the installation you are performing the upgrade on is offline.
The procedure for upgrading directly from version 4.6 to 4.7 consists of the following steps:
The minimum version required of eZ Components with eZ Publish 4.7 is "ezcomponents-ezp47", containing a fix to the package. eZ Publish 4.7 is compatible with PHP version 5.2 and above. For more information regarding system requirements check out eZ Publish requirements.
The easiest way to upgrade the distribution files is to unpack eZ Publish 4.7 to a separate directory and then copy the directories that contain site-specific files from the existing installation. Make sure that you copy the following directories:
Replace "example" and "example_admin" with the actual names of your site accesses.
Important note: Because the new directory has replaced the original directory, the directory permissions need to be fixed. You have the choice between Shell commands or Alternative shell commands
Use the following commands to do this.
These shell commands will give proper permission to the web server:
cd </path/to/your/eZ/Publish/directory> chmod -R a+rwx design extension settings var
These commands will setup the permission more correctly, but require knowledge about the running web server.
chmod -R og+rwx design extension settings var chown -R nouser:nouser design extension settings var
If you are using custom extensions, the sub-directories inside the "extension" directory will also have to be copied. However, make sure that you do not overwrite any extensions that are included in eZ Publish, which currently are eZ Flow (2.x) eZ Online Editor (5.x), eZ OpenOffice Document format (2.x), eZ JSCore (1.x), eZ Image Editor (1.x), eZ Comments (1.x), eZ Multiupload (1.x), eZ MB Password Expiry (1.x), eZ Network (1.x), eZ REST API Provider (1.x), eZ Script Monitor (1.x), eZ SI, ), eZ Find (1.x). Note that upgrading the distribution files will overwrite the autoload arrays for extensions. You will need to re-generate the autoload arrays for active extensions later.
See the dedicated upgrade instructions for eZ Flow and Website Interface below.
The updated versions of eZ Flow and Website Interface will also install the following extensions:
Note: Both admin2 design and webin (ezwebin extension) require ezjscore extension to be enabled, look here for how to enable extensions.
The update script for the database is located in
<eZ Publish root>/update/database/<mysqli|postgresql>/4.7/dbupdate-4.6.0-to-4.7.0.sql
You can run this with the appropriate command line tool or application.
Since 4.7, the DB schema files can be found in kernel/sql/<db>.
Example:
/var/www/../kernel/sql/<db> |___ common |___cleandata.sql |___ mysql |___ cluster_db_schema.sql |___ cluster_dfs_schema.sql |___ cluster_schema.sql |___ kernel_schema.sql |
Note: This is important when setting up a new instance.
Cluster Installation Index Setup
To setup the index part of a cluster installation, you have two files that contain the database AND cluster configuration settings. These settings are either in config.php or config.cluster.php.
Note: There are new settings, common to all clusters. You can see them on Cluster Configuration Settings (config.php / config.cluster.php).
You must follow the steps below in order to setup the index part of a cluster installation:
Important Note: Renaming and backing up the previous file must be done BEFORE replacing the distribution files.
Cluster Queries
Now, if you are using a DFS cluster, you must run the following query:
-- START: from 4.6.0 using DFS cluster setup ALTER TABLE `ezdfsfile` CHANGE `datatype` `datatype` VARCHAR(255); -- END: from 4.6.0 using DFS cluster setup
and if you are using a DB cluster, you ust run the following query:
-- START: from 4.6.0 using DB cluster setup ALTER TABLE `ezdbfile` CHANGE `datatype` `datatype` VARCHAR(255); -- END: from 4.6.0 using DB cluster setup
Note: The SQL script is located in eZ Publish distribution (update/database/mysql/4.7/).
The autoload system also has some changes, for example the autoload array for extensions is now placed in var/autoload of your eZ Publish installation (along the class changes in extensions itself).
To regenerate the autoload array, execute the following script from the root of your eZ Publish directory:
php bin/php/ezpgenerateautoloads.php --extension
Whenever an eZ Publish solution is upgraded, all caches must be cleared in a proper way. This should be done from within a system shell:
php bin/php/ezcache.php --clear-all --purge
Purging ensures that the caches are physically removed. When the "--purge" parameter is not specified, the caches will be expired but not removed.
Sometimes the script is unable to clear all cache files because of restrictive file/directory permission settings. Make sure that all cache files have been cleared by inspecting the contents of the various cache sub-directories within the "var" directory (typically the "var/cache/" and "var/<name_of_siteaccess>/cache/" directories). If there are any cache files left, you need to remove them manually.
ezjscore extension previously had a file called index_ajax.php which was removed in 4.7. If you enabled this feature in the past you should now remove the following line or anything referring to index_ajax.php from your rewrite rules:
RewriteRule ^/([^/]+/)?ezjscore/call.* /index_ajax\.php [L]
When using eZ Webin and eZ Flow, these extensions will also need to be updated.
The first thing to do is to change the extensions permissions. An example on how this is done:
$chmod -R a+rwx extension
When upgrading from eZ Publish 4.6 to 4.7 and you are using eZ Flow, you can benefit from the new mobile device detection feature. Put the following settings in your "settings/override/site.ini.append.php" file:
[SiteAccessSettings] [...] DetectMobileDevice=enabled MobileSiteAccessURL=http://example.com/iphone MobileSiteAccessList[] MobileSiteAccessList[]=iphone [...]
An "iphone" siteaccess is provided out-of-the-box with your eZ Flow installation. Make sure that the MobileSiteAccessURL= points to the "iphone" site access. Note that this is a full URL and needs to include the http:// part.
While upgrading eZ Flow to the next release, you will have to replace the following override condition in "settings/siteaccess/<admin siteaccess>/override.ini.append.php". This is to adjust to the changes in the object edit form in the Administration interface.
[edit_frontpage] Source=content/edit.tpl MatchFile=edit/frontpage.tpl Subdir=templates Match[class_identifier]=frontpage
with this new one
[add_to_block_frontpage] Source=content/parts/add_to_block.tpl MatchFile=content/parts/add_to_block_frontpage.tpl Subdir=templates Match[class_identifier]=frontpage
The same operation may have to be done if the same override condition has been added for other class_identifier than "frontpage".
Next, depending on your own extensions, follow the steps mentioned in the eZ Webin and eZ Flow upgrade documentation.
Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.