Category "php"

"properties should not be accessed directly" issue during WooCommerce 3.0 checkout

My log shows a lot of the following messages: order_total was called incorrectly. Order properties should not be accessed directly. This message was added in v

MySQL Filter JSON_CONTAINS Any value from Array

I have a JSON field in a MySQL database that contains values like [1,3,4,7]. I would like to be able to easily supply another array from a PHP variable and det

CodeIgniter Fatal error: Cannot redeclare class

I'm getting the error: Fatal error: Cannot redeclare class News in application\models\Entities\News.php The two classes are as follow: application/models/News

Move a child array to parent array and change parent/child name

I know probably this was asked before not sure if was in this form but I did tried some replay from what I found here about this and failed. ok I have this arr

Telegram bot doesn't answer

I'm using the package of eleirbag89 http://eleirbag89.github.io/TelegramBotPHP to create my bot on telegram. I'm having some issues on it, it doesn't answer me

How do I call Validator from a namespace with an already existing Validator class

I'm trying to test a function in phpspec which calls Laravel's Validator::make function (http://laravel.com/docs/4.2/validation) However, I'm trying to call th

Get orders by date and status woocommerce

I need get a list of orders in woocommerce passing start date, final date and status. I tryed use some techniques like described by Mike Jolley, and I mixed wi

Which is faster php date functions or carbon?

Carbon is simple PHP API extension for DateTime. I want to know that we can use datetime functions using by installing carbon via composer. which is faster ph

Sync AWS Elasticache(Redis) to MySQL Database Table

I am using AWS Elasicache(Redis) using PHP & MySQL for different caching purposes that are mentioned below Reducing the load on MySQL Session Handling Datab

(Laravel) How to delete multiple models including optional relationships?

Summary I'm trying to let my model controller delete multiple models (selected by an array of IDs) including their selected related models (selected by an arra

Call to undefined function openssl_decrypt

When I try to make a request with POST to a script that has this line: $decrypted_data = openssl_decrypt($encrypted_data, 'AES-256-CBC', $key); I get the fol

How can I send a Carousel like message in Telegram bot?

I've been searching for something like this https://cdn-images-1.medium.com/max/800/1*pLXaOT2WwxRptVxOvuvX8w.png in Telegram to no avail. Anyone out there can p

Auto increment id JSON

I'm making a RESTful webservice and I want the items that are posted to the JSON file to have an Id. I've been searching everywhere but couldn't find anything o

Captcha Helper Codeigniter Error - imagettftext(): Could not find/open font

please help me solve this problem. I want to use the captcha in my login page using captcha helper in CodeIgniter, but got some error like this : A PHP Error w

Why getting "Build step 'Execute shell' marked build as failure" error while creating a backup tar for files

We are trying to run a job in jenkins server. Before deploying I am trying to create a tar file of all files and folders. Whenever I try to build job tar file i

Why getting "Build step 'Execute shell' marked build as failure" error while creating a backup tar for files

We are trying to run a job in jenkins server. Before deploying I am trying to create a tar file of all files and folders. Whenever I try to build job tar file i

Can't connect to MySQL via PHP "Name or service not known"

I have a website, which sends input data with AJAX via a PHP script to a MySQL database. The JavaScript/AJAX part is working but the PHP script doesn't get exec

Coinpayments create_transaction "ERROR: Invalid command!"

I am trying to let people pay on my site with a simple API of Coinpayments (I tought it was simple). So, I found this page of the official Coinpayments website

PHP array sort and remove duplicates by two field values

I have an array structure like this [0]=>array(3) { ["Number"]=> "L1" ["Location"]=> "Location-A" ["Qty"]=>"1" } [1]=>array(3

Mysql : How to run heavy analytical query at real time

I am running a crm application which uses mysql database. My application generating lots of data in mysql. Now i want to give my customer a reporting section wh