简体   繁体   中英

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

http://php.net/manual/en/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:

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. 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);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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