October 13, 2011 06:32AM
Добрый день!
Возникла трудность с установкой pastebin cms в редакции mozilla-russia.org.

Сервер:
Debian 5
nginx=>php-cgi через unix сокеты
# nginx -v
nginx version: nginx/0.6.32
# php -v
PHP 5.2.6-1+lenny13 with Suhosin-Patch 0.9.6.2 (cli) (built: Jul 1 2011 17:03:36)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies

Для субдомена прописал следующий конфиг:
server {
listen 80;
server_name paste.org.in www.paste.org.in;

location / {
root /var/www/paste;
index index.html index.htm index.php;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/paste;
}

location ~ \.php$ {
fastcgi_pass unix:/tmp/.fastcgi.www-data/socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/paste/$fastcgi_script_name;
include fastcgi_params;
}

location ~ AppletX.class$ {
root /var/www/paste; #you path for web content
# fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/tmp/.fastcgi.www-data/socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/paste/$fastcgi_script_name;
include fastcgi_params;
}
}

Открываю домен - все воркает кроме отображения капчи.
При переходе на paste.org.in/inc/CaptchaSecurityImages.php?width=100&height=40&characters=5
выдает:
Warning: imagettfbbox() [function.imagettfbbox]: Could not find/open font in /var/www/paste/inc/CaptchaSecurityImages.php on line 60
Error in imagettfbbox function

libfreetype6 в системе установлен:
# aptitude search freetype
p freetype2-demos - FreeType 2 demonstration programs
i A libfreetype6 - FreeType 2 font engine, shared library files
p libfreetype6-dev - FreeType 2 font engine, development files

Файл шрифта идущий в комплекте для nginx доступен и при переходе paste.org.in/inc/monofont.ttf выдается как файл.

Почему я задаю вопрос на этом форуме?
В мане по cms есть следующее упоминание:
- For short url generation, Apache with mod_rewrite available. Something
like the following configuration options should be used
RewriteEngine on
RewriteRule /([0-9]+) /pastebin.php?show=$1
И как его прописать я пока не знаю. Ну извините, не спец я по nginx.
А гугл к сожалению не смог мне помочь с решением проблемы.
Теоретически - это должно влиять только на короткие урлы. Но уже не знаю в чем может быть причина сего поведения. Буду рад любой помощи в решении проблемы. Спасибо.
Subject Author Posted

nginx pastebin cms imagettfbbox

Ar3s October 13, 2011 06:32AM

Re: nginx pastebin cms imagettfbbox

Andrey Kopeyko October 13, 2011 08:38AM

Re: nginx pastebin cms imagettfbbox

Ar3s October 13, 2011 09:48AM

Re[2]: nginx pastebin cms imagettfbbox

Andrey Repin October 13, 2011 08:22PM

Re: nginx pastebin cms imagettfbbox

Andrey Repin October 13, 2011 10:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 163
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready