Articles of PHP

从没有域名的服务器提供PHP文件,只需一台IP Win Server 2008 R2

我已经升级到更好的Win Server 2008 R2专用服务器。 这是由于有一个原来的领域指向它,但不能testing从locahost(或任何等效可能)的PHP文件。 所有的文件都在wwwroot ,但是当在服务器上进行本地testing时,php文件只是作为文本而不是phpparsing。 我不确定从哪里开始,但是有没有办法在将DNS指向新服务器之前查看wwwroot的内容?

Symfony2应用程序在子目录nginx中

我试图在我们的服务器的子目录中设置一个symfony2应用程序 networking服务器:nginx 1.1.6 + php的fpm操作系统:gentoo 我的目标是让应用程序从一个子目录工作 subdomain.xy.domain.tld /工具 我的nginxconfiguration看起来像那样 server { listen 80; server_name subdomain.xy.domain.tld; error_log /var/log/nginx/subdomain.xy.error.log info; access_log /var/log/nginx/subdomain.xy.access.log main; location /tool { root /var/www/vhosts/subdomain.xy/tool/web; index app.php; location ~ \.php($|/) { include fastcgi_params; set $script $uri; set $path_info ""; if ($uri ~ "^(.+\.php)($|/)") { set $script $1; } if ($uri ~ "^(.+\.php)(/.+)") { set […]

PHP可能正在作为“特权”用户执行

好吧,一旦我在服务器上安装piwik,我得到以下错误: user_id – PHP可能作为“特权”用户执行,这可能是一个严重的安全漏洞。 group_id – PHP可能作为“特权”组执行,这可能是一个严重的安全漏洞。 我现在把它设置为 User apache Group apache 并在我的passwd文件中 apache:x:48:48:Apache:/var/www:/sbin/nologin 任何想法如何清除这些错误?

我在Centos上安装了带有rpm文件的php-soap,但是不起作用

我从RPM文件在我的Centos服务器上安装了php-soap。 然后,我重新启动httpd服务,但不工作的SOAP客户端。 当我得到: yum list installed 在这里列出的PHP肥皂: php.i386 5.3.6-1.w5 installed php-cli.i386 5.3.6-1.w5 installed php-common.i386 5.3.6-1.w5 installed php-devel.i386 5.3.6-1.w5 installed php-gd.i386 5.3.6-1.w5 installed php-imap.i386 5.3.6-1.w5 installed php-mbstring.i386 5.3.6-1.w5 installed php-mysql.i386 5.3.6-1.w5 installed php-pdo.i386 5.3.6-1.w5 installed php-pear.noarch 1:1.4.9-6.el5 installed php-soap.i386 5.2.17-1.el5.art installed php-xml.i386 5.3.6-1.w5 installed 在php.ini文件中有SOAP选项,在扩展名dir中有soap.so。 但是在phpinfo页面上没有出现任何SOAP选项。 (只有在ini文件中列出的soap.ini) 我能做些什么来启用SOAP扩展?

如何在redhat上启用mysqli扩展?

我的php.ini说: 附加的.ini文件parsing /etc/php53/php.d/curl.ini, /etc/php53/php.d/fileinfo.ini, /etc/php53/php.d/json.ini, /etc/php53/php.d/mysqli.ini, /etc/php53/php.d/mysql.ini, /etc/php53/php.d/pdo_mysql.ini, /etc/php53/php.d/phar.ini, /etc/php53/php.d/zip.ini mysqli.ini被加载..但是我仍然得到这个, PHP致命错误:未find类'mysqli' 我试图启用dynamic加载和初始化PHP脚本与dl(“mysqli.so”); 我也尝试重新编译php源代码: ./configure –with-mysql=/usr/lib64/mysql –with- mysqli=/usr/lib64/mysql/mysql_config 即使这不起作用。 有人能帮我解决我的问题吗? 红帽企业Linux服务器版本5(Tikanga)。 x86_64 GNU / Linux。 没有访问RHN。 谢谢。

无法访问http:// localhost / phpmyadmin /

我安装了wamp server2它没有密码,它有这个错误,然后我去了mysql,并使用此命令为root设置密码,我可以使用此密码login,但我再次无法访问phpmyadmin.I重新启动服务。 update user.mysql set password=password('root') where user='root'; 然后我去config.inc更改通过这一个: $cfg['Servers'][$i]['password'] = 'root'; 再次我重新启动,再次没有结果。 phpmyadmin页面: Welcome to phpMyAdmin Error MySQL said: Documentation #1045 – Access denied for user 'root'@'localhost' (using password: NO) phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your […]

如何有效地减lessphp-cgi进程的运行?

我的服务器是一个Linode 512,并且我运行了一个带有3个网站(他们没有很多访问者)的Wordpress MU和一些NodeJS应用程序。 我需要切换到Lighttpd,因为Apache 2使用了大约59%的服务器RAM,现在我的php-cgi进程占用了服务器RAM的43.6% 通常2个进程使用16.5%的RAM, 4个进程每个使用1.8%的RAM 4个更多的进程使用0.8%的RAM,每个 我怎样才能减less这些过程? 我几乎可以肯定,他们并不是所有需要这个服务器的交通… 我尝试只允许2个孩子,但我仍然有这10个…这是我在lighttpd.conf中的fastcgi.server部分。 fastcgi.server = ( ".php" => ( "localhost" => ( "socket" => "/var/run/lighttpd/php-fastcgi.socket", "bin-path" => "/usr/bin/php-cgi", "bin-environment" => ( "PHP_FCGI_CHILDREN" => "2", "PHP_FCGI_MAX_REQUESTS" => "4000" ) ) ) ) 我还能做些什么来调整lighttpd以使用更less的内存?

如何在同一台计算机上安装php,mysql,apache和visual studio?

从3年来,我无法find这个东西的解决scheme,我想使用http:// localhost /为XAMPP为PHPtesting,以及类似于http:// localhost:32465 /默认位置为Visual Studio for .NET C#和ASP.NET。 这是可能在同一台计算机上运行。 我想学习他们两个。 ——————————–更新:谢谢nnichols,我按你的方式。 感谢大家帮助我。 ——————————–

目录复杂性如何影响i-节点?

对于使用大量图像(每天±1k-3k)的单个项目,我使用自定义PHP脚本处理图像并将其保存到服务器。 目前的PHP脚本处理它们并保存在以下文件夹结构中: 所以max lvl是5.但是现在我想下面的目录结构如何影响inode计数? 我应该把lvl降到2或3吗?

编译PHP5.4 for Apache(PHP5.3已经安装了apt-get)

我已经通过Ubuntu的apt-get安装了PHP 5.3.10-1ubuntu3.1一段时间了。 我现在想安装PHP5.4,我打算从源代码编译。 我解压到/usr/src/php-5.4.3/并运行: ./configure –with-mysqli –with-pcre-regex –with-pdo-mysql –with-pear –with-curl –with-gd –with-openssl; make; make install 以及apt-get install其他所需的库以使其工作。 现在php -v是5.4,正如预期的那样,但是当我通过Apache使用PHP时,它仍然指向5.3。 我甚至做了apt-get remove –purge php5-dev但我错过了一些东西。 任何想法是什么? 谢谢你的帮助。