Category Archives: php

Propel2 criterions

Propel2 do not have mysql’s full text search support out of the box. Of course you can do $movies = MovieQuery::create() -> where(‘MATCH(Movie.title, Movie.director) AGAINST(? IN BOOLEAN MODE)’, ‘big lebowski’) -> find(); credits to jengeb This doesn’t looks good for … Continue reading

Posted in php | Comments Off on Propel2 criterions

Debian Jessie and php7.1

I will explain how to install php7.1 on Debian Jessie using deb.sury.org Install packages required for third party repositories over https $ apt-get install apt-transport-https lsb-release ca-certificates wget Get the repository key $ wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg Add the repository $ … Continue reading

Posted in Debian, Linux, php | Comments Off on Debian Jessie and php7.1

Update към Xdebug 2.2.0

Гледам излязла в версия 2.2.0 и веднага ъпдейтвам. Минават някакви букви в конозлата и всичко изглежда ОК. На другия ден пак пиша pear upgrade и същото, на по-следващия ден – същото. Зачетох се и какво да видя: Build process completed … Continue reading

Posted in php, Xdebug | Leave a comment

Проблеми с upgrade към php 5.4

Вчера ъпгрейднах към php 5.4, но чак днес ми се наложи да тествам нещо и ооо изненада suhosin apc и xdebug не работят. Решение: всички файлове от директория /usr/lib/php5/20090626 не ни трябват, трябва да ги имаме в /usr/lib/php5/20100525 съответни всички … Continue reading

Posted in php, Xdebug | Leave a comment

… ORDER BY RAND()

Goal: get random record from database Lets sat we have table `lyric` ~ 33k records, `id` is primary key Simple: SELECT * FROM `lyric` ORDER BY RAND() LIMIT 1; 1 row in set (1.12 sec) wtf!? 1 second ? Note: … Continue reading

Posted in MySQL, Optimization, Optimization, php | Leave a comment