Failed to open stream errors

All web design discussion, including Ultimate Quiz MOD support.

Moderator: CricketMX Forum Moderators

Failed to open stream errors

Postby Bernie » Tue Dec 12, 2006 5:23 pm

First, thanks for creating this mod!

Second, I've been struggling with a couple of errors I'm getting with this mod, and would appreciate any help/advice you have to offer.

When going to the Quiz Packs screen in the ACP I'm getting these warnings:

Code: Select all
Warning: file_get_contents(http://xxxxxxxxx/phpBB2/admin/quiz_packs/QP_UQM_Trivia.qp): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /xxxxxx/xxxxxx/xxxxxx/xxxxxx/phpBB2/admin/admin_quiz_packs.php on line 97

Warning: file_get_contents(http://xxxxxxxx/phpBB2/admin/quiz_packs/QP_UQM_Trivia.qp): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /xxxxx/xxxxxx/xxxxxxx/xxxxxx/phpBB2/admin/admin_quiz_packs.php on line 97


This indicates to me that I've got permissions on something set wrong, but I've reset all the permissions for that file and directory, and the appropriate directories above it, yet I still get the error. And yes, I've checked the filename for spelling errors too.

Interestingly, the link to the file shows up in the Quiz Packs section, and if I cut and paste the path into my browser I can access the file just fine, so why is the Mod getting a 404??

Clicking the filename link in the Quiz Pack section results in another warning, and a blank screen below it:
Code: Select all
Warning: file_get_contents(http://spwaw.com/phpBB2/admin/quiz_packs/QP_UQM_Trivia.qp): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /xxxxx/xxxxx/xxxxx/xxxx/phpBB2/admin/admin_quiz_packs.php on line 157


Two other warnings are also popping up on the Quiz configuration screen in the ACP, directly above the form:
Code: Select all
Warning: file(): php_network_getaddresses: getaddrinfo failed: Name or service not known (is your IPV6 configuration correct? If this error happens all the time, try reconfiguring PHP using --disable-ipv6 option to configure) in /xxxx/xxxxxxxxx/xxxxxx/xxxxx/phpBB2/admin/admin_quiz.php on line 400

Warning: file(http://www.cmxmods.net/quiz_latest.txt): failed to open stream: Success in /xxxx/xxxxx/xxxxxxx/xxxx/phpBB2/admin/admin_quiz.php on line 400


AFAIK my IPV6 configuration is fine, and I'd rather not mess with it. We do plan on upgrading to PHP5 in the future, probably over the summer, but not right now.
User avatar
Bernie
Greenhorn
Greenhorn
 
Posts: 3
Joined: Tue Dec 12, 2006 5:34 am
Location: Silver Spring, MD

Postby battye » Wed Dec 13, 2006 11:09 am

Hi, I think this error is simply because your PHP configuration doesn't allow the use of file, file_get_contents, or any other function that allows PHP to access files.

The good news is, that it doesn't affect the way the MOD runs overall, it just means you:

  1. Won't be able to the see the "latest version" line in the ACP.
  2. Won't be able to install quiz packs


The first point is not a major problem, and the second one is only a problem if you planned to use quiz packs (I think there are only a dozen or so floating around anyway).

Welcome to the forum, hope to see you around OT Forum :)
CricketMX.com.. home of bat's, rat's and other farmyard animals...
My articles: view all articles by battye

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
User avatar
battye
Site Admin
Site Admin
 
Posts: 14264
Joined: Sun Jan 11, 2004 8:26 am
Location: Victoria Falls, Zimbabwe

Postby Bernie » Wed Dec 13, 2006 5:06 pm

battye wrote:Hi, I think this error is simply because your PHP configuration doesn't allow the use of file, file_get_contents, or any other function that allows PHP to access files.

The good news is, that it doesn't affect the way the MOD runs overall, it just means you:

  1. Won't be able to the see the "latest version" line in the ACP.
  2. Won't be able to install quiz packs

The first point is not a major problem, and the second one is only a problem if you planned to use quiz packs (I think there are only a dozen or so floating around anyway).

Welcome to the forum, hope to see you around OT Forum :)


Greetings,

I disagree. I've never had a problem like this before and my system does indeed allow file access using the file_get_contents function of PHP.

Many areas of our system, most notably our reference library, use that function, and are working perfectly.

Thanks for the reply though, and again, thanks for creating this interesting Mod.
User avatar
Bernie
Greenhorn
Greenhorn
 
Posts: 3
Joined: Tue Dec 12, 2006 5:34 am
Location: Silver Spring, MD

Postby battye » Thu Dec 14, 2006 4:30 am

If you make a file (test.php):

Code: Select all
<?php
echo file_get_contents(http://spwaw.com/phpBB2/admin/quiz_packs/QP_UQM_Trivia.qp);
?>


And run it, does it work?
CricketMX.com.. home of bat's, rat's and other farmyard animals...
My articles: view all articles by battye

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
User avatar
battye
Site Admin
Site Admin
 
Posts: 14264
Joined: Sun Jan 11, 2004 8:26 am
Location: Victoria Falls, Zimbabwe

Postby Bernie » Thu Dec 14, 2006 4:43 pm

battye wrote:If you make a file (test.php):

Code: Select all
<?php
echo file_get_contents(http://spwaw.com/phpBB2/admin/quiz_packs/QP_UQM_Trivia.qp);
?>


And run it, does it work?


Hmmm...

It was working, but now it's not, and I see that the areas which use that function in other parts of the system are also not working correctly.

I'll have to look into this!

Thanks. :)
User avatar
Bernie
Greenhorn
Greenhorn
 
Posts: 3
Joined: Tue Dec 12, 2006 5:34 am
Location: Silver Spring, MD


Return to Web Design

Who is online

Users browsing this forum: No registered users and 1 guest

cron