ispconfig working with drupal

Discussion in 'General' started by cruz, Feb 2, 2008.

  1. cruz

    cruz New Member

    I have a debian 4.0 perfect setup. I installed drupal 5.7. I had to comment out the php area in the .haccess file to get it to install. Now I cannot change the logo or add pictures to the site. All I get is a red X and a placeholder. So then I installed lamp on my windows pc and installed the same drupal 5.7. It uploads pictures and I am able to change the logo. So then I created another site on my debian box. With drupal 6.0. The same thing as the 5.7. I do not know if it is a setting in drupal or a setting on the server that is causing this. Can someone please shed some light on this? Thank you for helping me.
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Any errors in your Apache error log? When you right click on the missing images and select Properties, does it show the correct image URL?
     
  3. cruz

    cruz New Member

    logo not loading in drupal

    I tried to change the logo. I get a box showing the placeholder for the logo, but no picture. I right clicked on the placeholder and it tells me that it is in www.mydomain/files/logoname.png. that is corect. then I go into the the files folder and the logo is in there. Somthing is blocking it from being seen. Here is the log from the apache error file.
    HTML:
    [Sun Feb 03 15:24:10 2008] [error] an unknown filter was not added: PHP
    [Sun Feb 03 15:24:10 2008] [error] an unknown filter was not added: PHP
    [Sun Feb 03 15:24:10 2008] [error] an unknown filter was not added: PHP
    [Sun Feb 03 15:24:10 2008] [error] an unknown filter was not added: PHP
    [Sun Feb 03 15:26:04 2008] [error] an unknown filter was not added: PHP
    [Sun Feb 03 15:26:04 2008] [error] an unknown filter was not added: PHP
    [Sun Feb 03 15:26:04 2008] [error] an unknown filter was not added: PHP
    [Sun Feb 03 15:26:04 2008] [error] an unknown filter was not added: PHP
    [Sun Feb 03 15:26:26 2008] [error] an unknown filter was not added: PHP
    [Sun Feb 03 15:26:26 2008] [error] an unknown filter was not added: PHP
    [Sun Feb 03 15:26:26 2008] [error] an unknown filter was not added: PHP
    [Sun Feb 03 15:26:26 2008] [error] an unknown filter was not added: PHP
    
    This is repeted for days of loging.
     
  4. madmucho

    madmucho ISPConfig Developer ISPConfig Developer

  5. cruz

    cruz New Member

    I changed the config.inc.php file to addtype, but it is still giving me the same error message.
     
  6. falko

    falko Super Moderator ISPConfig Developer

    You must update one of your web sites in ISPConfig so that ISPConfig rewrites the Vhosts_ispconfig.conf file.
     
  7. cruz

    cruz New Member

    no moore error

    I did what you told me. I got this mesage.
    HTML:
    [Tue Feb 05 09:53:02 2008] [warn] long lost child came home! (pid 2926)
    There is no moore error like before, but when I go to change the logo, it is still the placeholder there.
     
  8. falko

    falko Super Moderator ISPConfig Developer

    Are the permissions of the image ok (the Apache user must be allowed to read it)?
    Are there any .htaccess files in your web directories that might forbid to load the image?
     
  9. cruz

    cruz New Member

    file and pic permission, ,.htaccess file

    The files directery is 777 and the pics are 775. Here is the .htaccess fiel in the root of the website.
    HTML:
    #
    # 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
    
    # 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.
    <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/...)
      # 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]
    </IfModule>
    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 $
    
    I had to comment out the php in the .haccess file before I could get it to install. I don't know why. Also there is a .hacess file in the files directery were to lictures are uploaded as well. There is a temp file in the files dir with some strange file names in there. Like this (tmp_BujjgB) I was under the impression that the files are uploaded to the temp file first. But I'm not sure. Thanks for such a cool site.
     
  10. falko

    falko Super Moderator ISPConfig Developer

    Can you post that .htaccess file as well?
     
  11. cruz

    cruz New Member

    Getting Drupal to upload pics

    Here it is.
    HTML:
    SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
    Options None
    Options +FollowSymLinks
    Update 2/10/08
    I was looking in the apache2.config file and seen this. Is this denying all in the files directery?
    <Directory /var/www/*/web>
    Options +Includes -Indexes
    AllowOverride None
    AllowOverride Indexes AuthConfig Limit FileInfo
    Order allow,deny
    Allow from all
    <Files ~ "^\.ht">
    Deny from all
    </Files>
    </Directory>
     
    Last edited: Feb 10, 2008
  12. falko

    falko Super Moderator ISPConfig Developer

    Can you remove that .htaccess file (or remove it)? Do the images load then?

    No.
     
  13. cruz

    cruz New Member

    I removed the .htaccess file from the files folder and tried to change the logo in the theme. No change. so then I moved the image to the folder /themes/logos/mylogo.png and now I can see it. I do not understand this. Also there are some strange files in the temp folder. The permissions on those are 0600. the owner of the files are www-data. the last one looks like it is my png file. But they do not look like a normal file. They have names like tmp_BujjgB, tmp_xAgdjy ect. I do not understand this.
     
    Last edited: Feb 12, 2008
  14. PavementPounder

    PavementPounder New Member

    Having a similar problem.

    Hi

    I'm having the similar troubles. I can't view images directly with the URL, any thumbnails, or dynamically loaded images. I can view images directly with the URL when I delete the .htaccess file in the /var/www/*/web/files/ folder, but it gets put back in the folder immediately next time Drupal loads and the pictures no longer work again.

    The pictures when uploaded are owned by apache with permissions 664, and the folder has permissions 777.

    The .htaccess file in the /var/www/*/web/files/ folder is:
    Code:
    SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
    Options None
    Options +FollowSymLinks
    
    The .htaccess in the /var/www/*/web/ folder:
    Code:
    <IfModule mod_rewrite.c>  
    RewriteEngine on  
    RewriteCond %{REQUEST_FILENAME} !-f  
    RewriteCond %{REQUEST_FILENAME} !-d  
    RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]  
    </IfModule>
    
    and optional Apache Directives:
    Code:
    <Directory /var/www/www.giftmatch.ca/web/>  
    Options +Includes +FollowSymlinks -Indexes  
    AllowOverride All  
    Order allow,deny  
    Allow from all  
    <Files ~ "^\.ht">  
    Deny from all  
    </Files>  
    </Directory>
    
     
  15. falko

    falko Super Moderator ISPConfig Developer

    You can try to modify includes/file.inc. See http://drupal.org/node/105580#comment-224742
     
  16. PavementPounder

    PavementPounder New Member

    I found a solution

    That link helped, thanks!

    I found it was the
    Code:
    Options None
    Options +FollowSymLinks
    
    tags in the .htaccess that was causing the problem. I removed the first line and moved the second to the optional apache directives and it works good now. Although it is not the most ideal solution.

    New optional apache directives:
    Code:
    <Directory /var/www/*/web/>  
    Options +Includes +FollowSymlinks -Indexes  
    AllowOverride All
    Order allow,deny  
    Allow from all  
    <Files ~ "^\.ht">  
    Deny from all  
    </Files>  
    </Directory>
    <Directory /var/www/*/web/files/>
    Options +Includes +FollowSymlinks -Indexes  
    AllowOverride All  
    Order allow,deny  
    Allow from all   
    </Directory>
    
    new .htaccess file:
    Code:
    SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
    
     
    Last edited: Oct 23, 2008

Share This Page