Skip to content

Turning YII_CSRF_TOKEN secure flag on

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 …

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

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…