Questions tagged [php-ini]

PHP.ini is very useful and it is a configuration file that is used to customize behavior of PHP at runtime.

The configuration file (php.ini) is read when PHP starts up. For the server module versions of PHP, this happens only once when the web server is started. For the CGI and CLI versions, it happens on every invocation.

php.ini documentation.

You can change the settings in your web server configuration with php_flag, php_admin_value and php_admin_flag as well.

In case of Apache server some configuration settings can be changed using .htaccess files, but the usage is restricted to php_flag.

Related tags:

396 questions
11
votes
1 answer

sendmail_path in php.ini for unix [full name of email sender]

I have a Unix base server and a php base website on it. I am trying to set full name and email address for the sendmail_path in php.ini. When I set it as below (without name) it works fine sendmail_path = /usr/sbin/sendmail -t -i…
Javad
  • 4,339
  • 3
  • 21
  • 36
10
votes
2 answers

How to override php cli configuration with custom php.ini

I'm struggling to override the php cli configuration with my custom php.ini My custom php.ini max_execution_time = 90 memory_limit = 256M safe_mode = Off Running php cli php -c /home/env/php.ini -r 'phpinfo();' | grep…
longtimejones
  • 121
  • 1
  • 7
9
votes
2 answers

PHP Sql Server PDOException:could not find driver

My server is a Windows 2008 server. PHP Version 7.2.7 is installed and running. Sql Server 11 (64 bit) is installed and is working (there is a couple asp.net apps running and already using that database) I downloaded the PHP Sql Server Drivers from…
Soren
  • 797
  • 5
  • 15
  • 32
9
votes
2 answers

PHP 5.3: "Declaration of ... should be compatible with that of ..." error

After having upgraded to PHP 5.3, my application was inundated with "Declaration of ... should be compatible with that of ..." style errors. I understand the nature of these errors, but I wish to disable them. The error_reporting setting in…
Ethan
  • 199
  • 1
  • 3
  • 9
9
votes
4 answers

PhpStorm $_POST always empty

$_POST seems that does not work. I've installed PhpStorm 10.0.3, and using the WAMP server default php interpreter. in the index.php:
espumita
  • 157
  • 1
  • 6
9
votes
3 answers

php 7 unable to initialize sqlsrv

I searched all day to find out a solution for sqlsrv dll on php 7 VC14 x64 Thread Safe and i did not found a solution. Does anyone solved this issue : [04-Oct-2015 19:48:05 UTC] PHP Warning: PHP Startup: pdo_sqlsrv: Unable to initialize…
Pierre-Luc Bolduc
  • 485
  • 1
  • 5
  • 18
9
votes
2 answers

What difference does usage of symbol @ with ini_set, built-in function makes in PHP?

In one of my project's configuration settings I observed following two lines at the beginning of file : @ini_set('memory_limit', '-1'); @set_time_limit(0); My doubt is what's the difference in the above two lines of code and following lines of…
user4225623
8
votes
7 answers

Increase max upload file size WordPress multisite

I'm trying to increase the max file size for a WordPress multisite install (currently 1MB). I've tried a number of things to no avail. The things I've tried: Adding these to my hosts php.ini file: memory_limit = 300M post_max_size =…
Phil
  • 1,849
  • 4
  • 24
  • 38
7
votes
2 answers

How to set php_flag per-directory using php-fpm?

My problem I want to turn off the php engine in a specific folder, where users can upload files, but I can't seem to figure it out. PHP Version: 5.5.26 PHP mode: php-fpm (FastCGI Process Manager) Apache version: 2.2.29 (Server: Synology DS212j - DSM…
Punchlinern
  • 714
  • 5
  • 17
  • 33
6
votes
2 answers

ini_set('memory_limit', ...) doesn't work and returns false; can't figure out why

ini_set('memory_limit', '128M'); // Returns false; memory_limit unchanged I wasn't able to find a list of things that can cause this. So far I checked: Safe mode: disabled disable_functions: Empty php_admin_value: None that I could find (is there…
Andreas Bonini
  • 44,018
  • 30
  • 122
  • 156
6
votes
2 answers

PHP Tidy class not found, error

I was writing some code for repair html string. I read some nice solutions which work with the Tidy PHP class but I had some troubles with it. What in this post is written, is exactly what I want but I need to install / load the PHP Tidy…
Roberto Rizzi
  • 1,525
  • 5
  • 26
  • 39
6
votes
2 answers

dll in php "the specified module could not be found"

I am having trouble with PHP extensions. I am trying to run a script and nothing happens then I checked my error log and here is what I got: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\ext\php_oci8.dll' - The specified…
zuboje
  • 696
  • 3
  • 11
  • 28
6
votes
1 answer

Xdebug not as zend extension IIS7

I can't get xdebug loaded as Zend extension, because the php.ini automatically puts in the wrong term. The message in phpinfo() is XDEBUG NOT LOADED AS ZEND EXTENSION I'm Using IIS 7.5 on Windows Server 2008 R2 Enterprise PHP 5.3.8 Zend Engine…
32bitfloat
  • 751
  • 2
  • 8
  • 21
6
votes
4 answers

PHP - date() vs. date.timezone / date_default_timezone_set()

I've just got a new computer, and I've been setting up PHP/MySQL/databases etc... I think I'm just about there, except it's thrown this curveball. My login script was working fine, but now it's spitting the following warning (which messes up the…
Nick
  • 5,995
  • 12
  • 54
  • 78
5
votes
1 answer

php file upload error of 1 - What is correct way to use php_ini?

I'm having issues uploading a pdf to my server. The upload_max_filesize is 2M and the file(s) are more then that, around 4M. I found a post with a similar issue to mine here $_FILE upload large file gives error 1 even though upload_max_size is…
d.lanza38
  • 2,525
  • 7
  • 30
  • 52
1 2
3
26 27