Arlen Beiler
Arlen Beiler

Reputation: 15906

PHP.INI file paths don't seem to work right

I have an apache webserver with PHP and I got PHP setup fine, but I can't get the relative directories to work right. When I set extension_dir like the second line, it can't load the modules, but when I set it using the first it works fine.

extension_dir = "C:\ArlenWebServer\PHP\ext"
extension_dir = ".\ext"

http.conf looks like this:

LoadModule php5_module "C:/ArlenWebServer/PHP/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
PHPIniDir "C:/ArlenWebServer/PHP"

How does the PHP INI file work and what should I do different?

Apache 2.4, PHP 5.4.14

My directory structure looks like this:

/ArlenWebServer
    /Apache24
        /bin
        /conf
        /htdocs
    /PHP
        /ext
        php.ini

Upvotes: 2

Views: 2293

Answers (1)

Arlen Beiler
Arlen Beiler

Reputation: 15906

OK, this works as well: extension_dir = "..\..\PHP\ext".

See my update with directory structure.

It appears to be relative to httpd.exe. The next line in my ini file was error_log = ".\errors.log", and there is a PHP errors.log in the bin directory.

So, is it relative to the bin directory.

Upvotes: 4

Related Questions