includes not working -- really strange, php bug?
Posted: Sun Aug 15, 2010 6:52 pm
I have 2 pretty much identical files file1.php, file2.php.
All files and the includes are located in the same website folder.
When I do include("header.php") from file1.php everything works fine.
However, none of the includes in file2.php work, giving me the following errors:
Warning: include(header.php) [function.include]: failed to open stream: Operation not permitted in /var/www/vhosts/...../file1.php on line 20
Warning: include() [function.include]: Failed opening 'header.php' for inclusion (include_path='.:') in /var/www/vhosts/...../file1.php on line 20
Warning: mysql_query() [function.mysql-query]: Access denied for user 'apache'@'localhost' (using password: NO)
But file2.php is pretty much the same file as file1.php ! And it's in the same folder too!
Also mysql won't work. All the files are in the same folder. I tried setting all permissions to 777 -- does not make any difference. What seems to make a difference is when I rename header.php to header2.php and changed the include to include header2.php. It just seems really strange. I do not want to make 2 copies of all my includes!
The include path is set to .
All files and the includes are located in the same website folder.
When I do include("header.php") from file1.php everything works fine.
However, none of the includes in file2.php work, giving me the following errors:
Warning: include(header.php) [function.include]: failed to open stream: Operation not permitted in /var/www/vhosts/...../file1.php on line 20
Warning: include() [function.include]: Failed opening 'header.php' for inclusion (include_path='.:') in /var/www/vhosts/...../file1.php on line 20
Warning: mysql_query() [function.mysql-query]: Access denied for user 'apache'@'localhost' (using password: NO)
But file2.php is pretty much the same file as file1.php ! And it's in the same folder too!
Also mysql won't work. All the files are in the same folder. I tried setting all permissions to 777 -- does not make any difference. What seems to make a difference is when I rename header.php to header2.php and changed the include to include header2.php. It just seems really strange. I do not want to make 2 copies of all my includes!
The include path is set to .