Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
PHP errors & notices when executing a file from CLI
After installing a PHP script (CPVlab) I am trying to set up a cronjob that executes a PHP script every day. The script is executed like this : php5 /var/www/htdocs/cron-wurfl.php
After testing this line from the command line, I got the following output :(if it needs t
PHP Warning: visualStylesCheckCall(license/license.php): failed to open stream: No such file or directory in /var/www/htdocs/lib/app.inc on line 0 PHP Fatal error: visualStylesCheckCall(): Failed opening required 'license/license.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/htdocs/lib/app.inc on line 0
I was able to reduce these error messages by playing with the permission scheme (adding myself to the www-data group). However, that didn’t solve it all, as now, when I run : php5 /var/www/htdocs/cron-wurfl.php , I get the output below :
PHP Notice: Undefined index: SERVER_NAME in /var/www/htdocs/lib/app.inc on line 0 PHP Notice: Undefined index: REQUEST_URI in /var/www/htdocs/lib/app.inc on line 0
Could this still have to do with the permission scheme I am using ? I have myself as the owner of the htdocs directory, while it is also owned by the group of www-data. Myself as well as www-data (the user) are part of this group.
Anyone know how to solve it ?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×