<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PHP | DXSdata</title>
	<atom:link href="https://www.dxsdata.com/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dxsdata.com</link>
	<description>Software &#124; Network &#124; Administration</description>
	<lastBuildDate>Fri, 13 Jul 2018 05:51:22 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://www.dxsdata.com/wp-content/uploads/2023/08/cropped-logo-32x32.jpg</url>
	<title>PHP | DXSdata</title>
	<link>https://www.dxsdata.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>[:de]Ubuntu-Upgrade 14.04 -&gt; 16.04 -&gt; 18.04: Apache2 zeigt leere, weiße Seiten[:en]Ubuntu upgrade from 14.04 to 16.04 to 18.04 Apache2 showing blank pages[:]</title>
		<link>https://www.dxsdata.com/2018/07/ubuntu-upgrade-from-14-04-to-16-04-to-18-04-apache2-showing-blank-pages/</link>
					<comments>https://www.dxsdata.com/2018/07/ubuntu-upgrade-from-14-04-to-16-04-to-18-04-apache2-showing-blank-pages/#comments</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 13 Jul 2018 05:51:22 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">https://www.dxsdata.com/?p=2019</guid>

					<description><![CDATA[[:en] Scenario You are doing a Ubuntu LTS upgrade from 14.04. Having new 16.04 installed, everything seems fine, but after the upgrade to 18.04, Apache shows only blank pages for PHP sites. Even simple commands like phpinfo() do not work. The common log files do not show any information about it. Cause The general PHP [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[:en]</p>
<h3>Scenario</h3>
<p>You are doing a Ubuntu LTS upgrade from 14.04. Having new 16.04 installed, everything seems fine, but after the upgrade to 18.04, Apache shows only blank pages for PHP sites. Even simple commands like phpinfo() do not work. The common log files do not show any information about it.</p>
<h3>Cause</h3>
<p>The general PHP upgrading process from 5 to 7 (and to 7.2) seems to not always work well.</p>
<p>For whatever reason, the Ubuntu upgrade process declares some Apache PHP library modules as obsolete and deletes them, or at least disables them. So you might finish the upgrade with Apache having not enabled any PHP library module at all.</p>
<h3>Quick Fix</h3>
<p>Re-enable the module:</p>
<blockquote><p>a2enmod php7.2</p></blockquote>
<h3>Details</h3>
<p>See /etc/apache2/mods-available directory to find the most recent available PHP module version.</p>
<p>If no PHP module is installed, run</p>
<blockquote><p>apt install libapache2-mod-php7.2</p></blockquote>
<p>See /etc/apache2/mods-enabled for potential dead links, then re-enable the module via above a2enmod command.</p>
<h4>Additional Note</h4>
<p>Ubuntu 18 upgrade also removes Let&#8217;s Encrypt&#8217;s certbot tool, you might have to <a href="https://certbot.eff.org/lets-encrypt/ubuntuartful-apache">reinstall it</a>.</p>
<p>&nbsp;[:]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dxsdata.com/2018/07/ubuntu-upgrade-from-14-04-to-16-04-to-18-04-apache2-showing-blank-pages/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>[:de]Mikrotik RouterOS über SSH und OpenHAB steuern[:en]Remote controlling Mikrotik RouterOS with SSH and OpenHAB 2[:]</title>
		<link>https://www.dxsdata.com/2017/08/remote-controlling-mikrotik-routeros-with-ssh-and-openhab-2/</link>
					<comments>https://www.dxsdata.com/2017/08/remote-controlling-mikrotik-routeros-with-ssh-and-openhab-2/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Mon, 07 Aug 2017 12:45:18 +0000</pubDate>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://www.dxsdata.com/?p=1860</guid>

					<description><![CDATA[[:en]&#160; In a previous post, I explained how to set up Mikrotik Routerboards as a VPN gateway. This post is about how to remotely switch the VPN on and off via Smart Home visualization OpenHAB 2, so it affects your whole LAN. You can even switch to other VPN servers, conveniently via phone or browser [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[:en]&nbsp;</p>
<p>In a <a href="https://www.dxsdata.com/2017/04/ipvanish-vpn-with-mikrotik-routeros/">previous post</a>, I explained how to set up Mikrotik Routerboards as a VPN gateway.</p>
<p>This post is about how to remotely switch the VPN on and off via Smart Home visualization OpenHAB 2, so it affects your whole LAN. You can even switch to other VPN servers, conveniently via phone or browser interface.</p>
<p>Basic procedure: User starts a command via OpenHAB interface -&gt; SSH commands are executed via shell -&gt; RouterOS accepts the commands.</p>
<h3>SSH preparation</h3>
<p>First we need to establish a simple and secure connection between your server (e.g. Ubuntu, running OpenHAB) and your routerboard, which can be used in scripts without passwords.</p>
<p>On your OH server, execute:</p>
<pre class="lang:sh decode:true ">su - openhab -s /bin/bash #the Linux user which is running the OpenHAB process
mkdir /ssh-mikrotik
cd /ssh-mikrotik
ssh-keygen -t rsa #as location, choose /ssh-mikrotik/id_rsa
</pre>
<p>Copy the file /ssh-mikrotik/id_rsa<strong>.pub </strong>to your Mikrotik device, e.g. via WinSCP and RouterOS WinBox (or FTP / terminal).</p>
<p>Then open WinBox -&gt; System -&gt; Users and create a user &#8220;openhab&#8221; with full permissions. If you want, restrict it to a certain IP address.</p>
<p>In &#8220;SSH keys&#8221; tab, import the file id_rsa.pub you copied before, and assign it to Mikrotik user &#8220;openhab&#8221;.</p>
<p>Test the SSH connection on your OH server:</p>
<pre class="lang:sh decode:true">ssh -l openhab -i /ssh-mikrotik/id_rsa 10.1.0.11 "echo asdf" # assuming 10.1.0.11 is your RouterOS device</pre>
<p>&nbsp;</p>
<h3>Scripts</h3>
<p>You need some scripts on your OH server to get the VPN state and be able to control it.</p>
<pre title="/ssh-mikrotik/vpn-control.sh" class="lang:sh decode:true ">#!/bin/bash

if [ "$1" = "ON" ]
then
        echo "enabling vpn"
        ssh -l openhab -i /ssh-mikrotik/id_rsa 10.1.0.11 "/interface pptp-client enable myvpn" #assuming your VPN runs via PPTP and is called "myvpn"
fi

if [ "$1" = "OFF" ]
then
        echo "disabling vpn"
        ssh -l openhab -i /ssh-mikrotik/id_rsa 10.1.0.11 "/interface pptp-client disable myvpn"
fi</pre>
<p>&nbsp;</p>
<pre title="/ssh-mikrotik/vpn-status.php" class="lang:php decode:true">&lt;?php

$result = `ssh -l openhab -i /ssh-mikrotik/id_rsa  10.1.0.11 "/interface pptp-client print where name=myvpn"`;

#echo $result;

$lines = explode("\n", $result);

//offline?
if (count($lines) &lt; 5)
{
        echo "error";
        exit;
}

$line = $lines[1];

$expl = explode(" ",$line);

#var_dump($expl);

if ($expl[3] == "R")
{
        echo "ON";
}
else
{
        echo "OFF";
}

?&gt;
</pre>
<p>Make both scripts executable by the openhab user:</p>
<pre class="lang:sh decode:true">chmod a+x openhab /ssh-mikrotik/vpn-*</pre>
<p>You can later extend these scripts e.g. to be able to switch to another VPN host. Use the commands like in WinBox terminal, e.g. &#8220;/interface pptp-client set myvpn connect-to=example.com&#8221;.</p>
<p>Execute the scripts in your OH server&#8217;s shell manually to see if they work (they must be able to run under user openhab).</p>
<h3>OpenHAB2 configuration</h3>
<p>The last step is to configure OH visualization.</p>
<p>We use the Exec binding for OH2, so make sure it is enabled in runtime.cfg (or in your preferred OH admin interface).</p>
<pre title="demo.things" class="lang:sh decode:true">Thing exec:command:Vpn-Control [command="/ssh-mikrotik/vpn-control.sh %2$s", interval=0, autorun=true] 
Thing exec:command:Vpn-Status [command="/usr/bin/php /ssh-mikrotik/vpn-status.php", interval=3600, timeout=15]</pre>
<pre title="demo.items" class="lang:sh decode:true">String VPN "VPN" &lt;network&gt; (All) { channel="exec:command:Vpn-Control:input", channel="exec:command:Vpn-Status:output", autoupdate="true"}</pre>
<pre title="demo.sitemap" class="lang:sh decode:true ">Switch item=VPN</pre>
<p>You should now be able to control your VPN interface via OpenHAB:</p>
<p><img decoding="async" class="alignnone size-full wp-image-1863 " src="https://www.dxsdata.com/wp-content/uploads/2017/08/img_59885fff9ef2b.png" alt="" />[:]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dxsdata.com/2017/08/remote-controlling-mikrotik-routeros-with-ssh-and-openhab-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[:de]Magento Commerce: Kunden-Emailadressen beim Checkout einschränken / Adminzugang limitieren[:en]Magento Commerce: Restrict customer email addresses at checkout / Limit admin access[:]</title>
		<link>https://www.dxsdata.com/2017/06/magento-commerce-restrict-customer-email-addresses-at-checkout-limit-admin-access/</link>
					<comments>https://www.dxsdata.com/2017/06/magento-commerce-restrict-customer-email-addresses-at-checkout-limit-admin-access/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 08 Jun 2017 18:07:10 +0000</pubDate>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://www.dxsdata.com/?p=1797</guid>

					<description><![CDATA[[:en]Fake orders by guest customers (or robots) in Magento shops can become quite annoying, some bots are even able to solve or skip the shop&#8217;s captcha codes. Decline disposable email domains To add another obstacle for bots and to make the checkout process not more complex than needed, I added some additional code in Magento&#8217;s root directory. It [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[:en]Fake orders by guest customers (or robots) in Magento shops can become quite annoying, some bots are even able to solve or skip the shop&#8217;s captcha codes.</p>
<h3>Decline disposable email domains</h3>
<p>To add another obstacle for bots and to make the checkout process not more complex than needed, I added some additional code in Magento&#8217;s root directory.</p>
<p>It declines the customer&#8217;s email address if it comes from a disposable email (trash mail) provider. So for the checkout to complete, the customer is forced to enter a valid (non-trash) email address.</p>
<p>This list on <a href="https://github.com/ivolo/disposable-email-domains">Github</a> seems to be pretty much complete and can be queried directly e.g. <a href="https://open.kickbox.io/v1/disposable/">here</a>.</p>
<pre title="checks.inc.php" class="lang:php decode:true">&lt;?php

//2017-06 DXSdata.com

if (isset($_POST['billing']))
{
       //https://github.com/ivolo/disposable-email-domains
        //look if listed as disposable email domain
        if (@$tmp['email'])
        {
                $result = @file_get_contents("https://open.kickbox.io/v1/disposable/".$tmp['email']);

                if ($result)
                {
                        $result = json_decode($result);
                        if ($result)
                        {
                                if ($result -&gt; disposable)
                                {
                                        $_POST['billing']['email'] = '';
                                        mail("office@dxsdata.com", "disposable email detected: ".$tmp['email'], "", "From: office@mywebser.ver");
                                        exit;
                                }
                        }
                        else mail("office@dxsdata.com", "could not check disposable email domain","","From: office@mywebser.ver");
                }
                else mail("office@dxsdata.com", "could not check disposable email domain","","From: office@mywebser.ver");
        }


}</pre>
<p>Then include it in your Magento&#8217;s index.php:</p>
<pre title="index.php" class="lang:php decode:true ">&lt;?php
#only add the following line:

include('checks.inc.php');

#original:
/**
 * Magento
 *
...</pre>
<p>Note: After every update, security patch etc., check your index.php file if the include command is still there. Re-add it, if necessary.</p>
<hr />
<h3>Restrict admin access to certain IP ranges</h3>
<p>In addition, it definitely makes sense to make the virtual /admin subdirectory more secure. It does not really exist in Magento&#8217;s file structure, so you cannot use .htaccess files like it can be done for the /downloader directory. But you can extend the new checks.inc.php file you created before:</p>
<pre title="checks.inc.php" class="lang:php decode:true ">&lt;php
#addition

function isAllowedAsAdmin()
{
    $whitelist = array(
        '10.1.*',
        '192.168.1.*',
        '77.1.2.34',
        '234.45.567.80'
    );

    if(in_array($_SERVER['REMOTE_ADDR'], $whitelist))
        return true;
    else{
        foreach($whitelist as $i){
            $wildcardPos = strpos($i, "*");

            if($wildcardPos !== false &amp;&amp; substr($_SERVER['REMOTE_ADDR'], 0, $wildcardPos) . "*" == $i)
                return true;
        }
    }

    return false;
}

if (strpos($_SERVER['REQUEST_URI'], "/admin") !== false)
{
    if (!isAllowedAsAdmin())
    {
        echo $_SERVER['REMOTE_ADDR'] . " not allowed.";
        exit;
    }
}
</pre>
<p>&nbsp;[:]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dxsdata.com/2017/06/magento-commerce-restrict-customer-email-addresses-at-checkout-limit-admin-access/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[:de]Erste Schritte mit Github[:en]First steps with Github[:]</title>
		<link>https://www.dxsdata.com/2017/04/first-steps-with-github/</link>
					<comments>https://www.dxsdata.com/2017/04/first-steps-with-github/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 21 Apr 2017 08:31:51 +0000</pubDate>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://www.dxsdata.com/?p=1725</guid>

					<description><![CDATA[[:en] Signup Create an account on www.github.com, should be self-explaining. Also create a repository; I will call it &#8220;testrepo&#8221; in this tutorial. We will use a Ubuntu VM as local machine in this case. Prepare local directory I suppose you already have a local project directory which contains all the files you want to upload. [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[:en]</p>
<h2>Signup</h2>
<p>Create an account on www.github.com, should be self-explaining.</p>
<p>Also create a repository; I will call it &#8220;testrepo&#8221; in this tutorial.</p>
<p>We will use a Ubuntu VM as local machine in this case.</p>
<h2>Prepare local directory</h2>
<p>I suppose you already have a local project directory which contains all the files you want to upload.</p>
<p>If you use any personal user credentials in your project, please transfer the data to a separate file.</p>
<p>E.g. if you have a file like data.inc.php, also create a neutral file data.inc.php.sample.</p>
<p>Then create a file .gitignore with the contents you do not want to be uploaded:</p>
<pre title=".gitignore" class="lang:sh decode:true ">.htaccess
data.inc.php</pre>
<p>&nbsp;</p>
<h2>Upload local files</h2>
<p>First preparation:</p>
<pre class="lang:sh decode:true">apt-get install git
cd [yourlocalpath]/testrepo
git init
git remote add testrepo https://github.com/[yourUsername]/testrepo</pre>
<p>Add and upload all files:</p>
<pre class="lang:sh decode:true">git pull testrepo master
git add .
#or git add -A
git commit
#add a comment and close the editor
git push testrepo

</pre>
<p>Modifying a file is quite similar:</p>
<pre class="lang:sh decode:true ">#modify a file
git add -A
git commit
git push testrepo</pre>
<p>&nbsp;</p>
<p>&nbsp;[:]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dxsdata.com/2017/04/first-steps-with-github/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[:de]Emoticons für Openfire Spark Messenger[:en]Emoticons for Openfire Spark Messenger[:]</title>
		<link>https://www.dxsdata.com/2017/04/emoticons-for-openfire-spark-messenger/</link>
					<comments>https://www.dxsdata.com/2017/04/emoticons-for-openfire-spark-messenger/#comments</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 20 Apr 2017 15:57:41 +0000</pubDate>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<guid isPermaLink="false">http://www.dxsdata.com/?p=1718</guid>

					<description><![CDATA[[:en]Spark Messenger is a great open source messenger for internal and external usage, in combination with OpenFire Server. Because the integrated smileys and icons seem a bit outdated, I created an IconSet generator which uses the much more beautiful emoticons from EmojiOne. Project is also available on Github. [iframe src=&#8221;https://www.dxsdata.com/other/EmojiOne2Spark&#8221; width=&#8221;100%&#8221; height=&#8221;950&#8243;] &#160;[:]]]></description>
										<content:encoded><![CDATA[<p>[:en]<a href="https://igniterealtime.org/projects/spark/">Spark</a> Messenger is a great open source messenger for internal and external usage, in combination with OpenFire Server.</p>
<p>Because the integrated smileys and icons seem a bit outdated, I created an IconSet generator which uses the much more beautiful emoticons from <a href="https://emojione.com/">EmojiOne</a>.</p>
<p>Project is also available on <a href="https://github.com/DXSdata/EmojiOne2Spark">Github</a>.</p>
<p>[iframe src=&#8221;https://www.dxsdata.com/other/EmojiOne2Spark&#8221; width=&#8221;100%&#8221; height=&#8221;950&#8243;]</p>
<p>&nbsp;[:]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dxsdata.com/2017/04/emoticons-for-openfire-spark-messenger/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>[:de]Magento 1.9: Mwst.-Probleme mit PHP7[:en]Magento 1.9: Tax issues with PHP7[:]</title>
		<link>https://www.dxsdata.com/2017/04/magento-1-9-tax-issues-with-php7/</link>
					<comments>https://www.dxsdata.com/2017/04/magento-1-9-tax-issues-with-php7/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Mon, 10 Apr 2017 16:17:22 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://www.dxsdata.com/?p=1693</guid>

					<description><![CDATA[[:en]If you migrate from Ubuntu 14 to Ubuntu 16, PHP&#8217;s version also changes from 5.x to 7.x. Magento 1.9.x versions seem to work the same at first sight, but e.g. the cart and also the order process is done without VAT. According to various forum threads, the cause is that sorting has changed with PHP7. [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[:en]If you migrate from Ubuntu 14 to Ubuntu 16, PHP&#8217;s version also changes from 5.x to 7.x.<br />
Magento 1.9.x versions seem to work the same at first sight, but e.g. the cart and also the order process is done <strong>without</strong> VAT.</p>
<p>According to various forum threads, the cause is that sorting has changed with PHP7.</p>
<h3>Workaround</h3>
<p>Download <a href="https://github.com/hartmut-ltd/magento-php7-totals-fix">this module</a>, it provides a fix for this issue.</p>
<p>Extract it to the root folder of your Magento installation, e.g. /var/www/html.</p>
<p>You might have to delete cache files, afterwards everything should work again.</p>
<p>&nbsp;</p>
<p><a href="http://magento.stackexchange.com/questions/92783/magento-grand-total-without-taxes-in-1-9-with-php7">Reference</a>[:]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dxsdata.com/2017/04/magento-1-9-tax-issues-with-php7/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[:de]Magento Commerce: Dokument-Anhänge uploaden[:en]Magento Commerce: Product attachment upload[:]</title>
		<link>https://www.dxsdata.com/2017/03/magento-commerce-product-attachment-upload/</link>
					<comments>https://www.dxsdata.com/2017/03/magento-commerce-product-attachment-upload/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 16 Mar 2017 18:17:51 +0000</pubDate>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software]]></category>
		<guid isPermaLink="false">http://www.dxsdata.com/?p=1676</guid>

					<description><![CDATA[[:de]Magento bietet standardmäßig keine komfortable Möglichkeit Dokumente für Produkte, wie z.B. PDF-Anleitungen per Browser hochzuladen. Abhilfe schafft diese Extension (alternativ direkt vom Hersteller). Installation Download des .gz-File Über den Magentoconnect Manager (Downloader) hochladen (&#8220;Direct package file upload&#8221;) Bei Fehler &#8220;downloader &#8211; CONNECT ERROR: Unknown resource type&#8221;: GZ-File lokal entpacken und neu komprimieren, z.B. mit 7-Zip [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[:de]Magento bietet standardmäßig keine komfortable Möglichkeit Dokumente für Produkte, wie z.B. PDF-Anleitungen per Browser hochzuladen.</p>
<p>Abhilfe schafft <a href="https://www.magentocommerce.com/magento-connect/product-attachments-extension.html">diese Extension</a> (alternativ <a href="https://store.unicodesystems.in/index.php/product-attachments-extension.html">direkt vom Hersteller</a>).</p>
<h3>Installation</h3>
<ul>
<li>Download des .gz-File</li>
<li>Über den Magentoconnect Manager (Downloader) hochladen (&#8220;Direct package file upload&#8221;)
<ul>
<li>Bei Fehler &#8220;downloader &#8211; CONNECT ERROR: Unknown resource type&#8221;: GZ-File lokal entpacken und neu komprimieren, z.B. mit 7-Zip als Tar-File, dann erneut hochladen.</li>
</ul>
</li>
<li>Alternativ das Archiv in den Root-Ordner von Magento entpacken.</li>
<li>Extension aktivieren: Admin -&gt; System -&gt; Konfiguration -&gt; Product Attachment -&gt; ja</li>
<li>(optional) Übersetzungsdatei anpassen
<ul>
<li>app/design/frontend/default/default/locale/de_DE/translate.csv</li>
</ul>
</li>
</ul>
<p><strong>UPDATE 2017-04</strong>:</p>
<p>In einigen Fällen scheint nach der Modul-Installation die Produktbeschreibung (Description) nicht mehr auf.</p>
<p>Workaround:</p>
<pre title="app/design/frontend/base/default/template/fileuploader/desc_attachments.php" class="lang:php decode:true ">//Bugfix: Missing description; insert this code at line 20 (between $version php-echo)
?&gt;
&lt;h2&gt;&lt;?php echo $this-&gt;__('Description') ?&gt;&lt;/h2&gt;
&lt;?php echo $_description;
//End Bugfix: Missing description
</pre>
<p>&nbsp;</p>
<h3 id="bedienung">Bedienung im Magento-Adminbereich</h3>
<p>Der einfachste Weg ist zuerst das Attachment anzulegen und es dann einem bestehenden Produkt zuzuordnen &#8211; siehe Screenshots.</p>
<p><a href="https://www.dxsdata.com/wp-content/uploads/2017/03/magento-document-upload-1.png" rel="attachment wp-att-1673"><img loading="lazy" decoding="async" class="size-medium wp-image-1673 alignnone" src="https://www.dxsdata.com/wp-content/uploads/2017/03/magento-document-upload-1-300x106.png" alt="" width="300" height="106" /></a></p>
<p>Neues Attachment anlegen:</p>
<p><a href="https://www.dxsdata.com/wp-content/uploads/2017/03/magento-document-upload-2.png" rel="attachment wp-att-1674"><img loading="lazy" decoding="async" class="size-medium wp-image-1674 alignnone" src="https://www.dxsdata.com/wp-content/uploads/2017/03/magento-document-upload-2-300x264.png" alt="" width="300" height="264" /></a></p>
<p>&nbsp;</p>
<p><a href="https://www.dxsdata.com/wp-content/uploads/2017/03/magento-document-upload-3.png" rel="attachment wp-att-1675"><img loading="lazy" decoding="async" class="size-medium wp-image-1675 alignnone" src="https://www.dxsdata.com/wp-content/uploads/2017/03/magento-document-upload-3-300x144.png" alt="" width="300" height="144" /></a></p>
<p>Resultat:</p>
<p><a href="https://www.dxsdata.com/wp-content/uploads/2017/03/magento-document-upload-4.png" rel="attachment wp-att-1672"><img loading="lazy" decoding="async" class="size-medium wp-image-1672 alignnone" src="https://www.dxsdata.com/wp-content/uploads/2017/03/magento-document-upload-4-300x152.png" alt="" width="300" height="152" /></a></p>
<p>&nbsp;[:]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dxsdata.com/2017/03/magento-commerce-product-attachment-upload/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[:de]DPT5/EIS10 2-Byte Hex Gleitkommawert mit PHP konvertieren[:en]Convert DPT5/EIS10 2-byte octal value with PHP[:]</title>
		<link>https://www.dxsdata.com/2016/12/convert-dpt5eis10-2-byte-octal-value-with-php/</link>
					<comments>https://www.dxsdata.com/2016/12/convert-dpt5eis10-2-byte-octal-value-with-php/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 07 Dec 2016 14:57:18 +0000</pubDate>
				<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://www.dxsdata.com/?p=1366</guid>

					<description><![CDATA[[:en]&#160; Using a KNX server like eibd with PHP in combination, you might come to a point where you want to convert the DPT/EIS encoded telegram values to decimal format. For some data types, it works by simply using PHP hexbin(), but it does not for 2-byte floating point values. In many forum threads the [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[:en]&nbsp;</p>
<p>Using a KNX server like eibd with PHP in combination, you might come to a point where you want to convert the DPT/EIS encoded telegram values to decimal format.</p>
<p>For some data types, it works by simply using PHP hexbin(), but it does not for 2-byte floating point values.</p>
<p>In many forum threads the following sample is used:<br />
<del></del></p>
<pre class="lang:php decode:true ">
 $first_byte = decbin(hexdec(substr($value, 0, 2)));
 $second_byte = decbin(hexdec(substr($value, 2, 2)));

 while (strlen($first_byte) != 8) {
   $first_byte= "0".$first_byte;
 }

 while (strlen($second_byte) != 8) {
   $second_byte= "0".$second_byte;
 }

 $tmpdata = $first_byte.$second_byte;
 $eib_base_value=bindec(substr($tmpdata,5,15));
 $eib_exponent=bindec(substr($tmpdata,1,4));
 return (0.01*$eib_base_value)*pow(2,$eib_exponent);</pre>
<p>&nbsp;</p>
<p>&nbsp;<br />
BUT it converts negative values wrong! This can lead to e.g. wrong temperature values which might affect the heating control.</p>
<p>Use this snippet instead:</p>
<pre class="lang:php decode:true ">$intValue = hexdec($value);
$floatValue = ($intValue &amp; 0x07ff);

if (($intValue &amp; 0x08000) != 0)
{
  $floatValue = $floatValue | 0xfffffffffffff800;
  $floatValue = $floatValue *-1;
}

$floatValue = $floatValue &lt;&lt; (($intValue &amp; 0x07800) &gt;&gt; 11);
            
if (($intValue &amp; 0x08000) != 0)
{
  $floatValue = $floatValue * -1;
}

return $floatValue / 100;</pre>
<p><a href="https://www.gedankengut.de/eis5-dtp9-umrechnung-von-eib-knx-negativen-minustemperaturen-mit-php/">Reference</a>[:]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dxsdata.com/2016/12/convert-dpt5eis10-2-byte-octal-value-with-php/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[:de]Magento CE 1.x: Zugang zu Adminbereich mit IP-Whitelist einschränken[:en]Magento CE 1.x: Restricting admin access with IP whitelist[:]</title>
		<link>https://www.dxsdata.com/2016/11/magento-ce-1-x-restricting-admin-access-with-ip-whitelist/</link>
					<comments>https://www.dxsdata.com/2016/11/magento-ce-1-x-restricting-admin-access-with-ip-whitelist/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 01 Nov 2016 13:54:44 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://www.dxsdata.com/?p=1275</guid>

					<description><![CDATA[[:en]There are many tutorials (e.g. the official one) how to make Magento secure, but none of them worked perfectly (for me). So this is my approach: Secure /downloader Add to downloader/.htaccess: Order deny,allow Deny from all Allow from 77.12.34.56 Allow from 10.1.0.0/16 Allow from 192.168.0.0/24 Allow from 91.12.34.56 #adjust to your needs Secure /admin via [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[:en]There are many tutorials (e.g. the <a href="https://magento.com/security/best-practices/protect-your-magento-installation-password-guessing-new-update">official one</a>) how to make Magento secure, but none of them worked perfectly (for me).</p>
<p>So this is my approach:</p>
<h3>Secure /downloader</h3>
<p>Add to downloader/.htaccess:</p>
<pre class="lang:sh decode:true ">Order deny,allow
Deny from all
Allow from 77.12.34.56
Allow from 10.1.0.0/16
Allow from 192.168.0.0/24
Allow from 91.12.34.56
#adjust to your needs</pre>
<h3>Secure /admin via .htaccess</h3>
<p>Because the admin URL does not point to a real directory called &#8220;admin&#8221; (but points to /index.php), this is a bit more complicated.</p>
<p>Add to your Magento root .htaccess:</p>
<pre class="lang:sh decode:true">#Some IP Blacklisting (fake orderers etc.)
Deny from 91.123.45.
Deny from 80.12.34.56

# Restrict admin access
RewriteCond %{REQUEST_URI} ^/(index.php/)?admin/ [NC]
RewriteCond expr "! -R '10.1.0.0/16'"
RewriteCond expr "! -R '192.168.1.0/24'"
RewriteCond %{REMOTE_ADDR} !^77.12.34.56
RewriteCond %{REMOTE_ADDR} !^91.12.34.56
#add more if needed
RewriteRule ^(.*)$ / [F,L]</pre>
<p>Note the different syntax (expr) when using wildcards/subnet ranges instead of full IPs.</p>
<h3>Secure /admin via index.php</h3>
<p>The code above works for many cases, but under some circumstances it might happen that the user can access the login form anyway. For me, it worked e.g. with example.com/index.php/admin/admin&#8230;, but not for example.com/admin (so an attacker would be able to test passwords).</p>
<p>So I recommend to use the following PHP script in addition.</p>
<pre class="lang:php decode:true">&lt;?php

//ds, 11.2016
//Addition to .htaccess to restrict /admin access.   
                  
function isAllowedAsAdmin()
{
    $whitelist = array(
        '10.1.*',
        '192.168.1.*',
        '77.12.34.56',
        '91.12.34.566'
    );
    
    if(in_array($_SERVER['REMOTE_ADDR'], $whitelist))
        return true;
    else{
        foreach($whitelist as $i){
            $wildcardPos = strpos($i, "*");

            if($wildcardPos !== false &amp;&amp; substr($_SERVER['REMOTE_ADDR'], 0, $wildcardPos) . "*" == $i)
                return true;
        }
    }

    return false;
}

if (strpos($_SERVER['REQUEST_URI'], "/admin") !== false)
{
    if (!isAllowedAsAdmin())
    {
        echo $_SERVER['REMOTE_ADDR'] . " not allowed.";
        exit;
    }
}

                
?&gt;</pre>
<p>Save it as /ipcheck.inc.php, then edit index.php and add this line at the beginning:</p>
<pre class="lang:php decode:true ">&lt;?php
include('ipcheck.inc.php');
?&gt;</pre>
<p>&nbsp;[:]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dxsdata.com/2016/11/magento-ce-1-x-restricting-admin-access-with-ip-whitelist/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[:de]PHP-Klasse für Gardena Smart System API[:en]PHP Class for Gardena Smart System API[:]</title>
		<link>https://www.dxsdata.com/2016/07/php-class-for-gardena-smart-system-api/</link>
					<comments>https://www.dxsdata.com/2016/07/php-class-for-gardena-smart-system-api/#comments</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 30 Jul 2016 09:07:22 +0000</pubDate>
				<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://www.dxsdata.com/?p=1186</guid>

					<description><![CDATA[[:en]Gardena&#8217;s robotic lawn mower &#8220;smart Sileno&#8221; (R100LiC&#8221;) comes with a gateway module which is used for communication between the mower and Gardena servers. Unfortunately, at the moment there is no way to get direct API access to the gateway, so the commands have to be sent out of your LAN, and the gateway forwards the [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[:en]Gardena&#8217;s robotic lawn mower &#8220;smart Sileno&#8221; (R100LiC&#8221;) comes with a gateway module which is used for communication between the mower and Gardena servers.</p>
<p>Unfortunately, at the moment there is no way to get direct API access to the gateway, so the commands have to be sent out of your LAN, and the gateway forwards the Gardena server command to the mower, etc.</p>
<p>In addition, there is no official web interface yet, but thanks to <a href="http://www.roboter-forum.com/showthread.php?16777-Gardena-Smart-System-Analyse">this post</a>, there are commands you can use to integrate it into your existing home automation system.</p>
<p>For convenience, I created a PHP class for it.</p>
<p>First register a Gardena account, e.g. via Gardena smart system mobile app, and add your gateway and your mower.</p>
<p>Afterwards, you can use the class:</p>
<p>[github-contents username=&#8221;DXSdata&#8221; repository=&#8221;Gardena&#8221; filepath=&#8221;gardena.class.inc.php&#8221; language=&#8221;php&#8221; ]</p>
<p>Example usage:</p>
<p>[github-contents username=&#8221;DXSdata&#8221; repository=&#8221;Gardena&#8221; filepath=&#8221;index.php&#8221; language=&#8221;php&#8221; ]</p>
<p><strong>U</strong><strong>pdate 2017-04-17</strong></p>
<p>I updated the class with Gardena Smart Sensor support. The hardware is not cheap but reliable as I can say so far. If you have e.g. a Gardena Smart Sileno mower and a Smart Sensor, you can use this class to park the mower in its charging station as long as the ground is moist.</p>
<p><strong>Update 2017-04-21</strong></p>
<p><a href="https://github.com/DXSdata/Gardena">Moved project files to Github</a>.</p>
<p>Now also includes Watering Control.</p>
<p>Latest commits:</p>
<p>[github-commits username=&#8221;DXSdata&#8221; repository=&#8221;&#8221; limit=&#8221;3&#8243;][:]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dxsdata.com/2016/07/php-class-for-gardena-smart-system-api/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
	</channel>
</rss>
