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: Apache can´t load php modules on Win XP
Author
Camo



Joined: 05 Mar 2013
Posts: 10
Location: SK

PostPosted: Tue 05 Mar '13 21:25    Post subject: Apache can´t load php modules on Win XP Reply with quote

Hi there,
This is the third day what I trying to install apache with php so I think I need help.
Today Apache 2.4 and PHP5.4 on Win XP works but without any extensions which I would like to have.
Ext dir is ok and contains required files. I know that I need to load "some" dll files "somewhere", but I don't know where I can finf them and where should I load them.. In PHP and Apache folders I can´t find any of this files. Can you tell me where I can find them and where to load them? Thank you very much.
In error log is written:
Code:
[Tue Mar 05 17:41:38.906250 2013] [mpm_winnt:notice] [pid 2776:tid 428] AH00424: Parent: Received restart signal -- Restarting the server.
[Tue Mar 05 17:41:39.171875 2013] [mpm_winnt:notice] [pid 2776:tid 428] AH00455: Apache/2.4.4 (Win32) configured -- resuming normal operations
[Tue Mar 05 17:41:39.171875 2013] [mpm_winnt:notice] [pid 2776:tid 428] AH00456: Server built: Mar  1 2013 20:59:19
[Tue Mar 05 17:41:39.171875 2013] [core:notice] [pid 2776:tid 428] AH00094: Command line: 'C:\\Apache24\\bin\\httpd.exe -d C:/Apache24 -f C:\\Apache24\\conf\\httpd.conf -d C:\\Apache24\\.'
[Tue Mar 05 17:41:39.187500 2013] [mpm_winnt:notice] [pid 2776:tid 428] AH00418: Parent: Created child process 2120
[Tue Mar 05 17:41:40.906250 2013] [mpm_winnt:notice] [pid 3980:tid 1768] AH00364: Child: All worker threads have exited.
PHP Warning:  PHP Startup: Unable to load dynamic library 'ext\\php_bz2.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'ext\\php_curl.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'ext\\php_gd2.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'ext\\php_mbstring.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'ext\\php_mysql.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'ext\\php_mysqli.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'ext\\php_openssl.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'ext\\php_pdo_mysql.dll' - The specified module could not be found.\r\n in Unknown on line 0
[Tue Mar 05 17:42:00.359375 2013] [mpm_winnt:notice] [pid 2120:tid 1736] AH00354: Child: Starting 64 worker threads.
tp://localhost/index.php
[Tue Mar 05 19:05:22.656250 2013] [:error] [pid 2120:tid 1228] [client 127.0.0.1:2771] PHP Fatal error:  Call to undefined function mysql_connect() in C:\\Apache24\\htdocs\\DBconnect.php on line 10
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 05 Mar '13 22:11    Post subject: Reply with quote

How is the path of your extdir? Full path?
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1266
Location: Amsterdam, NL, EU

PostPosted: Wed 06 Mar '13 0:44    Post subject: Reply with quote

Check the extension_dir setting in your php.ini
Back to top
Camo



Joined: 05 Mar 2013
Posts: 10
Location: SK

PostPosted: Thu 07 Mar '13 20:07    Post subject: Reply with quote

I am sorry that I was no responding, I am sick...

Here si a part of php.ini which describes ext dir:
Code:
doc_root =

; The directory under which PHP opens the script using /~username used only
; if nonempty.
; http://php.net/user-dir
user_dir =

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "./"
; On windows:
extension_dir = "ext"


I thought that the engine takes it as a relative path. Doesn´t he?

EDIT:
I found here the same problem: http://www.codingforums.com/archive/index.php/t-224342.html
Acording that link I tried to find the libmySQL.dll file on a disc. I found it at the three places: C:\WINDOWS\system32; C:\Program Files\MySQL\MySQL tools for 5.0 and C:\Program Files\MySQL\MySQL Server 5.1\bin
Is it ok?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Thu 07 Mar '13 21:18    Post subject: Reply with quote

extension_dir = "ext" Needs to be a full path like

extension_dir = "C:\php544\ext"
Back to top
Camo



Joined: 05 Mar 2013
Posts: 10
Location: SK

PostPosted: Thu 07 Mar '13 21:29    Post subject: Reply with quote

James:
YES!!! It works. But why it didn´t work with relative path? It was original setting from php.net.

Thank you very much!
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1266
Location: Amsterdam, NL, EU

PostPosted: Fri 08 Mar '13 19:55    Post subject: Reply with quote

James Blond wrote:
extension_dir = "ext" Needs to be a full path like
extension_dir = "C:\php544\ext"

To be a bit more portable it could also be:
extension_dir = "/php544/ext"

extension_dir = "ext" or "./ext" will work from within the directory where php.exe and php-cgi.exe are located, but things like php5apache2_?.dll are often located in apache\bin and then paths go astray.

I often experiment with using apache\bin as the home directory of php itself. I began doing that when I discovered I had to put some DLL's both in apache\bin and in php's directory. By joining those directories I could save space on a portable installation of Apache.
Back to top
Camo



Joined: 05 Mar 2013
Posts: 10
Location: SK

PostPosted: Sat 09 Mar '13 16:43    Post subject: Reply with quote

Jan-E:
\PHP54\ext works too. But the php.exe php-cgi.exe and php5apache2_4.dll are in the same directory as ext dir. It means - I don´t understant how it works...
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Mon 11 Mar '13 17:40    Post subject: Reply with quote

Why the fullpath? Cause the php dev made it so. When I asked them why, they told "for good reasons". I think it has to do that Windows usualy uses the files in %PATH% first. And to prevent loading wrong files (e.g. some people copied the dlls into C:\Windows\system32\ ) they force a full path.
Back to top
Camo



Joined: 05 Mar 2013
Posts: 10
Location: SK

PostPosted: Mon 11 Mar '13 18:12    Post subject: Reply with quote

It makes sense.
It would be good to php.ini had some coment to this directive. There is nothing about it.

PS: I have some dlls in system32 too. Should I remove it from there?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Mon 11 Mar '13 18:33    Post subject: Reply with quote

Camo wrote:
It makes sense.
It would be good to php.ini had some coment to this directive. There is nothing about it.


File a feature request at https://bugs.php.net/

Camo wrote:

PS: I have some dlls in system32 too. Should I remove it from there?


If you putted them there yourself than yes. Don't remove native windows dlls Wink
Back to top
Camo



Joined: 05 Mar 2013
Posts: 10
Location: SK

PostPosted: Mon 11 Mar '13 18:38    Post subject: Reply with quote

Little problem is that I don´t know if that dlls are from me or not. It seems like a older instalations of Apache. But I am not sure about it.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Mon 11 Mar '13 18:46    Post subject: Reply with quote

Then leave it as is. Binaries from AL or AH use the correct dlls and the PHP as you noticed, too.
Back to top
Camo



Joined: 05 Mar 2013
Posts: 10
Location: SK

PostPosted: Mon 11 Mar '13 18:56    Post subject: Reply with quote

Ok thanks.
Back to top


Reply to topic   Topic: Apache can´t load php modules on Win XP View previous topic :: View next topic
Post new topic   Forum Index -> Other Software