DirectAdmin 1.59.4 has been released


Verified User
Nov 25, 2017
To check a literal package name, use the |PACKAGE| token. Does not need to be specific to an item within the package nor a "custom package item" feature (which is used to add more variables to a package).

For example, to change save to a custom a.log if package A is used, and b.log if any other package is used, this would be the code
|*if PACKAGE="A"|
CustomLog /path/a.log combined
CustomLog /path/b.log combined
Let us know if you have any other specific scenarios you're after.


|*if PACKAGE="A"|
this check is not good
1. Every i create new package i need to update template
2.What happen if i want to have custom for user
eg user a1 and a2 using same package A which default disable dangerous php functions
but i want user a1 to be able to access to all functions. then I uncheck Secure php check (custom package item) for a1. It will be very useful if i can use
My target is build a function which help toggle secure_php function per user easily. So I added custom package item called secure_php which is checkbox in skin
secure_php=type=checkbox&string=Secure PHP&desc=Disable dangerous functions&checked=yes
Now i want to use secure_php variable which created above in config template (httpd.conf, openlitesped.conf...)
|*if CUSTOM_PACKAGE_ITEM_secure_php="on"|
php_admin_value[disable_functions] = exec,system,passthru,shell_exec
By this way i can toggle Secure php function for user easily.

I think this is easy to implement, since we had implemented CUSTOM_DOMAIN_ITEM_%s for domain, so this one is same.

Now custom package item useless because we cannot retrieve value in config template :(
Last edited: