Forums / Install & configuration / Site migration - windows -> Linux

Site migration - windows -> Linux

Author Message

Daniel Guerrier

Saturday 26 November 2005 1:20:16 pm

I designed a site on Windows and am currently trying to migrate to Linux.
I've dump and restored the database and copied my entire apache directory to the Linux box.
Changed the site ini settings.

After doing this I can access pages that make direct fetches for data. Any template the makes use of {$module_result.content} times out with this error.

eZ debug
Notice: eZMySQLDB::query(0.000 ms) query number per page:0 Nov 26 2005 16:03:41

SET NAMES 'latin1'

Timing: Nov 26 2005 16:03:41

Module start 'content'

Warning: ezi18n Nov 26 2005 16:03:41

No translation for file(translation.ts) in context(lib/template): 'The maximum nesting level of 40 has been reached. The execution is stopped to avoid infinite recursion.' with comment()

Warning: ezi18n Nov 26 2005 16:03:41

No translation for file(translation.ts) in context(kernel/classes/datatypes): 'XML block' with comment(Datatype name)

Warning: ezi18n Nov 26 2005 16:03:41

No translation for file(translation.ts) in context(kernel/classes/datatypes): 'XML block' with comment(Datatype name)

Warning: ezi18n Nov 26 2005 16:03:41

No translation for file(translation.ts) in context(kernel/classes/datatypes): 'XML block' with comment(Datatype name)

Warning: ezi18n Nov 26 2005 16:03:41

No translation for file(translation.ts) in context(kernel/classes/datatypes): 'XML block' with comment(Datatype name)

Warning: ezi18n Nov 26 2005 16:03:41

No translation for file(translation.ts) in context(design/base): 'Read more...' with comment()

Warning: ezi18n Nov 26 2005 16:03:41

No translation for file(translation.ts) in context(kernel/classes/datatypes): 'XML block' with comment(Datatype name)

Warning: ezi18n Nov 26 2005 16:03:41

No translation for file(translation.ts) in context(kernel/classes/datatypes): 'XML block' with comment(Datatype name)

Warning: ezi18n Nov 26 2005 16:03:41

No translation for file(translation.ts) in context(design/base): 'Read more...' with comment()

Warning: ezi18n Nov 26 2005 16:03:41
Error: eZTemplateDesignResource::overrideArray Nov 26 2005 16:03:42

Custom match file: path 'embed/flash.tpl' not found in any resource. Check template settings in settings/override.ini

Error: eZTemplateDesignResource::overrideArray, tried files Nov 26 2005 16:03:42

Error: eZTemplateDesignResource::overrideArray, tried files Nov 26 2005 16:03:43

design/standard/templates/full/feedback_form.tpl, design/standard/override/templates/full/feedback_form.tpl, design/base/override/templates/full/feedback_form.tpl, design/base/templates/full/feedback_form.tpl, design/s2h/override/templates/full/feedback_form.tpl, design/s2h/templates/full/feedback_form.tpl, extension/ezsurvey/design/standard/templates/full/feedback_form.tpl, extension/ezsurvey/design/standard/override/templates/full/feedback_form.tpl, extension/ezsurvey/design/base/override/templates/full/feedback_form.tpl, extension/ezsurvey/design/base/templates/full/feedback_form.tpl, extension/ezsurvey/design/s2h/override/templates/full/feedback_form.tpl, extension/ezsurvey/design/s2h/templates/full/feedback_form.tpl, extension/xmlarea/design/standard/templates/full/feedback_form.tpl, extension/xmlarea/design/standard/override/templates/full/feedback_form.tpl, extension/xmlarea/design/base/override/templates/full/feedback_form.tpl, extension/xmlarea/design/base/templates/full/feedback_form.tpl, extension/xmlarea/design/s2h/override/templates/full/feedback_form.tpl, extension/xmlarea/design/s2h/templates/full/feedback_form.tpl, extension/phpadsnew/design/standard/templates/full/feedback_form.tpl, extension/phpadsnew/design/standard/override/templates/full/feedback_form.tpl, extension/phpadsnew/design/base/override/templates/full/feedback_form.tpl, extension/phpadsnew/design/base/templates/full/feedback_form.tpl, extension/phpadsnew/design/s2h/override/templates/full/feedback_form.tpl, extension/phpadsnew/design/s2h/templates/full/feedback_form.tpl, extension/ezsurvey/design/standard/templates/full/feedback_form.tpl, extension/ezsurvey/design/standard/override/templates/full/feedback_form.tpl, extension/ezsurvey/design/base/override/templates/full/feedback_form.tpl, extension/ezsurvey/design/base/templates/full/feedback_form.tpl, extension/ezsurvey/design/s2h/override/templates/full/feedback_form.tpl, extension/ezsurvey/design/s2h/templates/full/feedback_form.tpl

Warning: eZTemplate Nov 26 2005 16:03:43

No template could be loaded for "setup/debug_toolbar.tpl" using resource "design"

Error: eZDebug::writeFile Nov 26 2005 16:03:43

Cannot open log file 'var/log/warning.log' for writing
The web server must be allowed to modify the file.
File logging for 'var/log/warning.log' is disabled.

Daniel Guerrier

Saturday 26 November 2005 1:32:14 pm

The cache was also cleared before the move.
Also, the admin interface seems to work fine.
apache is set to run a user and group apache.
All file are owned by apache with group apache and permissions set to 755.

The admin interface seems to be working fine.

Frederik Holljen

Sunday 27 November 2005 3:11:07 am

Even though you say that the permissions are ok it looks like you are having permission problems. Check that your web server can read _all_ files and make sure that the webserver can write to the cache directories while you are at it (var/cache).

Daniel Guerrier

Sunday 27 November 2005 11:30:37 am

If that were the case why would the admin interface have the ability to edit the same data?

Also the indecx page was overriden and it works fine.

Is there a doc for the permissions needed for ez to funtion properly? I gave global read write execute to everything in the webroot and the same error occurs.

Daniel Guerrier

Sunday 27 November 2005 1:58:46 pm

Can someone please take a look at this.
This is an error in one of the pages I am trying to load, which works in windows.

Error: eZTemplateDesignResource::overrideArray  	Nov 27 2005 16:42:36

Custom match file: path 'xmlarea_embed_image.tpl' not found in any resource. Check template settings in settings/override.ini

Error: eZDebug::writeFile 	Nov 27 2005 16:42:36

Cannot open log file 'var/log/error.log' for writing
The web server must be allowed to modify the file.
File logging for 'var/log/error.log' is disabled.

Here is the permissions on the error log files and all other files.

-rwxrwxr-x  1 apache apache 179961 Nov 27 16:37 error.log
-rwxrwxr-x  1 apache apache 204822 Nov  6 17:49 error.log.1
-rwxrwxr-x  1 apache apache 204856 Oct 27 18:41 error.log.2
-rwxrwxr-x  1 apache apache 204857 Oct  5 18:38 error.log.3

Here is the httpd process.

root     18532     1  0 16:52 ?        00:00:00 /usr/local/apache2/bin/httpd -k start
apache   18533 18532  0 16:52 ?        00:00:00 /usr/local/apache2/bin/httpd -k start
apache   18534 18532  0 16:52 ?        00:00:00 /usr/local/apache2/bin/httpd -k start
apache   18535 18532  0 16:52 ?        00:00:00 /usr/local/apache2/bin/httpd -k start
apache   18536 18532  0 16:52 ?        00:00:00 /usr/local/apache2/bin/httpd -k start
apache   18537 18532  0 16:52 ?        00:00:00 /usr/local/apache2/bin/httpd -k start

Here is the /etc/passwd and /etc/group entries for the apache user.

apache:x:500:500::/var/apache:/sbin/nologin
apache:x:500:apache

The errors in the first entry are still occuring even if I set everything to 777.

Daniel Guerrier

Monday 28 November 2005 6:51:45 am

Any takers?
This doesn't seem to be a simple permissions issue, becuase the homepage seems to work and that is a overridden pagelayout template that is in the same place and has the same permissions as the files that are in the error. The files were moved using WinSCP ad having all .tpl files sent over as ASCII.

Also images appear without issue.
Thanks

Daniel Guerrier

Monday 28 November 2005 2:24:58 pm

ez Dudes.
Any suggestions would be much appreciated.
It doesn't make sense that the admin interface can read edit the same data. I would assume that ez is making use of the same templates on both the admin and display side. Again, I gave all files 777 and I am still getting the same error.

All I did was move the entire webroot from my apache on windows to the apache on linux restored the database. Changed site.ini setting to acount for the environment changes, in this case just the mysql username and password. Changed ownership to apache and right now have all files set to 777. if it can't write or find files with globe write access then there has to be something else. Just in case this makes a difference here is my virtual host set up.

I am at a wall, and I would really like to have the site live in the near future. Again any help would be very much appreciated.

NameVirtualHost 82.165.182.67
<VirtualHost 82.165.182.67:*>
    <Directory /home/apache2/vhosts/savehiphop.net/htdocs>
        Options FollowSymLinks
        AllowOverride None
    </Directory>

    # have fallback if mod_rewrite is not existent
   # DirectoryIndex index.php

 AddOutputFilterByType DEFLATE text/html text/plain text/xml
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteRule !(((^/|^/design|^design|^/var/.*/storage|^/var/storage|^/var/.*/cache|^/var/cache|^/extension
/.*/design|^/kernel/setup/packages|^/packages|^/share/icons).*\.(gif|css|jpg|png|jar|js|ico|pdf|swf|flv|php))|^/e
xtension/phpadsnew/phpadsnew/.*|^/forum/.*|^/forum.*)$ /index.php
    </IfModule>
DocumentRoot /home/apache2/vhosts/savehiphop.net/htdocs
ServerName u15197440.onlinehome-server.com
ServerAlias u15197440.onlinehome-server.com
</VirtualHost>

If you want to see first hand what the problem is you can go to http://u15197440.onlinehome-server.com
I have debug output turned on.

When the homepage loads you will notice that S2h.tv and weedshare links work, but the others do not. The only defference between the homepage, weedshare page and s2h.tv page is that they are all pagelayout overrides that have code for direct fetches. All other pages are standard line and full overrides that make use of module_result.content

Other than that I can not see why this is happening.

Daniel Guerrier

Monday 28 November 2005 7:08:25 pm

Please help!!
I just went thru every single directory and all files and directories are owned by apache and has global read write execute.

Anyone chime in please!!

Gurudutt Verma

Tuesday 29 November 2005 1:49:31 am

Hi Daniel

see this if this is helpful to you.

http://ez.no/community/forum/install_configuration/could_not_load_translation_file

http://ez.no/community/forum/install_configuration/the_maximum_nesting_level_of_40_has_been_reached

Did you clear cache, try to remove mannualy from
/var/[plain or your cache dir]/cache and empty this folder.

Daniel Guerrier

Tuesday 29 November 2005 4:35:55 am

hmm..
Can you tell me where this comes from?
SET NAMES 'latin1'
My site is supposed to be english and that message isn't seen on install that I am moving from.

Maybe if I get rid of that it will help.

I did manually delete the cache from the filesystem as well as adjsted the template.ini. Ez seemed to ignore the change and continues to report a max of 40.

Daniel Guerrier

Tuesday 29 November 2005 8:07:30 am

This doesn't make any sense.
I am getting this error

Cannot open log file 'var/log/error.log' for writing
The web server must be allowed to modify the file.
File logging for 'var/log/error.log' is disabled.

But ez can create the notice.log and warning.log file which is in the same place that it says it can't create the error.log. Does anyone have any idea what could make it have th ability to create and read some files and not others even when they are in the same place and have the same permission?

I just checked again and the error.log has been created.

There has to be a file that holds the expected permissions or the permissions that should be used to create and read files.

I'm getting a parse errors for templates on the homepage. So this means that eZ can read files from that directory.

Error: eZTemplate @ design/s2h/override/templates/indexpagelayout.tpl:205[6]  	Nov 29 2005 14:26:31

parser error @ design/s2h/override/templates/indexpagelayout.tpl:205[6]
End tag "def" for function which does not accept children, ignoring tag

The only difference is the use of module_result.content.

Gurudutt Verma

Tuesday 29 November 2005 12:34:45 pm

Hi Daniel

I can undetstand the situeation,

but it is really difficult to say from here without looking into it.
I just saw the link provided by you.

Warning: eZImageShellHandler::convert  	Nov 29 2005 15:23:43

Failed executing: c:\imagemagick-5.5.7-q8/convert.exe '-quality' '75' '-geometry' '360x440>'

Could you confirm this, it might be possible it is trying to get path in windows style (c:\).

You might get some more help from apache log as well.

I haven't faced this problem before, even I have transfer many sites from windows to linux and linux to windows but if apache/php/mysql settings are proper then there shouldn't be problem so at the movment I can say either it is permission prblem or apache/php/mysql setting is missing something and I can't guess anything here.

Daniel Guerrier

Wednesday 30 November 2005 8:06:11 am

As I suspected, this had nothing to do with file permissions. For some reason eZ thru the error because of this block of code that I had for debug purposes

{$module_result.node_id}<br/>
{$module_result.path[1]|attribute( show, 1 )}<br/>
{$module_result.content_info.object_id}<br/>
Depth: {$module_result.content_info.node_depth}

Don't know why, because the error given makes no sense at all.

I am also gettin the error for this line of code.

<div class="artist_banners"><a href={$node.url_alias|ezurl}><img src="{$node.object.data_map.banner_image.content[original].url}"></a></div>

Specifically the $node.object portion.

I have to see how I can work around that.

This would seem to be a bug to me since the exact same code works on windows/apache/php 4.4.0

Gurudutt Verma

Thursday 01 December 2005 12:26:12 am

Hi Daniel

I hope you have got something and still not
then just go check your roles and policy and see if proper roles for siteaccess/section are assigned at least for Anonymous user.

Daniel Guerrier

Thursday 01 December 2005 12:23:09 pm

Not sure what you are refering to. However I can tell you this.

This works on Windows/Apache2.0.55/PHP4.4.0
But throws the error in the first entry in this post on.
Fedora Core2/Apache2.0.55/php4.4.0

<div class="artist_banners"><a href={$node.url_alias|ezurl}><img src="{$node.object.data_map.banner_image.content[original].url}"></a></div>

Had to change to this to get it to work on Linux.

<div class="artist_banners"><a href={$node.url_alias|ezurl}><img src="{$node.data_map.banner_image.content.original.url}"></a></div>

I don't mind the code change but it would help if eZ generated errors that was remotely related to what the real issue was.

Gurudutt Verma

Friday 02 December 2005 12:42:20 am

Congratulations Daniel

Finnaly you got it worked.

Actueally this is the best way of coding :-)

Cheers

Daniel Guerrier

Tuesday 06 December 2005 8:57:39 am

I did get it to work. However, shouldn't someone be concerned about the drastic difference in behavior when running the same code on different operating systems?

Gurudutt Verma

Tuesday 06 December 2005 12:24:05 pm

Hi Daniel

If you can reproduce it then please report this as bug and explain how to reproduce it. If it is reproduceble then it will surely be fixed there.

Please describe all steps and post it on bug section of this site.

Thank you for your dedication.

Ɓukasz Serwatka

Tuesday 06 December 2005 10:55:26 pm

Hi Daniel,

I guess that you experiencing this problem:
http://ez.no/community/bugs/call_to_undefined_function_storedata

Check user comments for more info.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog