17 Replies Latest reply on Sep 17, 2008 9:32 PM by UteFanJason

    PHP install problem

    UteFanJason Level 2
      As I've been taking on php and mysql I decided it would be good to not just run them off my host server but go ahead and put them on an apache server on my computer.

      Apache worked fine. I changed the standard page to a simple static page I created for it and that worked fine.

      Then came the php installation.

      In the instructions I was given I had to add to the httpd.conf file this line of code:

      LoadModule php5_module c:/php/php5apache2.dll

      When I restart the apache server it won't start and an error is returned saying that the file cannot be found. It does exist at the location it claims not to be able to find it.

      So after a couple of hours of downloading and reinstalling I am asking to see if anyone has any ideas.
        • 1. Re: PHP install problem
          Level 7
          .oO(UteFanJason)

          >As I've been taking on php and mysql I decided it would be good to not just run
          >them off my host server but go ahead and put them on an apache server on my
          >computer.
          >
          > Apache worked fine. I changed the standard page to a simple static page I
          >created for it and that worked fine.
          >
          > Then came the php installation.
          >
          > In the instructions I was given I had to add to the httpd.conf file this line
          >of code:

          The PHP installer should do that automatically for you. Did you try this
          < http://www.php.net/get/php-5.2.6-win32-installer.msi/from/a/mirror>?

          Micha
          • 2. Re: PHP install problem
            UteFanJason Level 2
            >The PHP installer should do that automatically for you. Did you try this
            >< http://www.php.net/get/php-5.2.6-win32-installer.msi/from/a/mirror>?
            >
            >Micha

            Yes, that is what I used for php was the php5.2.6-win32-installer. Do you think that I may have installed apache wrong?
            • 3. Re: PHP install problem
              Level 7
              UteFanJason wrote:
              > In the instructions I was given I had to add to the httpd.conf file this line
              > of code:
              >
              > LoadModule php5_module c:/php/php5apache2.dll

              That's for Apache 2. I suspect you are probably using Apache 2.2, which
              requires this:

              LoadModule php5_module c:/php/php5apache2_2.dll

              --
              David Powers, Adobe Community Expert
              Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
              Author, "PHP Solutions" (friends of ED)
              http://foundationphp.com/
              • 4. Re: PHP install problem
                UteFanJason Level 2
                >That's for Apache 2. I suspect you are probably using Apache 2.2, which
                >requires this:
                >
                >LoadModule php5_module c:/php/php5apache2_2.dll
                >
                >--
                >David Powers, Adobe Community Expert

                Thanks. That worked.

                By the way I just bought The Essential Guide to Dreamweaver CS3 with CSS, Ajax, and PHP. It should get here soon hopefully.
                • 5. Re: PHP install problem
                  Level 7
                  UteFanJason wrote:
                  > Thanks. That worked.

                  Glad to have been of help.

                  > By the way I just bought The Essential Guide to Dreamweaver CS3 with CSS,
                  > Ajax, and PHP. It should get here soon hopefully.

                  Great. Hope you find it useful.

                  --
                  David Powers, Adobe Community Expert
                  Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
                  Author, "PHP Solutions" (friends of ED)
                  http://foundationphp.com/
                  • 6. Re: PHP install problem
                    UteFanJason Level 2
                    >Great. Hope you find it useful.

                    It looked like it would be. By the way, now that I have the apache server working my php must be done wrong because I keep getting an HTTP 500 Internal Server Error when I try to go to the phpinfo.php page that just has the phpinfo(); command.

                    This is probably another common easy fix but the books I have right now just say retrace my steps to see what I've done wrong. I have but nothing is jumping out yet.
                    • 7. Re: PHP install problem
                      Level 7
                      .oO(UteFanJason)

                      >>Great. Hope you find it useful.
                      >
                      > It looked like it would be. By the way, now that I have the apache server
                      >working my php must be done wrong because I keep getting an HTTP 500 Internal
                      >Server Error when I try to go to the phpinfo.php page that just has the
                      >phpinfo(); command.

                      Have a look at Apache's error log. Usually you'll find some details
                      there about the reason for the 500.

                      Micha
                      • 8. Re: PHP install problem
                        UteFanJason Level 2
                        >Have a look at Apache's error log. Usually you'll find some details
                        >there about the reason for the 500.
                        >
                        >Micha

                        Ok I looked. And this is what I found. I'm not sure I understand it.
                        [Tue Sep 16 10:09:51 2008] [error] [client 127.0.0.1] PHP Warning: require_once(SAM/php_sam.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in sam_factory on line 1
                        [Tue Sep 16 10:09:51 2008] [error] [client 127.0.0.1] PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'SAM/php_sam.php' (include_path='.;C:\\php5\\pear') in sam_factory on line 1

                        I don't remember ever seeing a file called SAM/php_sam.php in the php install.
                        • 9. Re: PHP install problem
                          Level 7
                          UteFanJason posted in macromedia.dreamweaver:

                          > Ok I looked. And this is what I found. I'm not sure I understand
                          > it. [Tue Sep 16 10:09:51 2008] [error] [client 127.0.0.1] PHP
                          > Warning:
                          > require_once(SAM/php_sam.php) [<a
                          > href='function.require-once'>function.require-once</a>]: failed to
                          > open stream: No such file or directory in sam_factory on line 1
                          > [Tue Sep 16 10:09:51 2008] [error] [client 127.0.0.1] PHP Fatal
                          > error:
                          > require_once() [<a href='function.require'>function.require</a>]:
                          > Failed opening required 'SAM/php_sam.php'
                          > (include_path='.;C:\\php5\\pear') in sam_factory on line 1
                          >
                          > I don't remember ever seeing a file called SAM/php_sam.php in the
                          > php install.

                          It's not. Whatever page you're trying to view has this line in it:

                          require_once(SAM/php_sam.php);

                          It is trying to include (require) another PHP script named php_sam.php
                          in the SAM folder next to this page. http://www.php.net/require_once

                          Which should NOT happen in a "phpinfo.php page that just has the
                          phpinfo(); command". Such a page should consist of nothing more than:

                          <?php
                          phpinfo();
                          ?>


                          --
                          Mark A. Boyd
                          Keep-On-Learnin' :)
                          • 10. Re: PHP install problem
                            UteFanJason Level 2
                            Mark A. Boyd said:
                            >Which should NOT happen in a "phpinfo.php page that just has the
                            >phpinfo(); command". Such a page should consist of nothing more than:
                            >
                            ><?php
                            >phpinfo();
                            >?>

                            I completely agree. There shouldn't be anything else on the page since that is all that I put. Except mine was all on one line.

                            <?php phpinfo(); ?>

                            I don't know how that could be the problem but maybe . . . Hopefully my book comes today so that I can start going through with that refernce. The books I have now just don't help very much.
                            • 11. Re: PHP install problem
                              Level 7
                              UteFanJason posted in macromedia.dreamweaver:

                              > I completely agree. There shouldn't be anything else on the page
                              > since that is all that I put. Except mine was all on one line.
                              >
                              > <?php phpinfo(); ?>
                              >
                              > I don't know how that could be the problem but maybe . . .

                              I just did a quick Google search for "php_sam" (no quotes). You might
                              give some of the links in that search a look-see. Particularly the
                              first link to http://www.faqts.com/knowledge_base/view.phtml/aid/44978

                              FWIW, I've never run into that situation with PHP/Apache/MySQL/Windows.
                              I installed them all manually once and several other times using WAMP
                              http://www.wampserver.com. WAMP was quick and painless for me. You
                              might want to give it a try.


                              --
                              Mark A. Boyd
                              Keep-On-Learnin' :)
                              • 12. Re: PHP install problem
                                Level 7
                                .oO(UteFanJason)

                                >Mark A. Boyd said:
                                > >Which should NOT happen in a "phpinfo.php page that just has the
                                > >phpinfo(); command". Such a page should consist of nothing more than:
                                > >
                                > ><?php
                                > >phpinfo();
                                > >?>
                                >
                                > I completely agree. There shouldn't be anything else on the page since that is
                                >all that I put. Except mine was all on one line.
                                >
                                > <?php phpinfo(); ?>

                                Maybe an auto_prepend_file? Check the php.ini for this directive.

                                But actually I'm wondering why this error causes an internal server
                                error in Apache. Usually you would just get PHP's error message back.

                                Micha
                                • 13. Re: PHP install problem
                                  UteFanJason Level 2
                                  Thanks Mark,

                                  Unfortunately the article you suggested didn't lead me to the solution. I may try the wamp. I will keep looking.
                                  • 14. Re: PHP install problem
                                    UteFanJason Level 2
                                    Micha,

                                    ; Automatically add files before or after any PHP document.
                                    auto_prepend_file =
                                    auto_append_file =

                                    is all I could find in my php.ini file
                                    • 15. Re: PHP install problem
                                      Level 7
                                      .oO(UteFanJason)

                                      >Micha,
                                      >
                                      >; Automatically add files before or after any PHP document.
                                      >auto_prepend_file =
                                      >auto_append_file =
                                      >
                                      >is all I could find in my php.ini file

                                      Hmm, OK. Was just an idea.

                                      Micha
                                      • 16. Re: PHP install problem
                                        UteFanJason Level 2
                                        quote:

                                        Originally posted by: Newsgroup User
                                        .oO(UteFanJason)

                                        >Micha,
                                        >
                                        >; Automatically add files before or after any PHP document.
                                        >auto_prepend_file =
                                        >auto_append_file =
                                        >
                                        >is all I could find in my php.ini file

                                        Hmm, OK. Was just an idea.

                                        Micha



                                        Thanks for the idea. I now have that book so hopefully when I get to that section I can understand it a little better.
                                        • 17. Re: PHP install problem
                                          UteFanJason Level 2
                                          quote:

                                          Originally posted by: Newsgroup User
                                          .oO(UteFanJason)

                                          >Micha,
                                          >
                                          >; Automatically add files before or after any PHP document.
                                          >auto_prepend_file =
                                          >auto_append_file =
                                          >
                                          >is all I could find in my php.ini file

                                          Hmm, OK. Was just an idea.

                                          Micha



                                          Well, thanks to my new book explaining things better than my old books (that are going back to the library) I got it up and running.