Why this happened?

The certificate used for OpenVPN is encrypted with MD5 and SHA1, but CentOS 7 doesn’t support it as default.

How to resolve this problem?

There are two possible solution,

Generate a certificate without using MD5

Enable MD5 support on CentOS 7

How to enable MD5 support on CentOS 7?

Temporally enable it.

export NSS_HASH_ALG_SUPPORT=+MD5

export OPENSSL_ENABLE_MD5_VERIFY=1

Enable MD5 support through NetworkManager

$ sudo vim /usr/lib/systemd/system/NetworkManager.service

Append this.

[Service]

Environment="OPENSSL_ENABLE_MD5_VERIFY=1 NSS_HASH_ALG_SUPPORT=+MD5"

And restart daemon

$ sudo systemctl daemon-reload

$ sudo systemctl restart NetworkManager.service

Fuente original: https://www.centos.org/forums/viewtopic.php?t=47210I too ran into this problem, but I was not running NetworkManager so I did it (very) slightly differently.

I edited /usr/lib/systemd/system/openvpn-client@.service and added the "Environment" line to the "[Service]" section.

This way, only OpenVPN has the extra environment variables set.

My thanks for working out how to do this and yes the OpenVPN setup is scheduled to be upgraded. Adding the CentOS 7 system is the first step in that process.
#vi /usr/lib/systemd/system/openvpn-client@.service

------------------------------------- ESTO ERA LO DE ANTES -------It took me a while to figure out why OpenVPN trough NetworkManager was not working on CentOS 7 with old MD5 certificates but I found a solution.

martes, 17 de noviembre de 2015

ORIGINAL ARTICLE: http://www.walkswithme.net/reading-images-from-excel-sheet-using-phpexcel

How to reading images from Excel Sheet using phpExcel ? Ya its very interesting and useful, An attached image of excel can be read and upload to server directory is, simplifying the file upload too.

Ok lets check how can we reading images from Excel Sheet using PHPExcel. Here I’am using PHPExcel Version PHPExcel 1.7.9 . There are two readers that supports Image reads facility right now from PHPExcel API. The reading of Excel cells data using PHP is simple and many example can be found on PHPExcel API Official sites.

Reading Images From Excel Sheet Using PHPExcel

Lets start with reading images from Excel Sheet using PHPExcel with 2007 reader class XLSXwill be as follows.

The above codes simply reads the images from each row and save to the “uploads” directory. Here one common question will arise what about all the rows don’t have images then How you guys save images to the corresponding rows right ? Have to get row and column index.

print_r($coordinate) ; //will return cols and rows index for the above case so you can create an array of list with these index.

Yes Done ! Reading images from Excel Sheet using PHPExcel with XLSX and XLS format with 2007 and 2005 reader are just simply like above codes. If you have any issue or thoughts regarding the functionality just comment below..

jueves, 3 de septiembre de 2015

ImageMagick is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats like GIF, JPEG, PNG, Postscript, and TIFF. We can also use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

ImageMagick is typically used from command line. Also we can use it from any programming language by using its interface like Magick.NET (.Net),IMagick (PHP), PerlMagick (Perl) etc.

Step 1. Install Required Packages

First we need to install required packages in order to install ImageMagic and IMagick PHP extension.

For CentOS,RHEL Users:

# yum install gcc php-devel php-pear

For Ubuntu Users:

$ sudo apt-get install gcc

Step 2. Install ImageMagick

After installing required packages, let’s install ImageMagick using following command.

For CentOS,RHEL Users:

# yum install ImageMagick ImageMagick-devel

For Ubuntu Users:

$ sudo apt-get install imagemagick

Step 3. Install ImageMagick PHP Extension

At this point you have successfully installed ImageMagick package on your system. Now are are going to install ImageMagick php extension, So that we can use it through php code.