Reputation: 1563
Yesterday I was working on some code as usual and then I made a mistake by omitting to declare a variable for an include like this:
include($myvar);
And of course I got an error message saying that the include cannot be empty. Ok, so I adapt the code and I keep on getting this error. I first thought it was a cache issue so I cleaned my cache locally, tried a private browsing session, cleaned cache on server level but nothing helped. The error was referencing a line in my code that didn't even exist.
This morning I tried again, I had the same message but I provoked voluntarily another error by tried to include a file that doesn't exist like this:
include ("builder/fv02/modules/php/navigation.php");
With this I get the following error as expected:
Warning : include(builder/fv02/modules/php/navigation.php): failed to open stream: No such file or directory in xxxx on line 78
Warning : include(builder/fv02/modules/php/navigation.php): failed to open stream: No such file or directory in xxxx on line 78
Warning : include(): Failed opening 'builder/fv02/modules/php/navigation.php' for inclusion (include_path='.:/usr/local/php7.0/lib/php') in xxxx on line 78
if I correct this error I have provoked I'm stuck with this error message. If I remove line 78 or if I remove all includes in my code, it still displays this error message. If I add at the top of my PHP something like echo "aaa"; it doesn't display it while a warning should not block the execution of this especially if the echo is put before the line with a warning.
I have never seen this before. Do you have any clue of what the problem could be?
thanks!
Upvotes: 1
Views: 36
Reputation: 1563
I ended up delete all files to put them back on the server and it solved the problem. There was probably nothing wrong with my file but something was going wrong on the server.
Upvotes: 1