This section describes how to upgrade your existing eZ Publish 4.5 installation to version 4.6. 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.5 to 4.6 consists of the following steps:
The minimum version required of eZ Components with eZ Publish 4.6 is "ezcomponents-ezp46", containing a fix to the package. eZ Publish 4.6 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.6 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. Use the following commands to do this.
(You have the choice between Shell commands or Alternative shell commands):
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:
For eZ OE 5.x and eZ JS Core you will need to replace the following rewrite rules when using Virtual Hosts:
RewriteRule ^/var/cache/texttoimage/.* - [L] RewriteRule ^/var/[^/]+/cache/(texttoimage|public)/.* - [L]
with:
RewriteRule ^/var/([^/]+/)?cache/(texttoimage|public)/.* - [L]
Since index_ajax.php no longer exists in eZ JS Core you will need to remove the following rewrite rule when using Virtual Hosts:
RewriteRule ^/([^/]+/)?ezjscore/call.* /index_ajax\.php [L]
or the rules in .htaccess:
RewriteRule ezjscore/call.* index_ajax.php
RewriteRule ^index_ajax\.php - [L]
For more detailed instructions, see the dedicated eZ OE and eZ JS Core doc pages.
Note: Both admin2 design and webin (ezwebin extension) requires ezjscore extension to be enabled, look here for how to enabling extensions.
The update script for the database is located in
<eZ Publish root>/update/database/<mysqli|postgresql>/4.6/dbupdate-4.5.0-to-4.6.0.sql
You can run this with the appropriate command line tool or application.
The "ezmysql" database driver has been deprecated in 4.5 and it is recommended to use the "ezmysqli" driver instead. This requires that the "mysqli" extension in PHP is enabled and can be archived by changing the driver in your override or siteaccesses "site.ini.append.php" settings to:
[DatabaseSettings] DatabaseImplementation=ezmysqli
The "Mysql DB/DFS Cluster" database back-end has not yet been deprecated, but it is recommended to use the same driver as the main database driver, so change your "file.ini.append.php" settings in override or siteaccesses to use" eZDFSFileHandlerMySQLiBackend" for DFS Cluster or "eZDBFileHandlerMysqliBackend" for DB Cluster.
Note: The "index_cluster.php" file should be updated to
define( 'STORAGE_BACKEND', 'dfsmysqli' )
If you use DB cluster, remove "dfs" from the string.
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
There are two system upgrade scripts that can be run for the eZ Publish 4.6 upgrade, "removetrashedimages.php" and "updateordernumber.php".
Script 1: If you want to ensure no trashed images remains on your setup because of image aliases not being restored when restoring object from trash (issue #017781), you do the following:
$ php update/common/scripts/4.6/removetrashedimages.php
Note: It is safe to skip this test, this is only to free extra space.
Script 2: You need to run an upgrade script to update webshop order numbers issue (#018233) by running:
$ php update/common/scripts/4.6/updateordernumber.php
Note: If you don’t have webshop or you don’t have orders (table "ezorder") in your eZ Publish, you don’t have to run this script.
Update "override.ini.append.php"
Content panes are not visible on the "User accounts" tab in the back-end. To fix it on an already-installed eZPublish, remove the following rules from your "override.ini.append.php" for your admin siteaccess:
[window_controls] Source=window_controls.tpl MatchFile=window_controls_user.tpl Subdir=templates Match[navigation_part_identifier]=ezusernavigationpart [windows] Source=windows.tpl MatchFile=windows_user.tpl Subdir=templates Match[navigation_part_identifier]=ezusernavigationpart
... and clear the cache after removing. See separate step below.
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.
When using eZ Webin and eZ Flow, these extension 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
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.