Articles of PHP

如何让PHP邮件function在Debian上“挤”?

可能重复: 获取PHP邮件()函数在Debian Lenny上工作 我在我的debian服务器上安装了Apache和PHP5。 首先我使用sendmail来试用它。 以下是我尝试过的一步一步的程序: Step 1: apt-get install sendmail Step 2: /etc/init.d/apache2 restart 但是这不起作用。 然后我尝试使用外部SMTP。 我的域名在BigRock上注册。我在那里注册了邮箱地址[email protected] ,它给了我所需的证书。 在服务器上,我安装了sSMTP > apt-get install ssmtp > Configured "/etc/ssmtp/ssmtp.conf" file. 在我添加的configuration文件中 [email protected] mailhub=smtp.fostergen.com:587 (Here I have doubt. I am not sure what to use here. I tried smtp.fostergen.com:587, smtp.fostergen.com:25,mx1.mailhostbox.com :587,mx1.mailhostbox.com:25. 我仍然不确定在这里使用mailhostbox.com。 我使用了mx1.mailhostbox.com,因为它是我在bigrock上的域的mx条目这里是截图![bigrock电子邮件pipe理工具的屏幕截图]) hostname=vs3204.ams2.alvotec.de (我在我的服务器上input了命令hostname -f并将其作为结果) FromLineOverride=YES UseSTARTTLS=YES […]

Phpize,找不到config.m4,Centos6,SAPRFC安装

我试图安装一个PHP模块,这需要phpize ,我遇到了一个警告,即使它存在和安装。 Cannot find config.m4.Make sure that you run '/usr/bin/phpize' in the top level source directory of the module 所以,我已经尝试从根目录运行phpize ,使用/usr/bin/phpize和# phpize ,仍然遇到相同的警告。 我的PHP模块存储在usr/lib64/php/modules/所以我尝试从那里运行phpize ,仍然是一样的警告。 安装php-devel : Package php-devel-5.3.3-14.el6_3.x86_64 already installed and latest version Nothing to do which phpize产生这个 – /usr/bin/phpize find -name 'config.m4'产生这个 – find: File system loop detected; ./var/named/chroot/var/named' is part of the […]

使用SSL的AWS PHP Curl

我试图在我的Ubuntu LAMP服务器上安装Amazon Web Services PHP SDK。 每当我运行兼容性检查一切,但curl回来没关系。 我遇到的问题是它报告我没有使用SSLcurl。 我卸载curl然后安装curl-ssl无济于事。

使用Nginx和PHP-FPM时,我得到一个400错误的请求错误,为什么?

我试图运行一个网站(这需要PHP – 目前在技术上不需要MySQL,但在不久的将来可能会有一段时间,因为我继续开发它,所以我继续安装,以及)使用nginx 1.2 .4和Ubuntu 12.04.1 LTS上的PHP-FPM 5.3.3。 据我所知,我没有做错任何事情,但显然有些事情是不正确的 – 每当我尝试浏览我的网站时,我似乎都会收到400错误的请求错误。 我主要是遵循一个指南,我已经做了或多或less的build议,除了没有设置PHP-FPM使用Unix套接字和我使用service而不是/etc/init.d/在启动时/停止nginx,PHP和MySQL。 无论如何,这里是我的相关configuration文件(我只有审查个人/敏感的细节,如我的域名 – 其中包含我的真实姓名): /etc/nginx/nginx.conf user www-data; worker_processes 4; pid /var/run/nginx.pid; events { worker_connections 768; # multi_accept on; } http { ## # Basic Settings ## sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 15; types_hash_max_size 2048; # server_tokens off; # server_names_hash_bucket_size 64; # server_name_in_redirect […]

502大file upload错误的网关:Nginx + PHP-FPM

我在nginx上运行php-fpm 我有我的php.ini值设置如下 upload_max_filesize = 100M post_max_size = 128M max_execution_time = 180 我也设置我的client_max_body_size为4G。 当我尝试上传小文件的时候,但是当我尝试上传35M的时候,我得到了一个502,当我查看日志时, upstream sent unexpected FastCGI record: 3 while reading response header from upstream 有任何想法吗? 我已经尝试了nginx的线程,但他们并没有真正的帮助。 提前致谢

在Fedora 17上使用php获取403

我把项目放在~/public_html/project并在/var/www/html/project中创build一个指向~/public_html/project的软链接。 我的/etc/httpd/conf/httpd.conf如下所示 ServerRoot "/etc/httpd" PidFile run/httpd.pid Timeout 60 KeepAlive Off MaxKeepAliveRequests 100 KeepAliveTimeout 5 <IfModule prefork.c> StartServers 8 MinSpareServers 5 MaxSpareServers 20 ServerLimit 256 MaxClients 256 MaxRequestsPerChild 4000 </IfModule> <IfModule worker.c> StartServers 4 MaxClients 300 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 </IfModule> Listen 80 Include conf.d/*.conf User apache Group apache ServerAdmin root@localhost UseCanonicalName […]

PHP网站:非常高的IOPS

我们正在虚拟云上托pipe一组网站。 这些站点以前是在一对专用服务器上,但为了提高性能,我们将它们转移到了一个云环境中。 云有SSD存储,但他们现在说我们有很高的IOPS,如果我们什么都不做,就会降低我们的性能。 我们有很好的PHP网站,但是没有任何caching就可以运行。 我该如何开始debugging呢? 此致 Khuram 编辑 :我们有两个服务器,其中一个持有代码,而另一个持有数据库。 但他们都显示非常高(〜95%)的写道。

MySQL PHPconfiguration不允许LOAD DATA LOCAL INFILE

我尝试添加行到my.cnf [mysql] infile = 1 [mysqld] infile = 1 SHOW VARIABLES LIKE "%infile"在mysql中显示为true。 但LOAD DATA不起作用。 我尝试了一个PHP脚本和phpMyAdmin。 它只有在我使用–allow-infile标志从命令行启动mysql时才有效 mysql –local-infile -u root -p db_name 但是这并没有解决PHP的问题。

在* nix命令行中使用curl -s不能正常工作

我正在试图在我的MediaTemple DV机器上安装composer php(虽然说实话我真的不知道它是如何工作的,文档看起来相当差)。 我正在使用他们的指示 尝试使用以下方法全局安装: $ curl -s https://getcomposer.org/installer | php 我的命令行(再次使用putty并以root身份login到我的服务器)想了一会儿,然后设置为下一个提示。 我运行一个简单的ls -l来检查它应该下载的文件,但没有运气。 任何想法可能会导致这个问题? 我已经testing,实际上已经安装了curl。 更新1 基于第一个答案,详细的回答是: $ curl -vs https://getcomposer.org/installer | php * About to connect() to getcomposer.org port 443 * Trying 37.59.4.156… connected * Connected to getcomposer.org (37.59.4.156) port 443 * successfully set certificate verify locations: * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * […]

cURL在错误的地方寻找CA.

在Redhat Linux上,在PHP脚本中,我设置了cURL选项: curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, True); curl_setopt($ch, CURLOPT_CAINFO, '/home/andrew/share/cacert.pem'); 然而,当我尝试发送数据时,却遇到了这个exception (curl error: 77) error setting certificate verify locations: CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none 为什么要在/etc/pki/tls/certs/ca-bundle.crt中/etc/pki/tls/certs/ca-bundle.crt ? 我不知道这个文件夹是从哪里来的,因为我没有把它放在任何地方。 不应该在我指定的地方寻找/home/andrew/share/cacert.pem吗? 我没有写入权限/etc/所以只是复制文件没有一个选项。 我是否错过了一些我应该使用的curl选项? (这是共享主机 – 是否有可能阻止我为CAfile设置不同的path?)