Joined: 13 Jan 2009
|Posted: Fri Jan 16, 2009 2:05 pm Post subject: Oracle 10g XE-Abyss X1-PHP5. Works like a charm!
|New user wanting to contribute... there are a lot of references to MySQL but for school reasons I have to use Oracle.
1. Students needing to practice on Oracle 10g
2. Professionals wanting a lightweight web server development environment for Oracle-PHP.
OS: Windows XP Pro
Web server: Abyss X1
Database: Oracle 10g Express Edition
Script: Aprelium's PHP v5.2.8 package
Resources & Credits
A. Install Oracle XE
B. Install Abyss
C. Install PHP
D. Edit 'php.ini'
E. Test Oracle DB
A) Install Oracle XE
1. Obtain Oracle 10g XE and its documentation from Oracle
(it is free and suitable for a student's needs).
2. Obtain Abyss X1 v 2.5 from Aprelium's website
3. Obtain PHP v5.2.8 from Aprelium's website.
I used the PHP v5.2.8 configured by Aprelium for Windows.
4. Install Oracle XE as per Installation Guide B25143.
> I installed XE Server only (I ignored the references to XE clients)
> Make note of your user id and password because you need it to log in to the database
> The installation program installs the GUI interface (i.e. Application Express) by default.
> I did not upgrade Application Express to the newest version because I do not need it and I don't want the headache.
> a sample Human Resources database is intalled by default.
5. Go to XE's Login Page
Section 6 of Guide B25143 provides 2 methods to get to the database login page:
i) Start->All Programs->Oracle XE->Goto to Homepage
ii) Open Internet Explorer and type the address: "http://127.0.0.1:8080/apex/" and press GO
6. Login to the XE database using the user id and password you created on the installation process.
The homepage will have 4 boxes: i) Administration, ii) Object Browser, iii) SQL, iv) Utilities.
7. Select the Administration box.
You will see 5 boxes: i) Storage, ii) Memory, iii) Database Users, iv) Monitor, v) About Database
8. Select Database Users
> you will now be at: Home->Administration->Manage Database Users
> there will be 1 box: HR
9. Select the HR user group... we will make 2 changes to this user
> your username is unchanged as "HR".
> i) create a password... and make note of it
> ii) change the Account Status to "UNLOCKED".
10. Update the configuration changes by clicking "Alter User" button.
11. Logout of the XE database
B) Install Abyss X1
Use the tutorial by Abyssunderground.
> I made no changes on the install of Abyss X1.
C) Install PHP 5.2.8
Aprelium has prepared a PHP version specially configured for Abyss and Windows... I used Aprelium's PHP version.
Use Abyssunderground's PHP installation tutorial as follows:
Step 1: ignore this step because we are using Oracle XE and Aprelium's PHP
Step 2: install as described in the tutorial except for item 5:
On item 5, use "php-cgi.exe" because we are using v5 of PHP
Step 3: test php as described in the tutorial (remember to save your php scripts in the htdocs folder).
D) Edit PHP.INI
The Aprelium PHP install did not enable the Oracle extension by default; therefore, we have to edit the .ini file to enable the extension for Oracle.
The reference article for this instruction is here:
E) Test Oracle DB
This step is necessary to test if we can access XE's demo HR database via Abyss-PHP.
The Oracle article mentioned above provided the test php script.... there is no change.
In Step 9 of the Oracle install, above, we created a password for the HR user and we unlocked the account status. The reason we did that was because of the following script... you need to edit the script for your password.
The demo user ID is 'HR' by default... on line 3 of the script, I have edited the script for you.
For password on line 3 of the script, you need to change "YOUR_PASSWORD" to whatever your real password is.
Everything else remains unchanged.
$db_conn = ocilogon("HR","YOUR_PASSWORD","//127.0.0.1/XE");
$cmdstr = "select last_name, salary from employees";
$parsed = ociparse($db_conn,$cmdstr);
$nrows = ocifetchstatement($parsed,$results);
echo "<html><head><title>Oracle PHP Test</title></head><body>";
echo "<center><h2>Oracle PHP Test</h2><br>";
echo "<table border=1 cellspacing='0' width='50%'>\n<tr>\n";
for ($i=0; $i < $nrows; $i++)
echo "<tr><td colspan='2'>Number of Rows:$nrows</td></tr></table>";
echo "<br><em>If you see data, then it works!</em><br></center></body></html>\n";
When you run this script you will see a table of names and salaries.We're done.
1. Aprelium could edit the php.ini file to enable Oracle extension by default.
2. Abyssunderground could create and host a tutorial for Abyss-PHP-Oracle 10g XE.
3. Someone could try Abyss with Microsoft SQL Server 2005 Express Edition and create a tutorial.
Microsoft provides a free, lite, version of SQL Server 2005.
4.FYI: there are freeware DB Managers from Navicat and EMS for Oracle XE and MSSQL 2005 XE.
5. For help on using the Oracle PHP extension: oci8.dll
Joined: 15 Oct 2009
|Posted: Sat Oct 17, 2009 5:15 am Post subject: Oracle 10g XE Abyss X1 PHP5 Works like a charm
|this is what i am concerned abt. My php dir is C:PHP, not C:PHP5. And php_mssql.dll reside in C:PHPext folder.
I have my php.ini in C:PHP. Where is info.php reading php.ini file? This is what is confusing me. Please suggest if I am overlooking something or missing something.
View iPlayer Abroad with UK Proxy
||All times are GMT + 1 Hour
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum