Apache の設定に問題があります。私のローカルホストで
return $this->redirect('ex::dashboard');
完璧に実行します。
しかし、コードをサーバーにアップロードするとき。空白のページで終了します。
その理由は何ですか?デバッグしようとしましたが、成功しませんでした。
サーバーにアクセスして、ほとんどの PHP パラメータをチェックしました。
'./configure' '--disable-fileinfo' '--disable-pdo' '--enable-bcmath'
'--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf'
'--enable-libxml' '--enable-mbstring' '--enable-soap' '--enable-sockets'
'--enable-zip' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs'
'--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr'
'--with-gd' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr'
'--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64'
'--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/'
'--with-mcrypt=/opt/libmcrypt/' '--with-mysql=/usr'
'--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-openssl=/usr'
'--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre'
'--with-pic' '--with-png-dir=/usr' '--with-xpm-dir=/usr'
'--with-zlib' '--with-zlib-dir=/usr'
1点違いがあります
ローカルホスト
Server API Apache 2.4 Handler Apache Lounge
専用サーバー
Server API CGI/FastCGI
これは違いを生むでしょうか?
コード:
https://github.com/nilamdoc/vc.co.uk/blob/master/app/controllers/SessionsController.php#L33
L33 では、ダッシュボード ページにリダイレクトする必要があります。
私も試しました
header('Location: https://' . $_SERVER['SERVER_NAME']."/ex/dashboard");
しかし、それはリダイレクトしませんでした