SitePoint Sponsor

User Tag List

Results 1 to 14 of 14
  1. #1
    Addicted to the Source of Life PowerBit's Avatar
    Join Date
    Feb 2004
    Location
    Loveland Co
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Apache Server starts & then stops at control panel-- need help to get it going again.

    Hello to all,

    I need some valuable assistance for my recently installed apache server. I installed apache and checked http://localhost/ and it displayed the appropriate page. Then I installed PHP and configured the apache server accordingly. I then went to services under the control panel to restart apache and then I get a display that stated that: Apache Server has started and then stopped. The display went on to say that programs will do this if they do no have any work to do.

    Well I wanted to run some PHP on it and check some code and now my server won't start. I have tried many times to restart it and it does the same thing. Should I check the spark plugs?

    Any suggestions I am newbie to this kind of stuff?

    I am running on WIN XP

    Thanks, Billy

  2. #2
    SitePoint Addict
    Join Date
    Sep 2004
    Location
    Kelowna, BC
    Posts
    202
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    do you have IIS running? if so, it might be having issues with two web servers running on the same port? try changing one or the other from port 80 to port 8080.

    if that's not it, try rotating the tires and changing the oil

  3. #3
    Addicted to the Source of Life PowerBit's Avatar
    Join Date
    Feb 2004
    Location
    Loveland Co
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I don't have IIS running. I tried rotating the tires and said let that old funky oil burn.

    Still need help from those who have the time and knowledge!

  4. #4
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,692
    Mentioned
    20 Post(s)
    Tagged
    3 Thread(s)
    onebit,

    The process is simple and straightforward:

    Once Apache is up and running, add PHP (4 - 5 should be the same but substitute 5 for 4 in filenames):

    1. Start | Programs | Apache HTTP Server | Configure Apache Server | Edit Configuration. This will open the httpd.conf file in your default text editor.

    2. All of the options in this long and intimidating configuration file should have been set up correctly by the Apache install program. All you need to do is add the following three lines to the very bottom of the file:

    LoadModule php4_module c:/php/sapi/php4apache2.dll
    AddType application/x-httpd-php .php .php3 .phtml
    AddType application/x-httpd-php-source .phps

    Make sure the LoadModule line points to the appropriate file in the PHP installation directory on your system - be sure to use slashes (/) instead of backslashes (\).

    3. The line that begins with DirectoryIndex tells Apache what file names to use when it looks for the default page for a given directory. You’ll see the usual index.html and so forth, but you need to add index.php, index.php3, and index.phtml to that list if they’re not there already:

    DirectoryIndex index.html … index.php index.php3 index.phtml

    4. Save your changes and close the editor.

    5. Restart Apache by choosing Start | Programs | Apache HTTP Server | Control Apache Server | Restart. If all is well, Apache will start up again without complaint.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  5. #5
    Addicted to the Source of Life PowerBit's Avatar
    Join Date
    Feb 2004
    Location
    Loveland Co
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep, I have done all that and triple checked my typing... everything points the right directory and all the additions have been made correctly including the right version of PHP. My install of Apache was successful as well. Yet it still starts and then stops.

    Any more suggestions?

  6. #6
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,692
    Mentioned
    20 Post(s)
    Tagged
    3 Thread(s)
    onebit,

    Other than it sounds like WinDoze, I should mention that my XP Home test server doesn't like the restart but stopping then starting Apache seems to do the trick. On the other hand, if you've rebooted while I was sleeping, that should have done the trick.

    Once past that, I'm fresh out of ideas.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  7. #7
    Addicted to the Source of Life PowerBit's Avatar
    Join Date
    Feb 2004
    Location
    Loveland Co
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    DK,

    Thanks for checking up on me. Is there any other way to start Apache other than from the 'control panel' 'services' ?

    Why do you need to sleep? Where is Auckland?

    Billy

  8. #8
    Addicted to the Source of Life PowerBit's Avatar
    Join Date
    Feb 2004
    Location
    Loveland Co
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried starting it from the exe. file icon and got a server window and it stated that there is a Syntax Error on line 987 of my config file: Load module takes two arguments a module name and a name of a share object file to load it from.

    Is this the add on LoadModules that I added that it's speaking of or something different?

    Thanks again for your help David!

  9. #9
    Addicted to the Source of Life PowerBit's Avatar
    Join Date
    Feb 2004
    Location
    Loveland Co
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    David, I am pretty sure it is talking about the following lines:

    LoadModule php5_module c:/Program Files/PHP/php5apache.dll
    AddModule mod_php5.c
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

    Now I am running version 5.0.4.4 of PHP - does anything have to change up above?

    Appreciate your help!
    -B

  10. #10
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,692
    Mentioned
    20 Post(s)
    Tagged
    3 Thread(s)
    onebit,

    You go to school in Greely? Auckland is THE major city in New Zealand (the capital, Wellington, is smaller than Colorado Springs but looks like San Francisco with its bay, hills and fault zones).

    Sorry about that CSU comment - I was a "zoomie" so it's interstate school rivalry, ya know?

    Apache's installed a control mechanism in the WinDoze "tray" which I use routinely.

    Yeah, I think that your problem is in not quoting the directory 'cause Apache does NOT like filenames/paths with spaces in them, i.e., Program Files screws up most applications (including WinDoze) if you don't enclose the whole path/filename in quotes.

    I'm only running PHP4 but it looks like you've changed the 4s to 5s so you should be set.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  11. #11
    Addicted to the Source of Life PowerBit's Avatar
    Join Date
    Feb 2004
    Location
    Loveland Co
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello to all and to "zoomie" if he should reply, : )

    I have added quotes to the path/file name as suggested and as seen below:

    LoadModule php5_module "c:/Program Files/PHP/php5apache.dll"
    AddModule mod_php5.c
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

    1.) I then go to start apache from the control panel and get this message:

    PHP Startup: Unable to load dynamic library 'c:\Program Files\php\ext\php_msql.dll' - The specified module could not be found.

    > Now I have gone to the 'ext' folder and the php_msql.dll file is present.

    2.) I go to start the server from the apache.exe file and I get these messages:

    From a pop-up window:

    a.) This application has failed to start because mSQL.dll was not found. Reinstalling the application may fix this problem.

    b.) PHP Startup: Unable to load dynamic library 'c:\Program Files\php\ext\php_msql.dll' - The specified module could not be found.

    Also the apache display terminal states this:
    [warn] module mod_php5.c is already added

    Any one familiar with this problem, and have any suggestions?

    Thank you,
    Billy

  12. #12
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,692
    Mentioned
    20 Post(s)
    Tagged
    3 Thread(s)
    Hiya, onebit!

    ZOoooOM!

    Anyway, I still believe that the problem is with Program Files which offers four choices:

    1. Try single quotes around that string (looks like that's what you've got).

    2. Try double quotes around that string.

    3. Try substituting %20 for the space between Program and Files.

    4. Take the advice of the PHP people and install PHP in the C:\PHP directory so you can avoid problems with Program Files.

    If you relocate PHP, be sure to update the php.ini, too!

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  13. #13
    Addicted to the Source of Life PowerBit's Avatar
    Join Date
    Feb 2004
    Location
    Loveland Co
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Problem solved!!! Thanks to all who have helped. The problem was with ZOomie. No just kidding! The problem was that windows does like to work with apache, php, and probably even Mysql when installed in the "Program Files" directory. I reinstalled everything to strictly my "C:/" directorty and everything started up.

  14. #14
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,692
    Mentioned
    20 Post(s)
    Tagged
    3 Thread(s)
    onebit,

    It's Party Time!



    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •