Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 3 123 LastLast
Results 1 to 15 of 36
  1. #1
    Regular Coder
    Join Date
    Feb 2005
    Location
    Texas
    Posts
    472
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Slight problem with PHP/MySQL

    I just installed Apache server because I think it might go faster. But when I load a page I get this:

    "Fatal error: Call to undefined function mysql_connect() in C:\php5\PEAR\betaboard.php on line 556"
    If you're reading this, it may already be too late!

  • #2
    Senior Coder
    Join Date
    Apr 2005
    Location
    Colorado, United States
    Posts
    1,208
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Open up php.ini and uncomment php_mysql.dll or whatever the MySQL extension name is.
    "$question = ( to() ) ? be() : ~be();"

  • #3
    Regular Coder
    Join Date
    Feb 2005
    Location
    Texas
    Posts
    472
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I found this: "extension=php_mysql.dll" but it doesn't seem to be commented.
    If you're reading this, it may already be too late!

  • #4
    Regular Coder
    Join Date
    Feb 2005
    Location
    Texas
    Posts
    472
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Is it possible Apache is looking for the PHP.ini somewhere else?
    If you're reading this, it may already be too late!

  • #5
    Regular Coder Element's Avatar
    Join Date
    Jul 2004
    Location
    Lynnwood, Washington, US
    Posts
    855
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Too my knowledge, if PHP is doing anything at all, it is using the php.ini.

  • #6
    Regular Coder
    Join Date
    Feb 2005
    Location
    Texas
    Posts
    472
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Ok, it's using the php.ini that I put in the WINDOWS directory. But now when I start Apache it says the extensions "ext\php_mysql.dll" can't be found.
    If you're reading this, it may already be too late!

  • #7
    Regular Coder
    Join Date
    Feb 2005
    Location
    Texas
    Posts
    472
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Where should I put that dll "php_mysql.dll" so that Apache can find it.
    If you're reading this, it may already be too late!

  • #8
    Senior Coder
    Join Date
    Apr 2005
    Location
    Colorado, United States
    Posts
    1,208
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Element
    Too my knowledge, if PHP is doing anything at all, it is using the php.ini.
    Nay. If PHP isn't supplied with configuration values (or is missing some) it uses internal defaults.

    Anyways, check that C:/php/ext/php_mysql.dll exists (or where ever PHP is). If not, I think you need to download an extension pack off php.net. If it does exist, use the full path (ie: C:/php/ext/php_mysql.dll).
    "$question = ( to() ) ? be() : ~be();"

  • #9
    Regular Coder
    Join Date
    Feb 2005
    Location
    Texas
    Posts
    472
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I'm 100% sure that C:\PHP\ext\php_mysql.dll exists, but it says it couldn't be found.
    If you're reading this, it may already be too late!

  • #10
    Senior Coder
    Join Date
    Apr 2005
    Location
    Colorado, United States
    Posts
    1,208
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try using the full path then. C:\PHP\ext\php_mysql.dll.
    "$question = ( to() ) ? be() : ~be();"

  • #11
    Regular Coder
    Join Date
    Feb 2005
    Location
    Texas
    Posts
    472
    Thanks
    1
    Thanked 0 Times in 0 Posts
    You mean I should have this in php.ini: "extension=C:\PHP\ext\php_mysql.dll" I did that and when I start my apache server it says:

    "PHP Startup: Unable to load dynamic library 'C:\PHP\ext\php_mysql.dll' - The specified module could not be found."

    See? This is why I don't like Apache.
    If you're reading this, it may already be too late!

  • #12
    Senior Coder
    Join Date
    Apr 2005
    Location
    Colorado, United States
    Posts
    1,208
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If it can't be found, then something is wrong with the path. It has absolutely nothing to do with Apache, it's PHP that can't find the extension. Verify your path.
    "$question = ( to() ) ? be() : ~be();"

  • #13
    Regular Coder
    Join Date
    Feb 2005
    Location
    Texas
    Posts
    472
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Ok I right clicked on the file and I'll copy and paste the information.

    The filename is: "php_mysql.dll"
    The location is: "C:\PHP\ext"

    Is there any subtle difference between that and the path I stated?
    If you're reading this, it may already be too late!

  • #14
    Regular Coder
    Join Date
    Feb 2005
    Location
    Texas
    Posts
    472
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Ugh. I give up. This is why I stopped using Apache in the first place. It's so hard to deal with. I never have this problem with Abyss, so I'm going back to it. I don't care if my pages do take 5 seconds to load.
    If you're reading this, it may already be too late!

  • #15
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,096
    Thanks
    11
    Thanked 101 Times in 99 Posts
    Dont give up you are 1 copy away ~ the error is not that apache cant find the extension itself but that it can not find a required dll libmysql.dll

    find libmysql.dll (it will either be in the PHP directory or PHP/EXT)
    copy that to either
    $C:/program files/apache/bin (e.g. the /bin directory for apache)
    or $c:/windows/system32

    I prefer to stick such bits in the /apache/bin directory but either will work.

    Moving to Apache is a big step in the right direction (though that alone wont solve your aforementioned MySQL issues)
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)


  •  
    Page 1 of 3 123 LastLast

    Posting Permissions

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