SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2009
    0 Post(s)
    0 Thread(s)

    SOLVED**phpinfo() and php.ini are not adding up

    Hello all,

    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.
    Last edited by MainStWebGuy; Apr 29, 2013 at 08:19. Reason: SOLVED

  2. #2
    I solve practical problems. bronze trophy
    Michael Morris's Avatar
    Join Date
    Jan 2008
    Knoxville TN
    66 Post(s)
    0 Thread(s)
    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts