mainstwebguy — 2013-04-29T10:50:08-04:00 — #1
I came across something that's got me stuck: According to phpinfo(), my loaded phpp config file is in c:\Program Files\PHP\php.ini which is cool. Also in phpinfo() it says that my file_uploads are off. I wanted to turn them on so i went to the php.ini located in c:\Program Files\PHP\php.ini and fif a Ctrl+F for "file_uploads." The weird thing is that the php.ini shows that uploads are turned on.
I did a search for any other php.ini files on the machine but can't find any more.
Any ideas of how this could be happening?
PS - file uploads are not currently working.
michael_morris1 — 2013-04-30T08:58:42-04:00 — #2
Depending on the directive, PHP settings can be changed by the php.ini file, a php_flag setting in an httpd.conf or .htaccess file, or by the function ini_set. Certain directives can be changed by functions specific to them, such as error_reporting
Now that I think about it, I don't know offhand if phpinfo reports the settings as they are when it is called, or as they are because of all files and previous calls. I think it's the latter, but I'm not sure.
Part of the reason for that is I use ini_get to check configuration settings specifically in code.
EDIT: File upload related settings must be set by an ini file or by the webserver via php_flag. They can't be changed at runtime.