Adopting a client using EZPublish

Author Message

Conor Stapleton

Wednesday 15 November 2006 6:15:11 pm

Hi,

I have an mysql dump, and all the php/html files of a new client that uses EZPublsih.

I want to migrate the site to my servers and would like to have a step by step guide to how to do it. What I have tried is installing EZPublish, and then importing the mysql dump from the last site over the one that Ezpublish installation made, but this did not work.

Has anyone got an ideas on how best to do this?

Much appreciated,
Conor Stapleton

David Barber

Thursday 16 November 2006 10:50:36 am

Hi,

It sounds as though you have everything you need - am I correct in understanding you have a tar of their ezpublish tree and the database? I'm not absolutely sure what you mean by the php/html files.

For the most part, if you've tarred up the whole tree and moved it over, and haven't changed the root dir (i.e. http://www.whatever.com still points to the directory where you have put their files), the whole thing should just come up. You shouldn't try to install ezpublish, unless you're sure they were running the same version you're trying to install. Rather you should take their install and just move it over.

If all you have is the database, well, that will be trickier. A lot trickier. So if you don't have a tar of their complete install, you should try to get it.

Hope this gives you a place to start!
David

Joe Kepley

Thursday 16 November 2006 11:51:57 am

Conor,

Here's the procedure we follow for migrating an eZ install to a new server:

<b>1.</b> Create the vhost (of course).

<b>2.</b> Increase the memory_limit in php.ini. How much depends on the site, but the default 8MB won't cut it. I recommend 32-64MB if you're not using a php accelerator, and 128+MB if you are.

<b>3.</b> Configure the vhost.conf in apache. Here's what we use:

<VirtualHost [whatever]>
ServerName [your clients domain name]

ServerAlias [any additional domains]

DocumentRoot "[Path to the doc root]"

<Directory [Path to the doc root]>
        allow from all
        Options +Indexes
</Directory>

RewriteEngine On
RewriteRule !(^/design|^/var/.*/storage|^/var/storage|^/var/.*/cache|^/var/cache|^/extension/.*/desi
gn|^/kernel/setup/packages|^/packages|^/share/icons).*\.(gif|css|jpg|png|jar|js|
ico|pdf|swf|html)$ /index.php
</VirtualHost>

The key there is the rewrite rules. They enable eZ's 'nice' urls. Depending on how things were configured at the previous host, you may need to tweak those a bit.

<b>4.</b> Create the mysql database and user. The site's old database and user settings will either be in a file called settings/siteaccess/[something]/site.ini.append.php or settings/override/site.ini.append.php in your eZ Publish files. The [something] depends on the site. The database settings are usually near the top of the file. Either use these to set up your new install, or edit them everywhere they appear in the eZ files to match what you did use.

<b>5.</b> Copy the eZ Publish files to the docroot of the vhost. Set the 'var' directory in the eZ install and all its contents to be writable by the apache user. Restart apache. You should have a site now.

<b>6.</b> If the site won't come up or there's something odd, clear the eZ cache. There's a shell script, bin/shell/clearcache.sh to do this. Just run bin/shell/clearcache.sh --clear-all from the docroot. To clear it manually, run 'rm -r *' from within 'var/cache' and 'var/[something]/cache' (but don't delete the 'cache' folders themselves, just their contents). Once you do this, refresh the site. It will consume a <i>lot</i> of RAM on this load and take a <i>long</i> time to load, but things should settle down after that.

Hope that helps!

kracker (the)

Thursday 16 November 2006 11:57:01 am

<b>@Joe</b>

Would mind documenting your process in the eZpedia (eZ publish community documentation project wiki)?

http://eZpedia.org/

Respectfully,
//kracker

<i>Yann Tiersen - L'autre valse d'Amilie</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Conor Stapleton

Thursday 16 November 2006 5:04:56 pm

Thanks joe. ill give that a go. I should have also mentioned that what I was given is:

- mysql dump of database from version 3.6.
- Directory tree of all files, again version 3.6

I am trying to move the site to a linux server running php 4.4 so I have tried to follow the upgrade process as detailed on the site. I am getting :

Object is unavailable

The object you requested is not currently available.

Possible reasons for this are:

* The id or name of the object was misspelled, try changing it.
* The object is no longer available on the site.

on the public site, and the admin side. I am accessing the site through a url something like

http://localhost/sitename/new/ but dont think that should make a difference. However I have not configured a vhost as yet, I will try that now joe, thanks for your help.

Conor

Conor Stapleton

Thursday 16 November 2006 7:08:59 pm

Ive made some progress. I can see the public site now, but the admin area wont show.

Here are my steps :

I created the mysql database.
Then I extracted the ezpublish 3.8.0 into a folder.
I went through the installation procedure succesfully.
I then dropped the database and recreated it empty.
I imported my ezpublish 3.6 mysql dump into the empty database.
I copied the /var, /settings/override, /settings/siteaccess, /design/plain from my old 3.6 version over the 3.8 copies.
I upgraded the 3.6 database using the update/database/mysql/3.8/dbupdate-3.6.0-to-3.8.0.sql procedure.
I updated the database settings in the plain and plain_admin site.ini.appen.php files.
I ran the updatemultilingual script on plain and plain_admin succesfully
I added the new language lines :

SiteLanguageList[]
SiteLanguageList[]=eng-GB
ShowUntranslatedObjects=enabled

to the relevant files plain and plain_admin files.
I ran the script to clear the cache and then restarted apache.

The public site is displaying, but when I try to open the admin side all I get is :

Fatal error: eZ publish did not finish its request

The execution of eZ publish was abruptly ended, the debug output is present below.

There is no debug output. Can anyone help me, I think Ive tried almost everything I can think of!

Thanks,
Conor

Mark Marsiglio

Friday 17 November 2006 5:16:40 am

Try taking a look at the ez error log, which is located in var/log/error.log and see if you can get some detail on the errors to post here. If you get the fatal error in a browser, then open the log, it should be the last few lines that will be relevant.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Joe Kepley

Friday 17 November 2006 6:19:37 am

Also, it would be helpful to know if you're using URI-based or host-based siteaccess mapping.

eZ Publish calls different 'views' of the site 'siteaccesses'. The public side is one siteaccess, and the admin side is the other.

eZ Publish can either map these to different subdomains (www.example.com and admin.example.com) or to different paths (www.example.com/ and www.example.com/admin)

You can tell which your site is using by looking in settings/override/site.ini.append.php. Under 'SiteAccessSettings', there will be a line called 'MatchOrder', which will probably say either uri or host.

Conor Stapleton

Sunday 19 November 2006 3:26:14 pm

[SiteAccessSettings]
RequireUserLogin=false
ShowHiddenNodes=false

in the two files within siteaccess.

Site.ini has the following :

[SiteAccessSettings]
# Set to true if you want to force VirualHost mode (with RewriteRules in apache)
# If this is set to true nonVirtualHost mode will not work correctly
ForceVirtualHost=false
# Set to true if you want the setup system to be activated
CheckValidity=true
# Set the true if you don't want anonymous access to your site
RequireUserLogin=true

# A list over current active siteaccesses
AvailableSiteAccessList[]=admin

All the errors in the error.log seem to be realted to premissions and access to something in the var/plain/cache/template/compiled/ folder.

Can someone give me an example of how I would update roles after an upgrade??

BTW my siteaccesssettings value for MathcOrder is uri.

Thanks,
Conor

Conor Stapleton

Sunday 19 November 2006 4:12:50 pm

I chmoded all the folders in /var/cache/ to 777 and that has got me access to the admin area.

I can now move around the admina area however I experience these issues :

When I try to edit any page for the first time I get :

Fatal error: A database transaction in eZ publish failed.

The current execution was stopped to prevent further problems.
You should contact the System Administrator of this site with the information on this page.
The current transaction ID is TRANSID-4ec00fdb36901261c34cd11657f4daad and has been logged.
Please include the transaction ID and the current URL when contacting the system administrator.

and the following lines appear in the error.log file :

[ Nov 20 2006 09:16:37 ] [192.168.17.140] eZMySQLDB:
Query error: Unknown column 'contentclassattribute_id' in 'where clause'. Query: SELECT to_contentobject_id, op_code FR$
WHERE contentclassattribute_id='0'
AND from_contentobject_id='411'
AND from_contentobject_version='1'
[ Nov 20 2006 09:16:37 ] [192.168.17.140] eZDBInterface::commit TRANSID-4ec00fdb36901261c34cd11657f4daad:
Transaction in progress failed due to DB error, transaction was rollbacked. Transaction ID is TRANSID-4ec00fdb36901261c$

If I then click back in my browser and try edit the same page again, a page loads with the following message :

There are no objects related to the one that is currently being edited.

Conor

Conor Stapleton

Sunday 19 November 2006 5:21:13 pm

I got this sorted by running a line from the 3.5 to 3.6 update script which added that field!

Now the current problem seems a little less trivial. All the href attributes of link tags are empty, and when I edit an article I cannot submit it as I get the following error :

Intro: Required attribute 'href' is not presented in tag <link>.

Is this a known issue, can anyone hazard a guess as to why this is happening?

Conor

Conor Stapleton

Sunday 19 November 2006 6:55:33 pm

Hi,

I have this almost finished now. I had been misinformed that I was getting a 3.6 database, when it was in fact 3.5.

I now run the update from 3.5 to 3.6, before I run the update 3.6 to 3.8 and it works.

The last problem i have is understanding why I must chmod the /var/plain/cache folder or I get a fatal error. I also cannot see images on the publis site due to permissions.

Thanks for all the help,
Conor

Mark Marsiglio

Sunday 19 November 2006 7:15:14 pm

These are the correct permissions to be set for your files (change apache:apache to your web server's user/group):

chmod -R ug+rwx design extension settings settings/override settings/siteaccess settings/siteaccess/admin var var/cache var/storage

chown -R apache:apache design extension settings settings/override settings/siteaccess settings/siteaccess/admin var var/cache var/storage 

There are two common reasons for your images problem. I suspect it is:
-you will need to add a new policy for anonymous role to see your images, allowing the content module, view-embed, media section.
-it could be that your GD or Imagemagick install is misconfigured, or cannot write to the var dir, which would be fixed by the command above. If debug shows an error "cannot create image..." it would give you some clues that this is what the problem is.

Glad to hear you are almost there!

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Conor Stapleton

Sunday 19 November 2006 9:51:25 pm

Hi Mark,

I have discovered that if I add flash or an image into the 'content structure' I can include it in my page successfully. If however I add them into the media library and then try including them in a page I do not haev the permission.

Where can I configure the anonymous user permissions. Is this actual file permissions on linux, as I have tried chmod'ing all the folders in var and in /design/templates folders?

It just seems anonymous users cannot access anything in the media library.

Another issue, which is seperate but you may have a quick answer for is this: I am adding a flash file which uses an xml file for input in a subfolder _xml. However ezpublish seems to create temp versions of all the files, and so this content structure is lost. Do I need to use an absolute path for my input xml, or is there a way around it?

thanks,
Conor

Mark Marsiglio

Sunday 19 November 2006 10:26:10 pm

You can modify the anonymous role in setup/roles & policies. There is some additional details on the process here:
http://ez.no/doc/ez_publish/technical_manual/3_8/concepts_and_basics/access_control

Regarding the flash xml, are you using Camtasia? We ran into this problem, and worked around it by creating a design/oursite/flash folder, and changing the reference in the flash files to look there. We actually had to put the flash files in with the xml (via manual FTP upload), then created a new Flash class that only references the file by name, and does not attach it. I would consider this a dirty hack because of the method, but the xml created by Camtasia is required to be in the same folder, and eZ cannot store two file class attributes in the same folder (and it actually needed 7 or 8 files).

In other words, proceed with caution and at your own risk, and look for a way to make an extension that can fix this problem.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.