Freesco, NND, CDN, EOS
http://forum.freesco.pl/

Apache i PHP
http://forum.freesco.pl/viewtopic.php?f=24&t=6987
Strona 1 z 1

Autor:  desperado [ piątek, 4 marca 2005, 12:56 ]
Tytuł:  Apache i PHP

Mam problem z konfiguracją PHP. Apache działa ale PHP nie wykonuje skryptów i wywala coś takiego:
: [/] [] ()
Warning: fopen(sonda.txt): failed to open stream: Permission denied in /home/httpd/html/dopisz.php on line 3

Warning: fgets(): supplied argument is not a valid stream resource in /home/httpd/html/dopisz.php on line 4

Warning: fseek(): supplied argument is not a valid stream resource in /home/httpd/html/dopisz.php on line 10

Warning: fwrite(): supplied argument is not a valid stream resource in /home/httpd/html/dopisz.php on line 11

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/html/dopisz.php:3) in /home/httpd/html/dopisz.php on line 13

Szukałem na forum i w googlownicy i jedyne co znalałem to, że trzeba zmienić prawa dostepu do plików. Pozmieniałem wszyskie pliki i katalog apacha na 777 i dalej to samo. Podejrzewam, że trzeba coś zmienić w php.ini. Tylko co?

Autor:  desperado [ piątek, 4 marca 2005, 14:52 ]
Tytuł: 

Dodam, że mam serwer ftp i dodanego użytkownika z katalogiem domowym takim jak apache. Znalazłem coś takiego:
Cytuj:
Your code produces an error like: "Warning: fopen(<some filename>) [function.fopen]: failed to create stream: Permission denied in <your script> on line <line number>"

In general, the user who is running this script does not have permission to the file. A web server will run as a specific user, and so any scripts that run through a web server will also run as if invoked by the server's user.

You can fix this by using the permission modification functions of your operating system to give the appropriate user permission to the file.

Jak w NND nadać te prawa użytkownikowi?

Autor:  Anonymous [ piątek, 4 marca 2005, 15:46 ]
Tytuł: 

a używałeś tylko komendy
: [/] [] ()
chmod 777

czy też może zmieniałeś
: [/] [] ()
chown -R nobody.nobody  /katalog_z_plikami_strony


??

komenda chown zmienia właściciela pliku i może tutaj właśnie tkwi problem bo musi być on nobody z grupy nobody czyli włąśnie tka jak janpisałem wyżej

Autor:  desperado [ piątek, 4 marca 2005, 16:05 ]
Tytuł: 

dzięki widget, działa. Nie domyśliłem się, że nobody musi mieć prawa.

Autor:  Anonymous [ piątek, 4 marca 2005, 19:23 ]
Tytuł: 

spox :)

Strona 1 z 1 Strefa czasowa UTC+2godz.
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/