Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: Shop auf SSL umgestellt => kein Login möglich / Browser akzeptiert keine Cookies

    svenyo

    • Mitglied
    • Beiträge: 211
    Hallo,

    habe bei meinem Shop die .htacess bearbeitet sowie die configure.php wie hier im Forum beschrieben, damit der Shop auf SSL läuft.
    Es funktioniert alles bis auf der Login. Jedesmal werde ich automatisch statt auf die login.php auf die cookie_usage.php umgeleitet. Im Browser sind aber Cookies erlaubt.

    Woran kann das liegen? ShopVersion müsste 2.0 sein.

    Gruß,
    svenyo

    Linkback: https://www.modified-shop.org/forum/index.php?topic=39124.0
    Shop Hosting

    Viol

    • Fördermitglied
    • Beiträge: 2.279
    Könnte irgendwas von diesem Thread auf Deinen Shop zutreffen?
    https://www.modified-shop.org/forum/index.php?topic=38031.0

    Außerdem, was heißt "müsste 2.0" sein.

    svenyo

    • Mitglied
    • Beiträge: 211
    Der Shop wurde vor einer Weile aufgesetzt. Bin mir nur nicht mehr sicher ob ich das Update zu 2.0.3 schon gemacht habe. Version 2.x ist es auf jeden Fall.

    Der Shop lief vorher über ein SSL-Proxy und hat jetzt ein eigenes Zertifikat. Kann das was damit zu tun haben?

    Viol

    • Fördermitglied
    • Beiträge: 2.279
    Das kann sehr wohl etwas damit zu tun haben.
    Am besten stellst Du hier mal die configure.php und die htaccess hier ein. Und ein Link zum Shop wäre evt. auch ganz hilfreich.

    svenyo

    • Mitglied
    • Beiträge: 211
    Link zum Shop: www.silberschmuck-steiner.de

    .htaccess

    Code: PHP  [Auswählen]
    ##-- $Id: .htaccess 3209 2012-07-12 11:51:11Z gtb-modified $

    ##-- Default charset
    #AddDefaultCharset UTF-8
    AddDefaultCharset ISO-8859-15

    ##-- Disable the server signature
    ServerSignature Off

    ##-- Turn off ETags in HTTP-header (use both directives)
    <IfModule mod_headers.c>
      Header unset ETag
    </IfModule>
    FileETag None

    ##-- When caching of gzipped JS and CSS files is used, enable this setting
    <IfModule mod_headers.c>
      Header set Vary Accept-Encoding
    </IfModule>

    ##-- when using Provider 1&1 set the following lines to activate PHP5
    #AddType x-mapp-php5 .php
    #AddHandler x-mapp-php5 .php

    # Disable directory browsing (disabled by default as this causes problems on some servers)
    #Options All -Indexes

    ##-- Enable the compression for any type of content
    <IfModule mod_deflate.c>
      <FilesMatch "\\.(js|css|html|htm|php|xml|jpg|jpeg|png|gif|svg|woff)$">
        SetOutputFilter DEFLATE
      </FilesMatch>
    </IfModule>

    ##-- Customization of HTTP request and response headers
    <IfModule mod_headers.c>
      <FilesMatch "\\.(ico|jpe?g|png|gif|swf|flv|svg)$">
        Header set Cache-Control "max-age=2592000, public"
      </FilesMatch>
      <FilesMatch "\\.(css|woff)$">
        Header set Cache-Control "max-age=604800, public"
      </FilesMatch>
      <FilesMatch "\\.(js)$">
        Header set Cache-Control "max-age=604800, private"
      </FilesMatch>
      <FilesMatch "\\.(xml|txt)$">
        Header set Cache-Control "max-age=604800, public, must-revalidate"
      </FilesMatch>
      <FilesMatch "\\.(html|htm|php)$">
        Header set Cache-Control "max-age=1, private, must-revalidate"
      </FilesMatch>
    </IfModule>

    ##-- Generation of Expires and Cache-Control HTTP headers
    <IfModule mod_expires.c>
      ExpiresActive On
      ExpiresDefault "access plus 1 seconds"
      ExpiresByType image/gif "access plus 2592000 seconds"
      ExpiresByType image/jpg "access plus 2592000 seconds"
      ExpiresByType image/jpeg "access plus 2592000 seconds"
      ExpiresByType image/png "access plus 2592000 seconds"
      ExpiresByType image/svg+xml "access plus 2592000 seconds"
      ExpiresByType text/html "access plus 1 seconds"
      ExpiresByType text/css "access plus 604800 seconds"
      ExpiresByType text/javascript "access plus 604800 seconds"
      ExpiresByType application/x-javascript "access plus 604800 seconds"
      ExpiresByType text/x-component "access plus 604800 seconds"
      ExpiresByType application/font-woff "access plus 604800 seconds"
      ExpiresByType image/x-icon "access plus 604800 seconds"

      <IfModule mod_headers.c>
        Header append Cache-Control "public"
      </IfModule>  
    </IfModule>

    ##-- Configure php_flags if necessary
    ##-- BEGIN - use IfModule clause if PHP runs in CGI mode, otherwise just uncomment the lines with php_flag...
    #<IfModule mod_php.c>

      ##-- Warn when arguments are passed by reference at function call time (from PHP5 allow_call_time_pass_reference is deprecated)
     #php_flag allow_call_time_pass_reference on

      ##-- Disable transparent sid support PHP-default is off (XTC Session only on first visit)
     #php_flag session.use_trans_sid off

      ##-- set suhosin flags because of errors with attributes (for webhosters with suhosin hardening patch enabled)
     #php_value suhosin.post.max_array_depth 0
     #php_value suhosin.post.max_array_index_length 0
     #php_value suhosin.post.max_vars 0
     #php_value suhosin.request.max_array_depth 0
     #php_value suhosin.request.max_array_index_length 0
     #php_value suhosin.request.max_vars 0

      ##-- set suhosin flags to have unencrypted session data, affecting "whos_online" & "shopping cart" (for webhosters with suhosin hardening patch enabled)patch enabled
     #php_value suhosin.session.encrypt Off
     #php_value suhosin.session.cryptkey ''

    ##-- END - use IfModule clause if PHP runs in CGI mode, otherwise just uncomment the lines with php_flag...
    #</IfModule>

    ##-- Redirect error pages to Sitemap
    ##-- set the correct Path to ErrorDocument
    ErrorDocument 400 /sitemap.html?error=400
    ErrorDocument 401 /sitemap.html?error=401
    ErrorDocument 402 /sitemap.html?error=402
    ErrorDocument 403 /sitemap.html?error=403
    ErrorDocument 404 /sitemap.html?error=404
    ErrorDocument 500 /sitemap.html?error=500

    ##-----------------------------------------
    ##- SEO Shopstat Modul (Hartmut Koenig)
    ##-----------------------------------------
    <IfModule mod_rewrite.c>
      ##-- Initialize and enable rewrite engine
     ##-- Documentation http://httpd.apache.org/docs/misc/rewriteguide.html
     RewriteEngine On
     
      RewriteCond %{SERVER_PORT} !^443$
      RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]

      ##-- EXAMPLE: If your shop is located at "http://www.yourdomain.com/shop",
     ##-- set the following line like e.g.: RewriteBase /shop/
     RewriteBase /

      ##-- disallow access to dotfiles (.htaccess, .svn, .git, etc.)
     #RedirectMatch 403 /\.
     
      ##-- Use canonical URLs
     ##-- Use SSL-Proxy
     ##-- HostEurope
     #RewriteCond %{HTTP:X-Forwarded-Server}   !^ssl\.webpack\.de$ [NC]
     ##-- 1und1
     #RewriteCond %{HTTP:X-Forwarded-Server}   !^ssl\.kundenserver\.de$ [NC]
     ##-- domainFACTORY
     #RewriteCond %{HTTP:X-Forwarded-Server}   !^sslsites\.de$ [NC]
     ##-- All-Inkl
     #RewriteCond %{HTTP:X-Forwarded-Server}   !^ssl-account\.com$ [NC]
     ##-- Strato
     #RewriteCond %{HTTP:X-Forwarded-Server}   !^www\.ssl-id\.de$ [NC]
     ##-- redirect to www-domain, when www is missing and no subdomain given and not using an ssl-proxy
     #RewriteCond %{HTTP_HOST}                 !^www\. [NC]
     #RewriteCond %{HTTP_HOST}                 !\.(.*)\. [NC]
     #RewriteCond %{HTTP_HOST}                 !^localhost [NC]
     #RewriteRule (.*)                         http://www.%{HTTP_HOST}/$1 [R=301,L]

      ##-- redirect to https-domain (Do not uncomment if you only have a SSL-Proxy!)
     #RewriteCond %{HTTPS} off
     #RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]

      ##-- Sitemap
     RewriteRule ^sitemap(.*)\.html$ shop_content.php?coID=8 [QSA,L]

      ##----------------------------------------------------------------------------------
     ##-- When working with SEO-Urls you can decide, whether to use a colon ":" or a dash "-" symbol
     ##-- (Windows Servers might have problems with colon as delimiter!)
     ##-- Change the delimiter symbol also in file "/inc/shopstat_functions.inc.php"
     ##----------------------------------------------------------------------------------

      ##-- Use colon delimiter ":" for SEO-URLS (default setting)
     ##-- Categories (:::)
     RewriteRule :::([_0-9]+):([_0-9]+)\.html$ index.php?cPath=$1&page=$2 [QSA,L]
      RewriteRule :::([_0-9]+)\.html$ index.php?cPath=$1 [QSA,L]

      ##-- Products (::)
     RewriteRule ::(.+)\.html$ product_info.php?products_id=$1 [QSA,L]

      ##-- Content (:_:)
     RewriteRule :_:([0-9]+)\.html$ shop_content.php?coID=$1 [QSA,L]

      ##-- Manufacturers (:.:)
     RewriteRule :.:([_0-9]+):([_0-9]+)\.html$ index.php?manufacturers_id=$1&page=$2 [QSA,L]
      RewriteRule :.:([0-9]+)\.html$ index.php?manufacturers_id=$1 [QSA,L]

      ##-- Use dash delimiter "-" for SEO-URLS (alternative setting i.e. for windows servers)
     ##-- Categories (---)
     RewriteRule ---([_0-9]+)-([_0-9]+)\.html$ index.php?cPath=$1&page=$2 [QSA,L]
      RewriteRule ---([_0-9]+)\.html$ index.php?cPath=$1 [QSA,L]

      ##-- Products (--)
     RewriteRule --(.+)\.html$ product_info.php?products_id=$1 [QSA,L]

      ##-- Content (-_-)
     RewriteRule -_-([0-9]+)\.html$ shop_content.php?coID=$1 [QSA,L]

      ##-- Manufacturers (-.-)
     RewriteRule -.-([_0-9]+)-([_0-9]+)\.html$ index.php?manufacturers_id=$1&page=$2 [QSA,L]
      RewriteRule -.-([0-9]+)\.html$ index.php?manufacturers_id=$1 [QSA,L]
    </IfModule>

    configure.php:

    Code: PHP  [Auswählen]
    <?php
    /* --------------------------------------------------------------
       $Id: configure.php 9258 2016-01-25 08:41:50Z Tomcraft $

       modified eCommerce Shopsoftware
       http://www.modified-shop.org

       Copyright (c) 2009 - 2013 [www.modified-shop.org]
       --------------------------------------------------------------
       based on:
       (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
       (c) 2002-2003 osCommerce (configure.php,v 1.13 2003/02/10); www.oscommerce.com
       (c) 2003 XT-Commerce (configure.php)

       Released under the GNU General Public License
       --------------------------------------------------------------*/


      // Define the webserver and path parameters
      // * DIR_FS_* = Filesystem directories (local/physical)
      // * DIR_WS_* = Webserver directories (virtual/URL)

      // global defines
      define('HTTP_SERVER', 'https://www.silberschmuck-steiner.de'); // eg, http://localhost - should not be empty for productive servers
      define('HTTPS_SERVER', 'https://www.silberschmuck-steiner.de'); // eg, https://localhost - should not be empty for productive servers
      define('DIR_FS_DOCUMENT_ROOT', '/home/strato/www/si/www.silberschmuck-steiner.de/htdocs/subdomains/silberschmuck-steiner/'); // absolut path required
      define('DIR_WS_CATALOG', '/'); // relative path required
      define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT);

      // secure SSL
      define('ENABLE_SSL', false); // secure webserver for checkout procedure?
      define('USE_SSL_PROXY', false); // using SSL proxy?

      // define our database connection
      define('DB_MYSQL_TYPE', 'mysqli'); // define mysql type set to 'mysql' or 'mysqli'
      define('DB_SERVER', 'rdbms.strato.de'); // eg, localhost - should not be empty for productive servers
      define('DB_SERVER_USERNAME', 'XXXXXXX');
      define('DB_SERVER_PASSWORD', 'XXXXXXX');
      define('DB_DATABASE', 'XXXXXXX');
      define('USE_PCONNECT', 'false'); // use persistent connections?
      define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
      define('DB_SERVER_CHARSET', 'latin1'); // set db charset 'utf8' or 'latin1'

      if (DB_DATABASE != '') {
        // set admin directory DIR_ADMIN
        require_once(DIR_FS_CATALOG.'inc/set_admin_directory.inc.php');

        // include standard settings
        require(DIR_FS_CATALOG.(defined('RUN_MODE_ADMIN')? DIR_ADMIN : '').'includes/paths.php');
      }
    ?>

    Viol

    • Fördermitglied
    • Beiträge: 2.279
    Falls Du bei Strato ssl erzwingen eingestellt hast, bitte als erstes rückgängig machen.

    svenyo

    • Mitglied
    • Beiträge: 211
    Ist nicht eingestellt.

    Viol

    • Fördermitglied
    • Beiträge: 2.279
    Das:
    Code: PHP  [Auswählen]
    define('ENABLE_SSL', false);
    auf true stellen.
    Und nochmals diese Anleitung durchgehen:
    https://www.modified-shop.org/forum/index.php?topic=33524.msg310335#msg310335

    Timm

    • Fördermitglied
    • Beiträge: 6.258
    In der configure muss enable ssl noch auf true gestellt werden. Hat aber mit dem Problem nichts zu tun.

    Dein shop leitet nicht weiter. Gib mal die domain ohne www ein. Leitet nicht zu https://www... weiter, sondern erst nach dem ersten Klick im Shop.

    Was hat das in deiner .htaccess zu suchen? Das ist wohl nicht ganz nach Anleitung.

    Code: XML  [Auswählen]
      RewriteCond %{SERVER_PORT} !^443$
      RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]

    Das ist doch das gleiche wie Zwangs SSL.

    Das gehört da nicht hin. Würde dir eh empfehlen die .htaccess aus der neuesten Shopversion zu nehmen und die Sachen dort anzupassen, auch wenn du scheinbar keinen aktuellen Shop hast (zumindest laut der Versionsnummern der beiden geposteten Dateien). Stand auch in der Anleitung von Web28.

    Und dann machst du darin aus

    Code: XML  [Auswählen]
    ##-- redirect to https www-domain, when www is missing and no subdomain given and not using an ssl-proxy
      #RewriteCond %{HTTP_HOST} !^www\. [NC]
      #RewriteCond %{HTTP_HOST} !\.(.*)\. [NC]
      #RewriteCond %{HTTP_HOST} !^localhost [NC]
      #RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
      #RewriteCond %{SERVER_PORT} !^443$
      #RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    Das

    Code: XML  [Auswählen]
    ##-- redirect to https www-domain, when www is missing and no subdomain given and not using an ssl-proxy
      RewriteCond %{HTTP_HOST} !^www\. [NC]
      RewriteCond %{HTTP_HOST} !\.(.*)\. [NC]
      RewriteCond %{HTTP_HOST} !^localhost [NC]
      RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
      RewriteCond %{SERVER_PORT} !^443$
      RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    Gruß Timm

    svenyo

    • Mitglied
    • Beiträge: 211
    Habe die Originl .htaccess Datei aus dem 2.0.3 genommen und wie beschrieben geändert. In der configure.php habe ich ssl auf true gestellt. Problem besteht weiterhin.

    Kann es daran liegen, dass ich mysql auf mysqli umgestellt habe (in der configure.php)?

    Viol

    • Fördermitglied
    • Beiträge: 2.279
    Kann es daran liegen, dass ich mysql auf mysqli umgestellt habe (in der configure.php)?
    Nein, eigentlich nicht, da mysqli ein "verbessertes" mysql ist und im Zuge der neueren PHP Versionen eingeführt wurde, weil das mysql nicht mehr unterstützt wurde
    Ich würde raten, dass Du Dich nochmals genau vergewisserst, dass Du bei Strato für Deinen Shop das SSL erzwingen wirklich abgestellt hast. Der Fehler deutet, nachdem Du alle Veränderungen durchgeführt hast, eigentlich darauf hin...

    Alfred

    • Experte
    • Beiträge: 2.115
    Leere mal die Sessions in der DB.
    Ist denn eine Registrierung gerade erfolgt?
    Sushi hat das gerade versucht.

    svenyo

    • Mitglied
    • Beiträge: 211
    Habe den Shop neu installiert. Jetzt klappt es ohne Probleme.
    Danke trotzdem an alle.