ViMbAdmin setup with nginx+php-fpm

1,210 views
Skip to first unread message

Cyril Mertens

unread,
Jul 14, 2012, 7:21:53 AM7/14/12
to vimbadmi...@googlegroups.com
Hello list,

I try to set up ViMbAdmin with nginx 1.2.2 and PHP-FPM 5.3.14.
My configuration file looks like this :

server {
    root /var/www/vimbadmin/public;
    listen [::]:80;
    listen [::]:443 ssl;
    ssl_certificate /etc/nginx/ssl/mirtouf.net.crt;
    ssl_certificate_key /etc/nginx/ssl/mirtouf.net.key;
    server_name vimbadmin.mirtouf.net;
    index index.php;

    location ~ /\.ht {
      deny  all;
    }

    location / {
        if (!-f $request_filename) {
            rewrite ^(.*)$ /index.php?q=$1 last;
            break;
        }
    }

    location ~* ^.+.(css|js|jpeg|jpg|gif|png|ico) {
        expires 30d;
    }

  # enable php
  location ~ \.php$ {
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param HTTPS on;
    include fastcgi_params;
  }
}

on some pages (aliases and logs) I get errors from smarty module :

File
/var/www/vimbadmin/library/Smarty/sysplugins/smarty_internal_templatecompilerbase.php
Line
656
Message
Syntax Error in template "/var/www/vimbadmin/application/views/alias/list.phtml" on line 74 "$( "#alias-goto-{$oneAlias.id}" ).tooltip( { title: '{$oneAlias.goto|regex_replace:"/[,]/":", "}' } );" unknown modifier "regex_replace"
Code
0

Trace

#0 /var/www/vimbadmin/library/Smarty/sysplugins/smarty_internal_compile_private_modifier.php(124): Smarty_Internal_TemplateCompilerBase->trigger_template_error('unknown modifie...', 74)
#1 /var/www/vimbadmin/library/Smarty/sysplugins/smarty_internal_templatecompilerbase.php(463): Smarty_Internal_Compile_Private_Modifier->compile(Array, Object(Smarty_Internal_SmartyTemplateCompiler), Array, NULL, NULL)
#2 /var/www/vimbadmin/library/Smarty/sysplugins/smarty_internal_templatecompilerbase.php(247): Smarty_Internal_TemplateCompilerBase->callTagCompiler('private_modifie...', Array, Array)
#3 /var/www/vimbadmin/library/Smarty/sysplugins/smarty_internal_compile_private_print_expression.php(65): Smarty_Internal_TemplateCompilerBase->compileTag('private_modifie...', Array, Array)
#4 /var/www/vimbadmin/library/Smarty/sysplugins/smarty_internal_templatecompilerbase.php(463): Smarty_Internal_Compile_Private_Print_Expression->compile(Array, Object(Smarty_Internal_SmartyTemplateCompiler), Array, NULL, NULL)
#5 /var/www/vimbadmin/library/Smarty/sysplugins/smarty_internal_templatecompilerbase.php(247): Smarty_Internal_TemplateCompilerBase->callTagCompiler('private_print_e...', Array, Array)
#6 /var/www/vimbadmin/library/Smarty/sysplugins/smarty_internal_templateparser.php(2363): Smarty_Internal_TemplateCompilerBase->compileTag('private_print_e...', Array, Array)
#7 /var/www/vimbadmin/library/Smarty/sysplugins/smarty_internal_templateparser.php(3096): Smarty_Internal_Templateparser->yy_r28()
#8 /var/www/vimbadmin/library/Smarty/sysplugins/smarty_internal_templateparser.php(3196): Smarty_Internal_Templateparser->yy_reduce(28)
#9 /var/www/vimbadmin/library/Smarty/sysplugins/smarty_internal_smartytemplatecompiler.php(105): Smarty_Internal_Templateparser->doParse(10, '' } );?        ...')
#10 /var/www/vimbadmin/library/Smarty/sysplugins/smarty_internal_templatecompilerbase.php(192): Smarty_Internal_SmartyTemplateCompiler->doCompile('{include file="...')
#11 /var/www/vimbadmin/library/Smarty/sysplugins/smarty_internal_template.php(187): Smarty_Internal_TemplateCompilerBase->compileTemplate(Object(Smarty_Internal_Template))
#12 /var/www/vimbadmin/library/Smarty/sysplugins/smarty_internal_templatebase.php(155): Smarty_Internal_Template->compileTemplateSource()
#13 /var/www/vimbadmin/library/ViMbAdmin/View/Smarty.php(261): Smarty_Internal_TemplateBase->fetch('alias/list.phtm...')
#14 /var/www/vimbadmin/library/Zend/Controller/Action/Helper/ViewRenderer.php(900): ViMbAdmin_View_Smarty->render('alias/list.phtm...')
#15 /var/www/vimbadmin/library/Zend/Controller/Action/Helper/ViewRenderer.php(921): Zend_Controller_Action_Helper_ViewRenderer->renderScript('alias/list.phtm...', NULL)
#16 /var/www/vimbadmin/library/Zend/Controller/Action/Helper/ViewRenderer.php(960): Zend_Controller_Action_Helper_ViewRenderer->render()
#17 /var/www/vimbadmin/library/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#18 /var/www/vimbadmin/library/Zend/Controller/Action.php(527): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#19 /var/www/vimbadmin/library/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('listAction')
#20 /var/www/vimbadmin/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#21 /var/www/vimbadmin/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#22 /var/www/vimbadmin/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#23 /var/www/vimbadmin/public/index.php(31): Zend_Application->run()
#24 {main}

Has somebody succeeded in setting up ViMbAdmin + nginx ?
What could be done to solve these issues ?

Regards,
Cyril

Cyril Mertens

unread,
Aug 10, 2012, 12:25:57 PM8/10/12
to vimbadmi...@googlegroups.com
Bump ?

Barry O'Donovan

unread,
Aug 15, 2012, 4:29:04 AM8/15/12
to vimbadmi...@googlegroups.com

Cyril,

> on some pages (aliases and logs) I get errors from smarty module :
>
> File
> /var/www/vimbadmin/library/Smarty/sysplugins/smarty_internal_templatecompilerbase.php
> Line
> 656
> Message
> Syntax Error in template
> "/var/www/vimbadmin/application/views/alias/list.phtml" on line
> 74 "$( "#alias-goto-{$oneAlias.id}" ).tooltip( { title:
> '{$oneAlias.goto|regex_replace:"/[,]/":", "}' } );" unknown
> modifier "regex_replace"

This seems like a Smarty version issue.

Please ensure you are using the latest Smarty and have svn up'd it
(bin/library-update.sh).

The following file should exist:

library/Smarty/plugins/modifier.regex_replace.php

In my library/Smarty, I have the following version:

library/Smarty $ svn info
Path: .
URL: http://smarty-php.googlecode.com/svn/trunk/distribution/libs
Repository Root: http://smarty-php.googlecode.com/svn
Repository UUID: 9dce5a81-9a42-0410-99e4-3799d3902e7f
Revision: 4644
Node Kind: directory
Schedule: normal
Last Changed Author: rodneyrehm
Last Changed Rev: 4644
Last Changed Date: 2012-08-14 14:22:34 +0100 (Tue, 14 Aug 2012)


- Barry


Cyril Mertens

unread,
Aug 15, 2012, 5:32:52 AM8/15/12
to vimbadmi...@googlegroups.com

Hello,

I was using the latest version, i.e. 4644 and I have still the same error.
The php file modifier.regex_replace.php is present, modified on June 24th.

I do not know whether the problem comes from my setup or from some Smarty files.

Have you ever tried this kind of setup during your development ?

Regards,

Barry O'Donovan

unread,
Aug 15, 2012, 5:43:09 AM8/15/12
to vimbadmi...@googlegroups.com


On 15/08/12 10:32, Cyril Mertens wrote:
> I was using the latest version, i.e. 4644 and I have still the same error.
> The php file modifier.regex_replace.php is present, modified on June 24th.

Is there any possibility of a conflict with a system installed version
of Smarty?

> Have you ever tried this kind of setup during your development ?

I'm afraid not.

But if you get the login page, then chances are it's working normally
and you do have a Smarty conflict / installation issue.

- Barry



Cyril Mertens

unread,
Aug 15, 2012, 6:11:40 AM8/15/12
to vimbadmi...@googlegroups.com

I checked once again but there is no other smarty installation :
aptitude search smarty
p   smarty                          - Template engine for PHP
p   smarty-acl-render               - Provide ACL based rendering for Smarty
p   smarty-gettext                  - Gettext plugin enabling internationalizati
p   smarty-validate                 - Server-side form validation plugin for Sma
p   smarty3                         - Template engine for PHP

I did the same check with zend and doctrine, there is no other installation.
Reply all
Reply to author
Forward
0 new messages