Oracle not visible for installation
Moderator: Thorsten
Oracle not visible for installation
Hello,
When I open the installer.php page, I see the full page. This includes “phpMyFAQ 2.0.15 Installation” and “Your PHP version: PHP 5.2.6”. However, the drop-down next to “SQL server” only provides the “MySQL 4.x…” choice and the “MySQL 4.1…” choice. I want to see “oracle” as a choice.
I have Oracle 10.2.0.3. I downloaded PHP through yum. I downloaded oci8-1.3.5.tgz, configured it to my $ORACLE_HOME and oracle libraries and installed it. In /etc/php.ini I have
extension_dir = "/usr/lib64/php/modules"
and
extension=oci8.so
Under /usr/lib64/php/modules I have oci8.so
I restarted apache.
I added a page with the following code:
<?php phpinfo(); ?>
and opened it in the browser.
I saw this info:
oci8
OCI8 Support enabled
Version 1.3.5
Revision $Revision: 1.269.2.16.2.38.2.32 $
Active Persistent Connections 0
Active Connections 0
Compile-time ORACLE_HOME /opt/db/oracle/10.2.0
Libraries Used -Wl,-rpath,/opt/db/oracle/10.2.0/lib -L/opt/db/oracle/10.2.0/lib -lclntsh
Temporary Lob support enabled
Collections support enabled
Directive Local Value Master Value
oci8.connection_class no value no value
oci8.default_prefetch 100 100
oci8.events Off Off
oci8.max_persistent -1 -1
oci8.old_oci_close_semantics Off Off
oci8.persistent_timeout -1 -1
oci8.ping_interval 60 60
oci8.privileged_connect Off Off
oci8.statement_cache_size 20 20
I also made another php page that accessed my oracle database using OCI functions and retrieved tablenames.
I cleared my browser cache and restarted apache multiple times.
Why is “oracle” still not showing up?
Thank you for any help.
-Jack
When I open the installer.php page, I see the full page. This includes “phpMyFAQ 2.0.15 Installation” and “Your PHP version: PHP 5.2.6”. However, the drop-down next to “SQL server” only provides the “MySQL 4.x…” choice and the “MySQL 4.1…” choice. I want to see “oracle” as a choice.
I have Oracle 10.2.0.3. I downloaded PHP through yum. I downloaded oci8-1.3.5.tgz, configured it to my $ORACLE_HOME and oracle libraries and installed it. In /etc/php.ini I have
extension_dir = "/usr/lib64/php/modules"
and
extension=oci8.so
Under /usr/lib64/php/modules I have oci8.so
I restarted apache.
I added a page with the following code:
<?php phpinfo(); ?>
and opened it in the browser.
I saw this info:
oci8
OCI8 Support enabled
Version 1.3.5
Revision $Revision: 1.269.2.16.2.38.2.32 $
Active Persistent Connections 0
Active Connections 0
Compile-time ORACLE_HOME /opt/db/oracle/10.2.0
Libraries Used -Wl,-rpath,/opt/db/oracle/10.2.0/lib -L/opt/db/oracle/10.2.0/lib -lclntsh
Temporary Lob support enabled
Collections support enabled
Directive Local Value Master Value
oci8.connection_class no value no value
oci8.default_prefetch 100 100
oci8.events Off Off
oci8.max_persistent -1 -1
oci8.old_oci_close_semantics Off Off
oci8.persistent_timeout -1 -1
oci8.ping_interval 60 60
oci8.privileged_connect Off Off
oci8.statement_cache_size 20 20
I also made another php page that accessed my oracle database using OCI functions and retrieved tablenames.
I cleared my browser cache and restarted apache multiple times.
Why is “oracle” still not showing up?
Thank you for any help.
-Jack
Re: Oracle not visible for installation
Hi Jack,
you're the first Oracle user!
Okay, it seems, I made a mistake in the check for Oracle.
Please open the file inc/constants.php and goto line 178. Please edit this line from
to
It's possible that more issue pop up because the Oracle support is still experimental. Maybe you can help here.
Thanks!
bye
Thorsten
you're the first Oracle user!
Okay, it seems, I made a mistake in the check for Oracle.
Please open the file inc/constants.php and goto line 178. Please edit this line from
Code: Select all
'oracle' => array('5.0.0', 'Oracle 8i and later (experimental)'),
Code: Select all
'oci8' => array('5.0.0', 'Oracle 8i and later (experimental)'),
Thanks!
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Oracle not visible for installation
Thank you for the incredibly fast response. After the fix, the oracle choice popped up.
I realize that MySQL has been tested more, but I'm hoping Oracle works out. We already have Oracle installed on this server and we're more familiar with it.
Thanks again.
I realize that MySQL has been tested more, but I'm hoping Oracle works out. We already have Oracle installed on this server and we're more familiar with it.
Thanks again.
Re: Oracle not visible for installation
When I try to install I get
"Error: Invalid server type."
My settings:
SQL server: Oracle 8i and later (experimental)
SQL server host: localhost
SQL username: requestsFAQ
SQL password: ****
SQL database: testdb1
Table prefix:
"Error: Invalid server type."
My settings:
SQL server: Oracle 8i and later (experimental)
SQL server host: localhost
SQL username: requestsFAQ
SQL password: ****
SQL database: testdb1
Table prefix:
Re: Oracle not visible for installation
Hi,
yes, I found another issue. Please rename the file inc/PMF_DB/Oracle.php to inc/PMF_DB/Oci8.php. You also have to rename the class inside from class db_oracle to class db_oci8.
Hope that helps.
I already fixed these issues in SVN for 2.0.16, 2.5.1 and 2.6.0-alpha.
bye
Thorsten
yes, I found another issue. Please rename the file inc/PMF_DB/Oracle.php to inc/PMF_DB/Oci8.php. You also have to rename the class inside from class db_oracle to class db_oci8.
Hope that helps.
I already fixed these issues in SVN for 2.0.16, 2.5.1 and 2.6.0-alpha.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Oracle not visible for installation
I'm getting the same error. Maybe I should just install a newer version?
Re: Oracle not visible for installation
Hi,
strange... should work now. You can try to download the stable snapshot of version 2.5 tomorrow or check it out directly from SVN.
bye
Thorsten
strange... should work now. You can try to download the stable snapshot of version 2.5 tomorrow or check it out directly from SVN.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Oracle not visible for installation
I did
mv /install/oracle.sql.php /install/oci8.sql.php
I got past that error.
I'm getting database connection problems, but that's probably my fault and I'll experiment with it.
Thanks
mv /install/oracle.sql.php /install/oci8.sql.php
I got past that error.
I'm getting database connection problems, but that's probably my fault and I'll experiment with it.
Thanks
Re: Oracle not visible for installation
I mistyped that last command. This is what I did from the faq directory:
mv install/oracle.sql.php install/oci8.sql.php
mv install/oracle.sql.php install/oci8.sql.php
Re: Oracle not visible for installation
Hi,
ah, I forgot the name changes in the install/ folder. It's fixed now, too.
bye
Thorsten
ah, I forgot the name changes in the install/ folder. It's fixed now, too.
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Oracle not visible for installation
In Oci8.php, the connect function had the line
if (empty($db) OR $this->conn == true) {
Based on the other files in PMF_DB, I changed this to
if (empty($db) || $this->conn == false) {
I'm still getting this error when trying to install:
|
Error: Please install your version of phpMyFAQ once again or send us a bug report.
DB error:
Query:
CREATE TABLE faqadminlog (
id INTEGER NOT NULL,
time INTEGER NOT NULL,
usr VARCHAR(255) NOT NULL,
text VARCHAR(512) NOT NULL,
ip VARCHAR(64) NOT NULL,
PRIMARY KEY (id))
if (empty($db) OR $this->conn == true) {
Based on the other files in PMF_DB, I changed this to
if (empty($db) || $this->conn == false) {
I'm still getting this error when trying to install:
|
Error: Please install your version of phpMyFAQ once again or send us a bug report.
DB error:
Query:
CREATE TABLE faqadminlog (
id INTEGER NOT NULL,
time INTEGER NOT NULL,
usr VARCHAR(255) NOT NULL,
text VARCHAR(512) NOT NULL,
ip VARCHAR(64) NOT NULL,
PRIMARY KEY (id))
Re: Oracle not visible for installation
I noticed that the query function in Oci8.php does not have a return value, while the other database types do return a value for query.
I tried replacing
oci_execute($stmt, OCI_DEFAULT);
with
return oci_execute($stmt, OCI_DEFAULT);
but that did not work.
As a test I ended the query with
return true;
It created 18 of the tables. Of course this was a mistake because I got the message
All database tables were successfully created.
Congratulation! Everything seems to be okay.
and now my installer.php is gone. It looks like there should be about 31 tables. I deleted the new tables and now I have a bad install.
I have a theory about what may have gone wrong with the
return oci_execute($stmt, OCI_DEFAULT);
but I can't test it now - is there a way to reverse the install (and restore installer.php)?
Thanks
I tried replacing
oci_execute($stmt, OCI_DEFAULT);
with
return oci_execute($stmt, OCI_DEFAULT);
but that did not work.
As a test I ended the query with
return true;
It created 18 of the tables. Of course this was a mistake because I got the message
All database tables were successfully created.
Congratulation! Everything seems to be okay.
and now my installer.php is gone. It looks like there should be about 31 tables. I deleted the new tables and now I have a bad install.
I have a theory about what may have gone wrong with the
return oci_execute($stmt, OCI_DEFAULT);
but I can't test it now - is there a way to reverse the install (and restore installer.php)?
Thanks
Re: Oracle not visible for installation
Hi,
I also checked the code and the oci8 extension. I think, the query() method has to look like this:
bye
Thorsten
I also checked the code and the oci8 extension. I think, the query() method has to look like this:
Code: Select all
public function query($query)
{
$this->sqllog .= pmf_debug($query);
$stmt = oci_parse($this->conn, $query);
oci_execute($stmt, OCI_DEFAULT);
return $stmt;
}
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
amazon.de Wishlist
Re: Oracle not visible for installation
I downloaded the newest 2.5.x Pandora and made a fresh install. I made the changes we discussed including
I also changed the class name in Oci8.php to
I ran the install and got the message
And I see 20 table names, but I see 32 CREATE TABLE statements in oci8.sql.php. Is this a problem?
Code: Select all
public function query($query)
{
$this->sqllog .= pmf_debug($query);
$stmt = oci_parse($this->conn, $query);
oci_execute($stmt, OCI_DEFAULT);
return $stmt;
}
Code: Select all
class PMF_DB_Oci8 implements PMF_DB_Driver
In the database I ranInstall wrote: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
All database tables were successfully created.
Congratulation! Everything seems to be okay.
Code: Select all
select table_name from user_tables;
Re: Oracle not visible for installation
I extracted the other CREATE TABLE statements and ran them directly in oracle. They don't run for various reasons. For instance, 'comment' cannot be used as a column name in oracle because it's a reserved word.