Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Apache 2 and PHP 5 -

 
   Web Hosting Problem Solving Community! (Home) -> Apache RSS
Next:  HELP: Debug .NET asp code on 2003/IIS6 with multi..  
Author Message
yonnermark1

External


Since: Mar 29, 2004
Posts: 6



(Msg. 1) Posted: Tue Jan 11, 2005 5:35 pm
Post subject: Apache 2 and PHP 5 -
Archived from groups: alt>apache>configuration (more info?)

[my own opinion of what could be the problem is written in the final
paragraph of this post. Jump to there if you don't want the background of
the problem]

Hello all.

After a clean install of Apache 2 and PHP 5 I am trying to run the test for
my Apache configuration using the following options from the Programs list
in WinXP Pro:

Configure Apache Server > Test Configuration

When I do that however, I got the following error message:

Syntax error on line 12 of C:/Program Files/Apache
Group/Apache2/Conf/httpd.conf:
Cannot load C:/php/php4apache2.dll into server: The specified module could
not be found

Can anyone suggest why the test does not work?

I installed Apache 2 from here
http://httpd.apache.org/

And I did a careful manual installation of PHP5

I can confirm that going to http://localhost/ does indeed bring up the
default "successful Apache installation" page. However, I wanted to test my
php too so I created the file phpinfo.php with the content [ <?php
phpinfo(); ?> ] and saved it to [what I think is] my web server root
(C:/Program Files/Apache Group/Apache2) and then when I tried to view
http://localhost/phpinfo.php in my browser I got a 404 File Not Found.

So it would seem that Apache is fine, but PHP is not working. My Apache
httpd file quote the following as my server root:

C:/Program Files/Apache Group/Apache2

My Idea:
I think the only thing I may have done wrong is when I first started the
Apache installation application it asked me what my server name was and gave
the example "somedomain.com" and then it asked for my server location (I
think) and gave the example www.somedomain.com. I had no idea what to put so
I invented a fictitious domain for those 2 fields. Could this be the source
of my problem? What should I have put there?

Many thanks for any tips
Regards,
Mark

 >> Stay informed about: Apache 2 and PHP 5 - 
Back to top
Login to vote
user3387

External


Since: Jan 03, 2005
Posts: 14



(Msg. 2) Posted: Tue Jan 11, 2005 5:35 pm
Post subject: Re: Apache 2 and PHP 5 - [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Yonnermark" <yonnermark DeleteThis @hotmail.com> wrote in
news:34iu52F4b5e8tU1@individual.net:

 > Syntax error on line 12 of C:/Program Files/Apache
 > Group/Apache2/Conf/httpd.conf:
 > Cannot load C:/php/php4apache2.dll into server: The specified module
 > could not be found
 >
It says it can't find a file called php4apache2.dll, which is on your C
drive, in the /php/ directory. Find out where that file is, and copy it to
the correct place.

--
Terry Austin
<a style='text-decoration: underline;' href="http://www.hyperbooks.com" target="_blank">www.hyperbooks.com</a>
Campaign Cartographer now available<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Apache 2 and PHP 5 - 
Back to top
Login to vote
yonnermark1

External


Since: Mar 29, 2004
Posts: 6



(Msg. 3) Posted: Tue Jan 11, 2005 5:35 pm
Post subject: Re: Apache 2 and PHP 5 - [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

  > > Syntax error on line 12 of C:/Program Files/Apache
  > > Group/Apache2/Conf/httpd.conf:
  > > Cannot load C:/php/php4apache2.dll into server: The specified module
  > > could not be found
  > >
 > It says it can't find a file called php4apache2.dll, which is on your C
 > drive, in the /php/ directory. Find out where that file is, and copy it to
 > the correct place.

Thanks Terry,
I've searched my C drive and that file doesn't seem to exist. I've installed
PHP 5 so are you sure I should even need php4apache2.dll ? I guess it's for
backwards-compatability or something??

Either way it looks like I need that file. I've tried google and I've tried
<a style='text-decoration: underline;' href="http://www.php.net" target="_blank">www.php.net</a> but I can't seem to find that file for individual download. Any
ideas where I can find that?

Thanks again Terry
Regards,
Mark<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache 2 and PHP 5 - 
Back to top
Login to vote
user3387

External


Since: Jan 03, 2005
Posts: 14



(Msg. 4) Posted: Tue Jan 11, 2005 5:35 pm
Post subject: Re: Apache 2 and PHP 5 - [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Yonnermark" <yonnermark DeleteThis @hotmail.com> wrote in
news:34j07eF4c5j1jU1@individual.net:

 >
   >> > Syntax error on line 12 of C:/Program Files/Apache
   >> > Group/Apache2/Conf/httpd.conf:
   >> > Cannot load C:/php/php4apache2.dll into server: The specified
   >> > module could not be found
   >> >
  >> It says it can't find a file called php4apache2.dll, which is on your
  >> C drive, in the /php/ directory. Find out where that file is, and
  >> copy it to the correct place.
 >
 > Thanks Terry,
 > I've searched my C drive and that file doesn't seem to exist. I've
 > installed PHP 5 so are you sure I should even need php4apache2.dll ?
 > I guess it's for backwards-compatability or something??
 >
 > Either way it looks like I need that file. I've tried google and I've
 > tried <a style='text-decoration: underline;' href="http://www.php.net" target="_blank">www.php.net</a> but I can't seem to find that file for individual
 > download. Any ideas where I can find that?
 >
I'm far from an expert on these things, and don't use PHP5 due to
incompatibility with the webmail script I use. Plus, I use a package called
Xampp that has PHP, MySQL and Apache 2 all integrated in a single install
package, so I didn't have to set anything up.

But, when I compare the two httpd.conf files, for PHP4 and PHP5, I find
that file being loaded for PHP4, but not for PHP5. In the httpd.conf for
PHP5, the same spot is loading php5apache2.dll. So, at a guess, you were
using instructions that were either for PHP4, or simply had an error. Try
searching for php5apache2.dll, and if you find it, change the reference to
that.

--
Terry Austin
<a style='text-decoration: underline;' href="http://www.hyperbooks.com" target="_blank">www.hyperbooks.com</a>
Campaign Cartographer now available<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache 2 and PHP 5 - 
Back to top
Login to vote
yonnermark1

External


Since: Mar 29, 2004
Posts: 6



(Msg. 5) Posted: Tue Jan 11, 2005 6:35 pm
Post subject: Re: Apache 2 and PHP 5 - [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

 > Plus, I use a package called
 > Xampp that has PHP, MySQL and Apache 2 all integrated in a single install
 > package, so I didn't have to set anything up.

I was going to go down that route but I think both php.net and the apache
website also recommends a manual install over combination packages. But I'm
not a heavy user and if it works for you I think I'll give it a go also.

 > Try
 > searching for php5apache2.dll, and if you find it, change the reference to
 > that.

I actually didn't understand that suggestion. What is the reference that you
refer to?

thanks
Mark<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache 2 and PHP 5 - 
Back to top
Login to vote
user3387

External


Since: Jan 03, 2005
Posts: 14



(Msg. 6) Posted: Tue Jan 11, 2005 6:35 pm
Post subject: Re: Apache 2 and PHP 5 - [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Yonnermark" <yonnermark RemoveThis @hotmail.com> wrote in
news:34j22tF4ck73hU1@individual.net:

  >> Plus, I use a package called
  >> Xampp that has PHP, MySQL and Apache 2 all integrated in a single
  >> install package, so I didn't have to set anything up.
 >
 > I was going to go down that route but I think both php.net and the
 > apache website also recommends a manual install over combination
 > packages. But I'm not a heavy user and if it works for you I think
 > I'll give it a go also.

The apache folks and the PHP folks are both excessively cautious about such
things, for good reasons (for them). But those reasons don't necessarily
appliy to everyone.

No package is better than the people who put it together, but the xampp
folks are actively supporting it, and there aren't too many problems (and
those usually get fixed quickly). I'd recommend them, unless you have lives
or more money than you can afford to lose at stake on its utter
realibility. <a style='text-decoration: underline;' href="http://apachefriends.org/" target="_blank">http://apachefriends.org/</a>

Takes less time to install than to download (and I'm on a T-1). Be sure to
look up the forum, if you have any issues.
 >
  >> Try
  >> searching for php5apache2.dll, and if you find it, change the
  >> reference to that.
 >
 > I actually didn't understand that suggestion. What is the reference
 > that you refer to?
 >
The error you are receiving is from Apache trying to load a file called
php4apache2.dll. It is told to do so by the httpd.conf file, which I'm
assuming you know how to find because you can't have gotten to this point
without having edited it already.

What you need to do (I think) is open up that httpd.conf file, and do a
search for that file name. You should find two lines, probably:

LoadFile "c:/apachefriends/xampp/apache/bin/php4ts.dll"
LoadModule php4_module "c:/apachefriends/xampp/apache/bin/php4apache2.dll"

They may or may not be together.

Change the php4 in both of them to php5. Leave the rest alone.

Those are the only differences I see in the two httpd.conf files I have
(xampp comes with templates for both PHP4 and PHP5).

You'll have to stop and restart Apache for the changes to take effect.

--
Terry Austin
<a style='text-decoration: underline;' href="http://www.hyperbooks.com" target="_blank">www.hyperbooks.com</a>
Campaign Cartographer now available<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache 2 and PHP 5 - 
Back to top
Login to vote
yonnermark1

External


Since: Mar 29, 2004
Posts: 6



(Msg. 7) Posted: Tue Jan 11, 2005 7:35 pm
Post subject: Re: Apache 2 and PHP 5 - [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

<snip very useful recommendation of Xapp (thanks)>

 > What you need to do (I think) is open up that httpd.conf file, and do a
 > search for that file name. You should find two lines, probably:
 >
 > LoadFile "c:/apachefriends/xampp/apache/bin/php4ts.dll"
 > LoadModule php4_module "c:/apachefriends/xampp/apache/bin/php4apache2.dll"
 >
 > They may or may not be together.
 >
 > Change the php4 in both of them to php5. Leave the rest alone.

Aha!! Makes sense now, thanks a lot for that.

First thing is to try the change to the httpd.conf file (I've come this far)
and if I have any trouble with that I'll go straight over to Xapp Smile

Many thanks
Mark<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Apache 2 and PHP 5 - 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]