Warning: require_once(/var/www/html/test_lms/include/mysql.processing.php): failed to open stream: No such file or directory in /var/www/html/test_lms/include/IMEXporter.class.php on line 513
Fatal error: require_once(): Failed opening required '/var/www/html/test_lms/include/mysql.processing.php' (include_path='.:/usr/local/lib/php') in /var/www/html/test_lms/include/IMEXporter.class.php on line 513
PHP from IMEXporter.class.php
LINE 513 that is throwing the error
require_once dirname(__FILE__) . "/mysql.processing.php";
The file is there.
The file is chmod 777.
The two files are both owned by the same user and group.
Why is php doing this to me?
The problem could be that mysql.processing.php
itself is broken and even though php finds the file it refuses to retrieve it and instead throws a Derp! cant find file. Derp.
. Kind of stupid to mislead me like that but its a possibility. I'm checking over my code now.
Nope, I tried erasing the entire script of mysql.processing.php
and wrote
echo "Hello you impudent php";
and it still wont find the file. So its not a file broken issue. Also I fixed the file case issue. From uppercase P to lowercase and it still wont go for it. I tried to include a file by the name of test.php and it wont find that one either..
Okay here was the problem. Remember when I mentioned that my mysql.processing.php
file could be broken? Well that was half the issue. Apparently php require
returns the error failed to open stream: No such file or directory.. etc
if it:
1) Cannot find the file.
2) It finds the file, but it cannot open it.
The error message is misleading and leads you to believe it is a path issue. Sometimes it is, but cases like mine, its just a syntax issue with the returned file. Now for the second half. I made the corrections to all my syntax errors on the mysql.processing.php
but it still was not working.. So I just did a reboot of my server and now it works.
The second half of the problem is that php has a nasty tendency to cache php files. Often you can start editing a php script, fixing solutions etc etc and not make any progress because php wont immediately take into effect your changes. This can lead you into stumbling around from one solution to the next, constantly changing your script and it can feel like you are in a maze.
There are ways to stop php from caching specific files. But the problem was php itself, with its misleading error report, and two with its caching of problems and excluding solutions.