I have enabled CSRF Validation in Yii: ‘enableCsrfValidation’ => true, Everything works as expected however I’d like for the session cookie to have the secure flag turned on. With other cookies you can set the secure flag in the config: How do you do this for the YII_CSRF_TOKEN? Answer Yo…
Run test in phpunit with specific php version
I have installed multiple PHP versions on my Mac and want to run unit-tests against a specific PHP version (or against multipls versions) Here’s the php versions I have: My test case looks like this: When I run the test I get this response: How can I run the tests with the php version 5.2.17? Update: I …
Rackspace php-opencloud how do I create a folder
When I upload a file using $container->uploadObjects($files) I can include the directory path in the name to make a new folder. If I use Cyberduck I can see the new folder. But if I try and get an …
Getting Recoverable fatal error: Object of class Entity could not be converted to string in DatabaseStatementBase->execute() error
Getting website encountered an unexpected error, please try again while adding goals using goals module in demo framework drupal 7. and in recent logs I get the Recoverable fatal error: Object of class Entity could not be converted to string in DatabaseStatementBase->execute() error Answer I found a work a…
nohup:ignoring input and appending output to ‘nohup.out’
I want to start my server through nohup.php but the command is not running and displays following error nohup:ignoring input and appending output to ‘nohup.out’ I am using ssh through putty, this …
Calculate the distance between 2 position Google maps Api
We want to create a Line Bus of our City , what kind of Maps Api , we can use , My friend proposed to use Google Map Api. We want to know howto get the distance between 2 places in meter , i found the …
Content length for code igniter view
Is it possible to get the length of the data that will be sent to browser when a view file is loaded? For example, I would like to know the content length that should be sent to browser. Since the data sent can also be an array, it might increase the length of the HTML content. It is unlikely that
date_diff() expects parameter 1 to be DateTimeInterface, string given
They have the same format: $date_expire = ‘2014-08-06 00:00:00’; $date1 = date(“Y-m-d G:i:s”); $date2 = date_create($date_expire); $diff = date_diff($date1, $date2); //this line makes error….
MySQL COMPRESS vs PHP gzcompress
I am developing a PHP application where large amounts of text needs to be stored in a MySQL database. Have come across PHP’s gzcompress and MySQL’s COMPRESS functions as possible ways of reducing the stored data size. What is the difference, if any, between these two functions? (My current thought…
WordPress – Custom Change Password page
I’m trying to create custom page for Change Password under Profile. When I store/update the new user password(already change to hash value), it will logout automatically. The new password can be use …