HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] Template: Could I include Php script ?



Please keep the mailing list CCed for the benefit of others having the same problem...

Quoting borgo2000@xxxxxxxx:

I did it but it's not working because enviroment varible which I have
defined seem to be empty (not global). I have created two files in
/var/spool/hylafax/etc/templates/custom:

First is hook.sh

#!/bin/bash
TEMPLATE_VAR_1=$(php /var/spool/hylafax/etc/templates/custom/hook.php
$SESSION_LOG)
export TEMPLATE_VAR_1


The second is hook.php


<?php
$txt = htmlspecialchars($argv[1], ENT_QUOTES);
echo $txt . "n";
?>


Here is my template file:


.....missing code.....
Test: $TEMPLATE_VAR_1



The problem is that $TEMPLATE_VAR_1 is always empty. I think that the
enviroment variable set in the bash script have local scope.

Any ideas ?

That's probably because $SESSION_LOG is also empty... SESSION_LOG is not an environment variable (because it can become too big, it has special handling. It hasn't always been the case though.)


--
Patrice Fournier
iFAX Solutions, Inc.
www.ifax.com


____________________ HylaFAX(tm) Users Mailing List _______________________ To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*




Project hosted by iFAX Solutions