I have a debien server setup (debian perfect setup)Web Server: Apache 2.2
Database Server: MySQL 5.0
Mail Server: Postfix
DNS Server: BIND9
FTP Server: proftpd
POP3/IMAP: I will use Maildir format and therefore install Courier-POP3/Courier-IMAP.
Webalizer for web site statistics
I setup a site with drupal 5.6. I first tried to change the logo and all it shows is a box, like a place holder with a red x. So then I installed lamp on my windows box, installed the same drupal and was able to change the logo. Then I setup another site on my server and used the new 6.0 drupal and tried to change the logo. I have the same issue with 6.0. When I installed both the 5.6 and the 6.0 drupal site I had to modify the .htaccess file. #
# 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
# Customized error messages.
ErrorDocument 404 /index.php
# 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.
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
# PHP 4, Apache 2.
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
# PHP 5, Apache 1 and 2.
#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
# Requires mod_expires to be enabled.
#
# 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
#
# 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/...)
# adapt and uncomment 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 and
# the rewrite rules are not working properly.
#RewriteBase /drupal
# Rewrite old-style URLs of the form 'node.php?id=x'.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^id=([^&]+)$
#RewriteRule node.php index.php?q=node/view/%1 [L]
# Rewrite old-style URLs of the form 'module.php?mod=x'.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
#RewriteRule module.php index.php?q=%1 [L]
# Rewrite current-style URLs of the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\..* [NC]
RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R=301]
# ENABLE SERVER-SIDE INCLUDES
AddType text/html .shtml .htm .html
AddHandler server-parsed .shtml .html
# $Id: .htaccess,v 1.81.2.3 2007/09/21 12:24:22 drumm Exp $
Can someone please help me? There are no moduals on the 6.0 install. I do have some on the 5.6 install. Finding help for drupal is like taking a trip to the moon. I have asked a few other places and have not received any answers. I hope someone can shed some light on this for me. Thanks for the help
Comments
What?
What did you modify in .htaccess, and why did you think you need to modify it?
What did you do to change the logo?
If you uploaded a new logo, how did you upload it? Where did it go?
If your logo is in the files directory, what are the permissions on that directory? What is the path to that directory?
How
Here is the .htaccess file before it was modified. I had to change it because I was getting error 500 on in IE. I commented out untill I was able to get the install screen. I went back and tried to uncomment line by line, but this is the least I could get away with if I wanted to get the install screen.
#
# 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
# Customized error messages.
ErrorDocument 404 /index.php
# 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.
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
# PHP 4, Apache 2.
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
# PHP 5, Apache 1 and 2.
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
# Requires mod_expires to be enabled.
# 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
# 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/...)
# adapt and uncomment 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 and
# the rewrite rules are not working properly.
#RewriteBase /drupal
# Rewrite old-style URLs of the form 'node.php?id=x'.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^id=([^&]+)$
#RewriteRule node.php index.php?q=node/view/%1 [L]
# Rewrite old-style URLs of the form 'module.php?mod=x'.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
#RewriteRule module.php index.php?q=%1 [L]
# Rewrite current-style URLs of the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
# $Id: .htaccess,v 1.81.2.3 2007/09/21 12:24:22 drumm Exp $
I got the logo to work by changing the pathe to /themes/logos. Then used winSCP to move the logo pic to that file.
But now when I try to enter pics to creat contence I get the same box an red mark. I go to create content /newsletter then I upload a pic with Image picker. I get the same result. I right click on the image and the path is files/imagepicker/a/administrator/browser/comks81711-1.jpg with of cource my doamin in front of it. I don't know why it is in foldr a. The name starts with a c. You think it would be placed in file c in the imagepicker. Also the name of the file is changed after uploading.
The permissions on the files dir is 777. I understand that the tmp file has somthing to do with files that are uploaded. The tmp file is 777 as well. Thanks for your help on this. I have been looking for help about this issue for some time now. Getting help for drupal is like takeing a trip to the moon :) Anyhow, thanks for the help. If there are other placess I can read and understand drupal and how to enter and setup the application, please enter some urls for me.
Also I installed wamp on my xp box to see if it would work and then created a db and installed drupal 5.3 to see if it was able to upload and see pictures. I installed all the mods that are on my linux server. Pics upload and I can see them. I did not have to modify the .htaccess file before install. This is frustrating. I wish I know why my server is doing this. Please help me. Thank you
Unix permissions and uploads
If you're having troubles uploading content through the Web application it helps to understand a few things about Unix permissions and standard security practices.
Your Web server runs as a special user, typically "apache" or "http." When you upload Drupal using scp or sftp, the Drupal files are owned by YOU, not by the webserver, and permissions are set so the webserver has read-only access.
This is the right way to do it. It prevents a security breach at the application level from being propagated to deeper levels, perhaps by replacing the PHP files.
However, in order to allow uploads, you have to have a file upload directory where the webserver has write access.
You can make that happen by granting group or global write permissions (which is a security risk) or by changing the ownership of the files directory to the webserver (which requires root access).
If you don't do one or the other, the webserver can't accept uploads, nothing will ever show up in the files directory, and a number of other features (such as aggregating and compressing CSS files, or the Garland color module integration) won't work.
None of this addresses your 500 server error, an I can't tell from the posted .htaccess file where the problem might lie. Any time you get server errors you should check the server error log, which might provide a clue. There is not a general conflict between Debian/Apache and Drupal, as there are many thousands of Drupal installations running on similar configurations.
File upload
I uploaded the files to the server using root permissions. I created the tmp file and modified it to 777. You know I had the same issue with the logo. It showed a box and red x just like the pics are after uploading them. What I did is change the path and move the pic to a diffrent file and it worked. I can now see the logo on the website. The permissions are the same for both directories. When I moved the pic to /themes/logos/logosml.png. With my domain in fronth of it, it works, but when it was in the default file it would just give me the place holder and the red X. The pics were showing up in the file. I looked with a ftp program and can see the pic in there. The original place is. files/imagepicker/a/administrator. then the name of the file. Also it is changing the name of the file after uploading it to the server. Now I loaded wamp on my windows box and installed the same drupal and mods and it has not trubble upoading pics. I can see them just fine. I even setup another site on my debian server and configured it the same as the other site I am trying to get working and I get the same results. I am very frustrated at this. I can not find anyone having this kind of trubble on the web. I searched and posted and no one is able to tell me what to do to get this working corect. I do not know if it is a setting in drupal or in apache that is causing this. Here is my apache log file.
PHP Warning: Module 'json' already loaded in Unknown on line 0
[Tue Feb 19 10:53:09 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Tue Feb 19 10:53:09 2008] [warn] long lost child came home! (pid 4343)
[Tue Feb 19 10:54:35 2008] [notice] Graceful restart requested, doing restart
[Tue Feb 19 10:54:35 2008] [error] (9)Bad file descriptor: apr_socket_accept: (client socket)
PHP Warning: Module 'json' already loaded in Unknown on line 0
[Tue Feb 19 10:54:35 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming normal operations
[Tue Feb 19 10:54:35 2008] [warn] long lost child came home! (pid 7414)
[Tue Feb 19 14:03:27 2008] [error] [client 203.70.85.138] File does not exist: /var/www/sharedip/stats
[Thu Feb 21 12:11:11 2008] [notice] caught SIGTERM, shutting down
[Thu Feb 21 12:11:19 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
PHP Warning: Module 'json' already loaded in Unknown on line 0
[Thu Feb 21 12:11:20 2008] [notice] Apache/2.2.3 (Debian) PHP/5.2.0-8+etch10 mod_ssl/2.2.3 OpenSSL/0.9.8c configured -- resuming norm
I looked this error up and they say this is normal from time to time to see this in apache log file.