Questions tagged [ini-set]

The ini_set() function is used to set PHP configuration options at runtime.

ini_set is a PHP function that allows developers to set a configuration option at runtime. This is done by calling the function in any PHP script with the option name ($varname) and the value ($newvalue) to be set:

ini_set ( string $varname , string $newvalue ) : string

If the execution is successful the function returns the previously set value, otherwise it returns false. At the end of the script execution the previous value will be restored automatically.

The option name must contain a valid configuration option name. A full list of names including their default values can be found in the List of php.ini directives in the PHP Manual. Only options with the modes PHP_INI_USER or PHP_INI_ALL can be changed with ini_set(). All other options require to be changed by editing php.ini.

91 questions
0
votes
1 answer

Session is no longer than an hour valid

I have an issue on SESSION. I need a session of 12 hours, so that I have to login in the morning and can access my website whole day long. I did the following in .htaccess php_value session.cookie_lifetime 43200 php_value session.gc_maxlifetime…
AndVla
  • 683
  • 2
  • 6
  • 18
0
votes
1 answer

How to eliminate error warnings about ini_set?

my wordpress error log is filling up with this message: PHP Warning: ini_set() has been disabled for security reasons in /home/mywebsite/public_html/wp-includes/load.php on line 271 that line reads: ini_set( 'display_errors', 0…
user1265590
  • 21
  • 1
  • 6
0
votes
1 answer

Should I set ini_set() on every page of my websites or will it on the first page do?

I want to set two ini directives by ini_set(): ini_set("session.cookie_httponly","1"); and if(/*cookies disabled*/){ ini_set("session.use_only_cookies", "0"); $url.=htmlspecialchars(SID); } Will it work to set it just on the first page…
aleskva
  • 1,023
  • 1
  • 13
  • 30
0
votes
1 answer

Disable logging through ini_set() in PHP?

I would like to disable logging (access_log and error_log) on my server. Is this possible through the function ini_set()? If it is, how do you do it?
Viktor Svensson
  • 745
  • 3
  • 16
0
votes
1 answer

Include path ignored

I have the following code (simplified) to add a path to my include paths (to temporarily fix an website with old code). set_include_path(get_include_path() . PATH_SEPARATOR . '/foo/bar'); I have a settings file /foo/settings/settings.inc.php Now…
Matthijn
  • 3,242
  • 8
  • 41
  • 62
0
votes
0 answers

PHP5 and pdo: include sqlite module by ini_set

Is it possible to include an external php module like do_sqlite.so directly in a page with a ini_set() command, bypassing php.ini? Some closed servers give only a limited mysql support... And I want to try a hack in order to use an external…
B33th0v3n
  • 185
  • 4
  • 9
0
votes
1 answer

PHP error_reporting issue, even local = On

in my php.ini the display_errors setting is set to Off by standard. Usually I started my index.php file with ini_set('display_errors', 'On'); error_reporting(E_ALL & ~E_NOTICE); which all worked fine for my needs. Recently, the error reporting did…
droehn
  • 63
  • 1
  • 9
0
votes
0 answers

How to retrieve and/or display php errors in a script which has been included with the @ error suppressor

In my development environment, all php pages are executed from a site controller. It renders headers and many other skeletal functions, and then to display your requested page, it does a @require_once('mypage.php'); because of the "@", no errors…
chiliNUT
  • 17,144
  • 11
  • 59
  • 92
0
votes
2 answers

PHP error reporting will not turn off

Preface: I have already searched for previous answers to similar questions, tried to implement suggested solutions, and my problem has still not been resolved. Also, I do not need to be told to solve the problem causing the error message as I have…
0
votes
0 answers

ini_precision not outputting correct number

I have a digit: 346574369297932288 as a variable. It outputs as: 3.4658261742612E+17 I used ini_set('precision', 20); but the number now outputs as: 346582617426116608 I have tried different number settings within the ini_set but nothing works. Any…
manc
  • 369
  • 3
  • 4
  • 14
0
votes
1 answer

How do I get around ini_set disabled when trying to autoload

I'm writing a WordPress plugin that uses Raven, which uses autoload in the following way: ini_set('unserialize_callback_func', 'spl_autoload_call'); spl_autoload_register(array(new self, 'autoload')); However, some users of the plugin have ini_set…
0
votes
2 answers

cakephp ini_set not working

I want to upload big file in my admin panel but not in every where and public users access to upload big file , I use ini_set in my core.php , bootstrap , controller , ... but its not working for me , My ini_set is : …
ali786
  • 142
  • 3
  • 10
0
votes
2 answers

php session and path setting

I would like to separate my source folders into two: The folders that contain the code that you type into the address bar and those that make up parts of the page (tiles) and other code (classes, etc). So at the start of every php file I…
graham.reeds
  • 15,267
  • 16
  • 66
  • 133
0
votes
1 answer

working with ini_set

I'm riding the structure based config file containing the type of ini_set. Then I fill the first class Config file containing the parameters and then I continue the application process. after the files are loaded, and set ini_set, any error will be…
Papa Charlie
  • 633
  • 8
  • 29
-1
votes
1 answer

is it safe to use two contradictory ini_set in php?

I have a website with two distinct scripts, one requires the session.use_cookies to be 0 and the other one to be 1. For now I just took care of the first one with ini_set like this: ini_set('session.use_cookies','0'); but now I'm wondering if I set…
Arheisel
  • 156
  • 10