curl-and-php
RE: php SSL Problem
Date: Wed, 9 Jul 2003 18:26:35 +0200
Firs of all thanks.
Please can you be more especific. We have a Linux Mandrake 9.1 and Apache
1.3.27 with PHP/4.3.1, mod_ssl/2.8.12, OpenSSL/0.9.7, libcurl/7.10.5 and
zlib/1.1.4 and the next active modules:
mod_vhost_alias, mod_php4, mod_ssl, mod_setenvif, mod_so, mod_usertrack,
mod_headers, mod_expires, mod_digest, mod_auth_anon, mod_auth, mod_access,
mod_rewrite, mod_alias, mod_proxy, mod_userdir, mod_actions, mod_imap,
mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_info,
mod_status, mod_negotiation, mod_mime, mod_log_referer, mod_log_agent,
mod_log_config, mod_env, http_core
The files we are using has read permissions for everybody but the problem
continues.
Some suggestions?
Thanks
-----Mensaje original-----
De: curl-and-php-admin_at_lists.sourceforge.net
[mailto:curl-and-php-admin_at_lists.sourceforge.net] En nombre de Joseph Glass
Enviado el: miércoles, 09 de julio de 2003 18:03
Para: curl-and-php_at_lists.sourceforge.net
Asunto: Re: php SSL Problem
I'd check and make sure this isn't a permissions issue. It's quite
likely that that user running the script (I'm assuming nobody, or
whichever web user) doesn't have access to the file that you reference.
Joseph Glass
josejuan wrote:
> Hello,
>
> Please we need some help in programming curl in PHP. We have this
> code:
>
> <?
> $ch = curl_init();
> $fp = fopen("php_homepage.txt", "w");
>
> curl_setopt($ch, CURLOPT_URL, "https://ssl.XXXX.com/WebService
> <https://ssl.XXXX.com/WebService/MWeb>");
> curl_setopt($ch, CURLOPT_SSLVERSION, 3);
> curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
> curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
> curl_setopt($ch, CURLOPT_SSLCERTTYPE, 'PEM');
> curl_setopt($ch, CURLOPT_SSLCERT, '/var/www/html/XXXXX/file02pub.pem');
> curl_setopt($ch, CURLOPT_SSLCERTPASSWD, '????????');
> //curl_setopt($ch, CURLOPT_SSLKEYTYPE, 'PEM');
> curl_setopt($ch, CURLOPT_SSLKEY, '/var/www/html/XXXXX/file02priv.pem');
> curl_setopt($ch, CURLOPT_FILE, $fp);
>
> ob_start();
> curl_exec($ch);
> ob_end_flush();
>
> if(curl_error($ch)) {
> printf("Se ha producido un error: [%s] %s", curl_errno($ch),
> curl_error($ch));
> }
>
> curl_close($ch);
> fclose($fp);
>
> ?>
>
> The result of this page is always the same:
>
> error: [58] unable to set private key file:
> '/var/www/html/XXXXX/file02priv.pem' type PEM
>
> What's the problem?
>
> Thank's in advance
>
>
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
Received on 2003-07-09