You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by thomas Armstrong <ta...@gmail.com> on 2007/02/22 14:06:41 UTC

[users@httpd] "(8)Exec format error: exec of 'test.php' failed" when ScriptAlias

Hi,

Using Apache 2.0.59 on Linux, I try to install a ScriptAlias.

My DocumentRoot is '/home/project/web', and the ScriptAlias directive
within httpd.conf is:
-----
ScriptAlias /videos/ /home/project/modules/videos/web/
-----

But when accessing with my web-browser to
'http://foo/videos/test.php', I get a '500 Internal Server Error', and
browsing the error log:
-----
[Thu Feb 22 09:56:24 2007] [error] [client
51a8:1409:18d7:afbf:20df:9300:a00:0] (8)Exec format error: exec of
'/home/project/modules/videos/web/test.php' failed
[Thu Feb 22 09:56:24 2007] [error] [client
51a8:1409:18d7:afbf:20df:9300:a00:0] Premature end of script headers:
test.php
---------

I chmoded 777 all the '/home/project/modules/videos/' directory. What
am I doing wrong?

Thank you very much.

---------------------------------------------------------------------
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] "(8)Exec format error: exec of 'test.php' failed" when ScriptAlias

Posted by thomas Armstrong <ta...@gmail.com>.
Easier (within httpd.conf):
----------------
  <Directory "/home/project/modules/">
       AddHandler application/x-httpd-php .php
   </Directory>
---------------

Thank you very much anyway!

On 2/22/07, Eric Covener <co...@gmail.com> wrote:
> On 2/22/07, thomas Armstrong <ta...@gmail.com> wrote:
> > 51a8:1409:18d7:afbf:20df:9300:a00:0] (8)Exec format error: exec of
> > '/home/project/modules/videos/web/test.php' failed
>
> Perhaps you need a shebang (!#/usr/bin...) line at the top of the PHP
> script so the interpreter can be found?
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> 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] "(8)Exec format error: exec of 'test.php' failed" when ScriptAlias

Posted by Eric Covener <co...@gmail.com>.
On 2/22/07, thomas Armstrong <ta...@gmail.com> wrote:
> 51a8:1409:18d7:afbf:20df:9300:a00:0] (8)Exec format error: exec of
> '/home/project/modules/videos/web/test.php' failed

Perhaps you need a shebang (!#/usr/bin...) line at the top of the PHP
script so the interpreter can be found?

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
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