Hi,
I encountered a weird bug in etemplate. The symptoms are as follows:
- with some specific etemplate, the php script is called twice. For instance
when saving data, the data is saved twice
- the script is called twice. Logging into the error log shows that the
first time it is called from the originating web page with the proper
referrer, the second time it is called with no referrer
- the error only occurs when using a selected template. The error was found
to happen on at least two different servers, so it does seem that the root
cause of the error is eTemplate. The configuration of the servers is
- Ubuntu 7.10 Apache 2 PHP 5.2.3
- CentOS5 Apache PHP 5.1.6
Any suggestion as to why this may occur? Here is the error log of my script
when I add the line error_log(“EXEC $action”)
[Sun Jan 20 17:49:28 2008] [error] [client 127.0.0.1] EXEC act_save,
referer:
http://mirou/~raphael/erp_demo/etemplate/process_exec.php?menuaction=blue_order.ui_Order.exec
[Sun Jan 20 17:49:30 2008] [error] [client 127.0.0.1] EXEC act_save
The effect of the bug can be stopped, however it does not solve the root
cause, by adding
if ($_SERVER[‘HTTP_REFERER’] == ‘’)
{
error_log(‘ui_Base: No referrer for this request - Stopping
processing’);
die;
}
I am at loss in trying to find what is the root cause of this error. Any
suggestion would be useful.
Cheers
Raphaël
–
Raphael Alla
Mitija Australia
+61 4 15 678 576
+687 78 86 86
http://www.mitija.com