error message

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mister
Forum Newbie
Posts: 7
Joined: Sat Jan 06, 2007 11:38 am

error message

Post by mister »

im making a website, and i download the files in my server and see my website from the web browser every thing was ok, then after few days of holiday i have returned to work and when i transferred a new pages and try to see them in the web browser i always get this error message just for the new php files that old page is still working and the error message is as follow


Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0

Warning: Unknown: Failed opening '/var/www/localhost/cache/blockwordtable.php' for inclusion (include_path='.:/usr/share/php5:/usr/share/php') in Unknown on line 0


so any body have an idea about this
User avatar
jyhm
Forum Contributor
Posts: 228
Joined: Tue Dec 19, 2006 10:08 pm
Location: Connecticut, USA
Contact:

Post by jyhm »

Maybe if we saw the code for blockwordtable.php, maybe the error is in there possibly.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

mister wrote:in Unknown on line 0
sounds like a auto_prepend_file pointing to a non-existing file
check the parameter via

Code: Select all

<?php phpinfo(); ?>
mister
Forum Newbie
Posts: 7
Joined: Sat Jan 06, 2007 11:38 am

Post by mister »

no there are no errors in the code because when i tried to make the action when i click a button not go to the new file (blockwordtable.php) but go to one of the worked pages the same error appear????
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Did you check auto_prepend_file?
mister
Forum Newbie
Posts: 7
Joined: Sat Jan 06, 2007 11:38 am

Post by mister »

what is auto_prepend_file?
Last edited by mister on Sun Jan 07, 2007 11:03 am, edited 2 times in total.
mister
Forum Newbie
Posts: 7
Joined: Sat Jan 06, 2007 11:38 am

Post by mister »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Here is the code of the blockwordtable.php

Code: Select all

<?
include ("main.php")
?>



<?php

$con = mysql_connect("localhost","root","26489447");
mysql_select_db("cache",$con); //as use 'database'


$result = mysql_query("SELECT * FROM words;");

print "
<html>
<body>
<div class=\"centre\">
";

echo "<table border='1'>

<tr>

<th>Word or Statement</th>

</tr>";


while($row = mysql_fetch_array($result))

  {
$name=$row[word];
  echo "<tr>";

  echo "<td>" .  $row['word'] . "</td>";
  
  echo "<td>" . "<form method=\"POST\" action=\"blockwordrem.php?row=$name\"><td style=\"text-align:center\"><strong><input type=\"Submit\" name=\"DelAdmin\" Value=\"Delete\"></td></form>"  . "</td>";

 echo "</tr>";
  }

echo "</table>";

print "


</div>
<div id=\"menu\">
	 <li>Copy right reserved.</li>
</div>

</body>
</html>
";


?>

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

mister wrote:what is auto_prepend_file?
volka wrote:
mister wrote:in Unknown on line 0
sounds like a auto_prepend_file pointing to a non-existing file
check the parameter via

Code: Select all

<?php phpinfo(); ?>
The blue auto_prepend_file is a link to the manual entry describing the php config parameter.
At least "non-existing file" is wrong
Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
it seems to be existing but the php process is not allowed to access the file. Do you know how to change file permissions on your server?
In case of doubt try

Code: Select all

chmod ugo+r /var/www/localhost/cache/blockwordtable.php
this allows every process to read the file's content.
mister
Forum Newbie
Posts: 7
Joined: Sat Jan 06, 2007 11:38 am

Post by mister »

Thank you very much gays... my website working well now.
But im ofcourse understand the command but why some of the pages that i have created didnt need this change mode and the new one need i cant understand why this happen ???

And do you have any ideas about how i can fetch the data inside any table from the database and put it in a file on the desktop for example?!
Post Reply