GithubHelp home page GithubHelp logo

iloveimg-php's People

Contributors

maztch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

iloveimg-php's Issues

I Can't Install API

I'm beginner. I installed PHP 7.3 and composer but couldn't install the API.
I use Kali Linux 2020.1
image
image

Fatal Error and warning

Hi,
Using the iloveimg-php library I encounter :

  • 1 PHP error that I've corrected in the file iloveimg-php/src/ImageTask.php :

    • In function toBrowser()

      • line 263 header("Content-Type:application/pdf")
        changed by header("content-type:application/pdf")
      • line 264 header("Content-Disposition:attachment; filename=\"" . $this->outputFileName . "\"");
        changed by header("content-disposition:attachment; filename=\"" . $this->outputFileName . "\"");
      • line 271 header("Content-Type: application/zip);
        changed by header("content-type: application/zip);
      • line 272 header("Content-Disposition: attachment; filename=\"" . $this->outputFileName . "\"");
        changed by header("content-disposition:attachment; filename=\"" . $this->outputFileName . "\"");
      • line 273 header("Content-Length: " . $size);
        changed by header("lontent-length: " . $size);
    • In function downloadFile($task)

      • line 293 if(preg_match("/filename\*\=utf-8\'\'([\W\w]+)/", $response->headers['Content-Disposition'], $matchesUtf)) {
        changed by if(preg_match("/filename\*\=utf-8\'\'([\W\w]+)/", $response->headers['content-disposition'], $matchesUtf)) {
      • line 296 preg_math('/ .*filename=\"([\W\w]+)\"/', $response->headers['Content-Disposition'], $matches);
        changed by preg_math('/ .*filename=\"([\W\w]+)\"/', $response->headers['content-disposition'], $matches);
  • 1 PHP warning in the file iloveimg-php/src/Exceptions/ExtendedExceptions.php :

    • line 20 __construct($message, $code = 0, Exception $previous = null, $response) : the function is no longer correct, you can't have a parameter without a default value ($response) after parameters that have a default value.

Is it possible you to update your library to fix this error and this warning please ? Thanks !

SSL certificate problem

I got this message:

Exception: SSL certificate problem: certificate has expired in /app/vendor/ilovepdf/iloveimg-php/src/Request/Request.php:399
Stack trace:
  /app/vendor/ilovepdf/iloveimg-php/src/Request/Request.php(156): Iloveimg\Request\Request::send('GET', 'https://api.ilo...',         'v=php.1.0.2', Array, NULL, NULL)
#1 /app/vendor/ilovepdf/iloveimg-php/src/Iloveimg.php(183): Iloveimg\Request\Request::get('https://api.ilo...', Array,     'v=php.1.0.2')
#2 /app/vendor/ilovepdf/iloveimg-php/src/ImageTask.php(74): Iloveimg\Iloveimg->sendRequest('get', 'start/resizeima...', 'v=php.1.0.2')
#3 /app/vendor/ilovepdf/iloveimg-php/src/ImageTask.php(66): Iloveimg\ImageTask->start()
#4 /app/vendor/ilovepdf/iloveimg-php/src/ResizeImageTask.php(56): Iloveimg\ImageTask->__construct('project_public_...', 'secret_key_4537...', true)
#5 /app/vendor/ilovepdf/iloveimg-php/src/Iloveimg.php(221): Iloveimg\ResizeImageTask->__construct('project_public_...', 'secret_key_4537...', true)
#6 /app/common/useCases/Image/ImageResizeService.php(148): Iloveimg\Iloveimg->newTask('resize')

On app/vendor/ilovepdf/iloveimg-php/src/Request/Request.php(397) is written next:

if(strpos($error,'SSL certificate problem')){
    throw new \Exception($error.' Try using  method verifySsl to false: "$iloveimg->verifySsl(false)"');
}

But this exception is not catched

I add

$iloveimg->verifySsl(false)

to my code, and it helped

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.