* [Comm] PHP и Apache2
@ 2007-11-10 17:59 Владимир Леонидов
2007-11-10 22:30 ` Di
2007-11-12 6:23 ` Алексей Шенцев
0 siblings, 2 replies; 9+ messages in thread
From: Владимир Леонидов @ 2007-11-10 17:59 UTC (permalink / raw)
To: ALT Linux Community general discussions
Не работает php в apache. Установлен apache2+mod_php5 к нему.
Вместо того, чтобы отображать правильную страницу, он выводит исходный
код. Права для файлов расставил.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Comm] PHP и Apache2
2007-11-10 17:59 [Comm] PHP и Apache2 Владимир Леонидов
@ 2007-11-10 22:30 ` Di
2007-11-10 22:49 ` Владимир Леонидов
2007-11-12 6:23 ` Алексей Шенцев
1 sibling, 1 reply; 9+ messages in thread
From: Di @ 2007-11-10 22:30 UTC (permalink / raw)
To: ALT Linux Community general discussions
[-- Attachment #1: Type: text/plain, Size: 91 bytes --]
1) 1.php
<? echo("Hello!"); ?>
2) 2.php
<?php echo("Hello!); ?>
Кто из них _не_ работает?
[-- Attachment #2: denyago.vcf --]
[-- Type: text/x-vcard, Size: 364 bytes --]
begin:vcard
fn:Denis Timurovich Yagofarov
n:Yagofarov;Denis Timurovich
org:ITGIS NASU
adr:room 615;;Chokolovski sqr., 13;Kiev;;03151;Ukraine
email;internet:denyago@rambler.ru
title:system administrator
tel;work:80442480755
tel;pager:diyago@jabber.te.ua
tel;home:80442434512
tel;cell:80662933760
note:diyago@jabber.te.ua
x-mozilla-html:FALSE
version:2.1
end:vcard
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Comm] PHP и Apache2
2007-11-10 22:30 ` Di
@ 2007-11-10 22:49 ` Владимир Леонидов
2007-11-10 22:58 ` Di
0 siblings, 1 reply; 9+ messages in thread
From: Владимир Леонидов @ 2007-11-10 22:49 UTC (permalink / raw)
To: ALT Linux Community general discussions
11.11.07, Di<denyago@rambler.ru> написал(а):
> 1) 1.php
> <? echo("Hello!"); ?>
> 2) 2.php
> <?php echo("Hello!); ?>
>
> Кто из них _не_ работает?
В обоих случаях выводит чистый лист
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Comm] PHP и Apache2
2007-11-10 22:49 ` Владимир Леонидов
@ 2007-11-10 22:58 ` Di
2007-11-11 3:00 ` Владимир Леонидов
0 siblings, 1 reply; 9+ messages in thread
From: Di @ 2007-11-10 22:58 UTC (permalink / raw)
To: ALT Linux Community general discussions
[-- Attachment #1: Type: text/plain, Size: 300 bytes --]
Владимир Леонидов пишет:
> 11.11.07, Di<denyago@rambler.ru> написал(а):
>
>> 1) 1.php
>> <? echo("Hello!"); ?>
>> 2) 2.php
>> <?php echo("Hello!"); ?>
>>
^^^^^ - тут пропущена кавычка
А что говорится в логах?
tail /var/log/httpd2/error_log - к примеру...
[-- Attachment #2: denyago.vcf --]
[-- Type: text/x-vcard, Size: 364 bytes --]
begin:vcard
fn:Denis Timurovich Yagofarov
n:Yagofarov;Denis Timurovich
org:ITGIS NASU
adr:room 615;;Chokolovski sqr., 13;Kiev;;03151;Ukraine
email;internet:denyago@rambler.ru
title:system administrator
tel;work:80442480755
tel;pager:diyago@jabber.te.ua
tel;home:80442434512
tel;cell:80662933760
note:diyago@jabber.te.ua
x-mozilla-html:FALSE
version:2.1
end:vcard
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Comm] PHP и Apache2
2007-11-10 22:58 ` Di
@ 2007-11-11 3:00 ` Владимир Леонидов
2007-11-11 13:28 ` Di
0 siblings, 1 reply; 9+ messages in thread
From: Владимир Леонидов @ 2007-11-11 3:00 UTC (permalink / raw)
To: ALT Linux Community general discussions
11.11.07, Di<denyago@rambler.ru> написал(а):
> >> 1) 1.php
> >> <? echo("Hello!"); ?>
> >> 2) 2.php
> >> <?php echo("Hello!"); ?>
Точно, не заметил :) ^^^^^ - тут
пропущена кавычка
Тогда 2-й работает, а 1-й нет
> А что говорится в логах?
> tail /var/log/httpd2/error_log - к примеру...
[Sun Nov 11 05:55:08 2007] [error] [client 127.0.0.1] PHP Notice:
Undefined variable: gzipuse in /var/www/apache2/html/index.php on line
5
[Sun Nov 11 05:55:37 2007] [error] [client 127.0.0.1] PHP Notice:
Undefined variable: gzipuse in /var/www/apache2/html/index.php on line
5
[Sun Nov 11 05:55:37 2007] [error] [client 127.0.0.1] PHP Warning:
session_start(): Cannot send session cookie - headers already sent by
(output started at /var/www/apache2/html/functions.php:40) in
/var/www/apache2/html/index.php on line 10
[Sun Nov 11 05:55:37 2007] [error] [client 127.0.0.1] PHP Warning:
session_start(): Cannot send session cache limiter - headers already
sent (output started at /var/www/apache2/html/functions.php:40) in
/var/www/apache2/html/index.php on line 10
[Sun Nov 11 05:55:37 2007] [error] [client 127.0.0.1] PHP Fatal error:
Call to undefined function ip() in /var/www/apache2/html/index.php on
line 16
[Sun Nov 11 05:55:37 2007] [error] [client 127.0.0.1] File does not
exist: /var/www/apache2/html/\\"$q[1]\\", referer: http://localhost/
[Sun Nov 11 05:55:37 2007] [error] [client 127.0.0.1] File does not
exist: /var/www/apache2/html/.$ee[1]., referer: http://localhost/
[Sun Nov 11 05:55:37 2007] [error] [client 127.0.0.1] File does not
exist: /var/www/apache2/html/\\"$zamena\\", referer: http://localhost/
[Sun Nov 11 05:55:37 2007] [error] [client 127.0.0.1] File does not
exist: /var/www/apache2/html/$logo, referer: http://localhost/
[Sun Nov 11 05:55:37 2007] [error] [client 127.0.0.1] File does not
exist: /var/www/apache2/html/templates/$templ_name, referer:
http://localhost/
Короче говоря, он не хочет воспринимать переменные должным образом.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Comm] PHP и Apache2
2007-11-11 3:00 ` Владимир Леонидов
@ 2007-11-11 13:28 ` Di
0 siblings, 0 replies; 9+ messages in thread
From: Di @ 2007-11-11 13:28 UTC (permalink / raw)
To: ALT Linux Community general discussions
[-- Attachment #1: Type: text/plain, Size: 2451 bytes --]
Это уже для протокола =)
> 2) 2.php
> <?php echo("Hello!"); ?>
>
Владимир Леонидов пишет:
> Тогда 2-й работает, а 1-й нет
>
Причина:
; Allow the <? tag. Otherwise, only <?php and <script> tags are recognized.
; NOTE: Using short tags should be avoided when developing applications or
; libraries that are meant for redistribution, or deployment on PHP
; servers which are not under your control, because short tags may not
; be supported on the target server. For portable, redistributable code,
; be sure not to use short tags.
short_open_tag = Off
так что правильнее писать <?php ... ?>
>
>> А что говорится в логах?
>> tail /var/log/httpd2/error_log - к примеру...
>>
>
> [Sun Nov 11 05:55:08 2007] [error] [client 127.0.0.1] PHP Notice:
> Undefined variable: gzipuse in /var/www/apache2/html/index.php on line
> 5
> [Sun Nov 11 05:55:37 2007] [error] [client 127.0.0.1] PHP Notice:
> Undefined variable: gzipuse in /var/www/apache2/html/index.php on line
> 5
> [Sun Nov 11 05:55:37 2007] [error] [client 127.0.0.1] PHP Warning:
> session_start(): Cannot send session cookie - headers already sent by
> (output started at /var/www/apache2/html/functions.php:40) in
> /var/www/apache2/html/index.php on line 10
> [Sun Nov 11 05:55:37 2007] [error] [client 127.0.0.1] PHP Warning:
> session_start(): Cannot send session cache limiter - headers already
> sent (output started at /var/www/apache2/html/functions.php:40) in
> /var/www/apache2/html/index.php on line 10
> [Sun Nov 11 05:55:37 2007] [error] [client 127.0.0.1] PHP Fatal error:
> Call to undefined function ip() in /var/www/apache2/html/index.php on
> line 16
> [Sun Nov 11 05:55:37 2007] [error] [client 127.0.0.1] File does not
> exist: /var/www/apache2/html/\\"$q[1]\\", referer: http://localhost/
> [Sun Nov 11 05:55:37 2007] [error] [client 127.0.0.1] File does not
> exist: /var/www/apache2/html/.$ee[1]., referer: http://localhost/
> [Sun Nov 11 05:55:37 2007] [error] [client 127.0.0.1] File does not
> exist: /var/www/apache2/html/\\"$zamena\\", referer: http://localhost/
> [Sun Nov 11 05:55:37 2007] [error] [client 127.0.0.1] File does not
> exist: /var/www/apache2/html/$logo, referer: http://localhost/
> [Sun Nov 11 05:55:37 2007] [error] [client 127.0.0.1] File does not
> exist: /var/www/apache2/html/templates/$templ_name, referer:
> http://localhost/
>
> Короче говоря, он не хочет воспринимать переменные должным образом
до этого я ещё не добрался =/
[-- Attachment #2: denyago.vcf --]
[-- Type: text/x-vcard, Size: 364 bytes --]
begin:vcard
fn:Denis Timurovich Yagofarov
n:Yagofarov;Denis Timurovich
org:ITGIS NASU
adr:room 615;;Chokolovski sqr., 13;Kiev;;03151;Ukraine
email;internet:denyago@rambler.ru
title:system administrator
tel;work:80442480755
tel;pager:diyago@jabber.te.ua
tel;home:80442434512
tel;cell:80662933760
note:diyago@jabber.te.ua
x-mozilla-html:FALSE
version:2.1
end:vcard
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Comm] PHP и Apache2
2007-11-10 17:59 [Comm] PHP и Apache2 Владимир Леонидов
2007-11-10 22:30 ` Di
@ 2007-11-12 6:23 ` Алексей Шенцев
2007-11-12 7:48 ` Владимир Леонидов
1 sibling, 1 reply; 9+ messages in thread
From: Алексей Шенцев @ 2007-11-12 6:23 UTC (permalink / raw)
To: ALT Linux Community general discussions
В сообщении от Saturday 10 November 2007 20:59:52 Владимир Леонидов
написал(а):
> Не работает php в apache. Установлен apache2+mod_php5 к нему.
>
> Вместо того, чтобы отображать правильную страницу, он выводит исходный
> код. Права для файлов расставил.
Покажите вывод control | grep php
--
С уважением Шенцев Алексей Владимирович.
E-mail: ashen@nsrz.ru
XMPP: ashen@altlinux.org, AlexShen@jabber.ru
ICQ: 271053845
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Comm] PHP и Apache2
2007-11-12 6:23 ` Алексей Шенцев
@ 2007-11-12 7:48 ` Владимир Леонидов
2007-11-12 7:56 ` Алексей Шенцев
0 siblings, 1 reply; 9+ messages in thread
From: Владимир Леонидов @ 2007-11-12 7:48 UTC (permalink / raw)
To: ALT Linux Community general discussions
> Покажите вывод control | grep php
apache2-mod_php5 restricted (restricted relaxed public )
find: /usr/bin/dvdrecord: Нет такого файла или каталога
php5-cgi restricted (restricted relaxed public )
php5-cli unknown (restricted relaxed public )
php-cli unknown (restricted relaxed public )
find: /usr/bin/readcd: Нет такого файла или каталога
find: /usr/sbin/rscsi: Нет такого файла или каталога
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Comm] PHP и Apache2
2007-11-12 7:48 ` Владимир Леонидов
@ 2007-11-12 7:56 ` Алексей Шенцев
0 siblings, 0 replies; 9+ messages in thread
From: Алексей Шенцев @ 2007-11-12 7:56 UTC (permalink / raw)
To: ALT Linux Community general discussions
В сообщении от Monday 12 November 2007 10:48:05 Владимир Леонидов написал(а):
> > Покажите вывод control | grep php
>
> apache2-mod_php5 restricted (restricted relaxed public )
> find: /usr/bin/dvdrecord: Нет такого файла или каталога
> php5-cgi restricted (restricted relaxed public )
> php5-cli unknown (restricted relaxed public )
> php-cli unknown (restricted relaxed public )
> find: /usr/bin/readcd: Нет такого файла или каталога
> find: /usr/sbin/rscsi: Нет такого файла или каталога
Выполните:
control apache2-mod_php5 public
control php5-cgi public
control php5-cli public
и посмотрите, что у вас получится. Надеюсь поможет.
А от куда у вас php-cli? Вы же используете php5, а это от php4 (если не
соврал) ...
--
С уважением Шенцев Алексей Владимирович.
E-mail: ashen@nsrz.ru
XMPP: ashen@altlinux.org, AlexShen@jabber.ru
ICQ: 271053845
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-11-12 7:56 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-10 17:59 [Comm] PHP и Apache2 Владимир Леонидов
2007-11-10 22:30 ` Di
2007-11-10 22:49 ` Владимир Леонидов
2007-11-10 22:58 ` Di
2007-11-11 3:00 ` Владимир Леонидов
2007-11-11 13:28 ` Di
2007-11-12 6:23 ` Алексей Шенцев
2007-11-12 7:48 ` Владимир Леонидов
2007-11-12 7:56 ` Алексей Шенцев
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git