Giter VIP home page Giter VIP logo

Comments (10)

duncan-qabana avatar duncan-qabana commented on July 17, 2024

Debugging it: \Query\Findable.php line 66: infinite loop:

while ($this->connection()->nextUrl !== null)
{
$nextResult = $this->connection()->get($this->connection()->nextUrl);
$result = array_merge($result, $nextResult);
}

from exact-php-client.

stephangroen avatar stephangroen commented on July 17, 2024

Have you tried on another server? And just the example.php file? Did you update of change the server this code runs on?

from exact-php-client.

duncan-qabana avatar duncan-qabana commented on July 17, 2024

I tried it on my local instance, on the online dev env and the live website, the latter 2 give the error, my local hangs on the while loop. Nothing has been update since last week. Tried running the example.php locally in a new vagrant box, same result.

edit: used a default debian box from vagrant, exact the same result, works for getting division and making the connection, fails on the first ->get(); no matter the model.

from exact-php-client.

stephangroen avatar stephangroen commented on July 17, 2024

What code are you executing?

from exact-php-client.

duncan-qabana avatar duncan-qabana commented on July 17, 2024

The connection is straight from the example, and then that code to get some results

$customersModel = new \Picqer\Financials\Exact\Account($connection);
$customers = $customersModel->get();

from exact-php-client.

stephangroen avatar stephangroen commented on July 17, 2024

I'm having no issues with this code using dev-master of this repo. Using a Laravel Homestead vagrant box for testing.

from exact-php-client.

duncan-qabana avatar duncan-qabana commented on July 17, 2024

it is really strange, a couple of lines above, I do:
$salesEntryModel = new \Picqer\Financials\Exact\SalesEntry($connection); $salesResults = $salesEntryModel->get();

and that works fine too. But then the second request to \Accounts fails either with that infinite loop or with the error in my first post. I am stuck at the moment of where to go now.

from exact-php-client.

duncan-qabana avatar duncan-qabana commented on July 17, 2024

Okay, going to leave it here for today:

  1. \Query\Findable.php line 66 causes infinite loop and a 504 gateway error.
  2. Thanks to the time out error, I get the SSL error. Restarting PHP fixes it.
  3. Running the composer command from the page along with the example.php gives the same problem when making 2 calls.
  4. Tried it on 3 custom debians wheezys, 1 default wheezy and 1 ubuntu 16.01

from exact-php-client.

duncan-qabana avatar duncan-qabana commented on July 17, 2024

Okay, fixed it.. There is a limit on how much you can get through this library. I made my own curl set up and started testing with that. I noted that there is a big loop if you have more then 100 records. With only curl that wasn't a problem. This library with that while loop crashes. I fixed it by limiting with ['$top'=> 50] and a loop around it to check if it completly filled.

from exact-php-client.

stephangroen avatar stephangroen commented on July 17, 2024

Thanks you for the info @duncan-qabana. We're using this library in production and haven't experienced this with one of our clients before. I'll note this for my README rewrite, that is some cases this might be a problem with getting too much results.

It's still odd this happens though.

from exact-php-client.

Related Issues (20)

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.