Visual Studio kills MySQL - Page 2
Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22

Thread: Visual Studio kills MySQL

  1. #16
    Pedantic Curmudgeon Weedpacket's Avatar
    Join Date
    Aug 2002
    Location
    General Systems Vehicle "Thrilled To Be Here"
    Posts
    21,771
    Quote Originally Posted by Stinger51
    I motored on over to the wamp\www directory and I tried this from the command prompt (brackets [ ] used here instead of < > to preserve formatting here):

    [?php phpinfo.php; ?]

    but Windows just complains that the command syntax is incorrect.
    When using PHP from the command line you're using the Windows command line interface, not a web server. The command would be
    Code:
    C:\current\directory>  \path\to\php\executable\php phpinfo.php
    Or
    Code:
    C:\path\to\php\executable>  php phpinfo.php
    If you're already in the right directory, or just
    Code:
    C:\current\directory>  php phpinfo.php
    if you have the PHP executable's directory in your system PATH.

    And it's not necessary to create a whole PHP file just to run phpinfo():
    Code:
    C:\arbitary\path>  php -r "phpinfo()"
    More information about PHP's CLI is of course in the manual. Note that one of the differences is that as a CLI program PHP reads php.ini on every invocation, instead of only when the web server is restarted (because of course there is no web server in this case).
    THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER
    FAQs! FAQs! FAQs! Most forums have them!
    Search - Debugging 101 - Collected Solutions - General Guidelines - Getting help at all

  2. #17
    Senior Member
    Join Date
    Aug 2002
    Location
    Florida Sun Coast
    Posts
    224
    Ok, here is part of the phpinfo() output from the command line as dumped to a text file (red emphasis mine):

    mysql

    MySQL Support => enabled
    Active Persistent Links => 0
    Active Links => 0
    Client API version => mysqlnd 5.0.8-dev - 20102224 - $Revision: 321634 $

    Directive => Local Value => Master Value
    mysql.allow_local_infile => On => On
    mysql.allow_persistent => On => On
    mysql.connect_timeout => 60 => 60
    mysql.default_host => no value => no value
    mysql.default_password => no value => no value
    mysql.default_port => no value => no value
    mysql.default_socket => no value => no value
    mysql.default_user => no value => no value
    mysql.max_links => Unlimited => Unlimited
    mysql.max_persistent => Unlimited => Unlimited
    mysql.trace_mode => Off => Off

    mysqli

    MysqlI Support => enabled
    Client API library version => mysqlnd 5.0.8-dev - 20102224 - $Revision: 321634 $
    Active Persistent Links => 0
    Inactive Persistent Links => 0
    Active Links => 0

    Directive => Local Value => Master Value
    mysqli.allow_local_infile => On => On
    mysqli.allow_persistent => On => On
    mysqli.default_host => no value => no value
    mysqli.default_port => 3306 => 3306
    mysqli.default_pw => no value => no value
    mysqli.default_socket => no value => no value
    mysqli.default_user => no value => no value
    mysqli.max_links => Unlimited => Unlimited
    mysqli.max_persistent => Unlimited => Unlimited
    mysqli.reconnect => Off => Off

    mysqlnd

    mysqlnd => enabled
    Version => mysqlnd 5.0.8-dev - 20102224 - $Revision: 321634 $
    Compression => supported
    SSL => supported
    Command buffer size => 4096
    Read buffer size => 32768
    Read timeout => 31536000
    Collecting statistics => Yes
    Collecting memory statistics => Yes
    Tracing => n/a


    Not sure if it means anything that no default port is defined for MySQL, as it is for MySQLi (3306). But it does say that MySQL support is enabled.
    If everybody's thinking alike, somebody isn't thinking.

  3. #18
    Pedantic Curmudgeon Weedpacket's Avatar
    Join Date
    Aug 2002
    Location
    General Systems Vehicle "Thrilled To Be Here"
    Posts
    21,771
    What about
    Code:
    C:\path\> php -r "echo function_exists('mysql_query') ? 'function exists' : 'function does not exist';"
    THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER
    FAQs! FAQs! FAQs! Most forums have them!
    Search - Debugging 101 - Collected Solutions - General Guidelines - Getting help at all

  4. #19
    Senior Member
    Join Date
    Aug 2002
    Location
    Florida Sun Coast
    Posts
    224
    Quote Originally Posted by Weedpacket View Post
    What about
    Code:
    C:\path\> php -r "echo function_exists('mysql_query') ? 'function exists' : 'function does not exist';"
    I got back the value "exists". So, the PHP interpreter must be seeing the library, right? So, why does this not work when the local WAMP server runs the code? I'm starting to believe this has something to do with port 3306. Just what, I don't know, as I don't think the .Net environment cares about that port for its IIS stuff. I may change the default port to something else, just to try it.
    If everybody's thinking alike, somebody isn't thinking.

  5. #20
    Pna lbh ernq guvf¿
    Join Date
    Jul 2004
    Location
    Kansas City area
    Posts
    19,349
    Quote Originally Posted by Stinger51 View Post
    I got back the value "exists". So, the PHP interpreter must be seeing the library, right?
    Correct.

    Quote Originally Posted by Stinger51 View Post
    So, why does this not work when the local WAMP server runs the code?
    Not to sound repetitive, but the culprit that comes to my mind is the php.ini configuration file. Have you verified that the same php.ini used when PHP is invoked via Apache is being used during your CLI tests?

    Quote Originally Posted by Stinger51 View Post
    I'm starting to believe this has something to do with port 3306.
    No port number configuration, conflict, preference, or... anything... would cause PHP to not load an extension.

  6. #21
    Senior Member
    Join Date
    Aug 2002
    Location
    Florida Sun Coast
    Posts
    224

    Screen shots

    Yes, I've double checked and double checked this. Here are a couple of screen shots from the WAMP control panel that demonstrate this:

    ApacheService.pngPHP-ini-file.jpg

    Image #2 shows the path to the php.ini file that Apache is using. I've scrolled down in the file to show that the extensions are indeed enabled (uncommented).
    If everybody's thinking alike, somebody isn't thinking.

  7. #22
    Senior Member
    Join Date
    Aug 2002
    Location
    Florida Sun Coast
    Posts
    224

    Resolved (sort of).

    I had WAMP use Apache 2.2.22 (instead of 2.2.21) and PHP 5.4.3 (instead of 5.3.10) and my scripts are now able to talk to MySQL again. The phpinfo() display also shows that MySQL is back in the mix now. Note that I sill had to set Apache to listen on port 8080 (not port 80). I'm also liking WAMP again rather than XAMPP as WAMP gives you much better control at their control panel.

    Why did this work? Dunno. Both Apache .conf files and both PHP .ini files are identical. Beats the F**K out of me. But I'll take it. Windoze must have woken up in a different mood after I did this, that's all I know.

    And Viz Web Dev 2010 is still working too (knock on wood). Sometimes the computer gods smileth down on thee, and sometimes they don't.
    If everybody's thinking alike, somebody isn't thinking.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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