MinusMyThoughts Posted January 26, 2007 Share Posted January 26, 2007 Hey, everyone!I wasn't entirely sure where this sort of question belonged, but my best guess was in here.I have just installed PHP 5, Apache 2.0, and MySQL 5 on my computer (Windows XP) for local testing. All the installations went according to plan and tested out fine. I followed the steps given HERE to install all three. My problem is this: I cannot, for whatever reason, get PHP to hook into MySQL. Everything looks the way the tutorial said it should, and I can use MySQL through the command line successfully, but I get the "Call to undefined function..." error when I call something like "mysql_query()" in a PHP file.Has anyone had this problem? Is there a better tutorial that I didn't see? Should I set my computer on fire?Thanks!-Jason Link to comment Share on other sites More sharing options...
MrAdam Posted January 26, 2007 Share Posted January 26, 2007 haha. i had very similar problems installing them ! My friend reccomended i uninstalled them and used xampp. It installs everything in one and has it's own control panel. Far better I thought!Also i've found that it doesn't slow my computer down at all - and im using a pretty.. poo.. computer.Good luck ! Link to comment Share on other sites More sharing options...
aspnetguy Posted January 26, 2007 Share Posted January 26, 2007 did you uncomment the call tot eh mysql library in php.ini? You have to restart apache after you do also. You also have to set the extention_dir to point to the php libraries (usually C:\PHP\ext on windows) Link to comment Share on other sites More sharing options...
MinusMyThoughts Posted January 26, 2007 Author Share Posted January 26, 2007 aspnetguy-Here is my configuration:php.ini Lines 521 & 522; Directory in which the loadable extensions (modules) reside.extension_dir = C:\dev\server\PHP\ext\Lines 652, 653, & 654;extension=php_msql.dllextension=php_mysql.dll;extension=php_oci8.dll Also, I'm having a really weird issue with the php.ini path in the phpinfo(). It says C:\WINDOWS, but there is not a php.ini file there. So I copied one there and added the line PHPIniDir C:\dev\server\PHPin an attempt to correct the issue. Still C:\WINDOWS.I don't really know what's going on. I looked through the php.net manual and any other installation guide I could find online - no dice. At this point I think I'd just be happy to know how PHP is finding a ghost file in C:\WINDOWS.Thanks for the help!-Jason Link to comment Share on other sites More sharing options...
MinusMyThoughts Posted January 27, 2007 Author Share Posted January 27, 2007 After what feels like years and what measures out to be about 14 wasted hours, I found the problem with my installation:In Apache's httpd.conf file, these lines: LoadModule php5_module C:/dev/server/PHP/php5apache2.dllAddHandler application/x-httpd-php .phpPHPIniDir "C:/your/path/to/PHP" Need to look like THIS: LoadModule php5_module C:/dev/server/PHP/php5apache2.dllAddHandler application/x-httpd-php .phpPHPIniDir C:\your\path\to\PHP\php.ini I looked at every tutorial I could find, and nearly every one of them was stalled out with somebody saying, "That didn't work. Does anyone have any other ideas?"Hopefully this will save someone else some heartache.-Jason Link to comment Share on other sites More sharing options...
justsomeguy Posted January 29, 2007 Share Posted January 29, 2007 About the phpinfo path to php.ini, if it cannot find php.ini it will list where it is looking (C:\Windows). If you see the filename in that path (e.g. C:\Windows\php.ini) then it was able to find it. If it doesn't list the filename, then it didn't find it. Link to comment Share on other sites More sharing options...
kvnmck18 Posted February 1, 2007 Share Posted February 1, 2007 Whoa, Xampp seems sweet. I've never heard of it. w3schools should add it to the site. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now