SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2002
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Where's my php.ini file?

    Hi anyone who can help

    My server is running php - so I know it's there! However, one of my users has asked me what's in my php.ini file (as he wanted to mirror it exactly on his own testing server) - and I thought - "No worries". Except - it's not there!

    Freebsd 4.6-RELEASE / Apache / using php4 module; libphp4.so - did a "find / -name php.ini -print" and also a "locate php.ini", as root, and also looked for other variations of php - but cannot find it on my system anywhere.

    It must be there, musn't it?

    Ian

  2. #2
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you may not have one. PHP just uses defaults if there's no php.ini. check phpinfo() for "Configuration File (php.ini) Path" at the top and see what it says.
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR

  3. #3
    SitePoint Enthusiast wogboy's Avatar
    Join Date
    Jun 2002
    Location
    Melbourne
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Create a PHP script in your apache doc root that contains this code:

    <?php
    phpinfo();
    ?>

    And view this script in your browser.

    One of the first items in this list is the location of the php.ini file.

  4. #4
    SitePoint Enthusiast wogboy's Avatar
    Join Date
    Jun 2002
    Location
    Melbourne
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    D'oh! just beat me to it

  5. #5
    SitePoint Enthusiast
    Join Date
    Sep 2002
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks all - it tells me it's at /etc - but there's no php.ini file there when I specifically look in that directory (as root). So it must be as you say - no php.ini, and it is using default settings.

    So - is that a worry, or concern in any way?

  6. #6
    SitePoint Enthusiast
    Join Date
    Jan 2003
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ianmarie
    Thanks all - it tells me it's at /etc - but there's no php.ini file there when I specifically look in that directory (as root). So it must be as you say - no php.ini, and it is using default settings.

    So - is that a worry, or concern in any way?
    No php.ini file was a HUGE worry and concern for me on a windows 2000 machine. I didn't have one initially so when I upgraded to php 4.3, no php.ini meant lots of errors.

    What I did was I made a copy of the php.ini-dist file and renamed it php.ini. I made whatever changes I needed to make in the php.ini file and then everything worked beautifully.

    Hope that info serves you purpose in some way .
    dace

  7. #7
    SitePoint Enthusiast
    Join Date
    Sep 2002
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No errors for me - I am more wondering whether there are security issues?

  8. #8
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    shouldn't be. my php.ini has pretty much the default settings. so basically the same as no php.ini.


Bookmarks

Posting Permissions

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