Erro Drupal

Events happening in the community are now at Drupal community events on www.drupal.org.
toni360's picture

Gostaria de obter ajuda nesta questão, que coloquei no forum do drupal.org. Não sei se aqui alguem pode ajudar-me. Tinha o meu site a funcionar muito bem até ontem e derepente o caos apareceu. Aqui fica o introduzi no forum.

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@ipta.co.pt and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


This is the error my drupal website without no reason seems to show, i can see the front office of my website, some pages do not work, like the search page and my administration area suffers the same error.

I trigged the error even if i type an page that dont exist...the error is the same...
ex:
test.test/hello (exists) - no error
test.test/hello2 (dont exist) - the same error appears

I tried some solution in the forum...like .htaccess comment and rewrite... i just do not know what to do anymore...

Please help me, the site was working fine...but something triggered this error...the hosting service says that nothing changed from their side.

Comments

pirex, Antes de mais, ao

borfast's picture

pirex,

Antes de mais, ao tentar aceder a www.ipta.co.pt, sou levado para www.carloscouto.net, o que me leva logo a pensar que provavelmente há algo errado na configuração do servidor. De facto diria que pode ser algo de errado com o .htaccess mas só vendo...

Boas

toni360's picture

Neste momento é mesmo assim, eu estou a trabalhar na directoria web, ou seja o site vai ser em www.ipta.co.pt/web

obrigado pelo feedback.

.htaccess


#

Apache/PHP/Drupal settings:

#

Protect files and directories from prying eyes.

Order allow,deny

Don't show directory listings for URLs which map to a directory.

Options -Indexes

Follow symbolic links in this directory.

Options +FollowSymLinks

Make Drupal handle any 404 errors.

ErrorDocument 404 /index.php

Force simple error message for requests for non-existent favicon.ico.

# There is no end quote below, for compatibility with Apache 1.3.
ErrorDocument 404 "The requested file favicon.ico was not found.

Set the default handler.

DirectoryIndex index.php

Override PHP settings. More in sites/default/settings.php

but the following cannot be changed at runtime.

Requires mod_expires to be enabled.

# Enable expirations.
ExpiresActive On

# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600

# Do not allow PHP scripts to be cached unless they explicitly send cache
# headers themselves. Otherwise all scripts would have to overwrite the
# headers set by mod_expires if they want another caching behavior. This may
# fail if an error occurs early in the bootstrap process, and it may cause
# problems if a non-Drupal PHP file is installed in a subdirectory.
ExpiresActive Off

Various rewrite rules.

RewriteEngine on

# If your site can be accessed both with and without the 'www.' prefix, you
# can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
#
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# adapt and uncomment the following:
# RewriteCond %{HTTP_HOST} ^example.com$ [NC]
# RewriteRule ^(.)$ http://www.example.com/$1 [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment and adapt the following:
# RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
# RewriteRule ^(.
)$ http://example.com/$1 [L,R=301]

# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /web
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /

### BOOST START ###
AddDefaultCharset utf-8

Header set Expires "Sun, 19 Nov 1978 05:00:00 GMT"
Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"

AddCharset utf-8 .html
AddCharset utf-8 .css
AddCharset utf-8 .js
AddEncoding gzip .gz

ForceType text/html

ForceType text/javascript

ForceType text/css

# Gzip Cookie Test
RewriteRule boost-gzip-cookie-test.html cache/perm/boost-gzip-cookie-test.html.gz [L,T=text/html]

# GZIP - Cached css & js files
RewriteCond %{HTTP_COOKIE} !(boost-gzip)
RewriteCond %{HTTP:Accept-encoding} !gzip
RewriteRule .* - [S=2]
RewriteCond %{DOCUMENT_ROOT}/web/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_.css.gz -s
RewriteRule .* cache/perm/%{SERVER_NAME}%{REQUEST_URI}_.css.gz [L,QSA,T=text/css]
RewriteCond %{DOCUMENT_ROOT}/web/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_.js.gz -s
RewriteRule .* cache/perm/%{SERVER_NAME}%{REQUEST_URI}_.js.gz [L,QSA,T=text/javascript]

# NORMAL - Cached css & js files
RewriteCond %{DOCUMENT_ROOT}/web/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_.css -s
RewriteRule .* cache/perm/%{SERVER_NAME}%{REQUEST_URI}_.css [L,QSA,T=text/css]
RewriteCond %{DOCUMENT_ROOT}/web/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_.js -s
RewriteRule .* cache/perm/%{SERVER_NAME}%{REQUEST_URI}_.js [L,QSA,T=text/javascript]

# Caching for anonymous users
# Skip boost IF not get request OR uri has wrong dir OR cookie is set OR request came from this server OR https request
RewriteCond %{REQUEST_METHOD} !^(GET|HEAD)$ [OR]
RewriteCond %{REQUEST_URI} (^/web/(admin|cache|misc|modules|sites|system|openid|themes|node/add))|(/(comment/reply|edit|user|user/(login|password|register))$) [OR]
RewriteCond %{HTTP_COOKIE} DRUPAL_UID [OR]
RewriteCond %{HTTP:Pragma} no-cache [OR]
RewriteCond %{HTTP:Cache-Control} no-cache [OR]
RewriteCond %{HTTPS} on
RewriteRule .* - [S=3]

# GZIP
RewriteCond %{HTTP_COOKIE} !(boost-gzip)
RewriteCond %{HTTP:Accept-encoding} !gzip
RewriteRule .* - [S=1]
RewriteCond %{DOCUMENT_ROOT}/web/cache/normal/%{SERVER_NAME}%{REQUEST_URI}%{QUERY_STRING}.html.gz -s
RewriteRule .* cache/normal/%{SERVER_NAME}%{REQUEST_URI}
%{QUERY_STRING}.html.gz [L,T=text/html]

# NORMAL
RewriteCond %{DOCUMENT_ROOT}/web/cache/normal/%{SERVER_NAME}%{REQUEST_URI}%{QUERY_STRING}.html -s
RewriteRule .* cache/normal/%{SERVER_NAME}%{REQUEST_URI}
%{QUERY_STRING}.html [L,T=text/html]

### BOOST END ###

# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

$Id: .htaccess,v 1.90.2.5 2010/02/02 07:25:22 dries Exp $

OK, assim já consigo aceder

borfast's picture

OK, assim já consigo aceder ao endereço e ver o erro.
E se esse texto é exactamente o que está no .htaccess, então o problema está logo aí: há várias linhas que deviam estar "comentadas" (com um '#' no início) e não estão, nomeadamente:

  • Protect files and directories from prying eyes.
  • Don't show directory listings for URLs which map to a directory.
  • Follow symbolic links in this directory.
  • Make Drupal handle any 404 errors.
  • Force simple error message for requests for non-existent favicon.ico.
  • Set the default handler.
  • Override PHP settings. More in sites/default/settings.php
  • but the following cannot be changed at runtime.
  • Requires mod_expires to be enabled.
  • Various rewrite rules.

De resto parece estar tudo OK. Se for este o problema, basta adicionar um '#' ao início de cada linha e fica tudo bem.

Se não for este o problema...

Retirando as configurações do Boost o problema desaparece? Pode ser alguma linha que tenha alguma coisa incorrecta (acho que não mas não sou um parser de htaccess do Apache :)

Também pode ser algum módulo que está com algum problema e está a fazer com que o Apache se engasgue. Eu verificaria o log para ver o que é que está a acontecer e tirar a limpo se não é algum erro no PHP.

Aliás, a primeira coisa que eu faria seria sempre ir ver o log, porque geralmente há lá informação que muito provavelmente me ajuda (a mim e a quem eu peça ajuda) a perceber o que se passa, se não me disser logo exactamente qual é o problema.

Portugal

Group categories

Classificação

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week