Error 403: Forbidden

Author Message

Piotr Dabrowski

Tuesday 07 April 2009 4:27:04 pm

Hi,
I got EzPublish 4.0.3 setup in hosting environment, and got strange non consist behavior.
I created a folder, created some text and inserted some image as a objects.
Save it and there was no problem. After I edited it, added another image and saved.
Edited again, added another image and when I saved I got "Error 403: Forbidden"
message. Initially I thought that I've made something wrong so deleted folder.
Repeated the process again and the same story.
Could somebody give me a hint where to look for the problem?

Thanks
Peter

Piotr Dabrowski

Thursday 09 April 2009 4:30:01 pm

Hi
I narrowed this to it:

No such locale default_html!
[ Apr 10 2009 09:10:02 ] [58.172.155.152] error/view.php:
Error ocurred using URI: /foreveramber/index.php/content/edit/442/2/default_html/favicon.ico

My Locale is eng_Au and I not use any other translations.

Anny hints?
Thanks
Peter

Piotr Dabrowski

Friday 10 April 2009 8:02:54 am

Hi,
I give up on this.
Reinstalled ezpublish again but this time selected only en_GB so this error message disappeared but still got ez crashing during edit got different error message:

[client 58.172.155.152] mod_security: Access denied with code 403. Pattern match "(insert[[:space:]] into. values|select.*from. [a-z|A-Z|0-9]|select. from|bulk[[:space:]] insert|union. select|convert. \\\\(.*from)" at POST_PAYLOAD [id "300016"][rev "2"] [msg "Generic SQL injection protection"] [severity "CRITICAL"]

And this seems solved it:

in .htaccess added:

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

And still got one unsolved issue. Application crashing when I try to edit classes.
It crashing on editing eny classes but message is the same:

[Fri Apr 10 14:01:50 2009] [error] PHP Parse error: syntax error, unexpected $end in /hsphere/local/home/forevera/foreveramber.info/foreveramber/kernel/classes/datatypes/ezisbn/ezisbntype.php on line 268

Maybe somebody will have a hint for this.

Thanks
Peter

Piotr Dabrowski

Friday 10 April 2009 3:15:46 pm

Hi,
It is beyond of my knowledge but this datatype creating a problem
in my Ezpublish 4.0.3 installation in hosting environment.
Removed entire ezisbn directory, still got an error:

Error: eZDataType::loadAndRegisterType Apr 11 2009 07:56:50

Datatype not found: 'ezisbn', searched in these directories: kernel/classes/datatypes

but EZ stop crashing and I could continue with my work.
It is a bug in software or I missing something environment or configuration?

ezisbntype.php
line 268

 // Extract the different parts and set the hyphens correctly.
            $isbn13 = new eZISBN13();
            $isbn13Value = $isbn13->formatedISBNValue( $number13, $error );
            $contentObjectAttribute->setAttribute( self::CONTENT_VALUE, $isbn13Value );
            return true;

Cheers
Peter

Paul Wilson

Friday 10 April 2009 5:26:25 pm

Hi Peter,

Hopefully I can give you some useful suggestions...

I use the eng_AU translation (eZ versions 3.+, 4.01, 4.03, 4.1) and have not had the problem you're experiencing.

I suspect there is something in your install process that is causing the problem and the things you're looking at (mod_security, eZDataType) are symptoms that can be ignored.
A 403 error seems more like a server-level configuration issue (ie how eZ Publish is configured with permissions) rather than something to do with eZ Publish itself.

I suggest three things to try:
1 >> The first page of the eZ Publish install process does various checks and usually asks you to either "chown" or- "chmod" some eZ Publish directory permissions. If you used the "chown" method in the past, try the chmod method instead (both are listed on that first install page). You could re-install the site to see this, or simply trigger it to see what the alternative command is. (There is a setting "checkvalidity" in site.ini user siteaccess - if you don't understand this, go for the reinstall approach).

2 >> Check your .htaccess file (should be in the root folder of eZ Publish). Make sure you've read through what it says - to get to the point of creating a folder, you must have already got most of this pretty right, but there may be some other element there.

3 >> In the Administration site (guessing you can get there if you were creating a folder), go to the Settings tab, then try the "Upgrade Check" to check that all eZ Publish files and database elements are present and correct.

I really suspect option 1 is the best course for you - if this is not done quite correctly, everything can seem to be fine, but then eZ Publish hasn't got the environment it needs to work, so problems come up when editing things.

Regards, hth.

- Paul

Piotr Dabrowski

Friday 10 April 2009 8:18:24 pm

Hi Paul,
I got EZ 4.0.3 and 4.1.0 installed on my test box , and didn't encounter any problems.
All trouble which I got coming from installing in hosted environment.
I used to run ez 3.6 there for more than a year without any trouble but wanted to get newer version , so moved my account to PHP 5.2.6 server. I could not install ez4.1 as they not
supporting Postgres 8 series which is required by 4.1 . So ez4.0.3 was a choice.
The mob which I using for hosting "Quadrahosting" got linux/unix servers but I wasn't able
to run ez installer properly, any attempt and up with timing out and crashing and the logs didn't told me much. PHP memory is 64M I increased it to 128M and higher numbers for timing.
In the end I populated the database manually and run installer with plain_site and selecting
to accept existing data, and in this condition it got through, but still coming with some problems from time to time. I want to debug installation before start rebuilding my site.

I run upgrade check as you suggested, database was OK
Are you recon that I should replace this files, maybe they got corrupted somehow?

Warning: it is not safe to upgrade without checking the modifications done to the following files:

bin/php/ezcache.php
kernel/classes/datatypes/ezisbn/ezisbntype.php
share/translations/ger-DE/translation.ts

My .htaccess


<IfModule mod_security.c>
 SecFilterEngine Off
 SecFilterScanPOST Off
</IfModule>


php_value magic_quotes_gpc 0
php_value magic_quotes_runtime 0
php_value register_globals 0

php_value allow_call_time_pass_reference 0
php_value date.timezone Australia/Sydney
php_value max_execution_time 300
php_value max_input_time 600


 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 ^design/[^/]+/override/(stylesheets|images|javascript)/.* -[L]
 Rewriterule ^share/icons/.* - [L]
 Rewriterule ^extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?|flash)/.* - [L]
 Rewriterule ^packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
 RewriteRule .* index.php [L]
 #RewriteCond $1 !^(images|system|themes|favicon\.ico|robots\.txt|index\.php) [NC]
 

Cheers
Peter

Piotr Dabrowski

Friday 10 April 2009 9:23:20 pm

Paul you are brilliant!

ezcache.php was missing , another two file sizes has been smaller.
Replaced this files, cleared cache and problems gone so far.

Thank you for hints!

Peter

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