Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Elo,
po zainstalowaniu serwera apache2 z php4, skompilowalem i zainstalowalem php5, nastepnie wyedytowalem http.conf dodajac linijki:
AddType application/x-httpd-php5 .php5 ScriptAlias /php/ "/usr/local/php5/bin/" Action application/x-httpd-php5 "/php/php"
oraz wyedytowalem linijki DirectoryIndex.
Jednak gdy opalam skryp .php5, nie uruchamia sie, a w logu pojawia sie wpis:
[Fri Mar 16 20:49:00 2007] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/php5/bin/php, referer: http://box/~tomek/
Co to moze oznaczac?
C.
Offline
Spróbuj dodać dyrektywę
Allow from 127.0.0.1[/quote]
[url=http://www.debian.org/][img]http://www.debian.org/logos/openlogo-nd-50.png[/img][/url]
Offline
Nie pomoglo. Zalaczam moj httpd.conf:
ServerRoot "/usr/local/apache2" Listen 127.0.0.1:80 listen 127.0.0.1:443 <IfModule !mpm_netware_module> User daemon Group daemon </IfModule> Servername 127.0.0.1 ServerAdmin you@example.com DocumentRoot "/home" <Directory /> Options FollowSymLinks AllowOverride FileInfo Allow from all </Directory> # katalogi uzytkownikow UserDir www <Directory /home/*/www> Options Indexes FollowSymLinks AllowOverride FileInfo Order allow,deny Allow from all </Directory> # mod_rewrite support <IfModule mod_rewrite.c> RewriteEngine on RewriteLog "/usr/local/apache2/logs/rewrite.log" RewriteLogLevel 9 </IfModule> <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory> <Directory "/usr/local/apache2/htdocs"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <IfModule dir_module> DirectoryIndex index.html index.xhtml index.php index.php4 index.php5 index.cgi index.pl </IfModule> AddDefaultCharset ISO-8859-2 <FilesMatch "^.ht"> Order allow,deny Deny from all Satisfy All </FilesMatch> ErrorLog logs/error_log LogLevel warn <IfModule log_config_module> LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined LogFormat "%h %l %u %t "%r" %>s %b" common <IfModule logio_module> # You need to enable mod_logio.c to use %I and %O LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %I %O" combinedio </IfModule> CustomLog logs/access_log common </IfModule> <IfModule alias_module> </IfModule> <IfModule cgid_module> </IfModule> <Directory "/usr/local/apache2/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> DefaultType text/plain <IfModule mime_module> TypesConfig conf/mime.types AddType application/x-compress .Z AddType application/x-gzip .gz .tgz </IfModule> <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule> NameVirtualHost 127.0.0.1:80 NameVirtualHost 127.0.0.1:443 # sekcja virtualhost - przykladowy nowy Vhost bez obslugi SSl <VirtualHost 127.0.0.1:80> ServerAdmin admin@space DocumentRoot /usr/local/apache2 ServerName box ErrorLog logs/localhost-error-log CustomLog logs/localhost-access_log common </VirtualHost> # przykladowy nowy Vhost z obsluga SSl <VirtualHost 127.0.0.1:443> DocumentRoot /usr/local/apache2 ServerName 127.0.0.1:443 ServerAdmin root@space ErrorLog logs/localhost-error-log CustomLog logs/localhost-access_log common SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL SSLcertificateFile /usr/local/apache2/conf/ssl.crt/server.crt SSLcertificateKeyFile /usr/local/apache2/conf/ssl.key/server.key SetEnvIf User-Agent "." "MSIE." nokeepalive ssl-unclean-shutdown downgrade-1.0 force-respone-1.0 </VirtualHost> # Ladowanie modulu php i obsluga parsowania ver4 LoadModule php4_module modules/libphp4.so AddType application/x-httpd-php .php AddType application/x-httpd-php .php4 # Ladowanie modulu php i obsluga parsowania ver5 AddType application/x-httpd-php5 .php5 ScriptAlias /php/ "/usr/local/php5/bin/" Action application/x-httpd-php5 "/php/php" # Obsluga skryptow cgi AddHandler cgi-script .cgi .pl <Directory /home/*/www/cgi-bin"> Options +ExecCGI </Directory>
C.
Offline
No przydałoby się jeszcze coś takiego:
<Directory "/usr/local/php5/bin/"> AllowOverride None Options None Order allow,deny Allow from all </Directory>
:)
Offline
Dodalem te linijki, i faktycznie cos sie ruszylo, niestety teraz jak odpalam skrypt testowy - to przegladarka pyta czy chce go zapisac na dysk.
Log:
[Fri Mar 16 23:39:04 2007] [error] [client 127.0.0.1] Premature end of script headers: php, referer: http://box/~tomek/
C.
Offline
Problem tkwil w zlej konfiguracji php, prawdopodobnie musialem pominac jakas opcje przy ./configure, ale zrekompilowalem php5 i zadzialalo.
Dzienx za wszelka pomoc,
pzdr C.
Offline
Time (s) | Query |
---|---|
0.00011 | SET CHARSET latin2 |
0.00005 | SET NAMES latin2 |
0.00106 | SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='3.145.110.99' WHERE u.id=1 |
0.00082 | UPDATE punbb_online SET logged=1732305256 WHERE ident='3.145.110.99' |
0.00046 | SELECT * FROM punbb_online WHERE logged<1732304956 |
0.00105 | DELETE FROM punbb_online WHERE ident='18.191.237.228' |
0.00080 | DELETE FROM punbb_online WHERE ident='85.208.96.195' |
0.00075 | SELECT topic_id FROM punbb_posts WHERE id=55169 |
0.00007 | SELECT id FROM punbb_posts WHERE topic_id=7232 ORDER BY posted |
0.00059 | SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=7232 AND t.moved_to IS NULL |
0.00008 | SELECT search_for, replace_with FROM punbb_censoring |
0.00134 | SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=7232 ORDER BY p.id LIMIT 0,25 |
0.00085 | UPDATE punbb_topics SET num_views=num_views+1 WHERE id=7232 |
Total query time: 0.00803 s |