Possible to remove /path/to/ez/index.php? under FastCGI?

Author Message

Luis Cruz

Tuesday 14 August 2007 8:24:31 pm

Greetings; I have been searching through the forums and trying a few things out but have not had any luck finding a solution to my problem. Here is what I would like to do; under the root of my web server directory the structure looks like this:

/blog
/gallery
/ezpublish-3.9.2
...

eZ is setup to run in URI virtual host mode with the site responding to www.lupinencyclopedia.com/ezpublish-3.9.2/index.php?/cms (admin) and www.lupinencyclopedia.com/ezpublish-3.9.2/index.php?/eng (user). Both of these URLs work fine (some oddness happens inside but is outside scope of this question).

What I want is for my domain to serve up the admin side via www.lupinencyclopedia.com/cms and the user side just via www.lupinencyclopedia.com. I've tried the various configs listed in this thread (http://ez.no/community/forum/install_configuration/htaccess_hidden_at_last) with no luck. That is including toggling ForceVirtualHost on and off.

Is it possible to remove the /ezpublish-3.9.2/index.php? from my URLs under this sort of configuration? If not, can I at least get rid of the index.php? if I move the structure under /ezpublish-3.9.2 up to the root of the server?

Cheers.

- luis

Server software info:

Apache/1.3.37 (Unix)
mod_fastcgi/2.4.2 
PHP/4.4.4

Björn Dieding@xrow.de

Wednesday 15 August 2007 6:56:30 pm

we are running mod_fcgid quite successfull under apache2

1.) move your site to the docroot
2.) apply the rewrite rules via .htaccess

Options -Indexes

DirectoryIndex index.php

RewriteEngine On

#Clustered setup switch
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteRule ^/var/([^/]+/)?storage/images(-versioned)?/.*  /index_image-common.php [L]
        
RewriteCond %{HTTP_HOST} ^webdav\..*
RewriteRule ^(.*) webdav.php [L]

RewriteCond %{HTTP_HOST} ^soap\..*
RewriteRule ^(.*) soap.php [L]

RewriteRule ^(.*)favicon\.ico - [L]
RewriteRule ^robots\.txt - [L]
RewriteRule ^sitemap\.xml - [L]
RewriteRule ^var/cache/debug.html.* - [L]
RewriteRule ^var/[^/]+/cache/debug.html.* - [L]
Rewriterule ^var/storage/.* - [L]
Rewriterule ^var/[^/]+/storage/.* - [L]
RewriteRule ^var/cache/texttoimage/.* - [L]
RewriteRule ^var/[^/]+/cache/texttoimage/.* - [L]
Rewriterule ^design/[^/]+/(stylesheets|images|javascript|flash)/.* - [L]
Rewriterule ^share/icons/.* - [L]
Rewriterule ^extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?|flash)/.* - [L]
Rewriterule ^packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
RewriteRule .* index.php [L]

3.) set ForceVirtualHost=enabled
4.) set DefaultAccess=eng
5.) set RemoveSiteAccessIfDefaultAccess=enabled

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Luis Cruz

Sunday 19 August 2007 12:54:21 pm

Björn, thanks; that works without any issues. Would have liked to keep ez in a separate directory under the webroot, but I'll take whatever works.

Thanks again.

Cheers.

- luis

Luis Cruz

Sunday 19 August 2007 8:08:08 pm

One wrinkle to add to this; my site runs on a shared server which means I have no direct control over php.ini. I want to be able to tweak the settings available in php.ini, but this means I have to jump through a few hoops on the server to use a custom php.ini file.

Specifically, I have to add these lines to .htaccess in the webroot:

AddHandler fastcgi-script .fcgi
Action application/x-httpd-php-cgi /php.fcgi

The php.fcgi file contains these lines:

#!/bin/sh
PHPRC="/path/to/my/php/config/"
export PHPRC
exec /path/to/php4-fcgi

The problem is that adding the two lines to .htaccess causes the rewrite rules to enter an infinite loop. The support people at my hosting center believe that nothing can be done about this; if I want to use a custom php.ini file, the rewrite rules won't work. If I want the rewrite rules to work, I don't get the custom php.ini file.

Anyone crack this nut already?

Cheers.

Björn Dieding@xrow.de

Monday 20 August 2007 12:23:36 am

In just case when you wanna remove ezpublish-*/index.php from the path anyway.. I would put it in root... else you just get other unwanted problems.

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Björn Dieding@xrow.de

Monday 20 August 2007 12:30:40 am

#!/bin/sh
PHPRC="/path/to/my/php/config/"
export PHPRC
exec /path/to/php4-fcgi

AFAIK PHPRC just works for php5... It might be the case the the fcgi setup just works wif you add it over apache conf and not .htaccess.

I use it like this...

DefaultInitEnv PATH "c:/php;c:/oracle/instantclient_10_2;C:/WINDOWS/system32;c:/WINDOWS;c:/WINDOWS/System32/Wbem;"
DefaultInitEnv SystemRoot "c:/Windows"
DefaultInitEnv SystemDrive "c:"
DefaultInitEnv TEMP "c:/WINDOWS/TEMP"
DefaultInitEnv TMP "c:/WINDOWS/TEMP"
DefaultInitEnv windir "c:/WINDOWS"
DefaultInitEnv ORACLE_HOME "c:/oracle/instantclient_10_2"
DefaultInitEnv TNS_ADMIN "c:/oracle/instantclient_10_2"
DefaultInitEnv NLS_LANG "American_America.US7ASCII"
DefaultInitEnv NLS_NUMERIC_CHARACTERS ".,"

IPCConnectTimeout 600
IPCCommTimeout 600
AddHandler fcgid-script .php
<Directory "C:/">
    FastCgiAccessCheckerAuthoritative Off
    FCGIWrapper "c:/php/php.exe -cC:\php\php.ini" .php
    Options ExecCGI
    allow from all
</Directory>
DefaultInitEnv PHPRC "c:/php5/"
DefaultInitEnv PATH "c:/php5;c:/oracle/instantclient_10_2;C:/WINDOWS/system32;c:/WINDOWS;c:/WINDOWS/System32/Wbem;"
DefaultInitEnv SystemRoot "c:/Windows"
DefaultInitEnv SystemDrive "c:"
DefaultInitEnv TEMP "c:/WINDOWS/TEMP"
DefaultInitEnv TMP "c:/WINDOWS/TEMP"
DefaultInitEnv windir "c:/WINDOWS"
DefaultInitEnv ORACLE_HOME "c:/oracle/instantclient_10_2"
DefaultInitEnv TNS_ADMIN "c:/oracle/instantclient_10_2"
DefaultInitEnv NLS_LANG "American_America.US7ASCII"
DefaultInitEnv NLS_NUMERIC_CHARACTERS ".,"

IPCConnectTimeout 600
IPCCommTimeout 600
AddHandler fcgid-script .php
<Directory "C:/">
    FastCgiAccessCheckerAuthoritative Off
    FCGIWrapper "c:/php5/php-cgi.exe -cC:\php5\php.ini" .php
    Options ExecCGI
    allow from all
</Directory>

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

pb j

Tuesday 16 October 2007 9:26:15 pm

Very Familiar,

It's almost like this Thread was meant for someone in my situation. How familiar does all of this sound to me. The only difference is is that my webhost does not support .htaccess files. Does anyone have any suggestions on how to fix this problem?

One of the other problems is is that not only am I having a problem with .htaccess support, but also too is that the Version of ezPublish that I am using is 3.10 (PHP 4.4 rquired) and the host provides only 4.3.11 support, this is also one of the error messages that I am getting at the Finetune in the Wizard.

Also, after completion of the Wizard I go back to root and/or index.php (path either/or to ezPublish) and I end up back to the first page of the Setup Wizard. It's deffinately not magic. Any suggestions?

Any help that may be provided, would be very highly appreciated.

Thank you

Xavier Dutoit

Wednesday 17 October 2007 12:33:34 am

Hi,

Long time ago, I did manage to have it run without mod rewrite.

Basically, the idea was to have a custom 404 php file, that would call the index.php

Did work, but that's a hack and you'll be on your own for that one as no one has such a config. Beside if you don't have access to your .htaccess, it probably means you don't have enough power/cpu/memory to make ez runs properly.

I'd suggest to find another provider.

X+

http://www.sydesy.com

pb j

Wednesday 17 October 2007 1:49:04 am

Thanks,

But, memory is not the issue 5000 MB. According to Tech Support at my webhost. 1. Is apparently there is no support for the .htaccess due to that the Server is already configured to run such a file as global and I was told that if I were to upload such a file that it would change the global setting of the one that is already on the server and change the settings for others that have a Webhosting Account.

Either that is true, or they are just pulling my leg?

And 2. Is that for some reason a dot file is not a valid file name that is allowed, I have no idea why. Strange, huh?

Would you be able to tell me if it is possible to upload ezpublish to a webhosting account and possibly give me a quick run-down on how to do it without having any errors such as the one of php version is invalid value. Running 4.3.11 and 4.4 minimum is needed. And something to do with a CGI issue.

Thank you for any help that you may be able to provide.

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