LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

View Poll Results: Which is the Secure and Best Linux Os
Free BSD 2 40.00%
Open Bsd 3 60.00%
RHEL 0 0%
CENTOS 0 0%
Ubuntu 2 40.00%
Multiple Choice Poll. Voters: 5. You may not vote on this poll

Reply
 
Search this Thread
Old 07-16-2011, 01:56 AM   #1
puneetbrar
LQ Newbie
 
Registered: Nov 2007
Posts: 9

Rep: Reputation: 0
Svn + php Web page


Hi
I am a linux newbie
and got into a major problem of setting up svn with php and apache
I have the following softwares in my systems

1. Fedora 13
2. Php version 5.2.17
3. Apache Version 2.2
4. svn client version 1.6.16 i can see them in phpinfo.php
5. svn extension version 1.0.1
6. https installed on apache working fine

Php and apache are working fine there are no issues in that as a project is working

Just Now i have installed svn version 1.6 but when i run a command svn info https://www.someurl.com from command line it works fine i get a message of the revision and its working fine but when the same thing i run from php file or php webpage it gives me the following error

Username: svn: OPTIONS of 'https://someurl/svn/something/something/trunk-new': authorization failed: Could not authenticate to server: rejected Basic challenge (https://someurl.net)Array
(
[0] => Authentication realm: Subversion Login
[1] => Username: svn: OPTIONS of 'https://someurl.net/svn/something/something/trunk-new': authorization failed: Could not authenticate to server: rejected Basic challenge (https://someurl.net)
)
1
The php code is here
$cmd = exec("svn info https://someurl.net/svn/someurl/something/trunk-new |grep Revision: |cut -c11- 2>&1", $output, $status);
echo "<pre>";
print_r($value);
print_r($output);
print_r($status);
echo "</pre>";
?>

i have followed the following
http://vengatctech.wordpress.com/200...svn-on-fedora/
and also googled enough but its not working in php web page

Can somebody help me
 
Old 07-16-2011, 02:00 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
why have you posted a poll with this? Why do you seem to think openbsd and freebsd are Linux?? why are you distingushing between rhel and centos? why do you think there could possibly be a "best"?

as for your issue (just running exec from php? Ewwwww, use a proper php interface - http://php.net/manual/en/book.svn.php) you are having authentication problems. httpd is running as a different user as the one you do it manually with so there will be different cached php credentials. Do it properly and you'll be able to properly authenticate easily.

Last edited by acid_kewpie; 07-16-2011 at 02:05 AM.
 
Old 07-16-2011, 02:42 AM   #3
puneetbrar
LQ Newbie
 
Registered: Nov 2007
Posts: 9

Original Poster
Rep: Reputation: 0
Hi there thanks for that prompt reply first

I Just posted the poll as i got that in my thread and sorry fro calling Free Bsd and open Bsd as linux as i never knew they are not Linux and moreover tha basic diff between RHEL and Centos as per me is RHEL is a commercial Product and Centos is free i may be wrong as i am a newbie kindly correct me

Now my issue is that manual http://php.net/manual/en/book.svn.php i have tried that also but it does not have that command for svn info as i need to get it from the server that is one and i did all the steps as told by the manual but still

when i tried
<?php
print_r( svn_log('http://www.example.com/', 23) );
?>

Warning: svn_log(): svn error(s) occured 170000 (Bad URL passed to RA layer) URL 'https://someurl.net/something/something/something/trunk-new--username something --password something ' is malformed or the scheme or host or path is missing in /var/www/something/something/deploy_script.php on line 19

can you please help on this
 
Old 07-18-2011, 11:01 PM   #4
leosgb
Member
 
Registered: Nov 2004
Location: Brazil
Distribution: Gentoo
Posts: 363

Rep: Reputation: 31
No option for "not listed"?
 
Old 07-19-2011, 07:53 AM   #5
cwizardone
Senior Member
 
Registered: Feb 2007
Distribution: Slackware64-current & "True Multilib." PC-BSD.
Posts: 2,218

Rep: Reputation: 176Reputation: 176
Slackware. No contest.
 
  


Reply

Tags
apache2, authentication, https, php, svn


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Resetting user passwords through php web page sushantchawla2005 Linux - Server 9 07-10-2009 08:22 AM
executing linux commands from web page and outputing it back to the web page ashes_sheldon Programming 8 05-09-2009 06:19 AM
PHP Web Page Unable to create DOMDocument Object linux_pioneer Programming 0 03-11-2006 01:01 PM
drawing line in php on web page pranith Programming 6 06-21-2005 04:14 AM
Setting a web page with php! mithras Linux - General 14 07-25-2003 03:25 PM


All times are GMT -5. The time now is 03:56 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration