Articles of PHP

不要在我的liux服务器上运行php

我一步一步在我的VPS上安装apache和php 安装Apache 安装PHP7 安装和configuration我的Apache和PHP后,我看到我的PHP代码在页面上。 喜欢这个: <?php defined('YII_DEBUG') or define('YII_DEBUG', true); defined('YII_ENV') or define('YII_ENV', 'dev'); require(__DIR__ . '/../vendor/autoload.php'); require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php'); $config = require(__DIR__ . '/../config/web.php'); (new yii\web\Application($config))->run();

更新phpMyAdmin后出现错误

在我的Apache / 2.4.10(Debian)上更新phpMyAdmin到v4.7.5之后,我得到: phpMyAdminconfiguration存储没有完全configuration,一些扩展function已被禁用。 找出为什么。 或者,也可以转到任何数据库的“操作”选项卡上进行设置。 这是not OK : https://image.ibb.co/jW3fOG/Bildschirmfoto_2017_11_14_um_17_18_34.png 我在/etc/phpmyadmin/config.inc.php添加了以下内容: $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; 但重启后仍然是一样的,仍然是相同的错误。 我究竟做错了什么? 我能做什么?

Centos 7 Selinux问题我想? PHP无法读取或写入

我的Web应用程序有一个上传文件夹: /disk2/app/uploads 。 ls -Z返回: drw-r–r–. apache apache unconfined_u:object_r:httpd_sys_rw_content_t:s0 uploads ls -Z /返回: drwxrwxrwx. root root system_u:object_r:file_t:s0 disk2 ls -Z /disk2返回: drwxr-xr-x. apache apache unconfined_u:object_r:file_t:s0 app 其中很多我从这里得到 当我在php中运行is_writable('/disk2/app/uploads') ,它返回false 我已经尝试了所有我能想到的可能性。 相关的审计日志: type=AVC msg=audit(1510944045.012:202923): avc: denied { getattr } for pid=14017 comm="httpd" path="/disk2/app/uploads/12222/206/1496103427-20170526_151922.jpg" dev=sdb ino=17826039 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:file_t:s0 tclass=file type=AVC msg=audit(1510944045.012:202924): avc: denied { write } for […]

PHP与操作码caching共享主机(如APC)?

基本上我正在寻找一个便宜的托pipe解决scheme,实际上使操作码caching。 我很难find一个。 是否有一个原因? 无论如何,任何人都知道吗?

开发背景,可以安全地拥有由根,但Apache不同的用户拥有的PHP文件?

我来自一个编程背景,因为我们的系统pipe理员的紧急情况,已经投入到pipe理Linux服务器的工作中。 让我们的PHP文件拥有的可靠或安全,但Apache明显运行在Fedora 8作为Apache? Apache有权读取,在小的情况下,例如上传目录,通过chmod 777为该上传文件夹写入权限。 我们正在运行mod_security,但想知道是否有一些更好的做法。 在系统pipe理员正在休养的时候,我会在接下来的2-3周里独自一人。

什么可能导致apache2不能通过PHP FastCGI处理程序运行index.php文件?

我试图在apache 2下使用FastCGI(mod-fcgid)和worker MPM运行PHP。 我用这个博客文章作为参考。 看来我已经有一切工作,除了一件事情: 当apache隐式地使用index.php(使用mod_dir,我认为)时,它不使用为.php文件configuration的处理程序,只是为PHP文件提供静态内容。 但是,当我手动添加index.php部分的URL,它确实使用处理程序,一切似乎工作。 其他PHP文件也可以正常工作。 澄清: http://example.com/服务PHP源文件本身。 http://example.com/index.php通过FastCGI处理程序正确运行PHP,并提供dynamic内容。 什么可能导致这个? 任何提示都表示赞赏! 编辑:一些更多的细节:这是一个Ubuntu无畏系统。 我通过将两个PHP行添加到mods-enabled / fcgid.conf中来获得在FastCGI中工作的.php,现在看起来像这样: <IfModule mod_fcgid.c> AddHandler fcgid-script .fcgi IPCConnectTimeout 20 AddHandler fcgid-script .php FCGIWrapper /usr/lib/cgi-bin/php5 .php </IfModule> 目录索引在mods-enabled / dir.conf中configuration: <IfModule mod_dir.c> DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm </IfModule> 我不需要把Options + ExecCGI放在任何地方。 其实,我只是尝试注释在网站启用/ 000默认的块,FastCGI PHP仍然工作正常,除了隐式index.php

Debian Lenny和php4(以及php5)

PHP4已从lenny软件包列表中删除。 任何build议什么可能是最好的方法来安装php4(Apache mod和cli)的lenny框不破坏php5? 并可能仍然有卸载能力稍后。

iis和php最大执行时间错误

首先,我正在运行带有IIS 6.0和Plesk的Windows 2003 Server的VPS 这些是来自php.ini的设置max_execution_time = 300; 每个脚本的最大执行时间,以秒为单位 返回的值是好的echo ini_get('max_execution_time'); // 300 但是当我试图使用keygenerator时,它会在30秒后停止执行,并显示致命错误:最大执行时间30秒超过…在第475行 生成器工作得很好共享主机,但它根本无法在我的VPS工作… 我什至尝试使用set_time_limit(0); 还是一样..我有FastCGI安装和VPS是一个QuadCore氙(512MB内存),所以它真的不能成为一个性能问题

安装PHP时,Yum失败

我尝试用yum安装PHP,并且收到如下消息: bash-3.2# yum install php 加载的插件:fastermirror从caching的hostfile加载镜像速度* epel:mirrors.tummy.com * updates:mirror.anl.gov * base:www.cyberuse.com * addons:mirror.raystedman.net * extras:www.cyberuse.com设置安装进程parsing包安装参数解决依赖关系 – >运行事务检查—>包php.x86_64 0:5.1.6-23.2.el5_3设置为更新 – >处理相关性:php-cli = 5.1.6 PHP的 – >处理相关性:httpd-mmn = 20051115为包:PHP的 – >处理相关性:PHP的普通= 5.1.6-23.2.el5_3为包:PHP的 – >处理相关性:-23.2.el5_3包:文件> = 4.0 for package:php – >处理相关性:libaspell.so.15()(64bit)for package:php – >处理依赖:libgmp.so.3()(64bit) >处理依赖:libcurl.so.3()(64bit)for package:php – >处理依赖:libpspell.so.15()(64bit)for package:php – >处理依赖:libidn.so.11 )(64位)的包:PHP的 – >运行tra nsaction check —>软件包php-cli.x86_64 0:5.1.6-23.2.el5_3设置更新—>软件包httpd.x86_64 […]

在IIS7上设置IonCube:Windows Server 2008

我们从需要IonCube的客户端inheritance了一个PHP项目。 我们的盒子都在IIS7上运行,虽然我们已经按照说明进行了configuration,但它并没有加载解码器库。 有没有任何成功获得IonCube运行Win 2k8(32位)?