Post
#1
|
|
|
Grupa: Zarejestrowani Postów: 12 Pomógł: 0 Dołączył: 13.12.2007 Ostrzeżenie: (0%)
|
Witam!
Mam problem ze skryptem newsów "PsNews". Otóż instalowałem go na serwerach boo.pl i innych i nie było problemu. Tym razem chce postawić stronę na darmowym serwerze. Wszystko ok, ale mam problem z błędami w kodzie. Może mi ktoś powiedzieć, czy to rzeczywiście błąd w kodzie, czy wina serwera? Serwery, których używam 000webhost.com i lua.pl Kod <b>Warning</b>: fopen(news.txt) [<a href="http://nistelrooy.000webhost.com/news/function.fopen">function.fopen</a>]: failed to open stream: Permission denied in <b>/home/a3296681/public_html/news/admin.php</b> on line <b>99</b> <table align="center" bgcolor="#ffffdf" border="1" bordercolor="#e8b900" cellpadding="2"> <tbody><tr><td><div align="center"><a href="http://www.000webhost.com/"><font color="#000000" face="Arial" size="1">Free Web Hosting</font></a></div></td></tr></tbody> </table> <table align="center" bgcolor="#ffffdf" border="1" bordercolor="#e8b900" cellpadding="2"> <tbody><tr><td><font color="#000000" face="Arial" size="1"><b>PHP Error Message</b></font></td></tr></tbody> </table> <b>Warning</b>: flock() expects parameter 1 to be resource, boolean given in <b>/home/a3296681/public_html/news/admin.php</b> on line <b>100</b> <table align="center" bgcolor="#ffffdf" border="1" bordercolor="#e8b900" cellpadding="2"> <tbody><tr><td><div align="center"><a href="http://www.000webhost.com/"><font color="#000000" face="Arial" size="1">Free Web Hosting</font></a></div></td></tr></tbody> </table> <table align="center" bgcolor="#ffffdf" border="1" bordercolor="#e8b900" cellpadding="2"> <tbody><tr><td><font color="#000000" face="Arial" size="1"><b>PHP Error Message</b></font></td></tr></tbody> </table> <b>Warning</b>: fputs(): supplied argument is not a valid stream resource in <b>/home/a3296681/public_html/news/admin.php</b> on line <b>101</b> <table align="center" bgcolor="#ffffdf" border="1" bordercolor="#e8b900" cellpadding="2"> <tbody><tr><td><div align="center"><a href="http://www.000webhost.com/"><font color="#000000" face="Arial" size="1">Free Web Hosting</font></a></div></td></tr></tbody> </table> <table align="center" bgcolor="#ffffdf" border="1" bordercolor="#e8b900" cellpadding="2"> <tbody><tr><td><font color="#000000" face="Arial" size="1"><b>PHP Error Message</b></font></td></tr></tbody> </table> <b>Warning</b>: flock() expects parameter 1 to be resource, boolean given in <b>/home/a3296681/public_html/news/admin.php</b> on line <b>102</b> <table align="center" bgcolor="#ffffdf" border="1" bordercolor="#e8b900" cellpadding="2"> <tbody><tr><td><div align="center"><a href="http://www.000webhost.com/"><font color="#000000" face="Arial" size="1">Free Web Hosting</font></a></div></td></tr></tbody> </table> <table align="center" bgcolor="#ffffdf" border="1" bordercolor="#e8b900" cellpadding="2"> <tbody><tr><td><font color="#000000" face="Arial" size="1"><b>PHP Error Message</b></font></td></tr></tbody> </table> <b>Warning</b>: fclose(): supplied argument is not a valid stream resource in <b>/home/a3296681/public_html/news/admin.php</b> on line <b>103</b> <table align="center" bgcolor="#ffffdf" border="1" bordercolor="#e8b900" cellpadding="2"> <tbody><tr><td><div align="center"><a href="http://www.000webhost.com/"><font color="#000000" face="Arial" size="1">Free Web Hosting</font></a></div></td></tr></tbody> </table> <table align="center" bgcolor="#ffffdf" border="1" bordercolor="#e8b900" cellpadding="2"> <tbody><tr><td><font color="#000000" face="Arial" size="1"><b>PHP Error Message</b></font></td></tr></tbody> </table> <b>Warning</b>: fopen(komentarze/2) [<a href="http://nistelrooy.000webhost.com/news/function.fopen">function.fopen</a>]: failed to open stream: Permission denied in <b>/home/a3296681/public_html/news/admin.php</b> on line <b>105</b> <table align="center" bgcolor="#ffffdf" border="1" bordercolor="#e8b900" cellpadding="2"> <tbody><tr><td><div align="center"><a href="http://www.000webhost.com/"><font color="#000000" face="Arial" size="1">Free Web Hosting</font></a></div></td></tr></tbody> </table> <table align="center" bgcolor="#ffffdf" border="1" bordercolor="#e8b900" cellpadding="2"> <tbody><tr><td> </td></tr></tbody> </table> <b>Warning</b>: fclose(): supplied argument is not a valid stream resource in <b>/home/a3296681/public_html/news/admin.php</b> on line <b>107</b> Błąd pojawia się przy próbie dodania newsa. Kod lini newsa: 100 - 107 Kod flock($file, 2);
fputs($file, $puts); flock($file, 3); fclose($file); $file = fopen("komentarze/$liczba", "w"); fputs($file, ""); fclose($file); |
|
|
|
![]() |
Post
#2
|
|
|
Grupa: Zarejestrowani Postów: 12 Pomógł: 0 Dołączył: 13.12.2007 Ostrzeżenie: (0%)
|
Ok , pomogło, ale zostały jeszcze dwa błędy:
Kod [b]Warning[/b]: fopen(komentarze/2) [[url="http://nistelrooy.000webhost.com/news/function.fopen"]function.fopen[/url]]: failed to open stream: Permission denied in [b]/home/a3296681/public_html/news/admin.php[/b] on line [b]105[/b] [center][url="http://www.000webhost.com/"][font="Arial"][size="1"][color="#000000"]Free Web Hosting[/color][/size][/font][/url][/center] [font="Arial"][size="1"][color="#000000"][b]PHP Error Message[/b][/color][/size][/font] [b]Warning[/b]: fclose(): supplied argument is not a valid stream resource in [b]/home/a3296681/public_html/news/admin.php[/b] on line [b]107 Dodam, że gdy ustawie chmody tak jak w readme, to wsykakują błędy. Ten post edytował eMichu 5.03.2008, 20:25:48 |
|
|
|
eMichu PsNews - problem. 5.03.2008, 20:02:15
Xniver CHMOD 777 na pliku news.txt 5.03.2008, 20:05:37
l0ud Musisz nadać chmod 777 na katalog komentarze oraz ... 5.03.2008, 21:40:58 ![]() ![]() |
|
Aktualny czas: 27.12.2025 - 18:35 |