Questions tagged [php.ini]

php.ini is the configuration file used by the PHP preprocessor to setup the default settings and certain security restrictions.

272 questions
3
votes
1 answer

How can I specify which php.ini file to use in my nginx conf file?

I'm running 2 PHP sites on the same server. I would like to use 2 different php.ini files for them. I've googled this issue with no luck. Here is what my php location looks like: location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; …
Aust
  • 161
  • 1
  • 8
3
votes
1 answer

Enforce loading of php.ini files from current folder

My goal is to increase the maximum file size for uploads in WordPress. I have followed the steps on this SE answer and this tutorial (except the .htaccess part, because it's runnning nginx and AFAIK nginx ignores .htaccess files), to no avail. Looks…
3
votes
4 answers

PHP Errors are not stored on CentOS Server

I just adjusted the php.ini on my CentOS 64 Bits VPS in /etc/php.ini to log PHP errors: cat /etc/php.ini | grep php-errors.log error_log = /var/log/php-errors.log I also have log_errors = on I created the log file in /var/log/ and it is CHMOD 644.…
rhand
  • 264
  • 2
  • 5
  • 23
3
votes
1 answer

APCu and APC setting unclear

Please help me to understand where is difference between APC and APCu lies. While inspecting CentOS web-server (set up not by me) found that it has APCu 4.0.2 installed and phpinfo(); reports that APC Emulated. It was bit confusing, anyway tried to…
Demontager
  • 73
  • 1
  • 3
  • 8
3
votes
3 answers

PHP cli uses different php.ini file when run by cron

My CakePHP console script is having problems executing under cron. It complains about missing Mysql connections and such. After a little investigating I found that php run by cron uses a different php.ini file compared to when I run it in the…
Jelle De Loecker
  • 1,094
  • 6
  • 17
  • 30
3
votes
3 answers

php-fpm Bad file descriptor errors

I'm using php-fpm with customer separate pools. Sometimes page are freezing, then showing 500 internal server error, and I'm getting such errors in error log: [11-Feb-2013 22:12:39] ERROR: unable to read what child say: Bad file descriptor…
Spacedust
  • 568
  • 5
  • 13
  • 28
3
votes
5 answers

PHP short_open_tag Won't Enable (CentOS 6)

I'm setting up an Apache2, PHP 5.3.3 server running on CentOS 6. My web application uses the short tags
Brack
  • 205
  • 2
  • 4
  • 8
3
votes
4 answers

Settings on php.ini ignored

I can't get my server to obey the settings from php.ini (I'm trying to change memory_limit and upload_max_filesize). As far as I can tell, I'm editing the correct file. phpinfo() gives: Loaded Configuration File /etc/php.ini The file permission…
bfavaretto
  • 131
  • 1
  • 4
3
votes
1 answer

How to disallow use of disable_functions in?

I'm obviously not the first one to have this problem, but I cannot not find an answer to this situation. I want to lock down PHP a bit, more specifically the use of disable_functions. The environment is CentOS 6.2/PHP 5.3.3 fcgid/Apache…
Gaia
  • 1,855
  • 5
  • 34
  • 60
3
votes
1 answer

Installing xdiff locally with Apache + PHP

I'm trying to get the xdiff library for PHP installed on my localhost so that I can do some testing with it. My set up is PHP 5.3 + Apache + Mac OS X. Unfortunately, there is no macports port for xdiff. Here's what I've done so far in my /usr/lib…
joshholat
  • 193
  • 1
  • 6
  • 12
3
votes
4 answers

Configuring php.ini to prevent attacks

I have been attacked on a shared host server (heartinternet) and they said I should configure my own php.ini file properly. Well I have a little php/MySQL program with a registering function, a little admin site however someone hacked it. What is…
TryHarder
  • 249
  • 1
  • 2
  • 13
3
votes
1 answer

PHP DL Function

Is allowing dynamic extension loading dangerous for some reason? I ask because I need it to include the pecl oauth.so extension to make the Google Adwords PHP SDK work using dl(). I've tried all other alternatives but just can't get it to…
Doug Molineux
  • 423
  • 3
  • 7
  • 17
3
votes
3 answers

How do I upload large (30MB) files via a web interface?

Because I'm stumped... The client needs to be able to upload large images to a library but the upload fails after 5-6MB (over my poor connection). It seems to be timing out as the filesize at fail isn't consistent. The setup is a form which is…
Dan
  • 488
  • 1
  • 3
  • 16
2
votes
0 answers

Is it possible to use Opcache to specific website only?

I run few wordpress websites on single Vps server. (Ubuntu 18.04 + Nginx + php7.3 + mariadb) I was changed code like below to use opcache in…
Seomari
  • 21
  • 2
2
votes
1 answer

Should I add `/dev/urandom` into PHP `open_basedir`?

My system is centos 7.4,with Apache 2.4.6 and PHP 5.4. I have following setting in /etc/php.ini open_basedir =.:/tmp/:/var/lib/php/session/ session.save_path = "/var/lib/php/session" session.entropy_length = 0 ;session.entropy_file = /dev/urandom I…
kittygirl
  • 945
  • 5
  • 13
  • 33