Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support PHP includes problem
Krysm
Posted on 16 Jul 2010, 14:19:32

Access: Member
Total Posts: 18
Joined: 2010-02-11

Hey,

I've recently incorporated PHP includes into my website. However, i've been having problems getting it to display 'news/index.php'. All I get is 2 errors. They are;

Warning: include_once(/news/index.php) [function.include-once]: failed to open stream: No such file or directory in _____________ on line 332

Warning: include_once() [function.include]: Failed opening '/news/index.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in _____________ on line 332


I got a friend to look over it and he says that it appears to be failing to include the file 'english_langmsg.php'.
I've yet to try any of the other news categories yet, but I assume they would display the same error.

Do you have any idea as to how I could solve this problem? Many thanks :)
#2703
Chris
Posted on 16 Jul 2010, 16:37:01

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Try using the full path instead, something like this

Code:
<?php
include '/home/username/public_html/news/index.php';
?>
#2704
Krysm
Posted on 16 Jul 2010, 22:47:25

Access: Member
Total Posts: 18
Joined: 2010-02-11

Hmm.. didn't seem to work. :S
#2708
Chris
Posted on 16 Jul 2010, 22:54:05

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Should work. The part of the error message you've blanked out with ____________, what did that say?
#2709
Krysm
Posted on 16 Jul 2010, 23:02:39

Access: Member
Total Posts: 18
Joined: 2010-02-11

Warning: require_once(language/) [function.require-once]: failed to open stream: No such file or directory in /home/teenuzco/public_html/news/index.php on line 86

Fatal error: require_once() [function.require]: Failed opening required 'language/' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/teenuzco/public_html/news/index.php on line 86
#2710
Chris
Posted on 17 Jul 2010, 00:42:36

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

You mentioned it appears to be trying to include the file "english_langmsg.php", The system hasn't used these file names since version 3.4, now they're just called english.php, spanish.php etc in 3.7.

Which version is it you have installed?
#2711
Krysm
Posted on 17 Jul 2010, 00:51:05

Access: Member
Total Posts: 18
Joined: 2010-02-11

3.4
#2712
Chris
Posted on 17 Jul 2010, 14:07:08

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

I would recommend installing 3.7, it's much better and I'm pretty sure this problem with paths was fixed in one of the versions in between 3.4-7
#2713
Network-13.com © 2013