简体   繁体   English

PHP SVN-SSL证书错误

[英]PHP SVN - SSL Certificate error

I am working on a project to create some kind of dahsboard to monitor SVN statuses against LIVE environments and for this logically I need to connect to SVN via PHP I am using the SVN extensions for PHP 我正在开发一个项目,以创建某种面板来监视LIVE环境下的SVN状态,因此从逻辑上讲,我需要通过PHP连接到SVN,我正在使用PHP的SVN扩展

http://php.net/manual/en/book.svn.php http://php.net/manual/zh/book.svn.php

After succesfully installation I was trying to just do a simple svn_ls (list) to see if it connects but I got the following error: 成功安装后,我尝试仅执行一个简单的svn_ls(列表)以查看其是否连接,但出现以下错误:

Warning: svn_log(): svn error(s) occured 230001 (Server SSL certificate untrusted) Unable to connect to a repository at URL 'https://XXXX.COM/XXXX/' 230001 (Server SSL certificate untrusted) Server SSL certificate verification failed: issuer is not trusted in D:\xampp\htdocs\wmdmngtools\src\testingSVN_Controller.php on line 8

I am using Windows2008 Server and I am able to connect succesfully from Command Prompt or from clients like Tortoise, but all this with different users... As Apache is running under SYSTEM user I cannot test it with CMD + SYSTEM user. 我正在使用Windows2008 Server,并且能够从命令提示符或Tortoise之类的客户端成功连接,但是所有这些都由不同的用户...由于Apache在SYSTEM用户下运行,因此无法使用CMD + SYSTEM用户对其进行测试。 Also I have reviewed the documentation for these libraries and there is a way to set some certificate information but I don't really know what values to set to configure it properly: 另外,我已经查看了这些库的文档,并且有一种方法可以设置一些证书信息,但是我真的不知道要设置哪些值才能正确配置它:

svn_auth_set_parameter(SVN_AUTH_PARAM_SSL_SERVER_CERT_INFO....

Does anyone know how should I set it properly? 有谁知道我应该如何正确设置?

Thanks in advance 提前致谢

Solved! 解决了! I set the following each time I need to connect and works perfectly :) 每次需要连接时,我都会设置以下内容,并且可以正常工作:)

svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_USERNAME, 'myuser');
svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_PASSWORD, 'mypassword');
svn_auth_set_parameter(PHP_SVN_AUTH_PARAM_IGNORE_SSL_VERIFY_ERRORS, true);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM