If you want to use Submin, or any other web application that resides outside default Apache directory (/var/www/html) you have to set proper SELinux context for all files. In this case all files are located in /var/lib/submin directory. Without this you will get some error messages in /var/log/audit/audit.log:

avc:  denied  { write } for  pid=1813 comm="python2" name="submin.db" dev=dm-0 ino=664032 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file

and in /var/log/messages:

setroubleshoot: SELinux is preventing /usr/bin/python from read access on the file /var/lib/submin/conf/settings.py
setroubleshoot: SELinux is preventing /usr/bin/python from read access on the file /var/lib/submin/conf/settings.pyc
setroubleshoot: SELinux is preventing /usr/bin/python from write access on the directory /var/lib/submin/conf
setroubleshoot: SELinux is preventing /usr/bin/python from getattr access on the file /var/lib/submin/conf/submin.db

You should change context of /var/lib/submin/cgi-bin/submin.cgi to httpd_sys_script_exec_t and whole /var/lib/submin/conf/ directory to httpd_sys_script_rw_t:

cd /var/lib/submin
chcon -t httpd_sys_script_exec_t cgi-bin/submin.cgi
chcon -R -t httpd_sys_script_rw_t conf

additionally if You want Submin to work with Apache on different port (ie. 88), you have to change http_vhost options:

submin2-admin /var/lib/submin config set http_vhost "http://your.host.com:88"

note there is no tailing slash (/) in address.

To Chińskie CST 26 x 2.10 C-1040N. Wyglądają znośnie. Po krótkiej przejażdżce stwierdzam, że pracują ładnie - są miękkie.

The extension I've used COOoder is not available any more. Now I've found Code Colorizer.

After installing OpenERP (using script from OpenERP forum) I couldn't get any "Apps". The solution was quite simple, but very hard to find.

Yo have to set up (in console) two environment variables: http_proxy and https_proxy and restart server

http_proxy=192.168.1.1:3128
https_proxy=192.168.1.1:3128
/etc/init.d/openerp restart

As You can see my proxy server uses default port 3128 and is on my gateway 191.168.1.1.

Next I've started to create "parts" using my own numbering scheme based on categories founded on credativ Blog because the main purpose was to take control of my electronics parts.

Preparation:

yum install java-1.7.0-openjdk graphviz

Downloaded wiki_external_filter:

wget "https://github.com/luckval/wiki_external_filter/archive/master.zip" \
-O /tmp/redmine_wiki_external_filter-commitdce52f32c5-2014-04-12.zip

Downloaded PlanUML jar file into /usr/local/bin.

Installation Redmine Wiki External Filter plugin

Unpack into redmine plugins directory and copy config file info main:

cd /var/www/redmine/plugins
unzip /tmp/redmine_wiki_external_filter-commitdce52f32c5-2014-04-12.zip
mv wiki_external_filter-master wiki_external_filter
cd ..
cp plugins/wiki_external_filter/config/wiki_external_filter.yml config/

renaming directory in necessary.

Standard plug in installation procedure (and restart httpd in the end):

cd /var/www/redmine
bundle install
/etc/init.d/httpd graceful

I have to run bundle install to install missing open4 gem.

Then you have to configure cache settings using Administration -> Plugins -> Wiki External Filter Plugin: Configure. I've set Cache expiration time to 2 second because my server is rather slow.

Testing graphs

I've added two lines (prolog and epilog) in config/wiki_external_filter.yml

  graphviz:
    description: "Constructs graph image from its textual description in DOT language, see http://www.graphviz.org"
    template: image
    outputs:
      - command: "/usr/bin/dot -Tsvg"
        content_type: "image/svg+xml"
    #  - command: "/usr/bin/dot -Tpng"
    #    content_type: "image/png"
        prolog: "digraph G {"
        epilog: "}"

and then put:

{{graphviz
A->B
}}

in Redmine wiki page and it was pretty rendered.

Testing UML diagrams

I've created /usr/local/bin/plantuml.bash file:

#!/bin/bash

/usr/bin/java -Djava.awt.headless=true -Djava.io.tmpdir=/var/tmp -jar /opt/PlantUML/plantuml.jar -charset UTF-8 ${@}

set to executable

chmod a+x /usr/local/bin/plantuml.bash

and then correct path in wiki_external_filter.yml file

  plantuml:
    description: "Constructs UML diagram image from its textual description in PlantUML language, see http://plantuml.sourceforge.net"
    template: image
    outputs:
      - command: "/usr/local/bin/plantuml.bash -pipe"
        content_type: "image/png"
        prolog: "@startuml"
        epilog: "@enduml"

and then put:

{{plantuml
A->B
}}

in Redmine wiki page and UML diagram should be shown.

"Should" - in my case - VPS with a little amount of RAM - I can see only

Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

but it's well known lack of memory problem and even -Xmx64m doesn't help.

For some simple diagrams adding -Xmx8m in /usr/local/bin/plantuml.bash fix that problem.

If You want to change Recipient or Email in Feedback form You have to made changes in language which is set as Main.

If not changes in Recipient attribute is discarded and Email is not accessible.

It's simple, but it takes me half an hour to change e-mail address ;-)

If you want to visualise database structure you can use reverse engineering, i.e. SchemaSpy Graphical Database Schema Metadata Browser or mysqlviz (for MySQL only). SchemaSpy is written in Java and support several types of databases, mysqlviz is in PHP. Both use Graphviz which you have to install separately.

There is a GUI for SchemaSpy - SchemaSpyGUI. To work with MySQL you need MySQL Connector/J - it's a little bit tricky because it's install in x86 patch even if you install 64 bit version of MySQL - at least in MS Windows.

In my case "Patch to DB driver" looks like this:

C:\Program Files (x86)\MySQL\Connector J 5.1.28\mysql-connector-java-5.1.28-bin.jar

The output is browsable "web page" about structure of analysed database.

Mysqlviz is simple PHP script - you have to prepare database dump in special format - special means different than generated by MySQL Workbench. You have to omit schema in dump (it is simple option in export options), but you have also check if CONSTRAINT are in single line. Dump generated by Workbench divide it into few lines. So you have to (I did it manually but I would prefer sed/awk) change this:

  CONSTRAINT `categories_ibfk_1`
    FOREIGN KEY (`parent_id`)
    REFERENCES `categories` (`category_id`)
    ON DELETE SET NULL
    ON UPDATE CASCADE,

into (long) single-line entry:

CONSTRAINT `categories_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `categories` (`category_id`) ON DELETE SET NULL ON UPDATE CASCADE

then you can generate DOT file:

./mysqlviz -f model.sql > output.dot

and open created in Graphviz.

I've accidentally commit corrupted file (long story... ;-) into subversion repository, so I would like to revert to a previous version - but only this one particular file.

My file (l6208.lib) had been corrupted in version 309 (revision 308 was the last good one), so I type:

svn merge -c -309 l6208.lib

please note minus sign before 309. This mean apply differences between 309 and 308. You can also type:

svn merge -c -r 309:308 l6208.lib

Now it's time to commit recovered file.

svn ci l6208.lib -m "Reverted last revision"

I don't know if it is best method, but it works for me.

LDAP authentication is build in eZ Publish by default - the only thing to do is configuration.

To use LDAP you have to add line

LoginHandler[]=LDAP

in settings/override/site.ini.append.php file in section UserSettings. In my file it looks like this:

[UserSettings]
LogoutRedirect=/
LoginHandler[]=LDAP

In new file settings/override/ldap.ini.append.php you have to specify all connection settings. In my case it looks like this:

[LDAPSettings]
LDAPServer=127.0.0.1
LDAPBaseDn=ou--users,dc--jaqb,dc--gda,dc--pl
LDAPBindUser=cn--ldap-connect-user,ou--users,dc--jaqb,dc--gda,dc--pl
LDAPBindPassword=SecretPassword

The double minus sign is entered instead of equal sign. You can change this using LDAPEqualSign variable.

As you can see, I've created special user only to bind to LDAP server, because my server doesn't allow anonymous bind and you have to enter password in plain text.

When you clear ini cache you can login using LDAP account.

Earlier I've described how to chose proper language depending on domain. When you want to smoothly switch between these two languages you have to comment out SiteURL entry in settings/override/site.ini.append.php file and set this variable in config files of each language.

I have two directories in settings/siteaccess: pol and eng, so I've add in section SiteSettings

SiteURL=www.somedomain.pl

in file settings/siteaccess/pol/site.ini.append.php, and

SiteURL=www.somedomain.eu

in file settings/siteaccess/eng/site.ini.append.php.

Ten kto umie pisze kod, ten kto nie umie pisze książki..., albo blog.

Pon Wt Śr Czw Pt So N
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30            
eZ Publish™ copyright © 1999-2025 eZ Systems AS