Skip to content


Nginx HUP and not USR1

I am in process of developing a small application for which the logrotate of Nginx logs is critical.
Unfortunately the default logrotate config that resides in /etc/logrotate.d/nginx is not working:


/var/log/nginx/*.log {
daily
missingok
rotate 52
compress
delaycompress
notifempty
create 640 nobody root
sharedscripts
postrotate
[ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
endscript
}

Unfortunately with this config my access.log is empty after logrotate.

The trick was to replace -USR1 with -HUP
[ ! -f /var/run/nginx.pid ] || kill -HUP `cat /var/run/nginx.pid`

Posted in Linux.


EPIC @INC

I am trying to debug a Perl CGI application. I choose EPIC for this, but my application does not run correctly because of the following error:
can't locate .pm in @INC

I Googled for it but can’t find anything yet.
Accidentally I right-clicked on the project in Eclipse “Navigator” and click on “Properties”. There is a “Perl Include Paths”. This helped me.

BTW: There is a simple tutorial regarding Perl Debug using EPIC at IBM DeveloperWorks:

http://www.ibm.com/developerworks/opensource/tutorials/os-epic/index.html

Posted in Eclipse, Perl.

Tagged with , , , , , , , , , , , , , .


parentIDName, not the parent

Today I got the following error testing a JBoss Seam project:
java.lang.IllegalStateException: duplicate Id for a component changeParent

Searching a bit the forums I fixed it modifying the template edit.xhtml.ftl to be

<#assign parentIdName = parentPojo.shortName?cap_first>

instead of

I found this here:

http://seamframework.org/Community/Seam212ProblemWithRichtabPanelInXXXEditxhtml

Posted in JBoss.


VMWare 2.0.2 vs kernel 2.6.35.6-48.fc14.x86_64

If you try to start VMWare 2.0.2 on top of Fedora 14 with kernel 2.6.35.6-48.fc14.x86_64, you will get the following message that does not let you to start compiling vmmon:

“The directory of kernel headers (version @@VMWARE@@ UTS_RELEASE) does not match
your running kernel (version 2.6.35.6-48.fc14.x86_64). Even if the module were
to compile successfully, it would not load into the running kernel.”

The solution is to change the lines 2702 and 2703 into:

if (-e $answer . '/generated/utsrelease.h') {
$uts_headers .= "#include <./generated/utsrelease.h>\n";

The problem that remained is the compilation itself. I will come back with a solution when I will have it.

Posted in Linux.

Tagged with , , , , , , , , , , , , .


Perfect match

Perfect match of the version… I installed a Joomla site on my server.
Navigating to Menus -> Menu Manager, all the menus are available, and for each menu the number of menu item is above 0.
Clicking on Menu Items icon, results in an empty list, like there is no menu item defined for that menu.
The cause is the mismatch of PHP and Joomla version.
The solution was to upgrade the Joomla version to the latest version.

Posted in Joomla.


The Cousin from Canada

In Niagra This Week
In Vremea Noua

Posted in A bit of relax.

Tagged with , , , , , .


Not any model is an object

A Magento instance is raising the following error everytime when I try to access the product details page:

[error] [client ] PHP Fatal error:  Call to a member function setAttribute() on a non-object in /app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php on line 374, referer: http://shop.matrixrom.ro/index.php/admin/shopadmin/catalog_product/

The resolution was to implement the following changes:

Line around 374, replace the :

$this->_source = Mage::getModel($this->getSourceModel())
->setAttribute($this);

with:

if(is_object(Mage::getModel($this->getSourceModel()))){
$this->_source = Mage::getModel($this->getSourceModel())
->setAttribute($this);
}

And open file: /app/code/core/Mage/Adminhtml/Block/Widget/Form.php

Line around 201/202:

Replace:
$element->setValues($attribute->getSource()->getAllOptions(true, true));

with:
if(is_object($attribute->getSource())){
$element->setValues($attribute->getSource()->getAllOptions(true, true));
}

Posted in Uncategorized.


Start time

Today I had some doubts about a process. Wasn’t sure who started it, and I wanted to check the start time of the process:

ps -eo pid,lstart,cmd

Posted in Linux.

Tagged with , , , , , , , .


The Slash

One suggestion for improving SEO is to add trailing slashes to all pages. The point is that this can break your site, generating 404 error at almost every click that you’ll do.

The solution that I found was to edit the file app/code/core/Mage/Core/Model/Url/Rewrite.php and to replace the line:

$requestPath = trim($request->getPathInfo(), '/');

with the line

$requestPath = ltrim($request->getPathInfo(), '/');

I mean to replace the trim with ltrim

Posted in Magento.

Tagged with , , , , , , , , .


Good night… U2

Actually it was an incredible good night with U2 in Istanbul. The “magical city of Istanbul” was the last appearance of Snow Patrol in U2 360.
The words cannot express the magic of this show. I recorded a part of the show (with my mobile, while the organizer stated that the recording devices are not allowed).

Snow Patrol singing with U2 crew

SnowPatrolwU2crew

and noooow… U2:

U2atIstanbul_1

U2atIstanbul_2

06092010027

06092010028

06092010029

06092010030

06092010031

Posted in A bit of relax.

Tagged with , , , , , , .




Optimized by SEO Ultimate