Re: relative path in extension_dir php.ini directive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 6, 2009 at 1:46 AM, Ferenc Kovacs <tyra3l@xxxxxxxxx> wrote:

> Hi.
> I would like to build a "portable" wamp stack for myself, and I came across
> a problem, that I couldn't solve on my own.
> I get the latest apache(2.2.11), and php(5.3 rc1), unzipped them, put them
> in a directory structure like:
> c:\wamp\
>   - apache
>   - php
> added the following to the apache\conf\httpd.conf:
> PHPIniDir "../php/php.ini"
> LoadModule php5_module "../php/php5apache2_2.dll"
> And the  ServerRoot, and every other directory reference is also in
> relative form, so this way if I zip the whole thing and unzip it on another
> machine, into another directory, it should be working without the need to
> modify the configuration files.
> But I cant do this with the php extensions.
> I tried to set the extension_dir to ./ext, ./php/ext, ../php/ext but no
> success.
> I thought that the current directory(from which I should set the relative
> path) should be the "apache" or "apache/bin", maybe "php", but it seems
> thats not the case.
> For some reason it seems, that the actual working directory is my
> xampp installation's: c:\xampp\htdocs, and I don't understand why.
> I didn't have this path in my PATH, nor have I anything similar in my
> apache, or php config.
> Anybody have any idea, how should I set the extension_dir to successfully
> point to c:\wamp\php\ext without using absolute reference (with that, it
> works perfectly, but it ruins the whole idea)?
>
> Thanks for your advice.
>
> Tyrael
>
> Okay, so I figured out where I screwed it.I was using a little php-cli
script to start the apache in the background without installing it as a
service.
And the cli and the apache was using the same php.ini.
If I set the extension_dir relative to the apache/bin, then the cli was
throwing the missing dll error, but if I changed to the ./ext, then the
apache php module was missing it.
:)
Now I created separate php.ini for the apache and the cli, and its working
without problem.
Sorry for bothering you guys.

Tyrael

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux