我注意到,即使脚本在后台工作,调用.php文件时也会得到404 – Not Found。 PHP文件下载一个长的JSON,并填充一个数据库,直到我closures窗口。 我正在使用PHP 5和Nginx 1.9.3。 我该如何解决这个问题,这是一个configuration问题? 感谢您的时间。 编辑 这个问题只发生在很长的JSON中。 我正在testing本地主机,我会在testing后格式化这个安装。 示例url: http://localhost/php/get_visit_log.php configuration:这里有一些截图。
我正在我的SLES11服务器上安装dokuwiki,但由于某种原因,dokuwiki只需要php 5.3.3及以上版本。 我意识到,通过系统安装php后,它安装了5.2.14。 我现在想要升级到最新版本,或者考虑删除旧版本并安装新版本。 我想要更简单的方法,在一些指导如何去简单的方法。 请让我知道是否需要澄清。 在此先感谢您的答复
我试图开始使用Homestead为我的非Laravel项目( 遗产 ),我设法通过克隆laravel/homestead 2.2.1 (使用PHP 5.6.15)成功地安装框0.3.3 。 现在我的问题是由于.htaccessconfiguration。 我使用的是Apache,但是在Nginx(Homestead)中No input file specified 。 我使用的.htaccess如下所示。 目标是 允许浏览器加载/下载一些特定的扩展名 禁止任何加载/下载特定文件夹( config和email ) redirect到index.php RewriteEngine on RewriteRule !\.(ini|js|ico|gif|jpg|png|css|html|swf|flv|xml|csv)|^[config/*|email/*]$ index.php 我尝试使用在线工具来转换,像Anilcetin和winginx没有运气。 在我的服务器中,我假设加载URL /user/panel和/user/manager/shop , index.php文件知道如何从URL读取并加载正确的页面。
我知道这可能是大多数网上讨论的主题,我在这里search和堆栈交换,并尝试了各种答案,但他们都没有似乎为我工作,因此为什么我张贴这个。 我有一个Debian与LAMP堆栈,最近不得不升级PHP从5.4到5.6(最新)。 我开始删除像这样的旧版本: a2dismod php5 sudo apt-get –remove –purge libapache2-mod-php5filter libapache2-mod-php5 libphp5-embed php-pear php5 php5 -cli php5-common php5-curl php5-dev php5-gd php5-mcrypt php5-mysql 将以下内容添加到我的/etc/apt/sources.list文件中: deb http://packages.dotdeb.org wheezy all deb-src http://packages.dotdeb.org wheezy all deb http://packages.dotdeb.org wheezy-php56-zts all deb-src http://packages.dotdeb.org wheezy-php56-zts all 并运行以下命令: wget https://www.dotdeb.org/dotdeb.gpg sudo apt-key add dotdeb.gpg sudo apt-get update sudo apt-get upgrade sudo apt-get install […]
我有一个运行PHP 5.3的OVH VPS。 我想更新到PHP 5.6。 我已经使用了这个解决scheme( 如何在Ubuntu中从PHP 5.3升级到PHP 5.4.6 ): sudo add-apt-repository ppa:ondrej/php5-5.6 sudo apt-get update sudo apt-get install php5 但我有这个错误: Reading package lists… Done Building dependency tree Reading state information… Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: libapache2-mod-php5 : Depends: apache2-api-20120211 Depends: apache2 […]
我正在使用基本的Apache基准testing在我的Windows 7工作站上testingPHP 7 x64 F:\apache\bin\ab -c 200 -n 2000 localhost/index.php index.php很简单 <?php phpinfo(); 该基准在50/100个请求发生之后终止 来自apache的error.log(请参阅zend_mm_heap已损坏) zend_mm_heap corrupted [Tue Feb 16 09:39:59.311046 2016] [mpm_winnt:notice] [pid 3716:tid 284] AH00428: Parent: child process 1740 exited with status 1 — Restarting. [Tue Feb 16 09:39:59.389048 2016] [mpm_winnt:notice] [pid 3716:tid 284] AH00455: Apache/2.4.18 (Win64) configured — resuming normal operations [Tue […]
我正在使用以下系统: $ cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.1 (Maipo) $ uname -a Linux ip-XXXX.ec2.internal 3.10.0-229.14.1.el7.x86_64 #1 SMP Tue Aug 25 11:21:22 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux $ rpm -q php php-5.4.32-1.el7.remi.x86_64 $ 并且偶尔会出现以下错误: Warning: mysql_connect(): Host 'ip-XXXX.ec2.internal' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' in /var/www/html/X/wp-includes/wp-db.php on […]
一旦Nginx检测到错误,有没有办法从php访问服务器响应,并将服务器响应邮寄给pipe理员,同时向访问者显示自定义错误页面? 目前我能够委托错误页面到PHP,从那里我可以发送一封邮件给pipe理员与我从nginx获得的有关请求的信息,但它检测到所有的GET请求,丢失所有的POST信息,我发现没办法访问实际的响应,所以我可以邮件给pipe理员,所以基本上我发送了一个关于错误的非常不完整的报告。 有没有办法不松动POST信息,一旦请求委托给PHP,从服务器读取响应? 有没有其他的方式来邮件的错误页面,同时显示自定义的错误页面? 这是我当前的nginx设置(连接到error_page子句的GET参数是我发现将一些信息传递给PHP的唯一方法,以便生成错误的后端服务器): location / { proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr; proxy_connect_timeout 4s; proxy_pass $scheme://hsbservers_$scheme; proxy_next_upstream error timeout invalid_header http_502 http_504; proxy_intercept_errors on; server_tokens off; } error_page 500 503 502 504 /error.php?err=$status&svr=$upstream_addr&uperr=$upstream_status&sT=$upstream_response_time&pT=$request_time; location ~ error\.php$ { try_files $uri /index.php; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } 这是我从PHP发送的一个POST请求产生错误的电子邮件的例子: _SERVER Array ( […]
我在Windows Server 2008 R2和PHP 5.6.18上运行Apache 2.4.18。 我的Apache服务器默认情况下已打开SSL 。 我需要运行2个不同的站点,其中一个站点使用SSL ,另一个站点不使用SSL 。 这里是我已经添加到我的httpd-vhosts.conf文件,试图让它工作 <VirtualHost *:80> ServerName SERVER1.example.com Redirect permanent "C:/phpsites/app1" https://sub1.example.com/ </VirtualHost> <VirtualHost *:80> DocumentRoot "C:/phpsites/app2/public" ServerName SERVER1.example.com ServerAlias sub2.example.com SSLEngine Off <Directory "C:/phpsites/app2/public"> AllowOverride All Require all Granted </Directory> </VirtualHost> <VirtualHost *:443> DocumentRoot "C:/phpsites/app1" ServerName SERVER1.example.com ServerAlias sub1.example.com SSLEngine On SSLCertificateFile "c:/Apache24/conf/certificate/cert.crt" SSLCertificateKeyFile "c:/Apache24/conf/certificate/private.key" <Directory […]
从我的前辈inheritance的Apache服务器上的php cURL扩展不起作用。 我使用下面的代码: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://www.linkedin.com/nhome/'); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_VERBOSE, true); curl_setopt($ch, CURLOPT_STDERR, $fp); $response = curl_exec($ch); $errmsg = curl_error($ch); $cInfo = curl_getinfo($ch); curl_close($ch); 哪个返回错误: * name lookup timed […]