Jump to content

naithen_tampa

Member
  • Posts

    2
  • Joined

  • Last visited

About naithen_tampa

naithen_tampa's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. Hi Thank you for your support First I tried your code but it shows error as follows : Fatal error: Call to a member function query() on a non-object Then I checked Whmcs documentation " SQL Helper Functions " and then I follow it as the below however I tried their code but I didnot work as well # function create_forum_account($vars) { $val = $vars['orderid']; $fields = "domain"; $table1 = "tbldomains"; $table2 = "tblclients"; $fields2 = "email"; $where = array("orderid"=>$val); $join = "tblorders ON tblorders.userid=tblclients.id"; $result1 = select_query($table1,$fields,$where); $result2 = select_query($table2,$fields2,$where); $data = mysql_fetch_array($result1); $data2 = mysql_fetch_array($result2); $domain = $data['domain']; $Email = $data2['email']; $output = shell_exec("echo $domain$Email>now.txt"); ---------------------- I did print in file now.txt So I guess It didnt work Any help guys......
  2. Hi Guys ,, Pleasure to be with you here and join this great community. I have small problem with my WHMCS hooks script and I need help. My hook is not being triggered, but the hook point itself is working. ( as per WHMCS support). they said " So you'd need to take another look at your custom code to see why it is not being triggered. " What I want to do is this " After accepting order, a shell script should be executed This is my PHP script in includes/hooks --------------------------------------- <?php /** * Example Hook Function * * Please refer to the documentation @ [url]http://docs.whmcs.com/Hooks[/url] for more information * The code in this hook is commented out by default. Uncomment to use. * * @package WHMCS * @author WHMCS Limited <development@whmcs.com> * @copyright Copyright (c) WHMCS Limited 2005-2013 * @license [url]http://www.whmcs.com/license/[/url] WHMCS Eula * @version $Id$ * @link [url]http://www.whmcs.com/[/url] */ /* if (!defined("WHMCS")) die("This file cannot be accessed directly"); function create_forum_account($vars) { $email = $vars['email']; $domain = $var['domainid']; $output = shell_exec('/home/test.sh $email $domain'); // Run code to create remote forum account here... } add_hook("AcceptOrder",1,"create_forum_account"); */ --------------------------------------- Now the hooks is not triggered and the shell scripts is not executed. for your info: ( I make the owner of the shell script file is the same owner of whmcs source files) Hope find a lead here
×
×
  • 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