Jump to content

Remitur

Senior Member
  • Content Count

    456
  • Joined

  • Last visited

  • Days Won

    4

Remitur last won the day on May 18 2019

Remitur had the most liked content!

Community Reputation

37 Excellent

About Remitur

  • Rank
    Level 2 Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I'm experiencing that internal whois lookup ( /admin/whois.php ) does not work for few TLD. I.e: if I check a .com domain, it work fine. But if I check a .es domain, the answer is always "available for registration", also for domain registered! So, checking i.e. google.es ... In the client area the function works fine: if a client try to register google.es, the answer is right... So, what's the difference between admin area whois and client area whois?
  2. You got it!!! Thank you! (I've always found annoying that "move the directory elsewhere for security reason"... I guess that protecting it using .htaccess would be as safe as moving it, but more error-proof...)
  3. I looked for .htaccess hidden somewhere... and I put also a phpinfo in the /whmcs/vendor/guzzlehttp/guzzle/src/ directory... and it answers the right local value too. So I can't explain why that script is using "master" value instead of local... 😕
  4. In my WHMCS dev environment, all at once crons stopped working regularly. Looking for errors, I found several "Allowed memory size of 33554432 bytes exhausted": [25-Jun-2020 00:01:01 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 139264 bytes) in /home/devdomai/public_html/whmcs/vendor/composer/ClassLoader.php on line 444 [26-Jun-2020 13:41:10 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2359296 bytes) in /home/devdomai/public_html/whmcs/vendor/guzzlehttp/guzzle/src/Event/Emitter.php on line 62 [26-Jun-2020 13:41:10 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2359296 bytes) in /home/devdomai/public_html/whmcs/vendor/guzzlehttp/guzzle/src/Event/Emitter.php on line 62 [26-Jun-2020 16:01:42 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2359296 bytes) in /home/devdomai/public_html/whmcs/vendor/guzzlehttp/guzzle/src/Message/Request.php on line 12 [26-Jun-2020 16:01:42 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2359296 bytes) in /home/devdomai/public_html/whmcs/vendor/guzzlehttp/guzzle/src/Message/Request.php on line 12 [27-Jun-2020 12:00:56 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2359296 bytes) in /home/devdomai/public_html/whmcs/vendor/guzzlehttp/guzzle/src/Message/Request.php on line 12 [27-Jun-2020 12:40:28 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2359296 bytes) in /home/devdomai/public_html/whmcs/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php on line 163 It could be a good explanation of the cause of the error, but... the issue is that, according to phpinfo, the allowed memory size is not 32MB, but 128 MB. particularly: According to WHMCS "internal" phpinfo, the value is: memory_limit 128M 32M (the first one being the "local value", and the second one the "master value") And the same according both to a plain phpinfo in root, and also in /whmcs/vendor/guzzlehttp/guzzle/src/ So, the question is: why and how these scripts adopt the "master value" of memory_limit, instead of the "local value" ?!?!
  5. It works, thanks! Just changing from: if (is_null($client)) to if (is_null($client) AND is_null($_SESSION['adminid']))
  6. Question: how is it possible, in a hook such as i.e. ClientAreaPage, understand if a user is logged in as himself, or if it's an administrator logged in as user? In .tpl it's easy, because we have two variables to check ( $adminMasqueradingAsClient and $adminLoggedIn) to check, but in PHP area? Real case: I'm working on this hook, which should force the user to a certain language, bound to the domain he's visiting, so, for english for example.com, french for example.fr, italian for example.it etc. It works, but I need to find a way to disable it if the logged-in user is an admin-logged-in-as-user: for some kind of unknown reason, it broke the magic of the function "login as user", and the admin so is redirected to ordinary login page. <?php add_hook('ClientAreaPage', 1, switch_languagehost($vars)); function switch_languagehost($vars) { $client= Menu::context('client'); if (is_null($client)) { $domain=$_SERVER['SERVER_NAME']; $language='english'; if ($domain=='example.fr' ) { $language='french'; } if(!isset($_SESSION['switch-language']) && $_SESSION['uid'] == false ) { $_SESSION['switch-language'] = true; // prevent from redirecting back again in this session } if(!isset($_SESSION['Language']) || $_SESSION['Language'] != $language) { $location = '?language='.$language; if($_SERVER['QUERY_STRING'] != '' && strpos($_SERVER['QUERY_STRING'],'?language')===0) $location .= '&'.$_SERVER['QUERY_STRING']; ob_clean(); header('location: '.$location); die(); } } } ?> Any idea?
  7. This simple hook adds details about services managed by the WHMCS auto-release module. Auto-release is handy, but it may be annoying because WHMCS will report in TO-DO just the service ID and a short description of action required (renew, suspend, etc.) This simple hook will add also service name, making the following job easier faster, and even more safe (it may happen that you open the service with a wrong ID, so i.e. you go on renewing the wrong service...) This hook is also available on GitHub repository: https://github.com/DomainRegister/WHMCS-enhanced-auto-release <?php // // enhanced to-do // WHMCS hook to enrich details about services managed by auto-release module // // https://domainregister.international/ // add_hook('AfterCronJob', 100, function($vars) { try { $todoitem = Capsule::table('tbltodolist') ->where('status', '!=', 'Completed') ->where('description', 'like', 'Service ID # %') ->select('id','description') ->first(); } catch (\Exception $e) { echo "error {$e->getMessage()}"; } $descr2=substr($todoitem->description,12); $serviceid=intval($descr2); $descr3=preg_replace( '/Service ID # \d+/', '', $todoitem->description ); try { $servicename = Capsule::table('tblhosting') ->where("id", $serviceid) ->select('domain') ->first(); echo "<pre>"; print_r($servicename); } catch(\Illuminate\Database\QueryException $ex){ echo $ex->getMessage(); } catch (Exception $e) { echo $e->getMessage(); } $newdescription = 'Service ID #'.$serviceid.' ( '.$servicename->domain.' ) '.$descr3.PHP_EOL; try { $update_data = [ 'description' => $newdescription ]; Capsule::table('tbltodolist') ->where('id', '=', $todoitem->id) ->update($update_data); } catch(\Illuminate\Database\QueryException $ex){ echo $ex->getMessage(); } catch (Exception $e) { echo $e->getMessage(); } });
  8. You can: create a user custom field "newsletter" (hidden to the user) with a mysql quey, switch its value to TRUE for any active user who has not active services and the use the normal mass-mailing WHMCS tools, using the custom field "newsletter" as filter Note: I use such a custom field any time I need to send the same message to a group of users; if the number of users is low, you can also switch the value by hand, and it's a quick and dirty way to do it...
  9. Anybody here know how to set whois.json for .ax domains? I tried (unsuccessfully): { "extensions": ".ax", "uri": "socket://whois.ax", "available": "is free" }, but it doesn't work ... 😞
  10. If you downloaded it long time ago, I guess it's outdated: almost for sure it was written for PHP 5.x, and can't work with PHP 7.x Have you it in source code? If yes: editing it in order to work with PHP 7.x may be annoying but not impossible... It's a project which could be interesting for manypeple: can you share your code?
  11. I liked to use the "contact" form of WHMCS, AND manage any received contact as ticket... and it was working fine (I still need to understand what WHMCS update broke the magic...) Would not use a separate department just for this kind of contact, because we would not create another email address (which is necessary to manage a department). But I understood what should be the code issue (even if without having access to contact.php code...) This behaviour is normal for phpmailer: if you specify just $mail->addReplyTo($email); phpmailer will ADD the $email address to the sender email ad "reply to", if you want $email to be the only "reply to" address, then you need to use also the ClearReplyTos() method. So right code should be something like: $mail->ClearReplyTos(); $mail->addReplyTo($email);
  12. Hello. I've just realized an issue in contact form, which brings to the loosing of email address of the user trying to contact If the user compile the form, his own address is lost: the ticket opened by WHMCS processing this email report only the system sending address (noreply@ ) I.e.: John (john@example2.net) compile a form: looking at the email message created by the form, I can find: To: info@mydomain.com From: Noreply <noreply@example.com> Reply-To: John <noreply@example.com>, John <john@example2.net> But grabbing the email to import it as a ticket in WHMCS, the system loose the second address of John , and keep only the first one (noreply@example.com): so, basically, the email address information of the user is lost. In the support ticket mail import log I find: 14/05/2020 18:25 info@mydomain.com Contact Form: info test From: John «noreply@example.com» Ticket Imported Successfully I don't know exactly when this issue rised: few months ago it worked properly...
  13. Keep attention, because this for EU is strictly forbidden: if you offer something to spanish, italian, or french citizens/entities, the price need to be exactly the same. While you're free to bill russian and canadians whatever you want...
  14. I guess they're right. It's not enough that you set WHMCS in order to be in "test mode", but you need also configure it in order to work on the resellerclub sandobox (https://test.httpapi.com/ instead of https://httpapi.com/ ) More details: manage.resellerclub.com/kb/node/3188
×
×
  • Create New...

Important Information

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