OS2 World.Com Forum

Subject  :  Apache modules problem
Author  :  Kim
Date  :  15 Jun, 2005 on 15:12
Oh well, kind of getting mighty tired of figuring out how to get Apache to execute the php and mysql modules. All of them are stored within following directory:

d:\program\apache2\modules

so they should be place where the are expected and as well, following has been added to php.ini file:

extension_dir=d:\program\apache2\modules
extension=gd.dll
extension=mysql.dll
extension=pdf.dll

and the php.ini file is located where it is supposed to be:

c:\mptn\etc

and httpd.conf has following entry:

LoadModule php4_module modules/modphp4.dll
AddType application/x-httpd-php .php

what have I missed out?

/Kim


Subject  :  Re:Apache modules problem
Author  :  Henrik
Date  :  15 Jun, 2005 on 17:53
Have place php4.dll in your path?

Henrik


Subject  :  Re:Apache modules problem
Author  :  Kim
Date  :  15 Jun, 2005 on 20:18
Yepp, done that... I mean the php works as it should, but it seems that it's only the extra modules that gives me problems...

Subject  :  Re:Apache modules problem
Author  :  davidfor
Date  :  16 Jun, 2005 on 02:32
What is the actual problem? I have Apache/2 V2, PHP and MySql running together here. VideoDB and phpMyAdmin work without errors. The configuration you list matches mine, so, it is probably some other configuration item.

If aren't getting enough info about the errors, then try increasing the logging detail for PHP and Apache.

---
David


Subject  :  Re:Apache modules problem
Author  :  Kim
Date  :  16 Jun, 2005 on 09:40
But, the main problem is that when I testing for mysql access there is no connectivity. Also other extension such as pdf.dll doesn't work, etc. I got some suggestion that I will try out tonight and a few of them are not within the documentation that came along with the different products. I will go through them and report back here.

But, I would like to ask how well the system performs, since when reading around it seems that the Apache 2 can be a bit pain when it comes to wierd problems and memory leaking. How well does it perform if you compare with a either a linux and windoze system?

Sorry for a 2nd update; but would any know of a tool where I can log the performance of OS2; ie cpu, disk load, etc.? Reason for asking is that I plan, when the system runs, use some tools to check how well it works and give the system some serious load.


Subject  :  Re:Apache modules problem
Author  :  Kim
Date  :  16 Jun, 2005 on 20:47
Well, I've now cleaned out old files and re-installed apache, mysql and php4 with same result. As well, I got a suggestion a link with checklist of things to go through and I did and no change:

http://www.scoug.com/os24u/2003/scoug505.mrkia.html

So soon I'm willing to try anything!!


Subject  :  Re:Apache modules problem
Author  :  Kim
Date  :  16 Jun, 2005 on 21:08
Well, I'm going totally blind here and so totally out of ideas; I've used the default php.ini and only added the extensions needed. But, if anyone would mind to just take a look at the php.ini file and at least confirm that it looks correct, so I can assume that the error is not within it.

Subject  :  Re:Apache modules problem
Author  :  Achain
Date  :  17 Jun, 2005 on 03:18
I think your php.ini is good. however you should check your php actual environment by calling phpinfo(). Try to run attached simple script on you apache.
Then you can check followings easily.
1. php really uses c:\mptn\etc\php.ini?
2. php really uses c:\apache2\mocules as extension_dir?

When extension dlls are loaded by php, you can see specific tebles for them in the result of phpinfo(), under "Configuration
PHP Core" section.


Subject  :  Re:Apache modules problem
Author  :  davidfor
Date  :  17 Jun, 2005 on 03:18
I can't see anything wrong with the PHP.INI. And, the instructions you have followed match what I have done.

So:

- Have you tested that MySql is working?
- Are any errors being displayed? Or written to the Apache log files?
- What PHP package are you testing? Maybe I can test it here.

---
David


Subject  :  Re:Apache modules problem
Author  :  Kim
Date  :  17 Jun, 2005 on 08:54

Achain (17 Jun, 2005 03:26):
1. php really uses c:\mptn\etc\php.ini?
2. php really uses c:\apache2\mocules as extension_dir?

1) Well, php usually doesn't work if there is no access to php.ini and it actually works since php renders php files as it should.

2) Well, here is the bad news, no they are not listed within the php core section. Everything seems to be in order...


Subject  :  Re:Apache modules problem
Author  :  Kim
Date  :  17 Jun, 2005 on 08:57

davidfor (17 Jun, 2005 03:1:
- Have you tested that MySql is working?
- Are any errors being displayed? Or written to the Apache log files?
- What PHP package are you testing? Maybe I can test it here.

From local concole it seems to work; but will give it a try to install local apps that needs mysql.

Errors are displayed and it usually that all the so called extension plugins isn't installed. I've not "enabled" mysql.dll, php.dll and sd.dll. Okey, if one really would make sure that apache/php finds the extensions; what would be suggested directory?

The packages I've tested are videodb and phpmyadmin and both complaint about missing mysql extension.


Subject  :  Re:Apache modules problem
Author  :  Achain
Date  :  17 Jun, 2005 on 11:22

Kim (17 Jun, 2005 08:54):
1) Well, php usually doesn't work if there is no access to php.ini and it actually works since php renders php files as it should.

I worried about that you had too much of php.ini on your system.Once I placed php.ini in the "current" directory for apache (x:\apps\apache2), php used it instead of x:\mptn\etc\php.ini.

by the way, did you restart apache after php.ini modification?


Subject  :  Re:Apache modules problem
Author  :  Kim
Date  :  17 Jun, 2005 on 11:36

Achain (17 Jun, 2005 11:22):
I worried about that you had too much of php.ini on your system.Once I placed php.ini in the "current" directory for apache (x:\apps\apache2), php used it instead of x:\mptn\etc\php.ini.

by the way, did you restart apache after php.ini modification?


Well, there is only one php.ini within the system; then again I will double check it to make sure tonight when I'm home again . And i did also restart apache after each time that I made changes to the curent php.

Is there any way to figure out what php.ini files php/apache uses?


Subject  :  Re:Apache modules problem
Author  :  Achain
Date  :  17 Jun, 2005 on 11:49

Kim (17 Jun, 2005 11:36):
Is there any way to figure out what php.ini files php/apache uses?

We can find almost everything about the php environment in the result of the phpinfo.php. e.g. my case:
- "Configuration File (php.ini) Path : E:\Apps\apache2\php.ini"
- "extension_dir : e:\Apps\php4\modules"
- "mysql" table exists --> mysql.dll extension is actually loaded.


Subject  :  Re:Apache modules problem
Author  :  Kim
Date  :  17 Jun, 2005 on 17:01
Right; I overlooked the content from the phpinfo; so let's see what we get...

Configuration File (php.ini) Path C:\MPTN\ETC\php.ini

extension_dir ./ ./

Well, above extension dir looks wrong.. grr and there is no mention about mysql extension either.

And I now also checked the error log for apache and yes there was a few lines; but I've added the part that is fresh new when I just started Apache. Check attachement.


Subject  :  Re:Apache modules problem
Author  :  Achain
Date  :  17 Jun, 2005 on 17:34
Ah! I got!
"extension_dir" line appears twice in you php.ini. The second one points the wrong place .

>; Directory in which the loadable extensions (modules) reside.
>extension_dir = "./"

After commented out of this line, you must have succes.


Subject  :  Re:Apache modules problem
Author  :  Kim
Date  :  17 Jun, 2005 on 17:58
Arrghh.. Well, what about that I missed out a single ; since everything so much was marked out...

Well, guess after this that I could write an article on what not to do when setting up apache and php.

Well, now php works fine and mysql works; I just tried to set up VideoDB and that worked fine.

phpmyadmin didn't work yet. Hm... let see what the error log says.. Well, never mind for the moment. Just happy to get it to run again.


Subject  :  Re:Apache modules problem
Author  :  Kim
Date  :  17 Jun, 2005 on 21:14

Kim (17 Jun, 2005 18:06):
phpmyadmin didn't work yet. Hm... let see what the error log says.. Well, never mind for the moment. Just happy to get it to run again.

Ok, turned out that I was using the default e editor at the system and forgot to update it to get ride of crap characters..

Case closed; everything now works fine on this system.


Subject  :  Re:Apache modules problem
Author  :  Kim
Date  :  20 Jun, 2005 on 10:21

Achain (17 Jun, 2005 17:34):
Ah! I got!
"extension_dir" line appears twice in you php.ini. The second one points the wrong place .

>; Directory in which the loadable extensions (modules) reside.
>extension_dir = "./"

After commented out of this line, you must have succes.


Notice regarding why I managed to have 2 lines with extension_dir; but the php modul instruction says that ones need to add the line within php.ini and due to that I looked maybe way too fast through it I also missed it out.


Powered by UltraBoard 2000 <www.ub2k.com>