Using New Oracle Tutorial on NetBeans, Zend Framework, and Oracle Database

Christopher Jones has a new tutorial up called Developing a PHP Web Application With Oracle Database 11g. This tutorial uses NetBeans IDE 6.9.1 and Zend Framework. It's a lab and assumes you are using Linux and have access to Oracle 11.2.

However, I have got this lab to work on Windows using OracleXE (free download!) and XAMPP. I also tested it with a nightly dev build of NetBeans IDE. I thought I'd share with you the differences between what I did and what the lab says to do.

In the Prerequisites section,

  1. I had already installed Oracle XE and did not install Oracle 11.2.
  2. I did not create a user named PHPHOL. Because the tutorial uses the default HR sample schema, I used the HR user credentials instead (user hr, password hr).
  3. I did not set the application environment in the Apache httd.conf file. I guess you could, though. I ended up adding the server properties to both development and production environments instead, in application.ini (see below).
  4. Because I was using XAMPP, I did not install a new Apache server or PHP engine. I did not enable the Apache UserDir module. I did not set the oci8.connection_class property. All I did was go into XAMPP's php.ini file and uncomment the line for the oci8 extension. (Actually, I had done that much earlier, when I had been using XAMPP with oci8.)
  5. I did use my own download of Zend Framework 1.10.2 instead of the version that is included in XAMPP. This is because the zf.php in XAMPP appears to be buggy, or at least I have never been able to register it with NetBeans IDE.

In the section Creating the Application Framework,

  1. My sources folder was different. My setup was different, so I did not have a root phphol directory, and Apache was using htdocs instead of public_html. My path then was C:/XAMPP/htdocs/PHPLab instead of /home/phphol/public_html/PHPLab.
  2. I did not add a RewriteBase line to .htaccess. I tried this and my project would not run correctly. It worked fine without it.

In the section Listing Employees,

  1. I added a different set of database server properties to application.ini, because I was using OracleXE and because I was accessing the HR schema directly as user hr. So instead of
    resources.db.adapter = "Oracle"
    resources.db.params.dbname = "localhost/orcl"
    resources.db.params.username = "phphol"
    resources.db.params.password = "welcome"
    I added 
    resources.db.adapter = "Oracle"
    resources.db.params.dbname = "localhost/XE"
    resources.db.params.username = "hr"
    resources.db.params.password = "hr"
  2. Because I had not set the application environment in httpd.conf or in index.php, I added the database server properties to both production and development sections of application.ini instead of only the development : production section.
  3. There are some references to the linux cp command. That's just the copy command, so I copied the files in Total Commander instead.

Except for these changes, the tutorial worked fine for me.

Comments:

Cool!, thanks.

Posted by Juan Felipe Alvarez Saldarriaga on January 20, 2011 at 11:43 AM CET #

Post a Comment:
  • HTML Syntax: NOT allowed
About

This blogs is written by NetBeans developers who contribute to the PHP support mainly.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today