Click to See Complete Forum and Search --> : Cannot load API module structure PHP4_module


p818
07-18-2003, 08:38 AM
Please Help

I downloaded PHP 4.3.1 version...installed under apache.. editing ini and conf file....and copied all dlls to c:/winnt/system32 as well as to c:\apache\bin..... but when i try to run apache...i'm getting below error...........

Can't locate API module structure `php4_module' in file c:/Apache/modules/php/sapi/php4apache.dll: cified procedure could not be found:

Somebody please help ASAP..

Regards

tsinka
07-18-2003, 03:26 PM
Hi,

did you install it over an already installed older version of php ? This error message in most cases appear if you mix up some dlls, e.g. using php4ts.dll of an older version with a newer release. Make sure that you also copy the php4ts.dll that comes with the new php version to the system32 directory. This error might also appear if you didn't copy php4ts.dll to the system32 directory at all.

Hope this helps you :)

Thomas

tsinka
07-18-2003, 03:29 PM
One more suggestion:

If you use apache 2.x you need to use php4apache2.dll instead of php4apache.dll.

Thomas

p818
07-19-2003, 01:43 AM
I'm using apache 1.3.........
i'd first installed apache under Program Files.....after editing the httpd.conf file..when i got the earlier mentioned error..i thought it must a path problem as it has spaces...i tried uninstalling apache...but i didn't had enough privileges to uninstall....so it was a failure...i again installed apached under root....and copied PHP files under apache/modules...and as per the requirements i copied all dlls to c:\winnt\system32.

But still no luck........i'm getting same error.......

What must be the problem...............

tsinka
07-19-2003, 12:28 PM
These are the steps that worked for me on all installations so far (you might need to remove the dlls you copied to the windows or system32 directory first:

1) make sure that you use the zip version of php not the msi installer version
2) install apache into a path that doesn't contain any white spaces (e.g. c:\wamp\apache)
3) unzip the php zip file to e.g. c:\wamp\php (not inside the apache installation directory)
4) copy php4ts.dll to system32
5) copy all files from dlls to system32
6) do not copy any php dlls anywhere to the apache installation directory.
7) Make sure that there are no old php dlls in any path set in the PATH environment variable and that there are no php dlls outside system32 at all (might be a pain if you want to upgrade php at a later time and it doesn't work because there are any dlls where they shouldn't be)
8) Edit httpd.conf and add the following lines:

LoadModule php4_module c:\wamp\php\sapi\php4apache.dll
at the end of the LoadModule block

AddModule mod_php4.c
at the end of the AddModule block

AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
somewhere below the AddModule block.


Then restart Apache and it *should* work, you never know for sure but I never had any big problems with this installation procedure.

Hope this helps you :)

Thomas

p818
07-21-2003, 01:25 AM
Hi! Thomos

Thanks very much..........

Its working..............i followed the steps....i removed everyhting and installed it again...it think the problem was with the version...i've downloaded php 5 but the dlls were of php4 ...

Can you please help with one more thing.....
I'm trying to implement credicard transaction in the site......i'm using VeriSign for the same.......everythings was ok....but lately i came to know that...i need VeriSign Pay Pro SDK in order to use there account.......but when i contacted them they said...non US citizens are people outside US cannot use this test service......

Can u guide me...which other providers can i go for............

Thanks

tsinka
07-21-2003, 03:17 AM
Hi,

maybe VeriSing Australia might be the right contact ...

http://www.verisign.com.au/press/2003/20030311.shtml

You're living in Bangalore, India, right ?

p818
07-21-2003, 03:49 AM
Yes, i work in bangalore. Thanks for the URL... let me go thro it.......

raroo
07-22-2003, 06:37 PM
Here is a QAD configuration example
for php5 with apache2 under XP.

1. unpacking apache
2. configureing httpd.conf
3. opening dos-box
cd \apache\apache2
bin\apache
... works ... ok. let's start php

4. unpacking php to \php\php
5. copy php.ini to \apache\apache2\bin
6. configure php.ini
7. copy php4ts.dll to \php\php\dlls
8. copy php4apache2.dll to \php\php\dlls
9. change httpd.conf
as last statement in module block
LoadModule php5_module /php/php/dlls/php4apache2.dll
... please note the 5 (!) ... that kept
very busy today
Just below adding
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
10. cd \apache\apache2
bin\apache

Works!

The good thing about it, uninstalling is easy. Just delete \apache and \php. The second thing is, that customers claiming your installation to interfere with there system can be proofed, that
everything is running quite isolated.

Thanks go to the strace-people. That helped a lot to understand, what is really going on.

somand
07-29-2003, 06:02 PM
(php-5.0.0b1-Win32 on Apache 1.3.27)

That last post from raroo gave me the clue I needed...

Install.txt instructions say:

"...you're ready to
finally configure Apache to load the PHP4 module. Just add the
following lines to your httpd.conf:
LoadModule php4_module c:/php/sapi/php4apache.dll
AddModule mod_php4.c
AddType application/x-httpd-php .php
..."

However, should be:

LoadModule php5_module c:/php/sapi/php4apache.dll
AddModule mod_php5.c
AddType application/x-httpd-php .php

With this change Apache now starts...
"
C:\apache13\Apache>Apache.exe
Apache/1.3.27 (Win32) PHP/5.0.0b1 running...
"

w3it
08-17-2003, 01:19 PM
Originally posted by tsinka
[B]These are the steps that worked for me on all installations so far (you might need to remove the dlls you copied to the windows or system32 directory first

Thomas, thanks. This is just what I was looking for. You saved the day!