In v2 of the AWS PHP SDK, I was able to setup logging of request and response information by simply doing this: In v3, I cannot seem to find the solution. Middlewares do not seem helpful as they only fire before the request is sent, and thus I cannot access the response HTTP code. Guzzle v6 has this feature b…
Tag: php
Laravel 5.1 – Checking a Database Connection
I am trying to check if a database is connected in Laravel. I’ve looked around the documentation and can’t find anything. The closest thing I’ve found is this, but this doesn’t solve my problem. I have three instances of MySQL that are set up on different machines. Below is a simplifie…
How to properly set “0000-00-00 00:00:00” as a DateTime in PHP
I have a column viewedAt which is a DATETIME and accept NULL values. It’s a software restriction to set that column on each new record as 0000-00-00 00:00:00 so I go through the easy way using Symfony and Doctrine as show below: But surprise PHP change that date to this -0001-11-30 00:00:00 and SQL mode…
Google Analytics SEO – PHP API
I have a PHP file which give’s me google analytics data, such as pageviews, Top Pages, or Organic Data simple stuff. Now I neet to get Stuff from the SEO Part. For example: TOP 50 Search Keywords (…
Mysql password expired. Can’t connect
I just wiped my Mac and did a fresh install of El Capitan. I’m struggling to connect to Mysql now. Having gone through a web server setup process, I’ve created a simple PHP test file: <?php $…
mysql_query returns TRUE for SELECT statement [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 29 …
Magento get the SKU of the first simple product in configurable
I need to get the SKU for a simple product that is part of a configurable in Magento. Something along the lines of: if($_product is simple) { echo $_product->getSku(); } elseif($_product is …
how to get updated id in codeigniter
i’m new to Codeigniter, but learning from web, actually i got stuck with a unknown proble. im inserting data into the database throw the model, and fetching back the data into form. but when i’m …
Laravel 5.1 xmlHttpRequest AJAX POST TokenMismatchException
The relevant code is shown below: I’ve been trying to figure this out for hours now, I honestly have no idea what to do at this point. Note, that if I use the form method everything works just fine. I’ve also tried sending the CSRF token as a parameter in the postString: “_token=” + cs…
WordPress – List Categories Limit
I want to ask something which I don’t have any idea if its possible or not. I will show you first as html to explain what I need.
<li class=&…