GreatSamps Posted January 14, 2011 Share Posted January 14, 2011 Hi, are there any functions for writing to log files. i am in the process of writing a gateway module, and without being able to write anything to a file i have no idea where or why its not working. i tried using standard php fopen / fwrite, but that does nothing ... any ideas? 0 Quote Link to comment Share on other sites More sharing options...
GreatSamps Posted January 14, 2011 Author Share Posted January 14, 2011 so i have made some progress. i have confirmed that my fopen / fwrite code works on this server .. i am now almost 100% of the conclusion that the function to capture the payment is not being called ... how can i tell this? 0 Quote Link to comment Share on other sites More sharing options...
GreatSamps Posted January 15, 2011 Author Share Posted January 15, 2011 manged to solve the problem ... due to the function being called from a file in another folder the output.txt was not showing up where i expected it to 0 Quote Link to comment Share on other sites More sharing options...
tsiedsma Posted January 15, 2011 Share Posted January 15, 2011 Why not log your message to the Admin Log in WHMCS? This is a WHMCS function that will do just that. logactivity('This will go in the Admin Log!'); 0 Quote Link to comment Share on other sites More sharing options...
mojowill Posted January 17, 2011 Share Posted January 17, 2011 Why not log your message to the Admin Log in WHMCS? This is a WHMCS function that will do just that. logactivity('This will go in the Admin Log!'); Interesting so if I want to output errors from my script to this? echo 'Error message to show here'; logactivity('error message for admin log'); 0 Quote Link to comment Share on other sites More sharing options...
tsiedsma Posted January 17, 2011 Share Posted January 17, 2011 Interesting so if I want to output errors from my script to this? echo 'Error message to show here'; logactivity('error message for admin log'); Yes, it is what shows up on the main page of your admin area. I wouldn't log everything, but for modules and stuff like that it is perfect. I've used it for my Testimonials addon and WHMCSPM2. When a user submits a testimonial or uploads a file to WHMCSPM2, it is logged in the admin log. I also log license checking errors for licensed modules and addons. 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.