Translate

In this Tutorial, we are going to show how to connect oracle database with php using XAMP server with the help of example.
For preforming this task we need to go through with 2 step.

In the first step we are configuring XAMP server according to oracle database communication.
In second step - we will execute query and connect with the database.

Step First: -
First of all check that whether we have oracle client installed already or not.

1. In XAMP start up, Goto PHP info page, then look for string oci8.
   if this string found then it says that connection is available and then execute step3. Otherwise do
2. find string ;extenstion = php_oci8.dll and then remove the semicolon(;) from the beginning of string to activate the extension of oracle.

3. Save you XAMP php.ini file.

4. Now Download the client package - Basic for window from OTN Instant Client Page. Unzip in the folder name at path to "c:\xampp\php\ext"

5. Edit the PATH environment setting from the windows environment from start button -> control panel -> system -> Advanced -> Environment Variables and then edit path in the system variable list.

6. Restart your XAMP Server.

Step Second: -
 
\n"; 
while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) 
{     
    echo "\n";     
	foreach ($row as $item) 
	{         
	   echo "" . ($item !== null ? htmlentities($item, ENT_QUOTES) : " ") . "\n";
	 }    
    	 echo "\n"; 
 }
 
 echo "\n";

?>
There is some problem whenever we connect database with PHPmyadmin. Then it says "PHPMyAdmin unable to connect with root password change.
 
Error

MySQL said:
Cannot connect: invalid settings.
phpMyAdmin tried to connect with PHPmysql server and while connecting server's has rejected the connect connection. During establishing connection with server we should also check our configuration file includes hostname, username, and password. those are needed to connect and also check provided informations are correct correspond to administrator of phpmyadmin.

We should also take care of configuration parameters.

For Solution: - We need to perform some changes into the configuration file named config.inc in PHPmyadmin directory like: - (C:\xampp\phpMyAdmin) and do some changes in line for matching the password we have entered in PHPmyadmin.

$cfg['Servers'][$i]['password'] = ' ';

If you feel any difficulty then feel free to contact me through contact form. i will surely contact you as soon as possible.

Thanks

0 comments:

Post a Comment

 
Top