LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 04-06-2011, 09:41 AM   #1
kptn3m0
LQ Newbie
 
Registered: Apr 2011
Posts: 4

Rep: Reputation: 0
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?
 
Old 04-19-2011, 02:43 PM   #2
lisle2011
Member
 
Registered: Mar 2011
Location: Surrey B.C. Canada (Metro Vancouver)
Distribution: Slackware 2.6.33.4-smp
Posts: 183
Blog Entries: 1

Rep: Reputation: 25
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
 
0 members found this post helpful.
Old 04-27-2011, 11:54 AM   #3
lisle2011
Member
 
Registered: Mar 2011
Location: Surrey B.C. Canada (Metro Vancouver)
Distribution: Slackware 2.6.33.4-smp
Posts: 183
Blog Entries: 1

Rep: Reputation: 25
You should mark this post as SOLVED
 
0 members found this post helpful.
Old 04-27-2011, 11:56 AM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
Originally Posted by lisle2011 View Post
You should mark this post as SOLVED
Is it solved then?

Kind regards
 
Old 04-27-2011, 03:30 PM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,623

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
Quote:
Originally Posted by lisle2011 View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] PHP unable to initialize module - Old Mod New PHP helptonewbie Linux - Newbie 4 12-01-2010 01:40 PM
mod auth mysql configuration dpp777 Linux - Software 0 09-07-2004 02:17 PM
Mod_Access and Mod Auth pazvant Linux - Security 1 06-24-2004 05:52 PM
Apache 1.3.29 with mod perl & php built in upgrade jester_69 Linux - General 0 02-22-2004 12:26 AM
auth mod sql kaboom Linux - Software 0 12-15-2003 09:02 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 09:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration