srg Posted May 13, 2016 Share Posted May 13, 2016 Hello, On WHMCS v6.2 I have created a hook[2] for ClientAreaPageLogin. According to documentation[1] it should do stuff when login page is displayed. For testing purposes my hook is trying to create a file in /tmp/ folder. This file is never created. Am I doing something wrong or this is a bug in WHMCS? [1] http://docs.whmcs.com/Hooks:ClientAreaPageLogin [2] hook.php add_hook('ClientAreaPageLogin', 1, function($vars) { $test = 'this is a test'; $fp = fopen('/tmp/file.txt', 'w'); fwrite($fp, $test); fclose($fp); } ); 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted May 13, 2016 Share Posted May 13, 2016 try to turn "Display Error" on: http://docs.whmcs.com/Blank_or_Partially_Rendered_Pages#If_you_can_access_the_Admin_Area it may return error message when you try to login again! are that this directory "/tmp" exist and what about permissions? you can also try using ClientAreaPage instead to test it 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.