logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: cannot load php5apache2_2.dll etc etc, please dome help
Author
galanta



Joined: 02 May 2007
Posts: 5

PostPosted: Wed 02 May '07 16:21    Post subject: cannot load php5apache2_2.dll etc etc, please dome help Reply with quote

Hello

I have apache 2.2.4 installed and try to configure php to work as a sapi module.

I follow the instructions of setting the httpd.conf, place all the files where necessary (it is not the first time I do it) and yet I can't make it work.

The message I get is that 'The requested operation has failed'. If I run the test configuration of apache, then it shows this:

Quote:

httpd.exe: Syntax error on line 119 of httpd.exe: Syntax error on line 119 of C:/home/apache/conf/httpd.conf: Cannot lo
ad C:/php/php5apache2_2.dll into server: \xc4\xe5\xed \xde\xf4\xe1\xed \xe4\xf5\
xed\xe1\xf4\xfc \xed\xe1 \xe5\xed\xf4\xef\xf0\xe9\xf3\xf4\xe5\xdf \xe7 \xea\xe1\
xe8\xef\xf1\xe9\xf3\xec\xdd\xed\xe7 \xec\xef\xed\xdc\xe4\xe1.


If I change to php4 with all the necessary changes (replace php5apache2.dll with php4apache2.dll where necessary as well as in the httpd.conf and all other changes required like paths etc) then I get the same error message.

Any ideas? By the way, if I comment the line that adds the module to the apache configuration, then apache starts without problem.
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Wed 02 May '07 23:29    Post subject: Reply with quote

For Apache 2.2.4, the file name should be php5apache2_2.dll, like in your quote - not php5apache2.dll like in your comments.

The error message should contain an explanation after the ':', but your message has hex characters instead - \xc4 \xe5, etc.

Maybe this is a character set problem. Does your system have a multi-byte default character set like Chinese or Japanese or Korean?

-tom-
Back to top
galanta



Joined: 02 May 2007
Posts: 5

PostPosted: Thu 03 May '07 12:32    Post subject: Reply with quote

Yes, I know about php5apache2_2.dll and in my settings the reference is correct. Besides, the same problem appears with php4apache2.dll.

As for your question, my system is windows xp home greek, but I am not sure whether the default character set is greek, which includes double-byte characters.

Should I translate these hex codes and how? May this cause my problem? I would like to remind you that if I comment that line in apache httpd.conf, then apache starts fine. It is these lines that load the php module that cause it not to start.

Thanks for your reply
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Thu 03 May '07 16:27    Post subject: Reply with quote

You could try starting Apache from a command window with this:
Quote:
httpd.exe -w -e debug


Hopefully either the screen output or C:\home\apache\logs\error.log will have better information about why you cannot load php5apache2_2.dll.

Does line 119 of you httpd.conf look like this?
Quote:
LoadModule php5_module "C:/PHP521/php5apache2_2.dll"

Your PHP directory may be different of course, but the rest of the LoadModule directive should be similar.
It is important to use forward-slashes /, not back-slashes \, in httpd.conf.

Please post the LoadModule directive (line 119) from your httpd.conf which loads PHP.

-tom-
Back to top
galanta



Joined: 02 May 2007
Posts: 5

PostPosted: Thu 03 May '07 18:19    Post subject: Reply with quote

Hello and thanks again

I did what you said, starting apache from the command line...

I receive some messages where each line says that a module has been loaded until the php module, where it says the same message with the hex words and then it halts.

I had a look at the error log and it is empty. (is that maybe because it logs web visit errors and not system errors? I don't know, I just guess)

My lines 119,120,121 look like this:

Code:
LoadModule php5_module "c:/home/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/home/php"


and indeed my php directory is the one mentioned. I have placed the critical files (php5apache2_2.dll and php5ts.dll) all over my system just in case it tries to load it from somewhere else. They are in windows folder, windows/system, windows/system32 etc etc...

Also, both php and apache folders are in the path of my system.

Honestly I am lost now, because in the past I have set apache and php several times with very few problems and now I have no idea what else to try.

Thanks for any idea
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Thu 03 May '07 19:22    Post subject: Reply with quote

Placing the critical files "all over your system" is probably a bad idea. The PHP files should only be in the C:\home\php directory.

You may want to download a program named Dependency Walker from http://support.microsoft.com/kb/256872 or from http://www.dependencywalker.com/.

If you have previously installed a Microsoft C++ compiler on your system you may already have this program.

This program can load a .dll and display all the other .dll's that it requires.
Perhaps it will display a more useful error message for you.

To check your PHP libraries from a command window, you should first change to the C:\home\apache\bin directory and set your PATH to:
Quote:
PATH=%SystemRoot%;%SystemRoot%\System32;C:\home\php;C:\home\apache\bin


then enter this command:
Quote:
Depends.exe c:/home/php/php5apache2_2.dll


-tom-
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Fri 04 May '07 16:45    Post subject: Reply with quote

FYI - if the hex codes are interpreted in the windows-1253 (Greek) character set, they are:
Quote:
Δεν ήταν δυνατό να εντοπιστεί η καθορισμένη μονάδα


Perhaps this message means something to you?

-tom-
Back to top
galanta



Joined: 02 May 2007
Posts: 5

PostPosted: Fri 04 May '07 17:24    Post subject: Reply with quote

Yes, this message is meaningful now, and it would translate to something like 'can't locate the specified drive/unit', though this is not very helpful by itself...

I made the same installation on another system, used the same settings (actually copied the php directory as well as httpd.conf for apache) and the whole thing worked, so the problem must be something with my system and not with apache and php...

I would better say it should be something with my system because it is not any more. I formatted the pc, reinstalled windows and then used the same settings and yes, it works...

I wonder whether it could have been some sort of virus or other malicious software, although I find it very hard to be the case...

Anyway, I really thank you for your help and your interest!!

I had to spend some hours to re-install everything but now it works as I want. Thanks once again!
Back to top
galanta



Joined: 02 May 2007
Posts: 5

PostPosted: Fri 04 May '07 17:29    Post subject: Reply with quote

oh yes...and if placing the critical files all over the system misht cause the problem, then maybe that was it.. hour difference didn't let me check your post before formatting but it is true that I had put those files all over the place just in case...

and now that I made a clean install they were only in php directory...so maybe...who knows now..thanks again for your time
Back to top


Reply to topic   Topic: cannot load php5apache2_2.dll etc etc, please dome help View previous topic :: View next topic
Post new topic   Forum Index -> Other Software