Skip to main content

Posts

Showing posts from November, 2016

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
%uniserverpath%\core\apache2\conf\httpd.conf

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
MacOSX



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):
$JAVA_HOME/lib/security/
/usr/java/jre1.8.0_77/lib/security/

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 ...





<?php

$newpassword='admin';

require('config.php');

    $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 'libcurl.so.4'.
Could not open library 'libcurl.so.4.dll



download libcurl from this website (captcha is needed)
http://www.confusedbycode.com/curl/#downloads
or from
https://curl.haxx.se/dlwiz/?type=*&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 https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)

Error:
Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://api.rubygems.org/specs.4.8.gz)



Why?
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 http://rubygems.org" to your command line.
gem install bundler --source http://rubygems.org
- manually update ruby to the latest version. (easy to do)


Example:

wget https://rubygems.org/downloads/rubygems-update-2.6.7.gem

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)
@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
@"ruby.exe" "C:/uselesswindowspath/bin/gem" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
@"ruby.exe" "%~dpn0" %*
____

and replace
"C:/uselesswindowspath/bin/gem"
with
"/bin/gem"


Then edit "bin/gem", and replace

#!C:/ruby-2.2.2-x64-mingw32/bin/ruby.exe
 with
#!/bin/ruby.exe


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