tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
i m very new to php and mysql. today is my first day of php and mysql and i havn't seen these two software.
now, i try to connect mysql. this is the code that provided in php tutorial:
Just search this forum for "mysql extension not installed". Many people before you have had this problem and we've answered it already many times before too. (hint: extension=php_mysql.dll in php.ini)
2. search php.ini on C: drive. open it in notepad. scroll down until you see something like this...
PHP.ini wrote:
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=modulename.extension
;
; For example, on Windows:
;
; extension=msql.dll
;
; ... or under UNIX:
;
; extension=msql.so
;
; Note that it should be the name of the module only; no directory information
; needs to go here. Specify the location of the extension with the
; extension_dir directive above.
;Windows Extensions
;Note that MySQL and ODBC support is now built in, so no dll is needed for it.
;
;extension=php_bz2.dll
;extension=php_cpdf.dll
;extension=php_crack.dll
extension=php_curl.dll
;extension=php_db.dll
here remove the ; before mysql.dll if there is any such line...
phpdevuk wrote:looks like you are running php on windows from the path given in the error message, how have you installed mysql and php on your system?
http://www.apachefriends.org is probably the way to go. They've compiled a selection of extensions into PHP and distribute it together with Apache 2 and MySQL 4.1. Neat all-in-one package for beginners.
I actually use it myself, because I'm pretty fed up with getting servers to run on my machine. Loads of problems with Apache, Tomcat 3.x-4.1, IIS4, and some weird Perl server I once had. All those config files to edit... and then it turns out you have to change the batch files as well. And set the correct paths. Not to forget installing any interpreters like PHP or Perl. Gaaah....
2. search php.ini on C: drive. open it in notepad. scroll down until you see something like this...
PHP.ini wrote:
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=modulename.extension
;
; For example, on Windows:
;
; extension=msql.dll
;
; ... or under UNIX:
;
; extension=msql.so
;
; Note that it should be the name of the module only; no directory information
; needs to go here. Specify the location of the extension with the
; extension_dir directive above.
;Windows Extensions
;Note that MySQL and ODBC support is now built in, so no dll is needed for it.
;
;extension=php_bz2.dll
;extension=php_cpdf.dll
;extension=php_crack.dll
extension=php_curl.dll
;extension=php_db.dll
here remove the ; before mysql.dll if there is any such line...
You also need to make sure that the extension_dir is set correctly in your php.ini as well, for example if your extensions are stored in the extensions directory then you'd need something like this:
or you can just install XAMPP and not have to configure anything And it installs everything for you in one nice easy program and everything is up to date.