SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot ShinoKage's Avatar
    Join Date
    Apr 2010
    Posts
    154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help installing PHP/Apache manually... php.ini not being read

    Okay, so, I had PHP, Apache, and MySQL installed with WAMP, but I needed an extension to be used that I thought I couldn't change with it using WAMP (I don't know now, I've uninstalled it). So now I'm installing everything manually, but I came across a problem, which I thought I found an answer to in the PHP manual:
    How do I know if my php.ini is being found and read? It seems like it isn't as my changes aren't being implemented.
    To be sure your php.ini is being read by PHP, make a call to phpinfo(). Near the top, there will be a listing called Configuration File (php.ini). This will tell you where PHP is looking for php.ini and whether or not it's being read. If just a directory PATH exists, then it's not being read, and you should put your php.ini in that directory. If php.ini is included within the PATH, it is being read.

    If php.ini is being read and you're running PHP as a module, then be sure to restart your web server after making changes to php.ini

    See also php_ini_loaded_file().

    How do I add my PHP directory to the PATH on Windows?
    • On Windows NT+ and Windows Server 2000+:
    • Go to Control Panel and open the System icon (Start -> Settings -> Control Panel -> System, or just Start -> Control Panel -> System for Windows XP/2003+)
    • Go to the Advanced tab
    • Click on the 'Environment Variables' button
    • Look into the 'System Variables' pane
    • Find the Path entry (you may need to scroll to find it)
    • Double click on the Path entry
    • Enter your PHP directory at the end, including ';' before (e.g. ;C:\php)
    • Press OK
    So I did all that, but from what I can tell it's still not reading the file. Any suggestions?

  2. #2
    SitePoint Addict Zarin Denatrose's Avatar
    Join Date
    Jan 2009
    Location
    Surrey BC, Canada
    Posts
    309
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try setting the PHPIniDir variable in your Apache httpd.conf file. Mine is set like this:
    Code:
    LoadModule php5_module "/server/php/php5apache2_2.dll"
    PHPIniDir "/server/php"
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    These paths are relative to the root of the drive they reside on in windows.
    If you want to test this before digging through your conf file, just paste this code at the end, and substitute your own paths.
    You will need to reset your server for any changes to take effect.

  3. #3
    SitePoint Zealot ShinoKage's Avatar
    Join Date
    Apr 2010
    Posts
    154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Arg, it didn't work.... I think my computer's just retarded -_- (I even remembered to restart apache and everything )

    Thank you anyways. With all this trouble I can just upload it and develop from my host's server. I can always reinstall WAMP....

  4. #4
    SitePoint Addict Zarin Denatrose's Avatar
    Join Date
    Jan 2009
    Location
    Surrey BC, Canada
    Posts
    309
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hold on now, there are things that can be done.

    First off, where is your new server being set up, where was the old one, and what is the current php.ini that is being loaded?

  5. #5
    SitePoint Zealot ShinoKage's Avatar
    Join Date
    Apr 2010
    Posts
    154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, my original server was saved under c:\program files\wamp\ or something like that. But I uninstalled it.

    I have no clue what php.ini file is being used because I don't have one in the place it's supposedly looking (according to that FAQ thing I posted before).

    The phpinfo page says:
    Configuration File (php.ini) Path: C:\Windows
    Loaded Configuration File: C:\Programs\PHP\5.3.5\php.ini
    But every time I try to make changes, nothing happens... >.>


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
  •