I think your problem is that the environment variable is not defined when you executes the script, try this:
1.- Edit your .bash_profile and add this line (put xulrunner
directory if you want):
export PATH_XUL=/tmp
2.- Reload console
3.- Executes this php (it should write /tmp
)
<?
echo getenv("PATH_XUL");
?>
This environment variable is declared for your user, to declare variable to all users you can add the export
directive to /etc/profile.d/xul.sh
If i don't understand your problem correctly, let me know