Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3676334
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:05:13+00:00 2026-05-19T03:05:13+00:00

I can run an svn command from the command line but not from within

  • 0

I can run an svn command from the command line but not from within a PHP script. Significantly, I can run the PHP script on my Mac and it returns the expected data just fine but when I upload it to my Linux server it won’t work (from within PHP… I can run the svn command from the terminal). I’m pretty sure this is a user or permission issue of some sort.

I can run (from command line):

svn log http://whatever.com/svn/foo

but none of the following work (run separately… not all together like this):

exec('svn log http://whatever.com/svn/foo');
exec('svn log http://whatever.com/svn/foo',$out);
exec('/usr/bin/svn log http://whatever.com/svn/foo');

However this works:

exec('ls');

I assume the problem is that when I run from the command line I am running as root whereas when I run from PHP I am running as the apache user (www-data)? Perhaps? Any suggestions on how to be able to run exec('svn log http://whatever.com/svn/foo');?

Changing permissions to 777 (just trying to get it working!) does not help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T03:05:14+00:00Added an answer on May 19, 2026 at 3:05 am

    Here are a couple of threads that I think might help:

    Thread 1 (read as there is more):

    $cmd = '/usr/bin/svn list --config-dir /some/place file:///var/subversion/devfoundry/ 2>&1';
    exec($cmd, $output); 
    $output = implode("\n", $output) . "\n";
    echo $output;
    

    Thread 2:

    The Subversion error “svn: Can’t
    recode string” can be caused by the
    locale being wrong. Try

    <?php
        putenv('LANG=en_US.UTF-8');
    ?>
    

    (or whatever your preferred locale is)
    before you call shell_exec()

    Thread 3: PHP Interactive Shell

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a JSP script I can run to point to a JPEG file
how can I save a java applet from a website so I can run
I can run the server on my local machine and connect to it on
I know that you can run almost all Java in Dalvik's VM that you
In Informix I can run SQL statement that use other database: INSERT INTO other_db:mytable
I need to make sure that user can run only one instance of my
Is there a way you can run your UnitTest project against a compiled DLL
I have a C#/.NET program that can run both as a console application and
Is there a way that I can run a ASP.NET MVC Project on godaddy.com
I am inside the IDE and I can run all the unit tests in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.