Skip to main content


Showing posts from 2016

Fatal error: Call to undefined function curl_init() in admin/controller/sale/order.php on line 84 - opencart

When using the curl functionalities you need to enable the extension in your php.ini file

on windows:

on linux*:

It could happen, for example, on opencart with this error:
Fatal error: Call to undefined function curl_init() in admin/controller/sale/order.php on line 84 -

[FIX] PHPmyadmin - Fatal error: main(): The script tried to execute a method or access

Fatal error: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "PMA\libraries\ThemeManager" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in \libraries\ on line 702

Fast solution - Just delete the cache in your browser :)

iframe not positioned correctly in chrome or safari (webkit) with rtl (ex. arabic language)

iframe not positioned correctly in chrome or safari (webkit) with rtl (ex. arabic language)

I got a problem with an iframe like this one
<iframe src="page.html" width="360px" height="120px" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe>

I solved by just setting a fixed width from the CSS and chrome positioned the iframe as expected.

I spent 1 hour on this stupid thing and I really don't like to fix such an old crap.

Uniserver ZeroXI and php 5.6 not starting - not running on windows

After installing php 5.6 on uniform server (ZeroXI_php_5_6_16_p.exe)

Open your httpd.conf file

After <IfDefine php56> replace all the occurences from *53.dll to *54.dll  as showed below

<IfDefine php56>
  LoadFile ${US_ROOTF}/core/php56/icudt54.dll
  LoadFile ${US_ROOTF}/core/php56/icuin54.dll
  LoadFile ${US_ROOTF}/core/php56/icuio54.dll
  LoadFile ${US_ROOTF}/core/php56/icule54.dll
  LoadFile ${US_ROOTF}/core/php56/iculx54.dll
  LoadFile ${US_ROOTF}/core/php56/icutest54.dll
  LoadFile ${US_ROOTF}/core/php56/icutu54.dll
  LoadFile ${US_ROOTF}/core/php56/icuuc54.dll

Restart apache

Unable to Connect to HTTPS localhost with java applications (screamingfrog, Beamusup)

Various programs are unable to connect HTTPS localhost or other urls with ssl.

This will fix:
https problems with Screaming Frog
https problems with Beamusup SEO crawler

Download Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files

Java 8 - Windows and *nix
Java 7 - Windows and *nix

Installation of the unlimited strength JCE policy files. Uncompress and extract the downloaded file.
Copy "local_policy.jar" and "US_export_policy.jar" in your JAVA_HOME (JRE) installation folder under /lib/security.

For example (on windows):
C:\Program Files\Java\jre1.8.0_77\lib\security

 For example (on *nix):

On Mac OS x the folder is different:
/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/security/

Opencart - create a php array of the countries IDs

A fast (not elegant) way to get an array of the countries iso codes and country ID from opencart. I just needed them to compare the data with an external source.
Just put the file in the Opencart folder (ex. arrayp.php).
I know that it's crap ...




    $dbconn = mysqli_connect(DB_HOSTNAME,DB_USERNAME,DB_PASSWORD) or die("Cannot connect to the database");
    mysqli_select_db($dbconn, DB_DATABASE) or die($dbconn->error());
    $sql_q = "SELECT CONCAT( '\'', `iso_code_2`, '\' => \'',`country_id`, '\', ' ) as arrcodes FROM `" . DB_PREFIX . "country`;";
    $result = mysqli_query($dbconn, $sql_q);

    if( !$result){ die($dbconn->error); }

    echo '$mycountries = array(' . "\r\n";
    // $queryResult = array();
    while($mres = $result->fetch_object()){
            echo "\t" . $mres->arrcodes . "\r\n";

[ERROR] Could not open library 'libcurl' - mingw - Windows 10 64bit

[ERROR] Could not open library 'libcurl'.
Could not open library 'libcurl.dll'
Could not open library ''.
Could not open library '

download libcurl from this website (captcha is needed)
or from*&os=Win64&flav=-&ver=*&cpu=x86_64

Copy all the files from the /dll/ folder in your /bin/ folder.
Copy the "bin" and "lib" files in the respective folders.

I got problems with other versions of libcurl. If you have better mirrors just post a comment.

Unable to download data from - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (

Unable to download data from - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (

You have problems with your configuration.

In my case I have ruby 2.2.2p95

How to Fix it?
 - You can download and reinstall ruby (I know that you probably already did it or you don't want to do it).
- A workaround could be to append "--source" to your command line.
gem install bundler --source
- manually update ruby to the latest version. (easy to do)



gem install --local rubygems-update-2.6.7.gem

update_rubygems --no-ri --no-rdoc

Now your ruby should work again.

Ruby Gem not working on windows 10 (x32 x64) - sh: /bin/gem: C:/path/ruby.exe^M: bad interpreter: No such file or directory

Ruby Gem not working on windows 10 (x32 x64) - sh: /bin/gem: C:/path/ruby.exe^M: bad interpreter: No such file or directory

Edit,ex with notepad, the file available in "bin/gem.bat"

(see below)
IF NOT "%~f0" == "~f0" GOTO :WinNT
@"ruby.exe" "C:/uselesswindowspath/bin/gem" %1 %2 %3 %4 %5 %6 %7 %8 %9
@"ruby.exe" "%~dpn0" %*

and replace

Then edit "bin/gem", and replace


Do the dame for any .bat file related to ruby (ex. jekyll) and you should not have other problems.

Install kolibrios on USB from windows - It's Very Easy

Installing kolibrios on a usb pen drive (ex. an old 256mb usb pen ... or even 64mb) from windows is quite easy.

NOTE: kolibri OS is very fast but doesn't have a lot of drivers for networking and doesn't support WIFI at all (I checked it in the forums - october 2016).

Download the kolibri OS image

Download rufus

Run rufus

Select "create bootable disk using" -> DD Image

- Click on the disk to choose your kolibri.img image file.
 - Select "DD Image" on "create a bootable disk using".
- click on the CD Icon and select your kolibri.img file
- Click on run

That's all.

USB\VID_0CF3&PID_3000&REV_0200 drivers - X64 X86 - Windows 7 8 10

Atheros valkyrie bootrom
download from the asus website

ASUS Bluetooth Driver V7.3.0.100 for Windows Vista 32bit & Vista 64bit---(WHQL).
ASUS Bluetooth Driver V7.2.0.65 for Windows Win7 32bit & Win7 64bit---(WHQL).
ASUS Bluetooth Driver V7.2.0.83 for Windows XP 32bit & XP 64bit---(WHQL).

XSS, SQL Injection, data leak |


SQL query from error

SELECT AS id, excerpt, status, expire_Date, name, des-c-r-i-p-tion, region_id,doclink,dotfin, difficulty, title FROM facilities, facilities_regions, regions WHERE AND AND{id}

SQL Injection

Microsoft OLE DB Provider for ODBC Driverserror '80040e14'
[MySQL][ODBC 5.3(a) Driver][mysqld-5.6.24-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''8, 5, 4, 6, 7) ) GROUP BY ORDER BY id desc' at line…

open the links of the carousel in a new page - opencart

Replace in catalog/view/theme/*/template/module/carousel.tpl

<a href="<?php echo $banner['link']; ?>">

<a href="<?php echo $banner['link']; ?>" target="_BLANK">

Sample Vqmod

    <name>carousel in a new page</name>

    <file path="catalog/view/theme/*/template/module/carousel.tpl">
            <search position="replace"><![CDATA[<a href="<?php echo $banner['link']; ?>">]]></search>
            <add><![CDATA[<a href="<?php echo $banner['link']; ?>" target="_BLANK">]]></add>
</modification> | XSS problems

Simple XSS

Fix background Image cover on Internet Explorer

Use the following CSS

filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='.backgroundimage.jpg', sizingMethod='scale');
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='backgroundimage.jpg', sizingMethod='scale')";

ALERT: If you have random problems like dead links and similar use a fixed 100% (height and width) div container instead of html or body.

Xcode - File was built for archive which is not the architecture being linked armv7s or armv6s or i386

Xcode build/linking problem
When you are trying to run on an external device you can get this error.

I've spent a lot of time to find a solution.

Just make sure that "Build Active Architecture Only" is set to Yes for Debug and NO for Release (or you will get a warning when publishing/uploading the app in the store).
You can find the option in the "Build Settings" of your application in xcode.

Remove border, border radius, shadow from the owl slideshow in Opencart

Open the owl css
and remove the following:

.owl-wrapper-outer {
    border: 4px solid #fff;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    -o-border-radius: 4px;
    border-radius: 4px;
    -webkit-box-shadow: 0 1px 4px rgba(0,0,0,.2);
    -moz-box-shadow: 0 1px 4px rgba(0,0,0,.2);
    -o-box-shadow: 0 1px 4px rgba(0,0,0,.2);
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
that's all.

Works on opencart 2.2

FIX - Invalid command: inetc::get or inetc::put with NSIS

When you get one of the following errors:
Invalid command: inetc::getInvalid command: inetc::put You need to make sure that you have installed the inetc plugin that can be downloaded from the NSIS website.

If you still  have problems when compiling your script go to your NSIS folder (ex.: c:\Program Files\NSIS\Plugins) and copy INetC.dll from the "x86-unicode" or "amd64-unicode" subfolder.

If you have an x86 installation it should be better to use the x86-unicode.

How to get a full system report on windows without external software using only the command line

If you need a fast way to get a system hardware and software report on quite any windows Operating System you just need to run the following command:

msinfo32 /report report.txt
It's the best wayt to get system informations without instally any third party software.

It works on:
Windows 10
Windows 8.1
Windows 8
Windows 7
Windows vista
Windows xp (?)

Raise errors on to show the source code.


var URI = Request.getURI();

    //This provides default values if not supplied by the TAF or initial Salsa page
   var theTitle = "JVP: ";
    var theFBshare = "";
    var theFBshareTitle = "";
    var theFBshareImage = "";

        //This section is needed on the regular Salsa template only
        function getFbshare($path){
                 var redirect=$path;
                 newred = redirect.split("tell_a_friend_KEY=");
                 var tafkey = newred[1] ? newred[1].replace(/\D+/g,"") : "";
                 var taf=salsa.getObject("tell_a_friend",tafkey);
                 if (taf != null) {
                 if(taf.PT_facebook_share != null)  theFBshare = taf.PT_facebook_share;
                 if(taf.PT_facebook_title != null)  theFBshareTitle = taf.PT_facebook_title;
                 if(taf.PT_facebook_image !=…

How to convert cdr to iso on mac osx - very easy

from the terminal type

$ cp diskimage.cdr diskimage.iso

If you like the GUI just duplicate the file and change the file extension from the Finder. The extensions should be enabled in the finder preferences.

In most cases it should be enough and a lot

you have problems with your ISO file try the following command

$ hdiutil makehybrid -iso -joliet -o myimage.iso myimage.cdr

[FIX] ERROR Internal navigation rejected cannot access other urls - Cordova iOS

Make sure that your config.xml whitelist is ok

<allow-navigation href="http://*" />  <allow-intent href="http://*/*" /> 
 Those tags must be set. Specify your url to restrict the navigation.


cordova clean and then
cordova build ios
Make sure that you have a provisioning profile when building otherwise the app will be stuck after the splash screen.

It's preferable to build on xcode AFTER runnin  "cordova build ios" since cordova will reparse your main xml. Avoid the modification of the xml for the specific platform and remember to backup your files before doing anything.

[FIX] - iPhone project’s minimum deployment target

When we try to run the iOS app on an older device we can get such info.
From the xcode project info we can change the setting but the problem (that's what happened for me) will persist.

To lower the development target we need to change
build.xcconfig located in

for esample I added


Now xCode 7.3 runs without problems my app (sdk ios 9) the application on iphone 4 with iOS 7.1.2.
In my case it's a cordova project without particular plugins.

The xCode generated error:
iPhone runs iOS 7.1.2, which is lower than app's minimum deployment target. Change your project’s minimum deployment target or upgrade iPhone di businessweb’s version of iOS.

Fix: Error Parse Generalized time, invalid offset

When you get this error while signing or listing the data from keystore the problem can be, as happened for me, that you have the wrong time set if compared to the keys in the store or you have generated a key with a lot of days (ex. -validity 1000000000).
Check the time/date settings on your system including bios (just to be sure that your time will be ok also after rebooting).
Create your keystore (backup anything if you don't know what you are doing) again with a common validity. Usually it should be 365 or less but you can also use 3650 (10 years?).

Error keytool: Parse Generalized time, invalid offset

How to move your web folder in the account on!

Run ssh and login with your own account (ex. fs-youraccount)

check the path where is located your web area by going up for 2 folders and changing to the web directory

In my case my home folder is:
 and my web folder is

Just create a symbolic mlink
ln -s /var/www/clients/client456/web303/web /var/www/clients/client456/web303/home/fs-guida/

And now you can see your "web" subfolder via ftp.

That's all :)

If you need a basic (italian) guide to have a new shell and website for free follow this link:
La guida per avere una shell gratis e farci girare un bnc o psybot o altro.

Get the version of opencart from the index file using an external script.

If you are writing standalone scripts that are using the informations from opencart this small function can be useful. It will return the current version of opencart.

function getcurrentversion($indexfile='index.php'){
    if(file_exists($indexfile)) {
        $fd = fopen($indexfile,'r');
        if(empty($fd)){return false;}
        while (!feof($fd)) {
            $buffer = fgets($fd);
            if(preg_match("#define\('VERSION', '(.*?)'\);#",$buffer,$matches)){
                return $matches[1];
    } else {
        return false;

I add also a switch with different opencart versions. Not very useful but there are also older and not (not anymore) documented versions.

    case '':
    case '':
    case '':
    case '':
    case '':

Portable ASP Web Server for Windows! Definitive Solution to not waste time!

If you don't want to install a lot of useless stuff on your computer I highly recommend to use

Baby Web Server

This is the fastest, simple, best, portable solution to have a webserver that supports Microsoft ASP (Active Server Pages).

It's simplicity is a miracle if confronted with all the stuff that you need to do with an iis installation and configuration.

It just Works!

how to refresh Wordfence Falcon Cache - wordpress plugin

The fastest way to *refresh* Wordfence Falcon Cache is to Disable and Reenable it from the "Performance Setup"!


delete all the files from within

That easy? well, yes ...

Remember to manually backup not only the .htaccess but also your wordpress.

Forbidden tiki-install.php - [SOLUTION]

403  Forbidden tiki-install.php

When this error happens during the installation
403 Forbidden You don't have permission to access /tiki-install.php on this server.

In most cases it's not an error related to the files permissions.

Check your error logs before anything so that you can solve the specific problem as fast as possible.

In my case I got this error:
[rewrite:error] [pid 1964:tid 2044] [client ::1:11439] AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions : tiki-install.php, referer: http://localhost/tikiwiki/tiki-install.php

And solved by configuring the htaccess with:

Options +FollowSymLinks If you have installed tikiwiki in a subfolder also remember to change the rewritebase (ex. with tikiwiki):

RewriteBase   /tikiwiki/

CSS z-index not working with bootstrap menu

we need to use z-index on the PARENT element

this is the code that I have in the menu
<li class="dropdown open"> ...
<ul class="dropdown-menu dropdown-menu-right">
                        <li><a href="http://localhost/index.php?route=account/register">Register</a></li>
            <li><a href="http://localhost/index.php?route=account/login">Login</a></li>

instead of using z-index on ul.dropdown-menu.dropdown-menu-right
I adde the z-index on the parent li
#top {z-index:10000 !important;}

If you need a better example just ask in the comments.

old script - retrieve confidential data from INPS about RED

An old php script that I used to retrieve informations about the RED (dichiarazione reddituale per pensionati) for each Fiscal Code.
INPS never checked the authorizations on the url to request the data and I used this, and several other, bug to work in a faster way ...
The url doesn't work anymore and the script is damn old that nobody will care about it.


$inputfile = 'codici.txt';
$outputfile = 'RED.txt';
$host = '';
$path = '/servizi/redest/Frm_MatricolaIpost.aspx';

$method = 'POST';

//$host = '';

$postdata = '&Stampa=Esegui&F00=';

//reading codici fiscali from file
$arrcodicifiscali = getcodicifiscali($inputfile);

foreach($arrcodicifiscali as $codice)
    //getting the page
    $resdata = httpSocketConnection($host, 'GET', $path, '');
    $viewstatedata = '';
$regu = $resdata[1];

    if( preg_match( '#name="__VIEWSTATE" value="(.*?)"#', $resdata…

hackintosh various stuff for dell 1545 - (a bit messy)

During the installation of Leopard add only the following options

Intel Core Duo 2 processor
GMAX3100 graphics
BCM94312HMG Wifi card

Drivers wireless - broadcom
fixes and patches -> ps2 device support ps2 fix

audio sigmatel 9200 - 9223 - 9271
Marvell 88E80XX 10/100 Ethernet Controller - skge marvell

If trackpad and keyboard still don't work after installation use this package:
or search 0.98 version of Rehabman VoodooPS2.

 to download more stuff