SitePoint Sponsor

User Tag List

Results 1 to 23 of 23
  1. #1
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL not listed in phpinfo()

    I could really use some advice...

    I installed PHP (v5.2.5), Apache (v2.2), and MySQL (v5.1.3). installed everything exactly according to the Kevin Yank install video. I can run PHP scripts in Apache and can use MySQL from the command prompt but cannot connect to MySQL from PHP.

    Also there is no MySQL info listed in phpinfo().

    I have only one php.ini file on my system (OS is windows xp). I enabled the mysql and mysqli DLL files in php.ini. Extensions are pointed at the c:\php\ext directory.

    I have followed the manual to the letter as far as I can tell.

    All help is very much appreciated.

    Chris

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2008
    Posts
    5,757
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Restart the webserver(or just reboot)

  3. #3
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I rebooted my machine but still no MySQL in phpinfo().

    I have to be missing something... I have tried everything I can find on forums, manual, etc...

    If php_mysql.dll and php_mysqli.dll are enabled in php.ini why wouldn't the MySQL section at least show up in phpinfo() ???

    - Chris

  4. #4
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sorry to post twice in a row...

    I just saw that I have libmysql.dll on my machine in three locations:
    C:\PHP
    C:\WINDOWS\system32
    C:\Program Files\MySQL\MySQL Server 5.1\bin

    Could that be the problem?

    Chris

  5. #5
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is (a portion) of the end of my php.ini:

    Code:
    [PHP_CURL]
    extension=php_curl.dll
    [PHP_MBSTRING]
    extension=php_mbstring.dll
    [PHP_MYSQL]
    extension=php_mysql.dll
    [PHP_MYSQLI]
    extension=php_mysqli.dll
    [PHP_OCI8]
    extension=php_oci8.dll
    [PHP_OPENSSL]
    extension=php_openssl.dll
    [PHP_PDO]
    extension=php_pdo.dll
    [PHP_PDO_MYSQL]
    extension=php_pdo_mysql.dll
    [PHP_PDO_PGSQL]
    extension=php_pdo_pgsql.dll
    and the line for the extensions (in php.ini):
    Code:
    ; Directory in which the loadable extensions (modules) reside.
    extension_dir ="C:\Program Files\PHP\ext"
    double check that you have the path right (windows can be tricky with single/double quotes and the direction of the slash. Every time you make a change restart apache and test. I went through this just a week or so ago and I resolved it (can't remember exactly what I did) but it had to do with the php.ini or the fact that I had yet to start MySQL (never had a service going for MySQL). I started there - getting MySQL going... then I double checked my php.ini and httpd.conf settings. Restarted Apache etc.

    I know I found some clues as to the problem in the log file "error.log" found in (for my installation) the C:\Program Files\Apache Software Foundation\Apache2.2\logs\ directory

    Try the above - if that doesn't help post your error log (what you can).

    Hope this helps...

  6. #6
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PATH has "C:\php;C:\Program Files\MySQL\MySQL Server 5.1\bin" at the end of it so I think that is okay.

    Here is today's error log in Apache:

    [Thu Dec 18 00:04:02 2008] [notice] Parent: Received restart signal -- Restarting the server.
    [Thu Dec 18 00:04:02 2008] [notice] Child 520: Exit event signaled. Child process is ending.
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.101 for ServerName
    [Thu Dec 18 00:04:02 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.5 configured -- resuming normal operations
    [Thu Dec 18 00:04:02 2008] [notice] Server built: Jan 18 2008 00:37:19
    [Thu Dec 18 00:04:02 2008] [notice] Parent: Created child process 3524
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.101 for ServerName
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.101 for ServerName
    [Thu Dec 18 00:04:02 2008] [notice] Child 3524: Child process is running
    [Thu Dec 18 00:04:03 2008] [notice] Child 520: Released the start mutex
    [Thu Dec 18 00:04:03 2008] [notice] Child 3524: Acquired the start mutex.
    [Thu Dec 18 00:04:03 2008] [notice] Child 3524: Starting 64 worker threads.
    [Thu Dec 18 00:04:03 2008] [notice] Child 3524: Starting thread to listen on port 80.
    [Thu Dec 18 00:04:04 2008] [notice] Child 520: All worker threads have exited.
    [Thu Dec 18 00:04:04 2008] [notice] Child 520: Child process is exiting
    [Thu Dec 18 00:04:10 2008] [notice] Parent: Received restart signal -- Restarting the server.
    [Thu Dec 18 00:04:10 2008] [notice] Child 3524: Exit event signaled. Child process is ending.
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.101 for ServerName
    [Thu Dec 18 00:04:10 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.5 configured -- resuming normal operations
    [Thu Dec 18 00:04:10 2008] [notice] Server built: Jan 18 2008 00:37:19
    [Thu Dec 18 00:04:10 2008] [notice] Parent: Created child process 3484
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.101 for ServerName
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.101 for ServerName
    [Thu Dec 18 00:04:10 2008] [notice] Child 3484: Child process is running
    [Thu Dec 18 00:04:11 2008] [notice] Child 3524: Released the start mutex
    [Thu Dec 18 00:04:11 2008] [notice] Child 3484: Acquired the start mutex.
    [Thu Dec 18 00:04:11 2008] [notice] Child 3484: Starting 64 worker threads.
    [Thu Dec 18 00:04:11 2008] [notice] Child 3484: Starting thread to listen on port 80.
    [Thu Dec 18 00:04:12 2008] [notice] Child 3524: All worker threads have exited.
    [Thu Dec 18 00:04:12 2008] [notice] Child 3524: Child process is exiting
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.101 for ServerName
    [Thu Dec 18 03:07:04 2008] [warn] pid file C:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
    [Thu Dec 18 03:07:04 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.5 configured -- resuming normal operations
    [Thu Dec 18 03:07:04 2008] [notice] Server built: Jan 18 2008 00:37:19
    [Thu Dec 18 03:07:04 2008] [notice] Parent: Created child process 528
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.101 for ServerName
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.101 for ServerName
    [Thu Dec 18 03:07:04 2008] [notice] Child 528: Child process is running
    [Thu Dec 18 03:07:04 2008] [notice] Child 528: Acquired the start mutex.
    [Thu Dec 18 03:07:04 2008] [notice] Child 528: Starting 64 worker threads.
    [Thu Dec 18 03:07:04 2008] [notice] Child 528: Starting thread to listen on port 80.
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.101 for ServerName
    [Thu Dec 18 10:18:21 2008] [warn] pid file C:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
    [Thu Dec 18 10:18:21 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.5 configured -- resuming normal operations
    [Thu Dec 18 10:18:21 2008] [notice] Server built: Jan 18 2008 00:37:19
    [Thu Dec 18 10:18:21 2008] [notice] Parent: Created child process 440
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.101 for ServerName
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.101 for ServerName
    [Thu Dec 18 10:18:21 2008] [notice] Child 440: Child process is running
    [Thu Dec 18 10:18:21 2008] [notice] Child 440: Acquired the start mutex.
    [Thu Dec 18 10:18:21 2008] [notice] Child 440: Starting 64 worker threads.
    [Thu Dec 18 10:18:21 2008] [notice] Child 440: Starting thread to listen on port 80.
    [Thu Dec 18 21:23:40 2008] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon.ico
    [Thu Dec 18 21:23:41 2008] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon.ico
    [Thu Dec 18 21:43:08 2008] [notice] Parent: Received shutdown signal -- Shutting down the server.
    [Thu Dec 18 21:43:08 2008] [notice] Child 440: Exit event signaled. Child process is ending.
    [Thu Dec 18 21:43:09 2008] [notice] Child 440: Released the start mutex
    [Thu Dec 18 21:43:10 2008] [notice] Child 440: All worker threads have exited.
    [Thu Dec 18 21:43:10 2008] [notice] Child 440: Child process is exiting
    [Thu Dec 18 21:43:10 2008] [notice] Parent: Child process exited successfully.
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.101 for ServerName
    [Thu Dec 18 21:43:32 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.5 configured -- resuming normal operations
    [Thu Dec 18 21:43:32 2008] [notice] Server built: Jan 18 2008 00:37:19
    [Thu Dec 18 21:43:32 2008] [notice] Parent: Created child process 3124
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.101 for ServerName
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.101 for ServerName
    [Thu Dec 18 21:43:33 2008] [notice] Child 3124: Child process is running
    [Thu Dec 18 21:43:33 2008] [notice] Child 3124: Acquired the start mutex.
    [Thu Dec 18 21:43:33 2008] [notice] Child 3124: Starting 64 worker threads.
    [Thu Dec 18 21:43:33 2008] [notice] Child 3124: Starting thread to listen on port 80.
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.101 for ServerName
    [Thu Dec 18 22:16:07 2008] [warn] pid file C:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
    [Thu Dec 18 22:16:07 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.5 configured -- resuming normal operations
    [Thu Dec 18 22:16:07 2008] [notice] Server built: Jan 18 2008 00:37:19
    [Thu Dec 18 22:16:07 2008] [notice] Parent: Created child process 424
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.101 for ServerName
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.101 for ServerName
    [Thu Dec 18 22:16:07 2008] [notice] Child 424: Child process is running
    [Thu Dec 18 22:16:07 2008] [notice] Child 424: Acquired the start mutex.
    [Thu Dec 18 22:16:07 2008] [notice] Child 424: Starting 64 worker threads.
    [Thu Dec 18 22:16:07 2008] [notice] Child 424: Starting thread to listen on port 80.
    [Thu Dec 18 22:17:28 2008] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon.ico

    Please let me know if you see something amiss here...

    TIA - Chris

  7. #7
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    and the MySQL service status is "started".

  8. #8
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Mysql on windows in PHP5 onwards has dependencies, but they need to be found by windows which involves telling windows which path to use.

    Install in Win32 for PHP5

    Did you action the things in this FAQ item?

  9. #9
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I appreciate the reply Cups.

    I watched a video by Kevin Yank and he had me move the phpmysql.dll and php_mysqli.dll files into the c:\Window\System32 directory and the php.ini file into the c:\Windows directory. I know the manual recommends not moving the files and just adding ";c:\php" to the end of the PATH.

    As it stands right now the files are moved to the other directories AND I have the php and mysql directories in the PATH statement. Does that mean that I am covered either way or does that create some conflict? Should I move all the files back to the c:\php directory?

    Also, I have read the having the php.ini file in multiple places is bad. I have php.ini in only one place but I have libmysql.dll in three places... could that be causing a problem?

    tyvm, Chris

  10. #10
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Dont worry, you aren't going insane, Ive done this many times and each time I want to start smoking again.

    Make sure the dlls are all the same version (right click them) - otherwise you should be able to leave them where they are for the time being.

    the main thing to do is make sure there is only one php.ini, as you have said, and that you are constantly restarting the webserver between changes (not the machine, apache).

    Also, on the file that shows phpinfo(), write some variable and change it, just in case you have some caching voodoo going on.

    on that file also write:
    PHP Code:
    print_rget_loaded_extensions() ) ; 
    ps have you already tried one of the magic installers like XAMP, WAMP etc ?

  11. #11
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you are bringing back bad memories for me ... LOL (I just went through same thing -- UGH!) I have done this so many times over the years and I'm always amazed when it goes off with out a hitch. So don't feel bad - stay with it!

    Many times I have just re-downloaded the installer packages and reinstalled and somewhere in the process I either got stuff put in the right place or I caught something I missed just because I was doing it over (again).

    I have Apache/MySQL/PHP running on both my VISTA Laptop and more recently my XP(SP3) machine (as well as a few Linux boxes).

    I don't have a copy of libmysql.dll under C:\WINDOWS\system32 on either win machine

    libmysql.dll resides in the mysql install \bin folder
    and
    C:\Program Files\PHP\

    I just checked and the only place I have
    php_mysql.dll
    php_pdo_mysql.dll
    php_mysqli.dll
    is in C:\Program Files\PHP\ext

    I would almost re-run the PHP installer again and chose "change" (I used the php-5.2.6-win32-installer.msi file). you can then chose from the list of extensions the modules you want installed and it should do all the heavy lifting for you. I have over 100 extensions loaded on my Vista Laptop with no problem from the PHP installer.

    The only other advice I can give you -- is use the "read me" or "install" text files that come with the package you downloaded for help. No dis on the tutorials and helps out there -- but things are changing so fast and some of the advice out there is old. You shouldn't have to copy or move files around anymore for example.

    I hope this helps.

  12. #12
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just re-read through the install.txt found in "C:\Program Files\PHP"
    And (really) the only part that applies to a modern (PHP5.2 and later with APACHE2.2 and WinXP) is the portion here:
    Windows Installer (PHP 5.2 and later)

    The Windows PHP installer for later versions of PHP is built using MSI
    technology using the Wix Toolkit . It will
    install and configure PHP and all the built-in and PECL extensions, as
    well as configure many of the popular web servers such as IIS, Apache,
    and Xitami.

    First, install your selected HTTP (web) server on your system, and make
    sure that it works. Then proceed with one of the following install
    types.
    __________________________________________________________________

    Normal Install

    Run the MSI installer and follow the instructions provided by the
    installation wizard. You will be prompted to select the Web Server you
    wish to configure first, along with any configuration details needed.

    You will then be prompted to select which features and extensions you
    wish to install and enable. By selecting "Will be installed on local
    hard drive" in the drop-down menu for each item you can trigger whether
    to install the feature or not. By selecting "Entire feature will be
    installed on local hard drive", you will be able to install all
    sub-features of the included feature ( for example by selecting this
    options for the feature "PDO" you will install all PDO Drivers ).

    Warning

    It is not recommended to install all extensions by default, since many
    other them require dependencies from outside PHP in order to function
    properly. Instead, use the Installation Repair Mode that can be
    triggered thru the 'Add/Remove Programs' control panel to enable or
    disable extensions and features after installation.

    The installer then sets up PHP to be used in Windows and the php.ini
    file, and configures certain web servers to use PHP. The installer will
    currently configure IIS (CGI mode only), Apache, Xitami, and Sambar
    Server; if you are using a different web server you'll need to
    configure it manually.
    So again, I recommend using the msi installer (php-5.2.6-win32-installer.msi) for installing.

    Sorry to give you so much to look at -- i just feel your pain...


  13. #13
    SitePoint Wizard
    Join Date
    Mar 2008
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Open Run from the Start Menu and execute:
    Code:
    c:\php\php -r "fread(STDIN, 1);"
    Do any errors appear?

    Personally, I've never used the PHP installer. I leave php.ini in the PHP directory and then add the three lines to enable PHP to httpd.conf (one of them is to locate the php.ini file). I do not need to move any MySQL DLL files around at all.

  14. #14
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks to everyone for the advice... it is really nice to know that there are people willing to lend a hand.

    Cups, I added "print_r( get_loaded_extensions() ) ;" to my phpinfo() script and this is what the output was:

    Array ( [0] => bcmath [1] => calendar [2] => com_dotnet [3] => ctype [4] => session [5] => filter [6] => ftp [7] => hash [8] => iconv [9] => json [10] => odbc [11] => pcre [12] => Reflection [13] => date [14] => libxml [15] => standard [16] => tokenizer [17] => zlib [18] => SimpleXML [19] => dom [20] => SPL [21] => wddx [22] => xml [23] => xmlreader [24] => xmlwriter [25] => apache2handler )

    IanMerwin, I never used the installer for PHP... everything I read recommended downloading the zipped package and installing manually, so thats the route I took. One book I have (released June, 2008) actually specifically says don't use the installer, but following that book hasn't gotten the desired results so I am willing to try a different approach. Can I just download the installer and run it or do I need to get rid of the current PHP install first?

    sk89q, I ran that command and did not get any errors... just a DOS-looking box with a flashing cursor, no c:\ prompt or anything like that.

    Thanks again to everyone, of course, all replies are most welcomed.

    - Chris

  15. #15
    SitePoint Wizard
    Join Date
    Mar 2008
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In the phpinfo() output, is "Loaded Configuration File" correct?

  16. #16
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool

    Here is the output I get for print_r(get_loaded_extensions())

    PHP Code:
    echo "<pre>" ;
       
    print_r(get_loaded_extensions()) ;
    echo 
    "</pre>" 
    Code:
    Array
    (
        [0] => bcmath
        [1] => calendar
        [2] => com_dotnet
        [3] => ctype
        [4] => session
        [5] => filter
        [6] => ftp
        [7] => hash
        [8] => iconv
        [9] => json
        [10] => odbc
        [11] => pcre
        [12] => Reflection
        [13] => date
        [14] => libxml
        [15] => standard
        [16] => tokenizer
        [17] => zlib
        [18] => SimpleXML
        [19] => dom
        [20] => SPL
        [21] => wddx
        [22] => xml
        [23] => xmlreader
        [24] => xmlwriter
        [25] => apache2handler
        [26] => curl
        [27] => mbstring
        [28] => mysql
        [29] => mysqli
        [30] => openssl
        [31] => PDO
        [32] => pdo_mysql
        [33] => soap
        [34] => tidy
        [35] => xmlrpc
        [36] => amf
        [37] => cpdf
        [38] => docblock
        [39] => http
        [40] => phpdoc
        [41] => SPL_Types
        [42] => timezonedb
    )
    As you can see.. mysql, mysqli, pdo_mysql are all loaded.

    I'm sure for you it has to be in your ability to get php to see the ext directory. I have a suspicion that it's not reading the extension line in your php.ini file correctly = meaning I've seen issues with the whole single/double quotes and direction of the slashes.. eg:

    ; Directory in which the loadable extensions (modules) reside.
    extension_dir ="C:\Program Files\PHP\ext"
    vs.
    extension_dir ="C:/Program Files/PHP/ext"
    vs.
    extension_dir ='C:\Program Files\PHP\ext'
    vs.
    extension_dir ='C:/Program Files/PHP/ext'

    mine is working with:
    extension_dir ="C:\Program Files\PHP\ext"

    OR


    the actual extensions aren't in the proper directory.

    No offense -- but double check that the files
    php_mysql.dll
    php_mysqli.dll
    are in your PHP install directory (for me it was C:\Program Files\PHP\ext).

    OR (finally)

    The other thing I would look for (double check) is that php.ini is what your are making adjustments to - and not the php-recommended (etc) I've done that in the past as well LOL... and forgot to "save-as."

    If none of this helps (and it were me) -- I would just use the windoze installer.... I've done it every which way to friday on Linux and win (including building from source/etc.). And, again, no offense to those who are way more experienced -- but there is no dishonor in using the pre-built - msi file and going with it. Unless there is some compelling reason not to (I have yet hear of one)...

    Located here:
    http://www"dot"php"dot"net/archive/2008"dot"php#id2008-12-08-1

    Download here:
    http://us3"dot"php"dot"net/get/php-5"dot"2"dot"8-win32-installer"dot"msi/from/a/mirror

    Be sure to 'un-install' and remove all the files that were copied/moved to the various locations... then run the installer. You can re-run the installer any time to ADD extensions and upgrade.

    Again, sorry man... I feel your pain (**shudders**)

  17. #17
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This might be important...

    In my php.ini file a found a setting "log_errors_max_len = 1024". I then looked the phpinfo() and found the "log_errors_max_len" and it has a value of "1024".

    I changed the setting in php.ini to = 0. I restarted the apache server and opened the phpinfo() script again and it still shows 1024.

    In the interest of overkill, I rebooted the machine, verified that the setting in php.ini was "log_errors_max_len = 0" and then ran the phpinfo() script again and it still shows the value of "log_errors_max_len" to be 1024.

    I ran a search several times and I am certain there is only one php.ini file and the machine and it is located in the c:\windows directory.

    There are the following files: php.in.in php.ini.dist php.ini.recommended.

    Could any of those be a problem?

    - Chris

  18. #18
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by sk89q View Post
    In the phpinfo() output, is "Loaded Configuration File" correct?
    when I run
    phpinfo();

    I see:
    Code:
    |--------------------------------------------------------------
    | System              | Windows NT FAMILY_SERVER 5.1 build 2600
    |-------------------------------------------------------------
    | Build Date          | May 2 2008 18:01:20
    |-------------------------------------------------------------
    | Configure Command   | .............
    |-------------------------------------------------------------
    | Server API          | Apache 2.0 Handler 
    |-------------------------------------------------------------
    | Virtual Dir Support | enabled
    |-------------------------------------------------------------
    | Configuration File  |
    | (php.ini) Path      |	C:\WINDOWS
    |-------------------------------------------------------------
    | Loaded              |  
    | Configuration File  |	C:\Program Files\PHP\php.ini 
    |-------------------------------------------------------------
    | ... and so on
    Are you saying your's is empty?

    AND does php.ini (for you) reside in your install directory or in "C:WINDOWS"?

    It should be in \PHP

    just for kicks I ran PATH from the command prompt and I get this:

    Code:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    
    C:\Documents and Settings\Ian>PATH
    PATH=C:\Program Files\PHP\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wb
    em;C:\Program Files\Apache Software Foundation;C:\Program Files\Apache Software
    Foundation\jre\bin;C:\Program Files\CollabNet Subversion Server;c:\Program Files
    \Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\
    DTS\Binn\;C:\Program Files\QuickTime\QTSystem\
    
    C:\Documents and Settings\Ian>

  19. #19
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think we are getting somewhere... check out my loaded configuration file.


    System Windows NT CHRIS-DESKTOP 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.*

  20. #20
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is there a set of defaults that php uses in the event there is no php.ini file?

    I'm getting the feeling that PHP isn't seeing my .ini file.

    - Chris

  21. #21
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I still can't post comments that look anything like "spam" so.... replace the
    "dot" with a "."

    Here is the line in my httpd "dot" conf that I have that calls loads the php...

    mine is near the bottom of my httpd "dot" conf
    Code:
    #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
    PHPIniDir "C:/Program Files/PHP/"
    LoadModule php5_module "C:/Program Files/PHP/php5apache2_2"dot"dll"
    AddType application/x-httpd-php "dot"php "dot"html

    NOTE: I have PHP parse html files -- since all my "html" files are actually php files.. LOL

    NOTE2: notice the direction of the slashes...

  22. #22
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    GOT IT !!!!!

    MySQL now shows up in the phpinfo(). phpinidir in httpd.conf was pointed at the wrong directory... I changed it and now things look to be okay.

    The script I am wrote to connect to MySQL still failed but it looks like a syntax error.

    Ian and everyone else, thank you so much for helping me and tolerating a newbie trying to learn.

    - Chris

  23. #23
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up



    Glad you got it!

    A couple of great places to start are:

    http://us3.php.net/manual/en/langref.php

    and

    http://devzone.zend.com/node/view/id/627

    through out they cover both procedural and OOP approaches to PHP

    part 8 has a great tut on databases...


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
  •