我有一台运行Ubuntu 14.04.3 LTS的机器,通过Ansible部署。 我已经使用OndřejSurý的PHP for PHP安装了PHP 7。 $ dpkg -l | grep -i php ii libapache2-mod-php7.0 7.0.3-2+deb.sury.org~trusty+1 amd64 server-side, HTML-embedded scripting language (Apache 2 module) ii php-common 1:36+deb.sury.org~trusty+1 all Common files for PHP packages ii php7.0 7.0.4-6+deb.sury.org~trusty+1 all server-side, HTML-embedded scripting language (metapackage) ii php7.0-cli 7.0.0-5+deb.sury.org~trusty+1 amd64 command-line interpreter for the PHP scripting language ii […]
我简单的PHP脚本发送邮件是 <?php ini_set( 'display_errors', 1 ); error_reporting( E_ALL ); $from = "[email protected]"; $to = "[email protected]"; $subject = "PHP Mail Test script"; $message = "This is a test to check the PHP Mail functionality"; $headers = "From:" . $from; mail($to,$subject,$message, $headers); echo "Test email sent"; ?> 当我在任何其他服务器上运行这个脚本时,它工作正常,但是当我在新的CentOS 7机器上执行时,我总是在/ var / log / maillog中出错 Mar 15 19:08:38 […]
Heey all, 我正在尝试托pipe我的symfony项目,但是我得到了一个来自nginx的500错误。 错误日志不显示任何内容。 但访问日志确实显示了一些内容: 46.243.152.13 – – [17/Mar/2016:14:05:45 +0100] "GET / HTTP/1.1" 500 507 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36" 当我看到http请求正在做,我得到一个500 507回来。 我已经仔细检查了文件夹上的权限,他们现在是正确的。 我如何继续? 这是来自nginx的hostfile: upstream php5-fpm { server unix:/var/run/php5-fpm.sock; #for PHP-FPM running on UNIX socket } server { listen 80; server_name dev.domain.nl; return 301 https://$host$request_uri; […]
我有2个HTTP服务器运行在1 VPS。 如果我从一个HTTP请求到另一个。 到底发生了什么? 它是通过互联网和回? 还是在VPS内处理? 主持:数字海洋 系统:Ubuntu 14.04 服务器:Nginx Web服务器1:PHP Web服务器2:NodeJs
我在Nginx和FPM下运行一个WordPress网站。 在stream量的情况下,杀死PHP进程和网站停止为所有用户工作。 这是我从日志中发现的。 有什么办法,网站不停止工作,但如果有更多的要求比我们已经configuration将忙于单身或以其他方式,这将不适用于这些新用户,但对于老用户它工作正常(不要停止整个网站)。 [20-Mar-2016 03:34:01] NOTICE: error log file re-opened [21-Mar-2016 05:51:44] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are 4 idle, and 27 total children [23-Mar-2016 06:56:13] WARNING: [pool www] child 8707 exited on signal 11 (SIGSEGV) after 231123.827974 seconds from start [23-Mar-2016 […]
最新的Synology NAS DSM 6版本有一个奇怪的PHP设置。 命令行二进制文件是PHP版本5.6.11,几乎没有启用的模块,标记器部分没有编译进去。 但是,当安装Synology Web服务器应用程序,我运行phpinfo(); 那么它会向我展示带有许多模块(包括intl和tokenizer)的PHP 5.6.17版本。 正在运行的Web服务器是使用php-fpm的Apache。 是否有可能从Web服务器的PHP二进制命令行运行PHP? 我需要这样做,因为我只有一个基于Symfony的PHP命令行应用程序,需要intl和tokenizer(可能还有一些)扩展名。 编辑: 发现解决schemehttps://stackoverflow.com/questions/30238602/how-to-execute-a-php-file-using-a-php5-fpm-pool-socket ,但方式太复杂。
我得到了后缀从我的服务器通过控制台使用echo "body example" | mail -s "subject example" my@email发送给我的电子邮件 echo "body example" | mail -s "subject example" my@email ,但是当我尝试从我的网站通过mail() ,PHP函数发送电子邮件,我没有收到电子邮件。 我是新来的Web服务器和邮件服务器,从我的理解,我需要postfix mts运行,以便我使用mail()函数。 我不知道为什么我的表单提交没有通过,没有什么出现在/var/log/mail.log文件中,以帮助我找出错误。 我已经检查了我的联系表单和php本身的任何错误(我从bootstrap模板中得到的,但从那以后被篡改),并且在那里找不到任何问题。 我可以使用一些帮助来find我可以采取的下一步,以找出为什么电子邮件不发送,如果有其他地方的日志,我指出潜在的错误。 为了好的措施,我已经包括我的PHP函数和forms: <?php function send(){ if(empty($_POST['name']) || empty($_POST['email']) || empty($_POST['phone']) || empty($_POST['message']) || empty($_POST['company']) || !filter_var($_POST['email'],FILTER_VALIDATE_EMAIL)) { echo "No arguments Provided!"; return false; } $name = $_POST['name']; $email_address = $_POST['email']; $phone […]
我有一个网站(mivprofit.com),这个网站的脚本需要几个cron作业每天运行一次。 我有一个cron电子邮件设置,每当cron作业运行这是我得到的电子邮件: Content-type: text/html Site error: the file <b>/cronpath/ourcron.php</b> requires the ionCube PHP Loader ioncube_loader_lin_5.2.so to be installed by the website operator. If you are the website operator please use the <a href="http://www.ioncube.com/lw/">ionCube Loader Wizard</a> to assist with installation. (实际上我得到了两封电子邮件,每封邮件都有一封邮件,除了path和文件名外,两个邮件都是一样的) 我发现对我的问题最接近的是这个 。 所不同的是我不知道我的网站正在运行什么,当我去cPanel>文件pipe理器> / etc /没有/ php5 /文件夹。 然而,类似于这种情况,我的网站似乎有完全安装的ioncube,因为整个脚本需要ioncube运行,它运行完美,我得到的错误与那种情况相同。 另外,php.ini文件与两个cron都在同一个文件夹中,并且在同一个文件夹中有一个phpinfo.php文件,当我打开它时,说我安装了ioncube。 在此先感谢您的帮助。 编辑:我花时间通读可能的重复 ,但是这些情况似乎都没有像我的一样。 由于问题不是我的命令似乎没有运行或正常运行,但它似乎不认识到,ioncube确实安装。 感谢伊恩的信息,但现在我知道更多关于克朗。
我想工作像http://host/test.php简单的url,请注意有没有尾/尾。 我从nginx站点的标准configuration开始+ serverfault: location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^((?U).+\.php)(.*)$; if (!-f $document_root$fastcgi_script_name) { return 404; } include fastcgi_params; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $fastcgi_script_name; fastcgi_pass unix:/run/php-fpm/www.sock; fastcgi_index index.php; } 结束http://host/test.php/工作,但http://host/test.php无尾/不工作。 我尝试改变到这样的configuration: location ~ \.php$ { fastcgi_split_path_info ^/(.+\.php)(.*)$; if (!-f $document_root$fastcgi_script_name) { return 404; } include fastcgi_params; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $fastcgi_path_info; […]
我正在用phpldapadmin在两台不同的CENTOS 7服务器上安装openldap,configuration如下: openldap服务器: firewall-cmd –permanent –add-service=ldap firewall-cmd –permanent –add-port=389/tcp firewall-cmd –reload yum install -y openldap openldap-clients openldap-servers slappasswd 设置通行证并记下散列 在: /etc/openldap/slapd.d/cn=config/olcDatabase={2}bdb.ldif 更改: olcSuffix:dc = mydomain ,dc = com olcRootDN:cn = user ,dc = mydomain ,dc = com olcRootPW: {SSHA} therandomhashfromslappswd 在/usr/share/openldap-servers/slapd.ldif中 更改: 134行:n = auth“读取 dn.base =“cn = user ,dc = mydomain ,dc = com”由* […]