Hi johanafm,
Thank you for your reply.
I have replaced my code with yours and I now get the following error:
#!/usr/bin/php /var/www/vhosts/mydomain/httpdocs/lgw/lgwfidsRAW.php (223)
Warning: fopen(/var/www/vhosts/mydomain/httpdocs/lgw/arriveOutPut.txt) [function.fopen]: failed to open stream: Permission denied in /var/www/vhosts/mydomain/httpdocs/lgw/lgwfidsRAW.php on line 224
Really failed to fopen /var/www/vhosts/mydomain/httpdocs/lgw/arriveOutPut.txt
The data is getting written to the correct file. An example of the data in the "arriveOutPut.txt" file is:
2010-09-10 11:48:02 ZB289 1525 1525 ES Expected 1525
2010-09-10 11:48:02 EZY8772 1530 1530 PI Scheduled 1530
2010-09-10 11:48:02 BE803 1600 1600 PI Scheduled 1600
2010-09-10 11:48:02 ZB737 1600 1555 ES Expected 1555
2010-09-10 11:48:02 BA2695 1615 1615 PI Scheduled 1615
2010-09-10 11:48:02 BA2883 1620 1620 PI Scheduled 1620
2010-09-10 11:48:02 AEA1015 1625 1625 PI Scheduled 1625
The file gets updated every minute. If I were to delete the file content, after one minute new data is written to it again which is what I would expect.
If I echo the file this is what I see:
Warning: fopen(/var/www/vhosts/mydomain/httpdocs/lgw/departOutPut.txt) [function.fopen]: failed to open stream: Permission denied in /var/www/vhosts/mydomain/httpdocs/lgw/lgwfidsRAW.php on line 237
Really failed to fopen /var/www/vhosts/mydomain/httpdocs/lgw/departOutPut.txt
UPDATE: OUTBOUND FLIGHT No: BA2960, STATUS CODE: CO STATUS MESSAGE: Gate Closed /var/www/vhosts/mydomain/httpdocs/lgw/lgwfidsRAW.php (236)
Warning: fopen(/var/www/vhosts/mydomain/httpdocs/lgw/departOutPut.txt) [function.fopen]: failed to open stream: Permission denied in /var/www/vhosts/mydomain/httpdocs/lgw/lgwfidsRAW.php on line 237
Really failed to fopen /var/www/vhosts/mydomain/httpdocs/lgw/departOutPut.txt
UPDATE: OUTBOUND FLIGHT No: BA8037, STATUS CODE: CO STATUS MESSAGE: Gate Closed /var/www/vhosts/mydomain/httpdocs/lgw/lgwfidsRAW.php (236)
Warning: fopen(/var/www/vhosts/mydomain/httpdocs/lgw/departOutPut.txt) [function.fopen]: failed to open stream: Permission denied in /var/www/vhosts/mydomain/httpdocs/lgw/lgwfidsRAW.php on line 237
Really failed to fopen /var/www/vhosts/mydomain/httpdocs/lgw/departOutPut.txt
UPDATE: OUTBOUND FLIGHT No: EZY5311, STATUS CODE: CO STATUS MESSAGE: Gate Closed /var/www/vhosts/mydomain/httpdocs/lgw/lgwfidsRAW.php (236)
Warning: fopen(/var/www/vhosts/mydomain/httpdocs/lgw/departOutPut.txt) [function.fopen]: failed to open stream: Permission denied in /var/www/vhosts/mydomain/httpdocs/lgw/lgwfidsRAW.php on line 237
Really failed to fopen /var/www/vhosts/mydomain/httpdocs/lgw/departOutPut.txt
UPDATE: OUTBOUND FLIGHT No: TS423, STATUS CODE: LC STATUS MESSAGE: Last Call /var/www/vhosts/mydomain/httpdocs/lgw/lgwfidsRAW.php (236)
Warning: fopen(/var/www/vhosts/mydomain/httpdocs/lgw/departOutPut.txt) [function.fopen]: failed to open stream: Permission denied in /var/www/vhosts/mydomain/httpdocs/lgw/lgwfidsRAW.php on line 237
Really failed to fopen /var/www/vhosts/mydomain/httpdocs/lgw/departOutPut.txt
/var/www/vhosts/mydomain/httpdocs/lgw/lgwfidsRAW.php (223)
This is very odd.