Vous êtes sur la page 1sur 4

Table of Contents

PHP - Encountered problem in running php file: ................................................................................2


PHP - Cannot load mysql extension. ...................................................................................................2
1.20 I receive the error "cannot load MySQL extension, please check PHP Configuration".
..............................................................................................................................................................2
PHP - Fatal error: Call to undefined function mysql_connect() ..........................................................2
Helpful Links........................................................................................................................................3
10/16/09

PHP - Encountered problem in running php file:


* Php not running; codes shown instead of page contents; asks to download the php file

Solutions

1. Returned the orignal path of root


- DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
- ServerRoot "C:/Program Files/Apache Software Foundation/Apache2.2"
2. Downloaded php zip file in php.net
3. Create php folder in C:\
4. Extract the downloaded php files in C:\Php
5. Create a copy of php.ini-recommended save as php.ini
6. Configure php.ini (modified/added the following)
- create the folder “tmp” in “c:\php”
- ;session.save_path = "/tmp" >> session.save_path = "c:\php\tmp”
- display errors = on
- default_display_errors = on
7. Configure httpd.conf (APACHE - added the following)
- AddType application/x-httpd-php .php
- AddType application/x-httpd-php-source .phps
- LoadModule php5_module "c:/php/php5apache2_2.dll"
- PHPIniDir "c:/php"

MySQL administrator explore; created a table


NetBeans explore; created login form; add record to database

http://www.thesitewizard.com/php/install-php-5-apache-windows.shtml

10/17/09

PHP - Cannot load mysql extension.


Please check your PHP configuration. - Documentation

1.20 I receive the error "cannot load MySQL extension, please check PHP Configuration".
To connect to a MySQL server, PHP needs a set of MySQL functions called "MySQL extension".
This extension may be part of the PHP distribution (compiled-in), otherwise it needs to be loaded
dynamically. Its name is probably mysql.so or php_mysql.dll. phpMyAdmin tried to load the
extension but failed.

Usually, the problem is solved by installing a software package called "PHP-MySQL" or something
similar.

10/19/09

PHP - Fatal error: Call to undefined function mysql_connect()


(in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\Ruvina\login.php on
line 6)

http://forums.mysql.com/read.php?52,98383,176785#msg-176785
http://www.ricocheting.com/server/php.html
If you are using Windows XP with Apache
If you are using Apache instead of IIS, copy the following files

php5apache2.dll
php5ts.dll
php_mysql.dll
libmysql.dll
libmysqli.dll

in to

c:\windows\system32

The 5 files are available for download here

Restart Apache before you view the pages. >>>>> http://www.siteinaweek.com/installphp5/howto.php#apache


Helpful Links

http://wiki.netbeans.org/CreateDatabaseFromNetbeans

http://www.thesitewizard.com/php/install-php-5-apache-windows.shtml

http://forums.mysql.com/read.php?52,98383,176785#msg-176785

http://www.ricocheting.com/server/php.html

Vous aimerez peut-être aussi