Right, been trying to get php mysql and apache to work.

So far, Apache is working fine stuck with PHP, well kind of. It works fine BUT it doesn't require the php.ini file. When I invoke phpinfo() it give me the correct screen with the following:

Configuration File (php.ini) Path C:\WINDOWS
Loaded Configuration File (none)

Now, I've searched for it and it is nowhere in C:\Windows. I've done a few test scripts with php and they work fine.

The Apache httpd.conf file has the following in it:

LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "c:/php"

So to do a little test I took the php.ini file out of the php working directory and called it something else. Everything still works fine.

The only reason I'm doing this is because mySQL doesn't work (I've done everything that is suggested - all PATH and PHPRC Env Var's point to the C:/php, and changed the php.ini file etc. etc.) so I was trying to track down what the problem is. I'm guessing the fact that php seems to be running without the php.ini file means something's fishy.

Any thoughts?

    The correct php.ini location in your case is C:\php\php.ini

    Did you restart the server?

      I should perhaps say that this is about the third time I've installed php but always been careful to remove all the files.

      Also, what is all this business of 'Compiling' php? I just downloaded the .zip file and extracted as per the php manual...

        Also, what is all this business of 'Compiling' php? I just downloaded the .zip file and extracted as per the php manual...

        Extracting the zip archive is good for Windows, but some people, typically those on Linux boxes, may prefer to compile PHP themselves.

          laserlight wrote:

          The correct php.ini location in your case is C:\php\php.ini

          Did you restart the server?

          Thanks for your speedy reply!

          yeah, I did. I was aware that C:\php\php.ini is the correct location for it, but currently I can run any script I like with the php.ini file sat on my desktop called 'something.txt'!

            I guess my main question is...why the heck can I do all this stuff with no php.ini file!

              I was aware that C:\php\php.ini is the correct location for it, but currently I can run any script I like with the php.ini file sat on my desktop called 'something.txt'!

              PHP is probably using a default configuration.

                hmmm...well, it's back in the correct place c:\php\php.ini but still:

                Configuration File (php.ini) Path C:\WINDOWS
                Loaded Configuration File (none)

                I mean, I'm thinking about this the right way aren't I? The phpinfo() page should say something like:

                Configuration File (php.ini) Path C:\php\php.ini
                Loaded Configuration File yes/true/i'm reading it!

                  I mean, I'm thinking about this the right way aren't I? The phpinfo() page should say something like:

                  Configuration File (php.ini) Path C:\php\php.ini
                  Loaded Configuration File yes/true/i'm reading it!

                  To be precise, that portion should read:

                  Configuration File (php.ini) Path C:\WINDOWS
                  Loaded Configuration File C:\php\php.ini

                  Unfortunately, I do not know why you have this problem. One possibility is that what you think is php.ini is actually php.ini.txt, so you have to show file extensions to be sure.

                    oooh, good one, I've had that problem before.

                    Just tried it...the file type is now coming up as a 'configurations setting' file, and I get a blank screen for my phpinfo page....

                      Thanks for your help by the way. At least now it is responding to something I do 🙂

                        You're welcome 🙂
                        Remember to mark this thread as resolved (if and when it is) using the thread tools.

                        If you still need more help, it would be good to say exactly what remains to be solved.

                          OK, well now one of two things happen (in the following, I always restart apache between loading the phpinfo page)

                          I've used pspad to open a new .INI file and C and P'd all the php.ini-recommended stuff (with all the relevant changes etc) into something which is most definitely called 'php.ini'. This give a blank screen when phpinfo is called.

                          OR

                          I put back 'php.ini-recommended' and this gives me the appropriate screen but with this old chesnut back:

                          Configuration File (php.ini) Path C:\WINDOWS
                          Loaded Configuration File (none)

                            This give a blank screen when phpinfo is called.

                            Try viewing clientside source. What do you see?

                              Here is the whole of the top table of phpinfo screen with the php.ini-recommended file in place:

                              System Windows NT LT005 5.1 build 2600

                              Build Date Nov 8 2007 23:18:08

                              Configure Command cscript /nologo configure.js "--enable-snapshot-build"

                              "--with-gd=shared"

                              Server API Apache 2.0 Handler

                              Virtual Directory Support enabled

                              Configuration File (php.ini) Path C:\WINDOWS

                              Loaded Configuration File (none)

                              PHP API 20041225

                              PHP Extension 20060613

                              Zend Extension 220060519

                              Debug Build no

                              Thread Safety enabled

                              Zend Memory Manager enabled

                              IPv6 Support enabled

                              Registered PHP Streams php, file, data, http, ftp, compress.zlib

                              Registered Stream Socket Transports tcp, udp

                              Registered Stream Filters convert.iconv.*, string.rot13, string.toupper,

                              string.tolower, string.strip_tags, convert., consumed, zlib.

                                laserlight wrote:

                                Try viewing clientside source. What do you see?

                                <? phpinfo();
                                ?>

                                  No, I'm looking for when you have php.ini in place, having copied and modified from php.ini-recommended.

                                  EDIT:
                                  That could explain it. You probably set short_open_tag to Off, which is a Good Thing. Test with:

                                  <?php
                                  phpinfo();
                                  ?>

                                    Oh, I did try following the instructions in the sticky on this forum but to not avail (the creation of a hpptd-php.conf file)

                                      The problem is that "<? phpinfo(); ?>" is interpreted as a HTML element since short_open_tag is Off. Use normal PHP open tags, i.e., <?php

                                        HOOOORAYYY!!!!! YOU FIXED IT. Thanks so much, you don't know how much this was doing my head in.

                                          Write a Reply...