Page 1 of 1
error message
Posted: Sat Jan 06, 2007 11:47 am
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
Posted: Sat Jan 06, 2007 1:56 pm
by jyhm
Maybe if we saw the code for blockwordtable.php, maybe the error is in there possibly.
Posted: Sat Jan 06, 2007 3:27 pm
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
Posted: Sun Jan 07, 2007 5:05 am
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????
Posted: Sun Jan 07, 2007 5:43 am
by volka
Did you check auto_prepend_file?
Posted: Sun Jan 07, 2007 11:00 am
by mister
what is auto_prepend_file?
Posted: Sun Jan 07, 2007 11:00 am
by mister
feyd | Please use 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
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]
Posted: Sun Jan 07, 2007 2:37 pm
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
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.
Posted: Mon Jan 08, 2007 1:10 pm
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?!