Articles of PHP5

mod_vhost_alias + suEXEC:自动selectuid / gid

我试图configurationDebian 6.0.4与PHP5的大规模共享主机。 apache2-mpm-worker libapache2-mod-fcgid apache2-suexec软件包apache2-mpm-worker libapache2-mod-fcgid apache2-suexec 。 我成功地加载了mod_vhost_alias和suexec来pipe理我的域名,然后我把这个configuration放在/etc/apache2/sites-enabled/001-vhostalias : NameVirtualHost *:80 ServerName web-test.mynet.lan DocumentRoot /var/www/ SuexecUserGroup www-data www-data UseCanonicalName Off VirtualDocumentRoot /var/www/www.%2+/public_html/ VirtualScriptAlias /var/www.%2+/cgi-bin/ DirectoryIndex index.html index.htm index.shtml index.php ScriptAlias /__php5-cgi/ "/usr/local/lib/custom-cgi/php5-cgi/" Action php5-script /__php5-cgi/php5-cgi AddHandler php5-script .php 有了上面的这个,在线上,一个名为www.test-a.com的域名需要: adduser test-a.com (强制使用坏名字) mkdir -p /var/www/www.test-a.com/public_html并放置数据 文件chmod和chown , 一切工作正常 … 没有suEXEC我做了一些简单的PHPtesting,它工作正常uid / gid www-data 。 […]

我想通过apt-get在ubuntu 12.04安装php 5.3.9 – 我应该添加哪个版本库?

我想通过apt-get在Ubuntu 12.04中安装php 5.3.9。 apt-cache显示php5-fpm 只列出了5.3.10-1ubuntu3.1和5.3.10-1ubuntu3 。 5.3.10( https://bugs.php.net/bug.php?id=61045&edit=1 )中有一个重要的错误,我试图避免。 有没有一个存储库,让我安装PHP 5.3.9在Ubuntu 12.04 LTS?

在Ubuntu上安装Lampp安装程序的最佳方法

在Ubuntu下安装lampp安装程序的最佳方法是什么? 我知道使用xampp进行安装。 可以用作中央开发服务器吗? 或者,如果我正在安装什么是我必须安装的软件包? 下面的包是否足够? PHP Mysql Apache

phpMyAdmin没有findmbstring事件,但它已经安装了

我现在正在运行Kloxo,并且已经更新了phpMyAdmin到最新版本以及php和mysql,但是,phpMyAdmin似乎抱怨没有安装mbstring,尽pipe如此。 这里有什么问题,我该如何解决? 从phpMyAdmin(版本3.4.10) The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results. php-mbstring被安装。 [root@237266 modules]# yum list installed | grep mbstring php-mbstring.i386 5.4.5-1.el5.remi installed 它的确与PHP的版本相同 [root@237266 modules]# yum list installed […]

密码pipe理与pg_connect()?

我是新来使用postgresql与PHP,但似乎不在这里。 9/10例子我见过使用纯文本设置password参数。 例如,这里有一个示例 $con = pg_connect("host='localhost' dbname='testdb' user='postgres' password='password'); 这是常见的做法吗? 这是否构成安全风险? 如果是这样,有没有更好的方法来传递password值?

将模块添加到自定义编译的PHP

在CentOS中,我有一个PHP的编译版本,但缺lessIMAP模块。 是否有可能添加该模块,而不重新编译PHP?

PHP脚本超时,否则在CentOS下被杀死在Apache(共享主机)

当试图运行一个PHP脚本(CentOS,Apache,PHP 5.2)时,可能需要很长时间,45分钟后显然死亡。 PHP脚本是从networking浏览器中调用的,在某些情况下,它将在处理POP3邮箱和发送电子邮件时作为自动监视系统的一部分来执行大量的工作。 从命令行运行PHP脚本可能是一个更好的select,但我想了解到目前为止发生了什么。 我运行了一个testing脚本,在45分钟后,它似乎最终导致了内部服务器错误(500?)。 这个限制在哪里,什么是杀死脚本,如果这是发生了什么? 它运行在Hostgator.com上的共享主机上。

无法启动xdebug

我设法安装xdebug并在需要时通过本地php.ini文件启用。 它工作了一个月左右,但今天它没有。 如果我尝试使用Zend Studio IDE启动debugging会话,它将陷入“57%启动:等待xdebug会话” 如果我运行这个命令$ sudo netstat -tunlp | 服务器控制台上的grep 9000 ,我得到: tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 1609 / php-fpm.conf) phpinfo报告Xdebug v2.1.0 本地php.ini 的zend_extension = '/ usr / lib中/ PHP5 / 20090626 / xdebug.so' [Xdebug的] xdebug.remote_autostart =closures xdebug.remote_enable =开 xdebug.remote_connect_back =开 xdebug.remote_port = 9000 xdebug.remote_handler = “dbgp” xdebug.profiler_enable =关 xdebug.profiler_enable_trigger =开启 xdebug.profiler_output_name = […]

在NGINX + PHP-FPM中设置PHP脚本的全局处理

我必须为每个虚拟主机定义fastcgi_pass。 我如何在全球范围内定义它? server { listen 80; server_name www.domain.tld; location / { root /home/user/www.domain.tld; index index.html index.php; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/user/domain.tld$fastcgi_script_name; include fastcgi_params; } }

自定义php ini文件的IIS7

我有一个Windows 2008 Web版服务器安装IIS7.5和PHP 5.4.6 FastCGI安装。 我想用这里描述的用户INI文件: http://php.net/manual/en/configuration.file.per-user.php 我将PHP安装在C:\PHP ,主要的ini文件位于C:\PHP\php.ini 。 这些网站位于C:\HostingSpaces\WebsiteName\wwwroot ,我在wwwroot目录中创build.user.ini文件。 用户文件从不加载,问题是什么? .user.ini设置正确.user.ini phpinfo显示。