i***@mail.ru
2003-09-10 13:57:41 UTC
Hi everyone,
I am trying to got PHP working as CGI with Apache web-server with
following features:
1) There are NO "#!/usr/local/bin/php"-headers (or like this) in the
scripts.
2) Executable Php-binary is located out of www-tree of apache server.
I've set in httpd.conf:
AddType application/x-httpd-php .php
AddHandler application/x-httpd-php .php
Action application/x-httpd-php /usr/local/bin/php
Options [...] ExecCGI # for all /www directory
and chmod 755 test.php
And I got in my browser:
"Not Found
The requested URL /usr/local/bin/php/usr/local/bin/php/test.php was
not found on this server."
If I comment:
# AddType application/x-httpd-php .php
AddHandler application/x-httpd-php .php
or:
AddType application/x-httpd-php .php
# AddHandler application/x-httpd-php .php
then I got:
"The requested URL /usr/local/bin/php/test.php was not found on this
server."
----
Version of PHP is 4.3.3. It compiled with options:
'./configure' '--enable-force-cgi-redirect' '--enable-discard-path'
'--enable-memory-limit' '--with-config-file-path=/usr/local/etc'
'--with-mysql' '--enable-calendar' '--enable-bcmath'
'--with-ming=/usr/lib'
and working cli mode fine.
I am trying to got PHP working as CGI with Apache web-server with
following features:
1) There are NO "#!/usr/local/bin/php"-headers (or like this) in the
scripts.
2) Executable Php-binary is located out of www-tree of apache server.
I've set in httpd.conf:
AddType application/x-httpd-php .php
AddHandler application/x-httpd-php .php
Action application/x-httpd-php /usr/local/bin/php
Options [...] ExecCGI # for all /www directory
and chmod 755 test.php
And I got in my browser:
"Not Found
The requested URL /usr/local/bin/php/usr/local/bin/php/test.php was
not found on this server."
If I comment:
# AddType application/x-httpd-php .php
AddHandler application/x-httpd-php .php
or:
AddType application/x-httpd-php .php
# AddHandler application/x-httpd-php .php
then I got:
"The requested URL /usr/local/bin/php/test.php was not found on this
server."
----
Version of PHP is 4.3.3. It compiled with options:
'./configure' '--enable-force-cgi-redirect' '--enable-discard-path'
'--enable-memory-limit' '--with-config-file-path=/usr/local/etc'
'--with-mysql' '--enable-calendar' '--enable-bcmath'
'--with-ming=/usr/lib'
and working cli mode fine.