gpt4 book ai didi

linux - $_GET 在服务器上被切断,但在本地有效

转载 作者:太空宇宙 更新时间:2023-11-04 03:52:30 25 4
gpt4 key购买 nike

我们的开发人员都在本地计算机上工作,我们遇到了一个问题,$_GET 在服务器上被切断,但在本地却没有。 (MAC、Apache/MySQL 构建 - 不是 MAMP)

CENTOS 上有这方面的设置吗?相同的代码,相同的数据库

这是正确的 URI

[REQUEST_URI] => /mapp/index/redirectToCart?productID=732&product=732&related_product=&qty=

来自服务器(CentOS 版本 6.5(最终版))

  Array
(
[HTTP_AUTHORIZATION] =>
[HTTPS] => on
[SSL_TLS_SNI] => www.mydomain.com
[SSL_SERVER_S_DN_OU] => Domain Control Validated
[SSL_SERVER_S_DN_CN] => mydomain.com
......
[HTTP_HOST] => www.mydomain.com
[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
[HTTP_CONNECTION] => keep-alive
[HTTP_COOKIE] => frontend=rb7ehmse7lfrile9q0o5gkj0h1; CATEGORY_INFO=%5B%5D; LAST_CATEGORY=3403; VIEWED_PRODUCT_IDS=732; _ga=GA1.2.549931750.1410525313; _gat=1
[HTTP_USER_AGENT] => Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.78.2 (KHTML, like Gecko) Version/7.0.6 Safari/537.78.2
[HTTP_ACCEPT_LANGUAGE] => en-us
[HTTP_REFERER] => http://www.mydomain.com/apw-wyott-cheesemelter-countertop-36-wide-ea.html
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[PATH] => /sbin:/usr/sbin:/bin:/usr/bin
[SERVER_SIGNATURE] =>
[SERVER_SOFTWARE] => Apache
[SERVER_NAME] => www.mydomain.com
[SERVER_ADDR] => 10.2.5.5
[SERVER_PORT] => 443
[REMOTE_ADDR] => [removed]
[DOCUMENT_ROOT] => /var/www/mydomain.com/staging/current/
[SERVER_ADMIN] => webmaster@mydomain.com
[SCRIPT_FILENAME] => /var/www/mydomain.com/staging/current/index.php
[REMOTE_PORT] => 15070
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => GET
[QUERY_STRING] =>
[REQUEST_URI] => /index.php/mapp/index/redirectToCart
[SCRIPT_NAME] => /index.php
[PATH_INFO] => /mapp/index/redirectToCart
[PATH_TRANSLATED] => redirect:/index.php/index/redirectToCart
[PHP_SELF] => /index.php/mapp/index/redirectToCart
[REQUEST_TIME_FLOAT] => 1410543560.059
[REQUEST_TIME] => 1410543560
)

来自本地

   Array
(
[REDIRECT_HTTP_AUTHORIZATION] =>
[REDIRECT_STATUS] => 200
[HTTP_AUTHORIZATION] =>
[HTTP_HOST] => fsss.local
[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
[HTTP_CONNECTION] => keep-alive
[HTTP_COOKIE] => _ga=GA1.2.2052654414.1410539051; CART=1af3799f2a75e89cb32e44ba38ab155d; CUSTOMER=37853b37ccdeca3c78270537e91e1f58; CUSTOMER_INFO=d65ce707afe805e0549ec6b9f8c68708; frontend=ru4dl80guqbho0h979srj4str0; persistent_shopping_cart=zblxqfEcDKDmSbs8o2mJFqoOUv56aFRabxIlnqEfL2WNukdAzp; VIEWED_PRODUCT_IDS=732
[HTTP_USER_AGENT] => Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.78.2 (KHTML, like Gecko) Version/7.0.6 Safari/537.78.2
[HTTP_ACCEPT_LANGUAGE] => en-us
[HTTP_REFERER] => http://client.local/apw-wyott-cheesemelter-countertop-36-wide-ea.html
[HTTP_ACCEPT_ENCODING] => gzip, deflate
[PATH] => /usr/bin:/bin:/usr/sbin:/sbin
[SERVER_SIGNATURE] =>
[SERVER_SOFTWARE] => Apache/2.2.26 (Unix) PHP/5.4.24 Phusion_Passenger/4.0.40 DAV/2 mod_ssl/2.2.26 OpenSSL/0.9.8y mod_perl/2.0.7 Perl/v5.16.2
[SERVER_NAME] => client.local
[SERVER_ADDR] => 127.0.0.1
[SERVER_PORT] => 80
[REMOTE_ADDR] => 127.0.0.1
[DOCUMENT_ROOT] => /Volumes/Data/prjs/sources/mydomain/
[SERVER_ADMIN] => [revoved]
[SCRIPT_FILENAME] => /Volumes/Data/prjs/sources/mydomain/index.php
[REMOTE_PORT] => 57218
[REDIRECT_QUERY_STRING] => productID=732&product=732&related_product=&qty=0
[REDIRECT_URL] => /mapp/index/redirectToCart
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.1
[REQUEST_METHOD] => GET
[QUERY_STRING] => productID=732&product=732&related_product=&qty=0
[REQUEST_URI] => /mapp/index/redirectToCart?productID=732&product=732&related_product=&qty=0
[SCRIPT_NAME] => /index.php
[PHP_SELF] => /index.php
[REQUEST_TIME_FLOAT] => 1410543740.533
[REQUEST_TIME] => 1410543740
)

最佳答案

这是 Apache/httpd.conf 和 PHP/php.ini 的设置。在 CentOS 中,您可以配置 php.ini 文件,或者我不确定您是否也在使用 cPanel,您可以在 cPanel WHM 用户界面面板上配置整个集合。

我会看看 CentOS/PHP 配置是如何配置的,以便解决这个问题。 CentOS 在这些方面与 Ubuntu 相比有点奇怪。

最大的原因之一可能是在您的应用程序中 CentOS 对待 REQUEST_URI 路径与您的应用程序配置设置不同。听起来不是很消极,Mac 和 CentOS 是完全不同的。你肯定会遇到问题。

关于linux - $_GET 在服务器上被切断,但在本地有效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25829084/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com