Jump to content

Gricenko Mihail

Members
  • Content count

    10
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Gricenko Mihail

  • Rank
    Junior Member
  1. I just got the same error when trying to login in clientarea:
  2. Hello guys. Just simple question. What kind of configuration for environment do you use to write \ debug code of your addons \ modules \ hooks? Have you use any debuggers or just. I have asked question early and wondering... nobody use IDE with debugger to write they code? how it's possible? how do you write complex addons or modules with lot of logic? please explain me this thing, i have stuck with latest version of WHMCS and very large custom module, description of my issue is on the link above Thanks
  3. Hello all. Who using this combination (xdebug module for php-fpm) to debug custom code inside WHMCS - addons \ modules \ hooks? I have a complex project which contains several modules developed by myself and by third party programmers (all modules with open sources). Using xdebug for development and debugging php applications is standard for me and i am use it where it's possible. But i have very strange experience of using xdebug with whmcs. It's seems to be because of whmcs encoded with ioncube. Each time when i try start debug session (by adding &XDEBUG_SESSION_START parameter to request, for example: /clientarea.php?action=productdetails&id=402&XDEBUG_SESSION_START=10879) php-fpm process crashes and system message log says it's crashes inside xdebug.so module. But it's not the all of information. I can catch breakpoints in the beginning of my hook files. I think it's working because this files included by WHMCS somewhere in the beginning and xdebug can pass to this points. But when process go deeper it's crashes like i say early. After long time of researching of my environment i have realize that's i can combine some "magic" details such as php\ioncube\xdebug\whmcs versions and sometimes it's starts working. For example i try many combinations of php version + xdebug version + WHMCS 7.1.1 core and found combination when xdebug working well, not crashes. But then i have update WHMCS core to version 7.6 and it's start crashes again... then i have update xdebug + ioncube to latest versions for this moment and it's start partially works (i can debug some pages, but some pages still cause crash of xdebug.so) So my question, is anybody know stable configuration for debugging modules for WHMCS with xdebug? Thanks for reading this, sorry for my english.
  4. Gricenko Mihail

    How to reconnect default database connection?

    Working with Capsule::table() queries. But it's don't take any effect with \LocalApi function. I think \LocalApi code is not used Capsule:: inside
  5. Gricenko Mihail

    How to reconnect default database connection?

    No ideas?
  6. Hello, please help me with next issue Let's imagine i have custom script which interacting with WHMCS... ( WHMCS 7.1.2 ) <?php define('CLIENTAREA', true); define('WHMCS_ROOT_DIR', dirname(dirname(__FILE__))); require WHMCS_ROOT_DIR . '/init.php'; $result = \localApi('GetOrders', array('userid' => $user_id, 'id' => $order_id), 'administrator'); long_running_function(); // runing about 10 minutes $result = \localApi('GetOrders', array('userid' => $user_id, 'id' => $order_id), 'administrator'); ?> It's abstract code to reproduce issue. Let's see what's happened. First call of "LocalApi" return "success" as expected But after "long_running_function" ends then second call of "LocalApi" return error with message "No matching admin user found" And console output says me next: "# PHP Warning: mysql_fetch_array() expects parameter to be resource, boolean was given. in /home/whmcs/web/public_html/includes/dbcompatfunctions.php on line 0" It's seems to be because mysql lost default connection after long time of waiting and "localApi" function can't get id of provided user. So how i can reestablish connection to continue use of "localApi" function? Using of before second call of localApi Capsule::connection()->reconnect(); has no effect
  7. Gricenko Mihail

    Long page operations blocks another WHMCS pages from loading

    If you mean to do like this: session_write_close(); long_query_function(); session_start(); It's will not help, because right after calling function session_write_close WHMCS loose session and user has log out till i start new session with session_start I need a mechanism to process long_query_function after user do some action and save ability to manipulate with panel. So i see only two true ways to do this: Move this functionality and call it with something like ajax request inside my module, but i think it still be problem with session blocking mechanism Refactor all code to interacting through cron in background, but it's increases summary time of all operations (user submit action -> creating cron task -> waiting to cron starts and find task -> waiting for long_query_function ) and will cause complication of user notification mechanism (i need to add some "state" primitives to show it to user while task processed) So maybe i loose something and there is another way?
  8. Gricenko Mihail

    Long page operations blocks another WHMCS pages from loading

    Thanks for the replies. Now i know a little bit more about sessions mechanism. But unfortunately calling "session_write_close" inside module hook function cause current user to logout
  9. Hello, i came across very strange WHMCS behavior. For example i have installed WHMCS panel of version 7.1.2 on domain https://mywhmcs.com/ and also i have custom page long_query_page.php with simple code: <?php use WHMCS\ClientArea; use WHMCS\Database\Capsule; define('CLIENTAREA', true); require __DIR__ . '/init.php'; $ca = new ClientArea(); print('Before long query'); long_query_function(); print('After long query'); long_query_function(); is function that's works about 30 seconds After i requesting this page by http, like https://mywhmcs.com/long_query_page.php all of WHMCS pages in the same browser has blocked and not loaded until long_query_page.php is completed loading. One more time. After i requesting page https://mywhmcs.com/long_query_page.php i can't open another WHMCS pages like https://mywhmcs.com/clientarea.php / https://mywhmcs.com/supporttickets.php in the same browser session (this requests are connected to web sever but waiting for data) until first request has completed. It's looks like some mutex mechanism inside WHMCS is preventing of parallel pages loading in one browser session. :-\ is it right behavior or i am doing something wrong?
  10. Welcome to WHMCS.Community Gricenko Mihail! We're glad you're here please take some time to familiarise yourself with the Community Rules & Guidelines and take a moment to introduce yourself to other WHMCS.Community members in the Introduce Yourself Board.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated