HomeOracle Page 2 - Configuring Oracle Database XE and PHP
Performing Post-Installation Tasks - Oracle
In this conclusion to a five-part article series on installing and configuring Oracle Database XE, you will learn how to enable PHP to connect to the Oracle database. This article is excerpted from chapter 27 of the book Beginning PHP and Oracle: From Novice to Professional, written by W. Jason Gilmore and Bob Bryla (Apress; ISBN: 1590597702).
By default, Apache and Oracle Database XE start automatically when Windows or Linux starts. If you did not launch the administrative interface when you finished the installation steps, open your Web browser and navigate to this URL:http://localhost:8080/apex/.
To access the administrative interface from another workstation (even if you did not install the client software on that workstation), use the same URL with the name of the Oracle Database XE server hostname instead of the default internal Linux hostnamelocalhost, as in this example:http://example.com:8080/apex/.
If Oracle Database XE’s Web service has started successfully, you will see the login screen shown in Figure 27-7.
Figure 27-7.Oracle Database XE login page
Creating User Accounts
In a default installation of Oracle Database XE, you specify the password for both theSYSandSYSTEM accounts. Following Oracle best practices, you should rarely use theSYSaccount, since it is the owner of all internal database tables and you want to minimize the risk of deleting or changing these tables. While you can use theSYSTEM account for most, if not all, of your administrative tasks, you should create another privileged account. This has a number of advantages. First, in case you lose, forget, or misplace the password for one of the accounts, you can still easily get into the database with another account. Second, in an environment with more than one administrator, having a separate account for each administrator provides more accountability and the option to fine-tune the privileges granted to each administrator.
To create an additional administrator account, log in using the Oracle Database XE administration home page shown in Figure 27-7, and click Administration. On the next page, click Database Users. Alternatively, you can click the arrow next to the Administration button itself and follow the drop-down menus to the user account management page.
Next, click the Create button and you will see the Web page shown in Figure 27-8.
Figure 27-8.Oracle Database XE Create Database User page
Specify a username and the password. By default, theCONNECT andRESOURCEroles are selected. To give this user administrative privileges, select theDBAcheckbox as well. We will explain how privileges and roles work in Chapter 30. Click the Create button, and you are ready to use the new administrative account the next time you log in.
You should now have a complete application and database environment installed: Oracle, PHP, and Apache on either Windows or Linux. Oracle Database XE retains many of the robust features found in the other (i.e., not free) versions of Oracle. It integrates nicely with other open source products such as PHP and Apache.
Throughout the rest of this book, we’ll use examples in the Windows environment except where the difference between environments is significant. However, you will soon find that you won’t even be able to tell that you’re on either Windows or Linux. This provides you with the flexibility to move your applications between platforms when the need arises with minimal, if any, rework.
The next chapter introduces many more administrative functions you will perform on a regular basis. We’ll also show you the basics of Oracle Database XE’s memory and disk architecture to help you optimize your database environment, whether it’s just for development or for a mission-critical department application.