Got a question about technology? Ask it here. Discussion of hardware, software, TiVos, multi-region DVDs, Windows, Macs, LINUX, hand-helds, iPods, anything tech related. Better than any helpdesk!
I was wondering if someone here could help me with a PHP/MySQL problem, please. I'm taking an eLearning course in an attempt to learn PHP/MySQL. So far I've installed PHP, Apache, and MySQL on my Windows XP laptop. Everything went fine until I was attempting to run a php file to test whether PHP had MySQL enabled. I got the error:
Fatal error: Call to undefined function mysql_connect() in c:program filesapache groupApachehtdocsmysql_connect.php on line 2
I thought I'd edited the php.ini file to enable php_mysql.dll . When I ran the phpinfo file it said the php.ini file was in the WINDOWS folder, and that's the one I edited. I restarted apache.
I'm not sure how to proceed. Suggestions?
Look in the errors logfile?
I'm assuming the course is more focused on writing php than system administration? In that case, I strongly recommend that you skip installing and configuring everything by hand and just use XAMPP: [link]
Unfortunately, installing and configuring everything myself is part of the course which I need to pass (it's a work thing).
I'll be happy to look in the errors logfile. Where might that sort of thing live?
There should be an entry for where the error file lives in the httpd.conf file.
OK, thank you. And where does the httpd.conf file live?
Ah - in that case, carry on with your error logging. And if you're ever looking for a php environment that's easier to set up once you're done with the class, XAMPP (or MAMP, which is a Mac-only thingie along the same lines) makes it very easy. Not something you'd use for an actual server, but I use it on all my machines when I want to run a local test/development environment.
Thanks, amych. Yeah, this course seems overkill for what I'm planning to do, but it's what they want me to take. And I don't mind learning the installation stuff--I've just hit a wall with it.
amych -- How does XAMPP compare with WAMP? Have you tried both? I played with the latter a while back and it was pretty easy to set up.
I've never used WAMP -- I mostly use MAMP, and I have used XAMPP when I'm not on a mac; my sense is that they're all pretty much the same idea. Also, fun to say in succession!