You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Dr. Shim" <dr...@alienmelon.com> on 2002/03/01 18:53:34 UTC

Re: Problems Executing PHP Script After Changing DocumentRoot

I'm just having troubles emailing to this user-group. Sorry if I'm missing
some messeges. :(

----- Original Message -----
From: "Alex "Sniper" Togstad" <sn...@3dretreat.com>
To: <us...@httpd.apache.org>; <dr...@alienmelon.com>
Sent: Thursday, February 28, 2002 1:35 PM
Subject: Re: Problems Executing PHP Script After Changing DocumentRoot


Remember to have the following in your httpd.conf:

'Add the php, php3 etc

<IfModule mod_dir.c>
    DirectoryIndex default.shtml index.shtml index.html index.htm index.php
index.php3
</IfModule>

'The Script alias:

ScriptAlias /php/ "c:/php/

  'Then right under you tell it where its located.
  #php
    Alias /php/ "c:/php/

'The farther down the httpd.conf is where you put the follwing: You will
just uncomment the follwing lines and add one.

Action application/x-httpd-php "/php/php.exe"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

Get it?



----- Original Message -----
From: "Dr. Shim" <dr...@alienmelon.com>
To: "Apache Users Mailing List" <us...@httpd.apache.org>
Sent: Thursday, February 28, 2002 1:27 PM
Subject: Problems Executing PHP Script After Changing DocumentRoot


> This is my first time posting here. And my first time really using Apache.
> So, please understand if I ask simple questions.
>
> I've searched numerious web-sites for answers, but I got nothing, or what
I
> didn't want.
>
>
> I set my DocumentRoot outside of the Apache folder (note that I'm using
> Windows at the moment), and I set it to the "My Documents" folder.
>
> Now, when I run any .php scripts through apache, all I get is a blank
page.
> So I assumed that Apache isn't executing the .php scripts right.
> I set ScriptAlias pointing to the folder containing the php scripts. I
tried
> running them again, and just got a "Page Cannot be Found". I navigated to
my
> php-bin page, assuming that it would show me an index of all of the
folders
> contents. It got a "Permission Denied" error.
>
> So I set some permissions for my php-bin folder:
>
>      AllowOverride None
>      Options None
>      Order allow,deny
>      Allow from all
>
> I could view the contents of my php-bin folder, but I still got a "Page
> Cannot be Found" error.
>
> I also tried setting up an add-handler
>
>     AddHandler x-httpd-php .php
>
> But then I was prompted to save the .php file to my computer.
>
>
>
> I'm totally stumped at what I should do. Could anybody be as kind as to
tell
> me how I can get this strightened out so I can execute php scripts from
> anywhere?
>
> Thanks ahead of time for any answers.
>
>
> P.S. I changed DocumentRoot because I want the root "/" of my server to be
> in the "My Documents" folder, not the default of "htdocs". Maybe I use
> ServerRoot for this?
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org