php
Компиляция из исходников расширений для php в centos 5
Рубрика: Дневник / Метки: centos | eaccelerator | php | xdebug / Дата: 03.01.2011 17:11 / Обсудить (0)Прежде всего шпаргалка для себя в будущем:)
Установить нужные вещи для компиляции:
Скачать нужное расширений, разархивировать^
Настройки для php.ini для некоторых расширений:
eAccelerator:
xDebug:
Запуск профайлера - ?XDEBUG_PROFILE=1
Установить нужные вещи для компиляции:
yum install autoconf automake libtool php-devel
Скачать нужное расширений, разархивировать^
phpize
./configure
make
make install
Настройки для php.ini для некоторых расширений:
eAccelerator:
extension=eaccelerator.so
eaccelerator.shm_size="100"
eaccelerator.allowed_admin_path = "/var/www/control.php"
eaccelerator.cache_dir="/var/cache/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="1"
eaccelerator.compress="0"
eaccelerator.compress_level="0"
xDebug:
[debug]
; Remote settings
xdebug.remote_autostart=off
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
; General
xdebug.show_local_vars=On
xdebug.dump.SERVER=HTTP_HOST, SERVER_NAME
xdebug.dump_globals=On
xdebug.collect_params=4
xdebug.auto_trace=off
xdebug.collect_includes=on
xdebug.collect_return=off
xdebug.default_enable=on
xdebug.extended_info=1
xdebug.manual_url=http://www.php.net
xdebug.show_mem_delta=1
xdebug.max_nesting_level=100
xdebug.idekey=netbeans-xdebug
; Trace options
xdebug.trace_format=0
xdebug.trace_output_dir=/tmp/xdebuglogs
xdebug.trace_options=0
xdebug.trace_output_name=tracelog
; Profiling
xdebug.profiler_append=0
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger=1
xdebug.profiler_output_dir=/tmp/profiler
xdebug.profiler_output_name=out.%H%R
Запуск профайлера - ?XDEBUG_PROFILE=1
Декодирование текста вида %u####
Рубрика: Программирование / Метки: php | кодировки / Дата: 20.05.2010 12:19 / Обсудить (0)Способ 1. С использованием iconv.
function global_decode($str)
{
return urldecode(preg_replace('/%u([0-9A-F]{4})/se','iconv("UTF-16BE", "UTF-8", pack("H4", "$1"))', $str));
}
Читать далее...