Search the Community
Showing results for tags 'MySQL'.
-
Hello, is there a module or a way to create a MySQL user & database automatically for the newly created cPanel account? Thanks, Davor
-
Hi, I am looking for a way to determine the source of a new invoice. That being is the new invoice generated by a client action, like ordering a service. Or if it simply is generated by billing. Testing the InvoiceCreated hook for invoiceID gives us the new invoice number. However it is not possible to check this invoiceID against database tables. This seems to be because the invoice has yet to be finalized. Else we could have checked if the invoiceID was located in both tblorders.invoiceid and tblinvoices.id. Any match on both tables would indicate it was an order, and should there only be a match in tblinvoices.id it would be simply billing. Next we have the source variable, there it seems to be mainly autogen being used. I did check the classdoc for Invoice, there we have a runCreationHooks method with a String $source parameter, with 4 possible options: 'adminarea', 'api', 'autogen' or 'clientarea'. Now the whmcs hook InvoiceCreated states that the only values it will return are one of 'adminarea', 'api', 'autogen' or 'clientarea'. Does anyone have any tips, or have you perhaps dealt with this issue and found a way?
-
Hello, I'm getting the following error : Critical Error Could not connect to the database. Here is my configuration.php file : <?php $license = 'WHMCS-SECRET'; $db_host = '192.168.0.41'; $db_username = 'user'; $db_password = 'SECRET'; $db_name = 'mydb'; $cc_encryption_hash = 'jdhJSH4ze47qs5AZde45d5qsd4zesde44aDgfvfzZf'; $templates_compiledir = '/var/www/template_c/'; $attachments_dir = "/var/www/html/test/att"; $downloads_dir = "/var/www/html/test/att"; $customadminpath = 'admin'; $api_access_key = 'SECRET'; I tried to connect from the server to the database using the same credentials as in the file : mysql -h 192.168.0.41 -u user -pSECRET mydb Result : MySQL [mydb]> How can I debug it ? PHP 7.0.33
-
Hi, I have to types of client email addresses - a regular email address and an email address that starts with dontreply and then some numbers and the domain prifas.co.il - something like that: dontreply1267@psifas.co.il I want to remove the Email Notifications (all except the "Domain Emails - Registration/Transfer Confirmation & Renewal Notices" that I can't remove) from all of the dontreplyXXXX@psifas.co.il customers but not to remove them from any other customer. Can you please help me with the exact command I should use in phpMyAdmin in order to remove all the Email Notifications from the dontreplyXXXX@psifas.co.il customers and only from them? Regards, Ram
-
Hello, I have a question on how to connect to hosted website whmcs database on my local pc, I am using MySQL Workbench, MySQL Query Browser to connect to cPanel database. Usually for a normal website database I am able to connect peacefully, but for whmcs it's on the other way round. For WHMCS, I filled in the hostname based on ip, username, password, and database name correctly but still doesn't let me. Is there a specific encryption or accessibility to grant user to connect whmcs database? Thank you!
-
Hi guys, I have a php file executing some mysql queries with variables parsed by Ajax , this is why i can't do the queries directly in php tags in the WHMCS template. So basically there is a query.php file that i need to export the session variable to for further usage. I need this variable in that file {php} echo $_SESSION['uid']; {/php} so i can use it for further manipulations.
-
Hello, I'm working on an Addon Module to store a License Key for an addon. I can have it verify the get the license key from the table.. but what I'm trying to do is figure out how to put a check_license within this: class License extends Model { /** @var string $table The table in which the addon settings are stored. (mod_mylicensetable) */ protected $table = 'mod_squareLicensing'; //protected function results($results); private $vString = "16da9d4d6fc1e1ec25ce622d59d3d34e2b147bed894296693492985d85d27868"; } $Licensedata = License::where('id', '1')->first( As such, I can get my License data as expected, however, within the Addon Module itself -- to ideally get everything, the check needs to be inside the Class. I'd like to do something like function verify_license { //--get information from original license call and do our actions for invalid or active } Can someone give me guidance? I'm new working with Laravel. I know how to do a license call with the default check_sample.php and have adapted that as needed, and have built upon it.. but working with the classes are new to me. Any help and pointers would be greatly appreciated 🙂
-
For many years I have had problems with the field "expirydate" in the table "tbldomain" changing back to MySQL standard value 1970-01-01 when a customer moves a domain. I use a custom registrar module and this does not have Domainsync. Basically, it doesn't matter if the date changes, when the domain is moved, but what happens is that WHMCS generates an invoice because the domain has got a new date and this is not good ! I see that the field "expirydate" has "Not null" as opposed to the other "date" fields. Could this be the problem ? Is there anyone who has a suggestion for a solution to this? Alternatively, one could put a block on the Auth Code, so that the customer did not receive it before Auto Renewal Status was set to OFF, so that a new invoice was not generated.
-
/admin/systemcleanup.php does not loading, it timeouts after a few minutes with blank white page (when enabled debug logging in settings, the error is: Fatal error: Maximum execution time of 300 seconds exceeded in /home/me/public_html/admin/systemcleanup.php on line 0) Can it be some mysql coruption regarding log data? Before some time i manually removed some data (i think by emptying tblmodulelog table) because if i remember right, my WHMCS site had some timeouts deleting it from WHMCS. DB was optimised, Total Tables: 123 - Total Rows: 103282 - Total Size: 23857.87 Kb WHMCS 6.3.2 Please any mysql commands that can help fix the mysql tables, or empty logs, or other way to fix issue?
-
[not reproducible] Can't create new order from admin
Pagchen posted a topic in Troubleshooting Issues
When I enter info for a new order, I received the email confirmation but then order is not showing in order list. Activated the mysql debug and see this error: SQL Error: Field 'nameservers' doesn't have a default value - Full Query: INSERT INTO tblorders (`ordernum`,`userid`,`contactid`,`date`,`status`,`paymentmethod`,`ipaddress`,`notes`) VALUES ('8453367643','14','','20160615131304','Pending','mailin','XXX.XXX.136.92','') And other mysql errors following this one. Using latest 6.3.1 WHMCS version PHP 5.6 Any idea how I can resolve this ? We recently move to a new server and had the licence changed to new IP. -
I'm trying to learn the new approach from v6 that uses Laravel for queries but this seems rather more messy (at least for me than the old way which is going to be deprecated. For example I made this query: This works and it gets the users logged in domains but the problem is that all results are into the single $dom variable as ouput. I tried setting them in $row like the a standard PHP query to MySQL but it does not work. Neither arrays worked for me. The problem with this approach is that I cannot use domains separately in the code. Is there an easier way to pull domains out of a users account?
-
I'm working on a module, and I need to do an SELECT QUERY with an INNER JOIN. Here is what I have: $table = "tblcustomfieldsvalues"; $fields = "fieldid,fieldname"; $where = array( "relid"=>array("sqltype"=>"LIKE","value"=>$params['serviceid']), ); $sort = "fieldid"; $sortorder = "ASC"; $limits = "0,2"; $join = "tblcustomfields ON tblcustomfields.id=tblcustomfieldsvalues.fieldid"; $result = select_query($table,$fields,$where,$sort,$sortorder,$limits,$join); There are two custom fields for this product, and their values occupy two rows in the tblcustomfieldsvalues table. This query should result in two records, with fieldid (from tblcustomfieldvalues) and fieldname (from tblcustomfields) for each. However, $result always comes up null. Anyone out there have any ideas?
-
I've created a custom table in the WHMCS DB, and would now like to display the contained table data on a custom page I've also created, in the form of an html table. In mycustompage.php, I've passed the data to an array like so: $result = mysql_query("SELECT * FROM tblclientscustom WHERE userid=".$ca->getUserID()); $data = mysql_fetch_array($result); $customdata = $data; $ca->assign('customdata', $customdata); Then in mycustompage.tpl (using the clientareainvoices.tpl as a 'template') I've done the following: {foreach from=$customdata item=customdata} <tr> <td>{$customdata.id}</td> <td>{$customdata.domain}</td> <td>{$customdata.email}</td> <td>{$customdata.organization}</td> <td >{$customdata.timestamp}</td> <td><a href="viewcustdata.php?id={$customdata.id}">{$LANG.customdataview}</a></td> </tr> {foreachelse} <tr> <td colspan="5">{$LANG.norecordsfound}</td> </tr> {/foreach} However the above just populates every row with the results from the first row of my custom DB table (tblclientscustom). Have I made a mistake in setting the variable/array $customdata? Also what is the 'item=customdata' setting? in the clientareainvoices.tpl template it's set to 'item=invoice'. Have I set this wrong too? Any help appreciated.
- 4 replies
-
- customization
- integration
-
(and 2 more)
Tagged with:
-
I've just realised that by default, MySQL doesn't return any search results for 3-letter words, such as DNS, FTP, etc. Obviously, this could be improved. There's some official documentation here: http://dev.mysql.com/doc/refman/5.1/en/fulltext-fine-tuning.html The parameter "ft_min_word_len=3" is the one controlling this. Has any of you tried fine tuning MySQL so it will return these searches? Have you found any adverse effects?
-
- knowledgebase
- mysql
-
(and 1 more)
Tagged with:
-
Due to an administrator username change, my mySql database username changed. This broke both WordPress and WHMCS. In WordPress, I just had to go into wp-config.php and find where it had the old username and update it to the new one. Is there a file in WHMCS somewhere that I need to go into and update the mySQL username? Is there anything else I need to do to fix it? When I try to connect now, I get Critical Error Could not connect to the database
