26 Ocak 2017 Perşembe

PHP Fatal error: Uncaught exception 'ImagickException' with message 'PDFDelegateFailed

Convert PDF to Image (JPEG,JPG,PNG)  with PHP
How do I convert a PDF to image 

Php 6 version causes problem that you are given as you use Imagick Somehow it works well in Php 5
(Php 6 ile bu sourun oluşuyor Ancak Php 5 de çalışıyor  )
  
So I got solution after searching lots of resources and reading 

SOLUTION:
(ÇÖZÜM)

$pathToPdf="/......";                      //pdf dosya dizini

$pathToWhereImageShouldBeStored="/...."          //resmin yükleneceği dosya dizini


//Counting page of pdf(Pdf deki toplam resim sayısını getir)

$pageCount = exec("/usr/bin/identify -format %n ".$pathToPdf);


//converting pdf to imgs (pdf i resimlere dönüştürme)

for($i=0;$i<$pageCount;$i++){
exec("convert ".$pathToPdf."[".$i."] ".$pathToWhereImageShouldBeStored.$i.".png");


NOTE: GhostScript should be installed ! 

22 Ocak 2017 Pazar

PHP Verileri Json'a Aktarırken Türkçe Karekter Sorunu(json_encode())

ÇöZÜM:

Php 'de Diziyi encode ederken türkçe karekter sorunu yaşıyorsanız
aşağıdaki gibi düzeltin.
echo json_encode($results,JSON_UNESCAPED_UNICODE);

3 Ocak 2017 Salı

dlopen failed: library "nulllibstlport_shared.so

If you get  like this error. (Böyle bir hata alıyorsanız.. )

 java.lang.UnsatisfiedLinkError: dlopen failed: library "nulllibstlport_shared.so" not found
at java.lang.Runtime.load(Runtime.java:331)
at java.lang.System.load(System.java:982)
at io.vov.vitamio.MediaPlayer.(MediaPlayer.java:257)

 SOLUTION:

Before starting video call the line   as shown below (Note that  use it onCreate())
Vidyoyu başlatmadan aşagıdaki kodu onCreate metoduna eklyeyin

Vitamio.isInitialized(this);