LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   Apache - mod auth external with php (https://www.linuxquestions.org/questions/solaris-opensolaris-20/apache-mod-auth-external-with-php-873348/)

kptn3m0 04-06-2011 09:41 AM

Apache - mod auth external with php
 
Hello,

i am trying to use mod_authnz_external for my subversion on apache 2.2.11 with an php authentication script.

Iam trying to build nearly the same as the one here

http://www.robpeck.com/2010/02/mysql...nd-subversion/

But i dont get this far:

The logfiles say:

[Wed Apr 06 16:19:46 2011] [notice] Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8k DAV/2 PHP/5.3.6 SVN/1.6.2 configured -- resuming normal operations
exec of '/app/apache2/htdocs/phptest.php' failed: (13) Permission denied

(tryed to locate the phptest.php in other directories like /sbin didnt help, too.

My httpd.conf is like

Code:


....
<Filesmatch  \.php$>
        SetHandler application/x-httpd-php
</Filesmatch>

// also tried with AddType application/x-httpd-php .php .php3 .htm .html

....

AddExternalAuth auth /app/apache2/htdocs/phptest.php
SetExternalAuthMethod auth pipe

<Location /svn/TEST>
          DAV svn
          SVNPath /var/app/subversion/TEST
        AuthType Basic
        AuthName "Subversion Auth"
        AuthBasicProvider external
        AuthExternal auth
        require valid-user
      SSLRequireSSL
      SSLOptions +StrictRequire
     
</Location>

My external PHP Auth script is reduced to the min:

Code:

#!/app/php5


<?php

exit (0);

?>

If i try to implement a perl script as external auth giving an exit 0 this works.
Script is executeable 777.

Can somebody help?

lisle2011 04-19-2011 02:43 PM

Have you put the php module in the .conf file?

LoadModule php5_module modules/libphp5.so
AddHandler php5-script php

or is this module staticaly compiled into your version of apache

path to apachectl -l will spill the beans on compiled in modules otherwise you need to add to your httpd.conf as a DSO as above

lisle2011 04-27-2011 11:54 AM

You should mark this post as SOLVED

repo 04-27-2011 11:56 AM

Quote:

Originally Posted by lisle2011 (Post 4338253)
You should mark this post as SOLVED

Is it solved then?

Kind regards

TB0ne 04-27-2011 03:30 PM

Quote:

Originally Posted by lisle2011 (Post 4329749)
Have you put the php module in the .conf file?

LoadModule php5_module modules/libphp5.so
AddHandler php5-script php

or is this module staticaly compiled into your version of apache path to apachectl -l will spill the beans on compiled in modules otherwise you need to add to your httpd.conf as a DSO as above

You should mark this post as SOLVED

Probably not, since your answer didn't address the OP's problem. If the OP installed PHP via packages/online repos/pre-installed at build time, the things you're suggesting are already there. And, the OP's problem isn't addressed by this...they're not saying the PHP page isn't being interpreted or running badly, but can't be found/run at all.

OP, check the permissions on that file, and make sure it's owned by the same user as your Apache engine. Also, make sure the directory where the PHP file is read/write/execute for that user, and that the path name to the phptest.php file is correct, and that the file is in your DOCROOT, as specified in your Apache config, or is in some path that you can access via a web browser.


All times are GMT -5. The time now is 01:40 AM.