Weblog von markus.wilhelm

Emma und Finley im DEZ

  • Posted on: 3 April 2013
  • By: markus.wilhelm

Hallo,
anbei ein paar Bilder wie sich unsere beiden bei den Gesundheitstagen im Donau Einkaufszentrum gemacht haben. Emma musst unter meinen beiden an ihrer Kenndecke angebrachten Luftballons leiden und Finley wurde zum "eintreiben" von Spenden "missbraucht".

Rettungshunde: 

Magento Varnish and Turpentine Error wiht Paypal

  • Posted on: 23 February 2013
  • By: markus.wilhelm

I had an error in my Magento Shop with 1.7 using Varnish and Turpentine extension. The redirect page from Magento to Paypal was cached and my customers did have a different basket in Paypal then the had previously in Magento. I changed the varnish config in the vcl_recv Funktion and added the following line:

Old:

if (req.restarts == 0) {
        if (req.http.X-Forwarded-For) {
            set req.http.X-Forwarded-For =
            req.http.X-Forwarded-For + ", " + client.ip;
        } else {
            set req.http.X-Forwarded-For = client.ip;
        }
    }
    set req.http.X-Turpentine-Secret-Handshake = "1";
     
         
    if (req.request !~ "^(GET|HEAD|PUT|POST|TRACE|DELETE|OPTIONS)$") {
        return (pipe);
    }

New:

if (req.restarts == 0) {
        if (req.http.X-Forwarded-For) {
            set req.http.X-Forwarded-For =
            req.http.X-Forwarded-For + ", " + client.ip;
        } else {
            set req.http.X-Forwarded-For = client.ip;
        }
    }
    set req.http.X-Turpentine-Secret-Handshake = "1";
     
    if (req.url ~ "^/paypal") {
        return (pass);
    }
     
         
    if (req.request !~ "^(GET|HEAD|PUT|POST|TRACE|DELETE|OPTIONS)$") {
        return (pipe);
    }

BR Markus

Rettungspfoten: 

Neuigkeiten aus dem Rettungspfoten-Shop

  • Posted on: 23 February 2013
  • By: markus.wilhelm

Hi ihr,
wir verwenden seit einigen Tagen in unserem Rettungspfoten-Shop eine neue Shop-Software. Mit dieser konnten wir unseren Service für Sie verbessern. In Kürze werden die Lieferzeitangaben verbessert. Ab diesem Zeitpunkt kann auch der aktuelle Lagerbestand angezeigt werden. Ab sofort haben wir auch immer Produkte mit einem reduzierten Preis im Angebot. Ebenso können Sie direkt Artikel finden, die wir Ihnen als Tipp des Monats empfehlen und Artikel, die wir neu im Sortiment haben. Ebenso können Sie uns jetzt auch bei Facebook und Twitter finden. Dort werden wir unsere Neuheiten oder andere Informationen posten.

Rettungshunde: 
Rettungspfoten: 

Magento error in order by name for directory_country_region bug

  • Posted on: 23 February 2013
  • By: markus.wilhelm

Dear all,
after searching like hell for solving the error message while trying to save the system default configuration in Magento I finally found an "error". Not sure where this comes from: Magento, German Market Ready. Whell I don't care, it now works ;-)
Just change the file: app/code/core/Mage/Directory/Model/Resource/Region/Collection.php

class Mage_Directory_Model_Resource_Region_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
{
...
 
 protected function _construct()
    {
        $this->_init('directory/region');
 
        $this->_countryTable    = $this->getTable('directory/country');
        $this->_regionNameTable = $this->getTable('directory/country_region_name');
 
// comment out the next line-----------------------------------------------
        //$this->addOrder('name', Varien_Data_Collection::SORT_ORDER_ASC);
// ------------------------------------------------------------------------
        $this->addOrder('default_name', Varien_Data_Collection::SORT_ORDER_ASC);
    }
...
}
BR Markus

SQLITE JDBC Adapter for SAP PI 7.30

  • Posted on: 23 February 2013
  • By: markus.wilhelm

To be able to use the SQLITE Jdbc class within a SAP PI 7.30 JDBC Adapter (sender or receiver) you must mdify the Jdbc class a little.
SQLITE Homepage: http://www.sqlite.org/
SQLITE JDBC Adapter from Xerial: http://www.xerial.org/trac/Xerial/wiki/SQLiteJDBC

The default jdbc classes for SQLITE need native libraries being available on the host where the jdbc class is used. Xerial implemented the SQLITE libraries within their SQLITE jdbc class but you must tell the class if you want to use native or build in Java SQLITE libraries. Within the calling code you may set the variable sqlite.purejava.

Example:

public class sample
{
  public static void main(String[] args) throws ClassNotFoundException
  {
    // load the sqlite-JDBC driver using the current class loader
    System.setProperty("sqlite.purejava", "true");
    Class.forName("org.sqlite.JDBC");
...
}

This is not possible within SAP PI, so I changed the jdbc jar to allways use the build in java library for SQLITE. I changed the function getPureJavaFlag file SQLiteJDBCLoader.java in the following way. You may download the jar file here.

package org.sqlite;
 
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
...
public class SQLiteJDBCLoader
{
...
    static boolean getPureJavaFlag() {
        //return Boolean.parseBoolean(System.getProperty("sqlite.purejava", "false"));
        return true;
    }
...
}
This now enables you to use SQLITE JDBC Adapter within SAP PI 7.30 as all other jdbc database connection:
- JDBC Driver: org.sqlite.JDBC
- Connection: jdbc:sqlite:/usr/sap/trans/interfaces/example.db
- leave username and password empty

Frasdorf 2013

  • Posted on: 19 February 2013
  • By: markus.wilhelm

Hallo,
auch dieses Jahr waren Bessie und ich zusammen mit der Ansbacher Rettungshundestaffel wieder in Frasdorf. Nächstes Jahr sind wir das 10. Mal dabei. Bei wunderschönem Wetter (naja, es hat viel geschneit und gab recht wenig Sonne) haben wir mit unseren Hunden wieder tolle Ausflüge im Schnee auf die Berge rund um die Frasi gemacht.

Rettungshunde: 

Feuerzangenbowle

  • Posted on: 26 January 2013
  • By: markus.wilhelm

Dieses Jahr haben Bessie und ich zum ersten Mal zu einer Feuerzangenbowle bei uns im Garten eingeladen. Bei viel Schnee (sogar so viel, dass wir eine Schneebar bauen konnten) haben sich Kameraden aus der Rettungshundestaffel und einige Nachbarn eingefunden und mit uns zusammen den kalten/warmen Abend genossen. Wie sagt man so schön im Französischen: á la prochaine

Wir werden es wiederholen ;-)

XAMP 1.8.1 and zip.so

  • Posted on: 3 December 2012
  • By: markus.wilhelm

Dear all,
after upgrading to XAMP 1.8.1 the PHP extension zip.so was not delivered any more. Trying to install via pecl directly failed. After searching a long time I found some bugs in the code for PHP 5.4.7 (which is the version delivered by apachefriends) and compiled the zip extension.

Command line installation with pecl: pecl install zip
Failed with errors.

Errors found:
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_extract_file':
/tmp/pear/temp/zip/php_zip.c:187: error: 'struct _php_core_globals' has no member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c:187: error: 'CHECKUID_CHECK_FILE_AND_DIR' undeclared (first use in this function)
/tmp/pear/temp/zip/php_zip.c:187: error: (Each undeclared identifier is reported only once
/tmp/pear/temp/zip/php_zip.c:187: error: for each function it appears in.)
/tmp/pear/temp/zip/php_zip.c:241: error: 'struct _php_core_globals' has no member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_add_file':
/tmp/pear/temp/zip/php_zip.c:291: error: 'struct _php_core_globals' has no member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c:291: error: 'CHECKUID_CHECK_FILE_AND_DIR' undeclared (first use in this function)
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_glob':
/tmp/pear/temp/zip/php_zip.c:532: error: 'struct _php_core_globals' has no member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c:532: error: 'CHECKUID_CHECK_FILE_AND_DIR' undeclared (first use in this function)
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_pcre':
/tmp/pear/temp/zip/php_zip.c:594: error: 'struct _php_core_globals' has no member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c:594: error: 'CHECKUID_CHECK_FILE_AND_DIR' undeclared (first use in this function)
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_get_property_ptr_ptr':
/tmp/pear/temp/zip/php_zip.c:840: error: too few arguments to function 'std_hnd->get_property_ptr_ptr'
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_read_property':
/tmp/pear/temp/zip/php_zip.c:883: error: too few arguments to function 'std_hnd->read_property'
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_has_property':
/tmp/pear/temp/zip/php_zip.c:932: error: too few arguments to function 'std_hnd->has_property'
/tmp/pear/temp/zip/php_zip.c: In function 'php_zip_object_new':
/tmp/pear/temp/zip/php_zip.c:1044: error: 'zend_class_entry' has no member named 'default_properties'
/tmp/pear/temp/zip/php_zip.c: In function 'zif_zip_open':
/tmp/pear/temp/zip/php_zip.c:1147: error: 'struct _php_core_globals' has no member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c:1147: error: 'CHECKUID_CHECK_FILE_AND_DIR' undeclared (first use in this function)
/tmp/pear/temp/zip/php_zip.c: In function 'c_ziparchive_open':
/tmp/pear/temp/zip/php_zip.c:1436: error: 'struct _php_core_globals' has no member named 'safe_mode'
/tmp/pear/temp/zip/php_zip.c:1436: error: 'CHECKUID_CHECK_FILE_AND_DIR' undeclared (first use in this function)
/tmp/pear/temp/zip/php_zip.c: In function 'zm_startup_zip':
/tmp/pear/temp/zip/php_zip.c:2580: warning: assignment from incompatible pointer type
/tmp/pear/temp/zip/php_zip.c:2583: warning: assignment from incompatible pointer type
/tmp/pear/temp/zip/php_zip.c:2584: warning: assignment from incompatible pointer type

I changed some code in php_zip.c and php_zip.h of version: zip-1.10.2 (you can find changed files and the zip.so file in the attached php_zip.zip file)

Manual Installation:
export PHPPATH=/opt/lampp/
wget http://pecl.php.net/get/zip
tar -zxvf zip
cd zip-1.10.2/
./configure --with-php-config=$PHPPATH/bin/php-config --enable-zip
make

php.ini
After this I was ale to change php.ini file and my PHPExcel Class works again fine ;-)

zip

Zip enabled
Extension Version $Id: php_zip.c 284448 2009-07-20 15:26:54Z pajoye $
Zip version 1.9.1
Libzip version 0.9.0

Seiten