Invalid path generated by eZ publish

Author Message

Stephen Lai

Thursday 21 September 2006 8:01:01 pm

I have installed eZ publish 3.8.4 with normal installation, Apache 1.3.37 and MySQL 4.1.21 on Win XP.

The eZ publish is installed in the sub-directory of the apache root, that is <web server root>/cms/ , with admin path = cms_admin and user path = en.

When I access the login page of admin site first time with the link
http://localhost/cms/index.php/?cms_admin, the page displayed correctly.

However, after clearing all the caches in the admin interface, the page displayed incorrectly.

I found that the image path and the css path are incorrect in the html output.

The correct path should be /cms/design/admin/stylesheets/site.css but I found that the html output showing /design/admin/stylesheets/site.css.

I have tried to clear the caches several times. The page sometimes displays correctly and sometimes displays incorrectly. I haven't changed any configuration or settings before and after clearing the caches.

Are there any problems in clearing the caches or in generation of html?
I am really confused. The big problem is that after the page showing correctly, I can't logon the admin interface to clear the caches anymore.

I am feeling that the eZ publish is unstable.

What is the cause of the problem? Any solution?

Łukasz Serwatka

Thursday 21 September 2006 11:49:16 pm

Hello Stephen, and welcome to eZ publish Community.

I would recommend change your Apache configuration and install PHP as Apache module instead CGI. You will get performance impact also mod_php is recommended for eZ publish.

Did you change any eZ publish settings after installation? Check if ForceVirtualHost is disabled in site.ini and overrides (settings/override/ or settings/siteaccess/(siteaccess_name)).

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

Stephen Lai

Friday 22 September 2006 3:41:05 am

Thanks your help first.
After using php as Apache module, the path becomes correct and the template shows correctly.
However, the content cannot be displayed with the error message shown below.

Any incorrect settings caused this error?

*********************************************************************************************************
Module not found
The requested module index.php could not be found.

Possible reasons for this are:

- The module name was misspelled, try changing the URL.
- The module does not exist on this site.
- This site uses siteaccess matching in the URL and you didn't supply one, try inserting a siteaccess name before the module in the URL .
*********************************************************************************************************

Łukasz Serwatka

Friday 22 September 2006 5:28:59 am

Do you have VirtualHost mode enabled? Check your configuration as mention in this documentation page:

http://ez.no/doc/ez_publish/technical_manual/3_8/installation/virtual_host_setup/virtual_host_example

Remember to clear all the cache after VH setup.

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

Stephen Lai

Sunday 24 September 2006 8:16:22 pm

I have kept the ForceVirtualHost as default so that "ForceVirtualHost=false". Should it be changed to true?

Since I can't access the admin interface, how can I clear the cache? I tried to clear the cache by remove all cache and .cache directories in var directory. Will the caches be cleared?

I have tried to set the ForceVirtualHost to true or false and clear the caches. However, the "Module not found" error still exists. Any other reason causes the "Module not found" problem?

Attached the virtual host setting in apache configuration.
************************************************************************************************************
LoadModule php4_module "D:/php/php4apache.dll"
AddModule mod_php4.c

DocumentRoot "D:/home/docs"

<IfModule mod_mime.c>
...
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
...
</IfModule>

<VirtualHost *>
<Directory "D:/home/docs">
Options FollowSymLinks
AllowOverride None
</Directory>

<IfModule mod_php4.c>
php_admin_flag safe_mode Off
php_admin_value register_globals 0
php_value magic_quotes_gpc 0
php_value magic_quotes_runtime 0
php_value allow_call_time_pass_reference 0
</IfModule>

DirectoryIndex index.php

<IfModule mod_rewrite.c>
# Enable Rewrite Engine
RewriteEngine On
RewriteLog "logs/rewrite.log"
RewriteLogLevel 9

# Pass through all request uri which without /cms prefix
# It implies that all non-cms path do not go through the
# cms content rewrite rule
RewriteCond %{REQUEST_URI} !^/cms.*
Rewriterule .* - [L]

# Rewrite rule for cms content
Rewriterule ^/cms/var/storage/.* - [L]
Rewriterule ^/cms/var/[^/]+/storage/.* - [L]
RewriteRule ^/cms/var/cache/texttoimage/.* - [L]
RewriteRule ^/cms/var/[^/]+/cache/texttoimage/.* - [L]
Rewriterule ^/cms/design/[^/]+/(stylesheets|images|javascript)/.* - [L]
Rewriterule ^/cms/share/icons/.* - [L]
Rewriterule ^/cms/extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
Rewriterule ^/cms/packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
RewriteRule ^/cms/packages/styles/.+/thumbnail/.* - [L]
RewriteRule ^/cms/favicon\.ico - [L]
RewriteRule ^/cms/robots\.txt - [L]
# Uncomment the following lines when using
# popup style debug.
# RewriteRule ^/var/cache/debug\.html.* - [L]
# RewriteRule ^/var/[^/]+/cache/debug\.html.* - [L]
RewriteRule cms/.* /cms/index.php
</IfModule>

DocumentRoot "D:/home/docs"
ServerName localhost
</VirtualHost>
************************************************************************************************************

Stephen Lai

Tuesday 26 September 2006 1:51:03 am

I think the reason of the problem is my mistake.

The link to access the site should be

http://localhost/cms/index.php?/cms_admin

instead of

http://localhost/cms/index.php/?cms_admin

All the pages display correctly in using php as CGI binary.

With your suggestion, I change to use php as Apache module.
After change, the page in user siteaccess shows correctly but there is a problem in admin interface.

The "Module not found" problem appears after logon the admin interface.
I access the admin interface with http://localhost/cms/index.php?/cms_admin successfully.
After input username and password and press Log in button, a page with "Module not found" message appears in the content area. The design shown in the page is in default siteaccess. Also, the URL in the browser has been changed to http://localhost/cms/index.php/cms_admin/user/login which does not have the question mark.

Question 1
Is it correct to access the site with the question mark when using php as Apache module?

Question 2
Is it correct that the URL changed from http://localhost/cms/index.php?/cms_admin to http://localhost/cms/index.php/cms_admin/user/login ?

Question 3
What is the reason of "Module not found" problem after logon? Any solution?

Question 4
Are there any difference in rewrite module setting between using php as Apache module and using php as CGI binary? If yes, what is the difference?

Travis Wahl

Tuesday 31 October 2006 4:07:14 pm

I imported a Java File from my Flash Drive and when i try to compile it, it says that my Flash is an invalid path. I also saved the same Java file to My Documents and tried to import it and compile it again but the same invalid path error came up. How do I fix this?

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