Hi guys

I'm kind of new user at drupal and I created a drupal site using acquia. All was doing great but when i almost finished my site i tried to upload it to my ftp server and now I'm getting only the home page but when i try to navigate i get a "500 Internal Server Error".

I thought i could be doing something wrong so i contacted my ftp provider and he told me all was ok with the server. So i asked a friend to try upload the site to his FTP and voila all was fine...To be sure the server supported drupal as the provider told me, we upload a new drupal site from zero and goes fine. The main thing that is happening here is the database. If i upload my database that i created locally the site doesn't work....

what can i do? please help

I'm trying to fix it for weeks and i can figure out a way to put things right...

ah also like to add that we tried to clean URL but doesn't work...

The url is www.ggsproductions.com

thanks a lot

Gon

Comments

drclaw’s picture

Have you double checked the settings.php file?

I went to your link. It's strange that the homepage works and nothing else...

One time, I was having some trouble with deployment and it was because of a missing .htaccess file...

Well that's all I have for Ideas. Sorry I couldn't be of more help!

FanisTsiros’s picture

Check your .htaccess file (allready noted by drclaw)

Have you checked that sites/default directory is there? and also settings.php ?

After a clean drupal install, settings.php is protected by drupal with 444 permissions. Set permissions to 644 before uploading to server via ftp. (Protect again settings.php after uploading ).

Also sites/default directory is also protected by drupal with 555 permissions. Change back to 755, upload and then back to 555 again.

How did you uploaded your (local ) database? Did you go with phpMyAdmin ?

ReliabilityConsistencyFeedback

Tatta’s picture

Hi guys

yes at the first time people told me about the .htaccess but the files is there and also worked fine in the other ftp of my friend.

About the settings.php the only change i made was changing username, password etc for the database and its getting it right because any change i make in the database i can see it reflected in the site.

about the permissions I'm not sure what you mean. i was looking in the settings.php for permissions but i can't find it.

by the way when i exported for the first time my database from local the SQL compatibility mode was none and when i got into my site the front page wasn't my home page but other page. Then i exported mysql40 and i can get the home page now but still no navigation...

thanks a lot guys

regards

FanisTsiros’s picture

I think this is a clean urls issue.
For example, following not clean urls are working fine:
http://www.ggsproductions.com/?q=node/1
http://www.ggsproductions.com/?q=node/2
http://www.ggsproductions.com/?q=node/3
http://www.ggsproductions.com/?q=node/4
etc. etc.

try to disable clean urls, and resolve the clean urls issue.

ReliabilityConsistencyFeedback

Tatta’s picture

The clean urls are disabled. i tryed once to see if that was the problem but it wasn't. and for example the blog that you can see in these urls u sent are not activated. and i dont know why you can see them....its very weird :(

FanisTsiros’s picture

well, its not weird.
See another link http://www.ggsproductions.com/?q=node/19
everything is there because it is published (though there is no menu item to link)
and is there because there is in your database as a node id with the number 19 (the number after the ?q=node/)

anyway, i think there is a problem with the way the database was moved in your new server.

We should (and we could) help you if we had more info such as:

what was your local development environment (OS - Linux or Win, PHP version, MySQL Version),
how did you export your database e.t.c.

In this page http://www.ggsproductions.com/?q=node/4 2D_3D link is invalid http://ggs-database:8082/2D_3D saying that you have access with port 8082. Is this the page that was linked from the primary links ? (first menu item of Services menu) ?

ReliabilityConsistencyFeedback

TheFazz’s picture

i have a similar problem to Tatta here.

i recently uploaded the drupal 6.20 files to replace my previous 6.19 via FTP.

i was previously running 6.19 with clean urls and it worked ok. no databases were changed or moved.

after updating to 6.20 i found two problems:

1. .htaccess was causing problems
2. clean urls didn't work

i initially got the 500 internal server error. based a number of forum responses, i guessed that it had something to do with .htaccess.

so i disabled .htaccess (by renaming).

i now had the WSOD problem. then i tested the unclean URLs and i could see the content. i found that now the server did not support clean URLs, when it did before.

i also found that the .htaccess had different configurations:

drupal 6.19 .htaccess

#
# Apache/PHP/Drupal settings:
#

# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template)$">
  Order allow,deny
</FilesMatch>

# 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.
<Files favicon.ico>
  ErrorDocument 404 "The requested file favicon.ico was not found.
</Files>

# Set the default handler.
DirectoryIndex index.php

# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.

# PHP 4, Apache 1.
<IfModule mod_php4.c>
  # php_value magic_quotes_gpc                0
  # php_value register_globals                0
  # php_value session.auto_start              0
  # php_value mbstring.http_input             pass
  # php_value mbstring.http_output            pass
  # php_value mbstring.encoding_translation   0
</IfModule>

# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
  # php_value magic_quotes_gpc                0
  # php_value register_globals                0
  # php_value session.auto_start              0
  # php_value mbstring.http_input             pass
  # php_value mbstring.http_output            pass
  # php_value mbstring.encoding_translation   0
</IfModule>

# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
  # php_value magic_quotes_gpc                0
  # php_value register_globals                0
  # php_value session.auto_start              0
  # php_value mbstring.http_input             pass
  # php_value mbstring.http_output            pass
  # php_value mbstring.encoding_translation   0
</IfModule>

# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On

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

  # Do not cache dynamically generated pages.
  ExpiresByType text/html A1
</IfModule>

# Various rewrite rules.
<IfModule mod_rewrite.c>
  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 /drupal
  #
  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
  # RewriteBase /

  # 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]
</IfModule>

# $Id: .htaccess,v 1.90.2.1 2008/07/08 09:33:14 goba Exp $

drupal 6.20 .htaccess


#
# Apache/PHP/Drupal settings:
#

# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$">
  Order allow,deny
</FilesMatch>

# 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.
<Files favicon.ico>
  # There is no end quote below, for compatibility with Apache 1.3.
  ErrorDocument 404 "The requested file favicon.ico was not found.
</Files>

# Set the default handler.
DirectoryIndex index.php

# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.

# PHP 4, Apache 1.
<IfModule mod_php4.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On

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

  <FilesMatch \.php$>
    # 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
  </FilesMatch>
</IfModule>

# Various rewrite rules.
<IfModule mod_rewrite.c>
  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 /drupal
  #
  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
  # RewriteBase /

  # 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]
</IfModule>

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

i see a few differences and # commented lines. but i don't dare play around too much with .htaccess. instead i loaded the 6.19 version of .htaccess to the rest of the 6.20 code, and it worked.

the best part was when i tested clean urls for drupal 6.20 (with the 6.19 .htaccess) - and it worked too!

i have no idea what this means, but i think i need to deprecate my .htaccess.... and not sure if it would cause security issues.

i would like to understand what is wrong with my server so i can talk to the hosts.

of course, any help is most appreciated.

FanisTsiros’s picture

Are you sure that the files you post are right? The first file should not work. The second should work.
I think the first file (6.19) is the wrong one as it has

# Follow symbolic links in this directory.
# Options +FollowSymLinks

which is commented... with the '#' character.
For the clean urls to work you should have enabled "FollowSymLinks" , this should be:

 # Follow symbolic links in this directory.
Options +FollowSymLinks

see also http://www.maxi-pedia.com/FollowSymLinks

Also, as far as i know, there was no change in .htaccess file for version 6.20.
Anyway this is intersting. Please double check again your (working) htaccess file and check if FollowSymLinks are enabled.

Hope that helps...

ReliabilityConsistencyFeedback

TheFazz’s picture

thanks for the response, and sorry for my late reply.

i checked it again, and the FollowSymLinks is disabled. I just enabled it by removing the # and i got the 500 internal server error.

what could be causing this? is it because the server host may have not enabled FollowSymLinks in the httpd.conf?

fazz

FanisTsiros’s picture

Well, yes, this is a hosting provider issue. Some hosting providers (like bluehost) don't support "Options + FollowSymLinks" (but you can use "Options +SymLinksIfOwnerMatch")
I found these related:
http://drupal.org/node/656022
http://drupal.org/node/137225
but if it works (with the old .htaccess file), no prob. I don't see any security issue here...
Fanis

ReliabilityConsistencyFeedback

TheFazz’s picture

Fanis

thanks for the advice on this not being a security issue. i shall uncomment this for now and also check with my host.

fazz

drclaw’s picture

You won't see the permissions in the file itself. The numbers @FanisTsiros was referring to are permission values you can apply using the command 'chmod' in the command line. First you would navigate to the sites/default folder in the command line using something like $ cd sites/default then use chmod to change the permissions $ chmod 666 settings.php To change permissions on the entire sites/default directory and it's contents you would use navigate to sites/ first $ cd sites then chmod then entire director with the flag -R $ chmod -R 755 default .

If you're not very familiar with the command line shell interface it may be a little tricky at first but there should be some good tutorials online about how to use a shell.

Also, if your hosting provider doesn't give you command line access to your site, it may be tricky to change the permissions once the files are uploaded. If you have cPanel though, you should be able to change the permissions using the file browser.

Tatta’s picture

that's a little "chinese" for me...i wouldnt know where to start...but i will investigate and see if i can figure it out...i'm really loosing my strengthens on this...for weeks trying to solve it...maybe im too noob for this and should stick with html website instead... :(((

drclaw’s picture

Your site looks good so far! It would be a shame to throw away all the work you've done so far.

I also tried http://www.ggsproductions.com/?q=news and it worked! I'm sure it's a clean urls issue. Try disabling it again and clearing the cache. I think the key is to get it working without clean urls on your local system first so that when you click on links, you get the proper non-clean url in the address bar. Once it's all working locally, re-upload your files and re-import the db.

I really think it's a clean urls issue now that I know you can still access the pages with ?q=news.

Someone else had this problem too, btw http://drupal.org/node/700738

And maybe this could help? http://drupal.org/node/15365 (I'm sure you've been there already, but it's worth mentioning)

Good Luck!

Tatta’s picture

I did what u told me and it worked :O i can navigate. i dont know why it didnt work the previous time. but now im having another problem....when i try to log in i recieve this message

Access denied
You are not authorized to access this page.

im logging in in this page:

http://www.ggsproductions.com/?q=user

is this normal???? what can i do???

thanks a lot for ur help guys

regards

drclaw’s picture

Glad its *sorta* working!

Are you logging in as the admin user? (the same user you created when you first installed drupal)

After logging in can you navigate to any other pages?

Tatta’s picture

This is weird, i can only log in in chrome and in IE. In firefox access is denied...

i tried to enable clean url (online) but i could not. it says

Your system configuration does not currently support this feature. The handbook page on Clean URLs has additional troubleshooting information.

so i have to leave it this way or is there anything i can do?

thanks a lot for your help guys

regards

drclaw’s picture

I would try clearing the Firefox cache (Tools > Clear Recent History)

There's going to be a chance that your server doesn't end up supporting Clean URLs. You'll have to follow the instructions in the handbook, but if nothing works, you may have to stick with the ?q=path.

Glad to hear it's working! Aren't you glad you stuck with it? =P

Tatta’s picture

well for now i'm enjoying but i used to do more webs in html and in flash and im finding it a little bit difficult in the design part...but we'll see....hope all goes fine...

thanks for your help

cheers

FanisTsiros’s picture

Drupal's front page says:
"Come for the software, stay for the community"

We (you included) are the community.
If you "stick" with drupal, some day you will also say "Drupal changed my life"

ReliabilityConsistencyFeedback

ressa’s picture

Uncommenting Options +FollowSymLinks in .htaccess fixed it for me:

# Follow symbolic links in this directory.
# Options +FollowSymLinks