Re: [PHP-DEV] doc_root problem From: Patrick Aland (paland <email protected>)
Date: 09/15/00

Ok here we go
Apache 1.3.12
RedHat 6.2
PHP 4.0.2
Postgres 7.0.2

Apache compiled with:
./configure --prefix=/usr/local/apache/httpd --enable-module=so --enable-module=info; make; make install
PHP Configured with:
Configured with:
./configure --with-apxs=/usr/local/apache/httpd/bin/apxs --with-pgsql --enable-trans-id --with-pdflib

diff php.ini-dist /usr/local/lib/php.ini :
        86c86
        < safe_mode = Off
        ---
> safe_mode = On
        223c223
        < doc_root = ; the root of the php pages, used only if nonempty
        ---
> doc_root = /usr/local/apache/httpd ; the root of the php pages, used only if nonempty

I have tried using "'s around the path and it didn't help.

grep -i php httpd.conf :
        DirectoryIndex index.html index.htm index.php
        # And for PHP 4.x, use:
        AddType application/x-httpd-php .php
        AddType application/x-httpd-php-source .phps

test.php :
        <?
        phpinfo();
        ?>

Viewing test.php results in:
Warning: Unable to access /usr/local/apache/httpd/usr/local/apache/httpd/htdocs/test.php in Unknown on line 0

Warning: Failed opening '/usr/local/apache/httpd/htdocs/test.php' for inclusion (include_path='.:/usr/local/lib/php') in Unknown on
line 0

I have also noticed that if I just try to go to /test (as opposed to /test.php) it still interprets it as a php doc. Not sure if it did that in the past (that happens regardless of doc_root)

Let me know if you need anymore info.

--patrick

On Fri, Sep 15, 2000 at 08:39:28AM +0300, Andi Gutmans wrote:
> Can you tell me how to reproduce it exactly? I can't reproduce the problem
> you are describing.
> Are you using CGI? What server? What OS? What exactly are you doing?
> You might be right but I see the same code in PHP 3. Maybe this is being
> caused by something else either in your setup or the SAPI module in PHP.
>
> Andi
>
> At 09:16 PM 9/14/00 -0400, Patrick Aland wrote:
> >The need to include a file isn't needed.
> >A script that has simply
> ><?
> >phpinfo();
> >?>
> >
> >Will cause the error (I am assuming you are referring to the same bug #6480)
> >
> >

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>