You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by James Hurst <jh...@designforge.com> on 2002/09/14 03:35:26 UTC

[users@httpd] Why isn't 'ScriptAlias' recognized within httpd.conf ?

Hi all you Apache-dudes!
I've installed Apache 2.0.40 onto a Win2K box and verified that it
serves up webpages, and now need to configure it to process PHP markup.
I just downloaded PHP 4.2.3 installer, installed it into C:\PHP, and
per the instructions am trying to configure it with Apache as either a CGI
binary
OR a module (I don't care which).

Please afford me your supreme wisdom and advise why Apache 2.0.40 doesn't like
this...

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"

Upon restarting Apache after entering these lines,  it says:
"Syntax error on line 24 of C:/Apache/conf/httpd.conf:
Invalid command: 'ScriptAlias', perhaps mis-spelled or defined by a
module not included in the server configuration."

I tried commenting out that line, but then it gives a similar complaint
about the next one. And the next. Am I putting these commands in the
wrong file or something?
(btw, I'm a PHP newbie)

Your help is certainly appreciated, thanks!

(Host is a Win2K Prof box.)



---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Why isn't 'ScriptAlias' recognized within httpd.conf ?

Posted by James Hurst <jh...@designforge.com>.
Thine wisdom is great. Thank you!
That was indeed it.


Robert Andersson wrote:

> A bit late perhaps; just catching up with the list. See comments below...
>
> James Hurst wrote:
> > Hi all you Apache-dudes!
> > I've installed Apache 2.0.40 onto a Win2K box and verified that it
> > serves up webpages, and now need to configure it to process PHP markup.
> > I just downloaded PHP 4.2.3 installer, installed it into C:\PHP, and
> > per the instructions am trying to configure it with Apache as either a CGI
> > binary
> > OR a module (I don't care which).
> >
> > Please afford me your supreme wisdom and advise why Apache 2.0.40 doesn't
> like
> > this...
> >
> > ScriptAlias /php/ "c:/php/"
> > AddType application/x-httpd-php .php
> > Action application/x-httpd-php "/php/php.exe"
> >
> > Upon restarting Apache after entering these lines,  it says:
> > "Syntax error on line 24 of C:/Apache/conf/httpd.conf:
> > Invalid command: 'ScriptAlias', perhaps mis-spelled or defined by a
> > module not included in the server configuration."
>
> I reacted on the "line 24" thing here. You mustn't use such directive before
> the loadModule list (which I assume you do here). ScriptAlias belongs to
> mod_alias, thus the error. Move all php related somewhere further down.
>
> Regards,
> Robert Andersson


---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Why isn't 'ScriptAlias' recognized within httpd.conf ?

Posted by Robert Andersson <ro...@profundis.nu>.
A bit late perhaps; just catching up with the list. See comments below...

James Hurst wrote:
> Hi all you Apache-dudes!
> I've installed Apache 2.0.40 onto a Win2K box and verified that it
> serves up webpages, and now need to configure it to process PHP markup.
> I just downloaded PHP 4.2.3 installer, installed it into C:\PHP, and
> per the instructions am trying to configure it with Apache as either a CGI
> binary
> OR a module (I don't care which).
>
> Please afford me your supreme wisdom and advise why Apache 2.0.40 doesn't
like
> this...
>
> ScriptAlias /php/ "c:/php/"
> AddType application/x-httpd-php .php
> Action application/x-httpd-php "/php/php.exe"
>
> Upon restarting Apache after entering these lines,  it says:
> "Syntax error on line 24 of C:/Apache/conf/httpd.conf:
> Invalid command: 'ScriptAlias', perhaps mis-spelled or defined by a
> module not included in the server configuration."

I reacted on the "line 24" thing here. You mustn't use such directive before
the loadModule list (which I assume you do here). ScriptAlias belongs to
mod_alias, thus the error. Move all php related somewhere further down.

Regards,
Robert Andersson



---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Why isn't 'ScriptAlias' recognized within httpd.conf ?

Posted by "J. Greenlees" <ja...@shaw.ca>.
actually, from reading the logs for this list, apache 2 has problems 
with php still.
you could try running the latest apache 1 instead of apache 2


James Hurst wrote:
> Hi all you Apache-dudes!
> I've installed Apache 2.0.40 onto a Win2K box and verified that it
> serves up webpages, and now need to configure it to process PHP markup.
> I just downloaded PHP 4.2.3 installer, installed it into C:\PHP, and
> per the instructions am trying to configure it with Apache as either a CGI
> binary
> OR a module (I don't care which).
> 
> Please afford me your supreme wisdom and advise why Apache 2.0.40 doesn't like
> this...
> 
> ScriptAlias /php/ "c:/php/"
> AddType application/x-httpd-php .php
> Action application/x-httpd-php "/php/php.exe"
> 
> Upon restarting Apache after entering these lines,  it says:
> "Syntax error on line 24 of C:/Apache/conf/httpd.conf:
> Invalid command: 'ScriptAlias', perhaps mis-spelled or defined by a
> module not included in the server configuration."
> 
> I tried commenting out that line, but then it gives a similar complaint
> about the next one. And the next. Am I putting these commands in the
> wrong file or something?
> (btw, I'm a PHP newbie)
> 
> Your help is certainly appreciated, thanks!
> 
> (Host is a Win2K Prof box.)
> 
> 
> 
> ---------------------------------------------------------------------
> 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
>    "   from the digest: users-digest-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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Why isn't 'ScriptAlias' recognized within httpd.conf ?

Posted by Joshua Slive <jo...@slive.ca>.
On Fri, 13 Sep 2002, James Hurst wrote:
> Upon restarting Apache after entering these lines,  it says:
> "Syntax error on line 24 of C:/Apache/conf/httpd.conf:
> Invalid command: 'ScriptAlias', perhaps mis-spelled or defined by a
> module not included in the server configuration."
>
> I tried commenting out that line, but then it gives a similar complaint
> about the next one. And the next. Am I putting these commands in the
> wrong file or something?
> (btw, I'm a PHP newbie)

The error message is quite direct: you are trying to use a directive
from a module that is not available in your configurtion.  Check your
LoadModule lines in httpd.conf and make sure they include things like
mod_alias and mod_actions.

Joshua.


---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org