• <small id='nPiZs'></small><noframes id='nPiZs'>

    <i id='nPiZs'><tr id='nPiZs'><dt id='nPiZs'><q id='nPiZs'><span id='nPiZs'><b id='nPiZs'><form id='nPiZs'><ins id='nPiZs'></ins><ul id='nPiZs'></ul><sub id='nPiZs'></sub></form><legend id='nPiZs'></legend><bdo id='nPiZs'><pre id='nPiZs'><center id='nPiZs'></center></pre></bdo></b><th id='nPiZs'></th></span></q></dt></tr></i><div id='nPiZs'><tfoot id='nPiZs'></tfoot><dl id='nPiZs'><fieldset id='nPiZs'></fieldset></dl></div>

  • <tfoot id='nPiZs'></tfoot>

        • <bdo id='nPiZs'></bdo><ul id='nPiZs'></ul>
        <legend id='nPiZs'><style id='nPiZs'><dir id='nPiZs'><q id='nPiZs'></q></dir></style></legend>

        “getimagesize(): SSL 操作失败,代码为 1"仅在本地 Xampp 上

        quot;getimagesize(): SSL operation failed with code 1quot; on local Xampp only(“getimagesize(): SSL 操作失败,代码为 1仅在本地 Xampp 上)
        <i id='JX1mQ'><tr id='JX1mQ'><dt id='JX1mQ'><q id='JX1mQ'><span id='JX1mQ'><b id='JX1mQ'><form id='JX1mQ'><ins id='JX1mQ'></ins><ul id='JX1mQ'></ul><sub id='JX1mQ'></sub></form><legend id='JX1mQ'></legend><bdo id='JX1mQ'><pre id='JX1mQ'><center id='JX1mQ'></center></pre></bdo></b><th id='JX1mQ'></th></span></q></dt></tr></i><div id='JX1mQ'><tfoot id='JX1mQ'></tfoot><dl id='JX1mQ'><fieldset id='JX1mQ'></fieldset></dl></div>

                <tbody id='JX1mQ'></tbody>
              <tfoot id='JX1mQ'></tfoot>

              <small id='JX1mQ'></small><noframes id='JX1mQ'>

              1. <legend id='JX1mQ'><style id='JX1mQ'><dir id='JX1mQ'><q id='JX1mQ'></q></dir></style></legend>
                  <bdo id='JX1mQ'></bdo><ul id='JX1mQ'></ul>
                • 本文介绍了“getimagesize(): SSL 操作失败,代码为 1"仅在本地 Xampp 上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  getimagesize() 在 Xampp(本地 PC)中失败,尽管它在实时环境中运行良好.

                  getimagesize() fails in Xampp (local PC), although it works fine in the live environment.

                  根据错误消息,问题似乎与证书配置有关.我根据这篇文章创建了自签名证书:https://shellcreeper.com/how-to-create-valid-ssl-in-localhost-for-xampp/

                  Based on the error message, the issue seems related to certificate configuration. I have created self-signed certificates based on this article: https://shellcreeper.com/how-to-create-valid-ssl-in-localhost-for-xampp/

                  这从 Apache 的错误日志中删除了 SSL 警告,但 getimage() 的问题仍然相同.

                  This removed the SSL warning from Apache's error log, but the issue with getimage() is still the same.

                  如果我使用 http 而不是 https 传递图像的 URL,则调用有效.

                  If I pass the image's URL with http instead of https, the call works.

                  <?php
                  $file = "http://webtest.test/content/uploads/img.jpg";  // Will work
                  $file = "https://webtest.test/content/uploads/img.jpg"; // Will not work
                  
                  // ...
                  
                  $img_info = getimagesize($file);
                  if(!$img_info) {
                    throw new Exception(__("The file type is not valid image (1)"));
                  }
                  ?>
                  

                  收到错误:

                  PHP Warning:  getimagesize(): SSL operation failed with code 1. OpenSSL Error messages:
                  error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in \xampp\htdocs\index.php on line 3, referer: https://webtest.test/
                  PHP Warning:  getimagesize(): Failed to enable crypto in \xampp\htdocs\index.php on line 3, referer: https://webtest.test/
                  PHP Warning:  getimagesize(https://webtest.test/content/uploads/photos/2019/08/2f203cfc1e.jpg): failed to open stream: operation failed in \xampp\htdocs\index.php on line 3, referer: https://webtest.test/
                  

                  Xampp/PHP 版本 7.3.6.加载的模块:

                  Xampp/PHP version 7.3.6. Loaded modules:

                  <代码>核心mod_win32 mpm_winnt http_core mod_so mod_access_compat mod_actions mod_alias中mod_allowmethods mod_asis mod_auth_basic mod_authn_core mod_authn_file模块mod_authz_core mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi一样mod_dav_lock的mod_dir mod_env mod_headers中mod_include负责mod_info mod_isapi mod_log_config mod_cache_disk mod_mime mod_negotiation模块的mod_proxy的mod_proxy_ajp mod_rewrite的mod_setenvif mod_socache_shmcb mod_ssl的mod_status的mod_php7

                  问题可能来自哪里,如何解决?

                  Where could the problem be coming from, and how to fix it ?

                  推荐答案

                  如果你想从你自己的服务器图像目录中获取图像大小,你可以使用 base_path 而不是 url().'pathtoyourimage'.

                  If you're trying to get image size from your own servers images dir, you can use base_path instead of url().'pathtoyourimage'.

                  这篇关于“getimagesize(): SSL 操作失败,代码为 1"仅在本地 Xampp 上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                  • <bdo id='0hTjD'></bdo><ul id='0hTjD'></ul>
                    <i id='0hTjD'><tr id='0hTjD'><dt id='0hTjD'><q id='0hTjD'><span id='0hTjD'><b id='0hTjD'><form id='0hTjD'><ins id='0hTjD'></ins><ul id='0hTjD'></ul><sub id='0hTjD'></sub></form><legend id='0hTjD'></legend><bdo id='0hTjD'><pre id='0hTjD'><center id='0hTjD'></center></pre></bdo></b><th id='0hTjD'></th></span></q></dt></tr></i><div id='0hTjD'><tfoot id='0hTjD'></tfoot><dl id='0hTjD'><fieldset id='0hTjD'></fieldset></dl></div>
                  • <legend id='0hTjD'><style id='0hTjD'><dir id='0hTjD'><q id='0hTjD'></q></dir></style></legend>
                    <tfoot id='0hTjD'></tfoot>

                            <small id='0hTjD'></small><noframes id='0hTjD'>

                              <tbody id='0hTjD'></tbody>