【问题标题】:Transfer Zend App to new VPS show blank page将 Zend App 转移到新的 VPS 显示空白页面
【发布时间】:2017-07-28 16:37:26
【问题描述】:

我购买了一个新的 VPS,并尝试转移我正在工作的 ZendApp(以前使用 DirectAdmin 进行托管)。现在我用 php5 和 mysql 安装 nginx,这是我的 php 配置 - 效果很好

http://178.216.200.85/info.php

我在 php.ini 中打开了显示错误,它在可写 /_cache/ 文件夹中显示错误,所以我将其设置为 777 权限。错误已解决,但我仍然有错误,在我的网站上看不到任何内容http://178.216.200.85/index.php

我没有任何 .htaccess 文件

这是我的 /etc/nginx/sites-avaible/默认内容

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    # SSL configuration
    #
    # listen 443 ssl default_server;
    # listen [::]:443 ssl default_server;
    #
    # Self signed certs generated by the ssl-cert package
    # Don't use them in a production server!
    #
    # include snippets/snakeoil.conf;

    root /var/www/html;

    # Add index.php to the list if you are using PHP
    index index.php index.html index.htm index.nginx-debian.html;

    server_name 178.216.200.85;

    location / {
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        try_files $uri $uri/ =404;
    }


    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
    }

    location ~ /\.ht {
        deny all;
    }
}

我应该添加什么或一些东西来在新服务器上运行我的应用程序?

任何建议都会很有价值

【问题讨论】:

  • 你能用error_reporting(-1);添加错误本身吗?
  • 不确定是否可以共享目录结构?可能是由于位置尝试更改如下:location / { try_files $uri $uri/ /index.php$is_args$args; } location ~ \.php$ { fastcgi_pass unix:/usr/local/zend/tmp/php-fastcgi.socket; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }
  • @mim 我应该在哪里添加您的代码?
  • @TomekR 您的项目 index.php 或者您可以打开配置 ini 上的错误。
  • @ShahrozeNawaz 和你的代码我在根目录和 /info.php 文件中有 502 Bad Gateway 错误

标签: php .htaccess nginx zend-framework vps


【解决方案1】:

当您访问视图、触发器或过程时会出现问题(一般错误:1449),例如,当您移动数据库时,当代表另一个用户连接到新位置时。

您在某个用户('bunga'@'localhost')下创建了一些数据,该用户当前不在 MySQL 的新服务器上。最简单的方法是创建此用户。

了解更多 — MySQL error 1449: The user specified as a definer does not exist

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-09-23
    • 1970-01-01
    • 2017-10-01
    • 1970-01-01
    • 1970-01-01
    • 2017-03-10
    • 1970-01-01
    • 2013-03-29
    相关资源
    最近更新 更多