Newbie problem (PHP module with Apache on XP Pro)

This is a discussion on Newbie problem (PHP module with Apache on XP Pro) within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi folks I wonder if anyone can help me out. I'm a total newbie to Apache. I want to ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-13-2003
MB
 
Posts: n/a
Default Newbie problem (PHP module with Apache on XP Pro)

Hi folks I wonder if anyone can help me out. I'm a total newbie to Apache.

I want to learn about online databases so I've started with a book.

I installed MySQL and that works ok.
Installed Apache 2.0.43 and got it running. Starting Netscape or IE and
going to http://localhost resulted in the Apacher server test page. Yaay!
Next I installed PHP
Next job was to get Apache to load PHP as a module and this is where it
fell down a bit.
The good book advised: "Find the bit in httpd.conf that goes -
# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule access_module modules/mod_access.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_module modules/mod_auth.so
#LoadModule auth_anon_module modules/mod_auth_anon.so
#LoadModule auth_dbm_module modules/mod_auth_dbm.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule headers_module modules/mod_headers.so

and add the following: LoadModule php4_module
c:/php-4.2.3-Win32/sapi/php4apache2.dll"

The next instruction says "Find the bit that goes
#
# AddType allows you to add to or override the MIME configuration
# file mime.types for specific file types.
#

and add
AddType application/x-httpd-php .php .phtml .html
AddType application/x-httpd-php-source .phps

Ok so after carrying out these instructions exactly the server starts
and vanishes immediately. Adding a "#" in front of the Loadmodule
statement (Hey I thought it was worth a try) allowed the server to start
but had the interesting effect that when going to localhost Netscape and
EI both attempt to download files with seemingly randomly generated
names like yhy86lzl-1. or v3jb95ks-1.

Any ideas?

Interestingly if I delete these lines Netscape retains the same
behaviour but IE goes back to the Apache test page as before.

I'm not sure if I've done something to my browsers, something to PHP or
something to Apache. I don't know enough to know if just made some
ovbvious mistake or if the advice I'm getting is wrong.
Can anyone out there offer any help please.

Sorry for the length of this post
All the best

JM

  #2 (permalink)  
Old 10-14-2003
Alan S. Daniel
 
Posts: n/a
Default Re: Newbie problem (PHP module with Apache on XP Pro)

Switch to Linux
"MB" <judgemarc@softhome.net> wrote in message
news:iqwib.410$yM1.393295@newsfep1-win.server.ntli.net...
> Hi folks I wonder if anyone can help me out. I'm a total newbie to Apache.
>
> I want to learn about online databases so I've started with a book.
>
> I installed MySQL and that works ok.
> Installed Apache 2.0.43 and got it running. Starting Netscape or IE and
> going to http://localhost resulted in the Apacher server test page. Yaay!
> Next I installed PHP
> Next job was to get Apache to load PHP as a module and this is where it
> fell down a bit.
> The good book advised: "Find the bit in httpd.conf that goes -
> # Example:
> # LoadModule foo_module modules/mod_foo.so
> #
> LoadModule access_module modules/mod_access.so
> LoadModule actions_module modules/mod_actions.so
> LoadModule alias_module modules/mod_alias.so
> LoadModule asis_module modules/mod_asis.so
> LoadModule auth_module modules/mod_auth.so
> #LoadModule auth_anon_module modules/mod_auth_anon.so
> #LoadModule auth_dbm_module modules/mod_auth_dbm.so
> #LoadModule auth_digest_module modules/mod_auth_digest.so
> LoadModule autoindex_module modules/mod_autoindex.so
> #LoadModule cern_meta_module modules/mod_cern_meta.so
> LoadModule cgi_module modules/mod_cgi.so
> #LoadModule dav_module modules/mod_dav.so
> #LoadModule dav_fs_module modules/mod_dav_fs.so
> LoadModule dir_module modules/mod_dir.so
> LoadModule env_module modules/mod_env.so
> #LoadModule expires_module modules/mod_expires.so
> #LoadModule file_cache_module modules/mod_file_cache.so
> #LoadModule headers_module modules/mod_headers.so
>
> and add the following: LoadModule php4_module
> c:/php-4.2.3-Win32/sapi/php4apache2.dll"
>
> The next instruction says "Find the bit that goes
> #
> # AddType allows you to add to or override the MIME configuration
> # file mime.types for specific file types.
> #
>
> and add
> AddType application/x-httpd-php .php .phtml .html
> AddType application/x-httpd-php-source .phps
>
> Ok so after carrying out these instructions exactly the server starts
> and vanishes immediately. Adding a "#" in front of the Loadmodule
> statement (Hey I thought it was worth a try) allowed the server to start
> but had the interesting effect that when going to localhost Netscape and
> EI both attempt to download files with seemingly randomly generated
> names like yhy86lzl-1. or v3jb95ks-1.
>
> Any ideas?
>
> Interestingly if I delete these lines Netscape retains the same
> behaviour but IE goes back to the Apache test page as before.
>
> I'm not sure if I've done something to my browsers, something to PHP or
> something to Apache. I don't know enough to know if just made some
> ovbvious mistake or if the advice I'm getting is wrong.
> Can anyone out there offer any help please.
>
> Sorry for the length of this post
> All the best
>
> JM
>



  #3 (permalink)  
Old 10-18-2003
MB
 
Posts: n/a
Default Re: Newbie problem (PHP module with Apache on XP Pro)



Alan S. Daniel wrote:
> Switch to Linux
> "MB" <judgemarc@softhome.net> wrote in message
> news:iqwib.410$yM1.393295@newsfep1-win.server.ntli.net...
>
>>Hi folks I wonder if anyone can help me out. I'm a total newbie to Apache.

<snip>

Thanks for your considered and helpful reply. In fact I do use Linux in
other places but not here.
The purpose of this project is to learn how to solve problems and get
things working and I do not go running back to my Linux comfort zone
when confronted with a problem.
Why did you bother replying to a question that is beyond your problem
solving ability anyway?
Do you have a row of discarded cars outside your place that have flat
tyres or full ashtrays?

  #4 (permalink)  
Old 10-21-2003
HornDog
 
Posts: n/a
Default Re: Newbie problem (PHP module with Apache on XP Pro)


"MB" <judgemarc@softhome.net> wrote in message
news:iqwib.410$yM1.393295@newsfep1-win.server.ntli.net...
[SNIP]
> and add the following: LoadModule php4_module
> c:/php-4.2.3-Win32/sapi/php4apache2.dll"


Typo, the path needs a " on both ends as in:
"c:/php-4.2.3-Win32/sapi/php4apache2.dll"

Also check you syntax with the "Check Configuration"
in the program group.

If you look in the error file for Apache you might get
some insigh,t also check your Windows event viewer
for errors. Most of the time the Apache or php can't
find files so check the paths closely.

That's all I can think of for now.
Regards,
Stuart



  #5 (permalink)  
Old 10-25-2003
MB
 
Posts: n/a
Default Re: Newbie problem (PHP module with Apache on XP Pro)

Hi Horndog thanks for the response.
The quotes didn't make any difference and Apache still fails to start
whenever I include that one line.

One thing I forgot to mention in my original waffle was that Apache
doesn't write to the error log at all when this happens. The console
window opens, some error message appears and the console closes before
you can read it. Grr.
I've seen someone else with similar problems and I'm wondering if Apache
or PHP is just allergic to XP.

Has anyone tried this on 98? (stop laughing at the back!)

All the best
MB





HornDog wrote:

> "MB" <judgemarc@softhome.net> wrote in message
> news:iqwib.410$yM1.393295@newsfep1-win.server.ntli.net...
> [SNIP]
>
>>and add the following: LoadModule php4_module
>>c:/php-4.2.3-Win32/sapi/php4apache2.dll"

>
>
> Typo, the path needs a " on both ends as in:
> "c:/php-4.2.3-Win32/sapi/php4apache2.dll"
>
> Also check you syntax with the "Check Configuration"
> in the program group.
>
> If you look in the error file for Apache you might get
> some insigh,t also check your Windows event viewer
> for errors. Most of the time the Apache or php can't
> find files so check the paths closely.
>
> That's all I can think of for now.
> Regards,
> Stuart
>
>
>


  #6 (permalink)  
Old 10-26-2003
HornDog
 
Posts: n/a
Default Re: Newbie problem (PHP module with Apache on XP Pro)


"MB" <judgemarc@softhome.net> wrote in message
news:W6tmb.2448$xS2.672854@newsfep2-win.server.ntli.net...
> Hi Horndog thanks for the response.
> The quotes didn't make any difference and Apache still fails to start
> whenever I include that one line.
>
> One thing I forgot to mention in my original waffle was that Apache
> doesn't write to the error log at all when this happens. The console
> window opens, some error message appears and the console closes before
> you can read it. Grr.
> I've seen someone else with similar problems and I'm wondering if Apache
> or PHP is just allergic to XP.
>
> Has anyone tried this on 98? (stop laughing at the back!)
>
> All the best
> MB
>
>
>
>
>
> HornDog wrote:
>
> > "MB" <judgemarc@softhome.net> wrote in message
> > news:iqwib.410$yM1.393295@newsfep1-win.server.ntli.net...
> > [SNIP]
> >
> >>and add the following: LoadModule php4_module
> >>c:/php-4.2.3-Win32/sapi/php4apache2.dll"

> >
> >
> > Typo, the path needs a " on both ends as in:
> > "c:/php-4.2.3-Win32/sapi/php4apache2.dll"
> >
> > Also check you syntax with the "Check Configuration"
> > in the program group.
> >
> > If you look in the error file for Apache you might get
> > some insigh,t also check your Windows event viewer
> > for errors. Most of the time the Apache or php can't
> > find files so check the paths closely.
> >
> > That's all I can think of for now.
> > Regards,
> > Stuart
> >
> >
> >

>

Did you install Apache2 as a windows service and
did Apache2 ever run?
FWIW I run Apache2 on Win2kPro and others
are successfully running with XP.

Regards,
Stuart


  #7 (permalink)  
Old 11-03-2003
MB
 
Posts: n/a
Default Re: Newbie problem (PHP module with Apache on XP Pro)

Hi HornDog

>>

> Did you install Apache2 as a windows service and
> did Apache2 ever run?
> FWIW I run Apache2 on Win2kPro and others
> are successfully running with XP.
>
> Regards,
> Stuart
>
>


Yeah if I don't have the Loadmodule startement in then it runs fine,
http://localhost brings up tyhe correct apache test page. Its only when
I start trying to load PHP as a module that things stop working.

Excuse my ignorance but I don't know what you mean by installing apache
as a windows service. I start the server from the start menu as I am
only running it occasionally - not acually using it to serve anything.

All the best
Marc

  #8 (permalink)  
Old 11-04-2003
HornDog
 
Posts: n/a
Default Re: Newbie problem (PHP module with Apache on XP Pro)


"MB" <judgemarc@softhome.net> wrote in message
news:s_spb.682$Sp6.344@newsfep1-gui.server.ntli.net...
> Hi HornDog
>
> >>

> > Did you install Apache2 as a windows service and
> > did Apache2 ever run?
> > FWIW I run Apache2 on Win2kPro and others
> > are successfully running with XP.
> >
> > Regards,
> > Stuart
> >
> >

>
> Yeah if I don't have the Loadmodule startement in then it runs fine,
> http://localhost brings up tyhe correct apache test page. Its only when
> I start trying to load PHP as a module that things stop working.
>
> Excuse my ignorance but I don't know what you mean by installing apache
> as a windows service. I start the server from the start menu as I am
> only running it occasionally - not acually using it to serve anything.
>
> All the best
> Marc
>


Hi Marc,
This is the setup on my Apache2 /win200pro.
Give it a try and please change to paths for your
needs. BTW check the syntax with "Test Configuration"
in the Apache2 program group if there is an error do not
start the server until syntax is ok.


LoadModule php4_module f:/php/sapi/php4apache2.dll


<IfModule !mod_php4.c>
LoadFile f:/php/php4ts.dll
Action application/x-httpd-php "f:/php/php.exe"
</IfModule>

AddType application/x-httpd-php .php .phtml .php3 .php4

Regards,
Stuart


  #9 (permalink)  
Old 12-22-2003
RJones
 
Posts: n/a
Default Re: Newbie problem (PHP module with Apache on XP Pro)


"MB" <judgemarc@softhome.net> wrote in message
news:iqwib.410$yM1.393295@newsfep1-win.server.ntli.net...
> Hi folks I wonder if anyone can help me out. I'm a total newbie to Apache.
>
> I want to learn about online databases so I've started with a book.
>
> I installed MySQL and that works ok.
> Installed Apache 2.0.43 and got it running. Starting Netscape or IE and
> going to http://localhost resulted in the Apacher server test page. Yaay!
> Next I installed PHP
> Next job was to get Apache to load PHP as a module and this is where it
> fell down a bit.
> The good book advised: "Find the bit in httpd.conf that goes -
> # Example:
> # LoadModule foo_module modules/mod_foo.so
> #
> LoadModule access_module modules/mod_access.so
> LoadModule actions_module modules/mod_actions.so
> LoadModule alias_module modules/mod_alias.so
> LoadModule asis_module modules/mod_asis.so
> LoadModule auth_module modules/mod_auth.so
> #LoadModule auth_anon_module modules/mod_auth_anon.so
> #LoadModule auth_dbm_module modules/mod_auth_dbm.so
> #LoadModule auth_digest_module modules/mod_auth_digest.so
> LoadModule autoindex_module modules/mod_autoindex.so
> #LoadModule cern_meta_module modules/mod_cern_meta.so
> LoadModule cgi_module modules/mod_cgi.so
> #LoadModule dav_module modules/mod_dav.so
> #LoadModule dav_fs_module modules/mod_dav_fs.so
> LoadModule dir_module modules/mod_dir.so
> LoadModule env_module modules/mod_env.so
> #LoadModule expires_module modules/mod_expires.so
> #LoadModule file_cache_module modules/mod_file_cache.so
> #LoadModule headers_module modules/mod_headers.so
>
> and add the following: LoadModule php4_module
> c:/php-4.2.3-Win32/sapi/php4apache2.dll"
>
> The next instruction says "Find the bit that goes
> #
> # AddType allows you to add to or override the MIME configuration
> # file mime.types for specific file types.
> #
>
> and add
> AddType application/x-httpd-php .php .phtml .html
> AddType application/x-httpd-php-source .phps
>
> Ok so after carrying out these instructions exactly the server starts
> and vanishes immediately. Adding a "#" in front of the Loadmodule
> statement (Hey I thought it was worth a try) allowed the server to start
> but had the interesting effect that when going to localhost Netscape and
> EI both attempt to download files with seemingly randomly generated
> names like yhy86lzl-1. or v3jb95ks-1.
>



Just to add to this problem - i too am experiencing the exact same problem.

Windows XP
Apache 2.0.43
php-4.2.3-Win32

I'm pulling my hair out.


  #10 (permalink)  
Old 01-25-2004
Mr. Bill
 
Posts: n/a
Default Re: Newbie problem (PHP module with Apache on XP Pro)


On 25-Oct-2003, MB <judgemarc@softhome.net> wrote:

> Nine times out of 10, this means you have a typo in your httpd.conf. To
> keep the window open and see the actual error message, open a DOS
> console, navigate to the Apache installation directory, go into the bin
> directory and type apache.exe to start the server. The window will stay
> open, you'll see the message, and you'll know what to fix. Fix it, save
> httpd.conf, restart Apache.



On 25-Oct-2003, MB <judgemarc@softhome.net> wrote:

> Nine times out of 10, this means you have a typo in your httpd.conf. To
> keep the window open and see the actual error message, open a DOS
> console, navigate to the Apache installation directory, go into the bin
> directory and type apache.exe to start the server. The window will stay
> open, you'll see the message, and you'll know what to fix. Fix it, save
> httpd.conf, restart Apache.


This from another newbie, it sounds like the problem though so I thought I
would send it along.

Mr. Bill
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:30 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0