• <legend id='7YSEI'><style id='7YSEI'><dir id='7YSEI'><q id='7YSEI'></q></dir></style></legend>

        • <bdo id='7YSEI'></bdo><ul id='7YSEI'></ul>

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

        <small id='7YSEI'></small><noframes id='7YSEI'>

        <tfoot id='7YSEI'></tfoot>

        如何在 MS Azure 中调试 PHP

        How to debug PHP in MS Azure(如何在 MS Azure 中调试 PHP)
          1. <small id='AlTxh'></small><noframes id='AlTxh'>

          2. <tfoot id='AlTxh'></tfoot>

                  <tbody id='AlTxh'></tbody>
                • <bdo id='AlTxh'></bdo><ul id='AlTxh'></ul>
                • <i id='AlTxh'><tr id='AlTxh'><dt id='AlTxh'><q id='AlTxh'><span id='AlTxh'><b id='AlTxh'><form id='AlTxh'><ins id='AlTxh'></ins><ul id='AlTxh'></ul><sub id='AlTxh'></sub></form><legend id='AlTxh'></legend><bdo id='AlTxh'><pre id='AlTxh'><center id='AlTxh'></center></pre></bdo></b><th id='AlTxh'></th></span></q></dt></tr></i><div id='AlTxh'><tfoot id='AlTxh'></tfoot><dl id='AlTxh'><fieldset id='AlTxh'></fieldset></dl></div>
                  <legend id='AlTxh'><style id='AlTxh'><dir id='AlTxh'><q id='AlTxh'></q></dir></style></legend>
                  本文介绍了如何在 MS Azure 中调试 PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  第一件事:我的任务是在 Azure 上部署一个 Drupal 网站.

                  First things first: I was given the task to deploy a Drupal website on Azure.

                  在本地,我使用运行 Apache 的 OS X,一切正常.将项目部署到 Azure 时,出现错误.经过一些调试后,我将错误隔离到这段代码中:

                  Locally I use OS X running Apache and everything works ok. When I deploy the project to Azure, I get an error. After some debugging I isolated the error to this snippet of code:

                  private function getToken(){
                      $ch = curl_init($this->host . $this->clientId . "&client_secret=" . $this->clientSecret);
                      curl_setopt($ch,  CURLOPT_RETURNTRANSFER, 1);
                      curl_setopt($ch, CURLOPT_HTTPHEADER, array('accept: application/json',));
                      $response = json_decode(curl_exec($ch));
                      curl_close($ch);
                      $token = $response->access_token;
                      dvm($response, $name = NULL);
                      return $token;
                  }
                  

                  dvm() 是一个 Drupal Devel 函数,但足以说它有点像 Drupal 的 print_r.

                  dvm() is a Drupal Devel function, but suffice to say that's sort of print_r for Drupal on steroids.

                  我遇到的问题是,无论出于何种原因,$result 都会返回 NULL.当我在本地机器和 Linux/Debian 机器上运行相同的代码时,一切都按预期工作(由于 curl,我得到了一个对象).

                  The problem I'm getting is that for whatever reason, $result is coming back NULL. When I run the same code on my local machine and on a Linux/Debian box, all worked as expected (I get an Object as a result of the curl).

                  由此得出的结论是,Azure 不喜欢这段代码中的某些内容.问题是找出什么.有什么想法吗?

                  This leads to the conclusion that Azure is not liking something in this piece code. The problem is finding out what. Any ideas?

                  推荐答案

                  对于 prod 环境,display_errors 在 Azure Web Apps 上的 PHP 运行时设置为 off.我们可以通过更改内置的 PHP 配置来打开调试设置.

                  For a prod environment, display_errors is set off in PHP runtime on Azure Web Apps. We can open the setting for debugging via change the build-in PHP configurations.

                  以下是简单的步骤:

                  1、在你的根目录添加一个.user.ini文件.

                  1, Add a .user.ini file to your root directory.

                  2、使用与在 php.ini 文件中相同的语法将配置设置添加到 .user.ini 文件.根据您的要求,您的 .user.ini 文件将包含以下文本:

                  2, Add configuration settings to the .user.ini file using the same syntax you would use in a php.ini file. With your demand, your .user.ini file would contain this text:

                  display_errors = On

                  3、部署您的网络应用程序.

                  3, Deploy your web app.

                  4、重启网络应用.

                  您可以阅读官方指南 了解更多信息.

                  You can read official guide for more information.

                  此外,我们可以登录我们网站的 Kudu 控制台来管理我们的网站.Kudu 控制台的 URL 应该是:https://{your_web_site_name}.scm.azurewebsites.net,然后单击 Tools => Diagnostic dump 下载诊断日志.

                  Furthermore, we can login in the Kudu console of our websites to manage our sites. The URL of Kudu console should be like: https://{your_web_site_name}. scm.azurewebsites.net, and click Tools => Diagnostic dump to download the diagnostic logs.

                  此外,我们可以使用 WebMatrix 直接修改您在 Azure Web 应用程序上的代码.

                  Additional, we can use WebMatrix to directly modify your code on Azure Web Apps.

                  这篇关于如何在 MS Azure 中调试 PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 的问题)

                  <tfoot id='oL2Dz'></tfoot>
                  <legend id='oL2Dz'><style id='oL2Dz'><dir id='oL2Dz'><q id='oL2Dz'></q></dir></style></legend>

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