Wre do you execute this script, in a website? The /var/ directory is outside of the allowed paths of a website, so you can not change to that directory. If you want to allow access to /var, then add /var to the open basedir path settin on the options tab of this website.
|