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: Starting Apache with PHP failure
Author
semeur



Joined: 30 Dec 2012
Posts: 7
Location: France

PostPosted: Sun 30 Dec '12 23:36    Post subject: Starting Apache with PHP failure Reply with quote

I removed older versions of Apache and PHP from my Wndows-7 machine and installed Apache24 and php-5.4.10-Win32-VC9-x86.

Apache has been installed as a service but won't start.

Using the the command line I see following:

C:\Program Files\Apache Lounge\Apache24\bin>httpd

httpd: Syntax error on line 529 of C:/Program Files/Apache Lounge/Apache24/conf/
httpd.conf: Cannot load C:/Program Files (x86)/PHP/php5apache2_4.dll/ into server: Le module sp\xe9cifi\xe9 est introuvable.

What kind of module is this? I have the usual PHP statement in the Apache conf file, as follows:

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
LoadModule php5_module "C:/Program Files (x86)/PHP/php5apache2_4.dll/"
AddType application/x-httpd-php .php5
PHPIniDir "C:/Program Files (x86)/PHP/"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

The php5apache2_4.dll is of course available

Is there a solution to my problem? Any help is welcome! Thanks in advance.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Mon 31 Dec '12 9:24    Post subject: Reply with quote

by looking at your paths, I'd say you are trying to run a 32bit module in a 64bit Apache. That is not a possible combination.

Apache x64 + mod_fcgid x64 + php x86 via php-cgi.exe
Apache x86 + php x86 via php5apache2_4.dll
Back to top
semeur



Joined: 30 Dec 2012
Posts: 7
Location: France

PostPosted: Sat 05 Jan '13 1:11    Post subject: Post subject: Starting Apache with PHP failure Reply with quote

Thank you for your quick reaction.

The bad news was that after a day running in circles I had to decide to go back to basics. So I installed Apache (httpd-2.4.3-win64.zip) bit alone and found out that in order to go anywhere, the command line interface had to be started as administrator and, most embarassing, that I took the document root for server root. Embarassed Which explains the module sp\xe9cifi\xe9 not found error, which has consequently nothing to do with PHP.

The good news is that, once I had Apache working, I installed PHP (php-5.4.3-Win32-VC9-x64.zip from Anindya's Blog) and made that working with Apache via the php5apache2_4.dll; I tested this with "echo phpinfo()", so a complete 64 bit Apache-PHP-MySQL combo. Future will learn if this also a full swinging and dancing system with all bells and wistles....

I hope this is useful for others. Thanks for your help!
Back to top
semeur



Joined: 30 Dec 2012
Posts: 7
Location: France

PostPosted: Sat 26 Jan '13 21:38    Post subject: Starting Apache with PHP failure Reply with quote

Hello!

I have still a problem with my 64-bit Apache-PHP-MySQL configuration, as follows:

Though the PHP-INFO works, I am unable to connect to MySQL. The PHP-INFO shows that the mysql-connect etc. functions are not available; the mysqlnd driver is there.

This seems to be an Apache problem. When I test the same (64 bit)PHP Version 5.4.10 with the internal httpd server (port 8080) of my very old PHP Expert Editor, there are no connection problems and mysql-connect is visible in the PHP-INFO.

Any ideas why APACHE 2.4 is not connecting to MySQL?

Thanks in advance

GZ
Back to top
James Blond
Moderator


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

PostPosted: Tue 29 Jan '13 15:33    Post subject: Reply with quote

Maybe you used in the script localhost instead of 127.0.0.1 ?
Back to top
semeur



Joined: 30 Dec 2012
Posts: 7
Location: France

PostPosted: Wed 30 Jan '13 0:59    Post subject: Starting Apache with PHP failure Reply with quote

Thanks,

there is no difference between 127.0.0.1, "localhost" and the servername "sb-2". Checked PHPinfo on IE9, Firefox and Chrome listening on port 80.

The problem must be somewhere else! Can the Httpd.conf file block any mysql or mysqli functions?

Or is there a problem with php5apache2_4.dll in the 64-bit environment?

GZ
Back to top
James Blond
Moderator


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

PostPosted: Sat 02 Feb '13 11:25    Post subject: Reply with quote

Nope apache itself can't block PHP.
Since you wrote that the function is not available, do you load mysql extension in your php.ini?
Back to top
semeur



Joined: 30 Dec 2012
Posts: 7
Location: France

PostPosted: Sun 03 Feb '13 0:45    Post subject: Starting Apache with PHP failure Reply with quote

Agreed, but the PHPini file loads the mysql and mysqli extensions properly; I can use them with the PHP Expert Editor internal 32-bit HTTP server, but not with Apache24(64-bit). I tested also with Apache22(64-bit), same problem.

I identified another problem: in all configurations above, httprequest-post will connect to the corresponding callback "getpost" php-function, but the posted data will not be transmitted. So ajax is out!

I have on a different machine a 32-bit Appache22/PHP53/Mysql combi that doesn't show any of these problems. All ajax functions working fine.

So there must be problem in the 64-bit setup, but where?

GZ
Back to top
James Blond
Moderator


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

PostPosted: Mon 04 Feb '13 13:05    Post subject: Reply with quote

if you run a phpinfo() script is the correct php.ini loaded?
Back to top
semeur



Joined: 30 Dec 2012
Posts: 7
Location: France

PostPosted: Thu 07 Feb '13 22:47    Post subject: Starting Apache with PHP failure Reply with quote

As far as I can see the PHP.ini is correct.

I upgraded my 32-bit configuration on a different computer to the latest software versions. Apache24 an PHP folders both in the "Program Files (x86)" folder. The system works very well with mysql, provided that the PHP folder is "PHP" and not something like "PHP345", which breaks mysql (but not the rest of PHP)!

Based on this experience I tried several 64-bit set-ups of Apache and PHP folders direct under the root of the windows disk C:\, under "program files" and even under "program files (x86)". No way to get mysql operational.

This seems a deadlock because of some problem in the PHP/MYSQL modules.

Any idea's?

GZ
Back to top
semeur



Joined: 30 Dec 2012
Posts: 7
Location: France

PostPosted: Wed 07 Aug '13 23:52    Post subject: Post subject: Starting Apache with PHP failure Reply with quote

PROBLEM SOLVED! (in a stupid way......)

I left my problem alone for a while, I had sufficient other ones. After a good testing session today, I found the solution.

The culprit is in the PHP ini file. As in the Apache conf file it is necessary to specify the full path for "ext", that is all. As follows in my case:

extension_dir = "c:/Program files/PHP54-12/ext"

in stead of the suggested standard

extension_dir = "ext"


Have a nice holiday!

Gerrit
Back to top


Reply to topic   Topic: Starting Apache with PHP failure View previous topic :: View next topic
Post new topic   Forum Index -> Other Software