When I had fixed all the other issues I got stuck with this one, still during installation:
INSERT INTO "SYSTEM" (filename, name, type, owner, info) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4) e: SQLSTATE[HY000]: General error: 12899 OCIStmtExecute: ORA-12899: value too large for column "DRUPAL"."SYSTEM"."FILENAME" (actual: 1072, maximum: 255) (ext\pdo_oci\oci_statement.c:146) args: Array ( )
| Comment | File | Size | Author |
|---|---|---|---|
| #30 | log.txt | 241.24 KB | jurgenhaas |
| #29 | query.zip | 1.96 KB | aaaristo |
| #27 | log.txt | 39.8 KB | jurgenhaas |
| #24 | log.txt | 40.5 KB | jurgenhaas |
| #17 | log.txt | 27.68 KB | jurgenhaas |
Comments
Comment #1
jurgenhaasBTW, I've cross checked and performed another install with the exact same components just replacing Oracle by MySQL and this error did not occur.
Comment #2
aaaristo commentedYou are facing one of those problems that makes me happy about using Oracle instead of MySQL:
if you look at "./modules/system/system.install" line 1406 you can see that actually the core create the filename field as 255 char long:
....
$schema['system'] = array(
'description' => "A list of all modules, themes, and theme engines that are or have been installed in Drupal's file system.",
'fields' => array(
'filename' => array(
'description' => 'The path of the primary file for this item, relative to the Drupal root; e.g. modules/node/node.module.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
....
You are trying to insert a value of 1072 charcaters, so the value exceed the column length...
You are probably right when you say that on mysql this will "work"... Or to be more detailed i should say the insert works and it works really bad!! Try to create a table with a column of 255 charcaters in mysql and now try to insert a value of 1072 characters inside it...
You will see that the value is inserted... but silently truncate at 255 chars!!!! So actually on mysql you installation works because a file path is truncated and when you will try to use this functionality from the system table it will fail...
See this blog post for details:
http://www.suspekt.org/2008/08/18/mysql-and-sql-column-truncation-vulner...
You should use the STRICT_ALL_TABLES mysql option.
So please file a bug on the drupal project for that... or tell me if you are not going to do that so i will. ;)
Meanwhile, to solve your installation problem simply change this "./modules/system/system.install" line 1406 to a longer field, say 2000...
Comment #3
jurgenhaasUnderstand what you're saying but I suspect something else is going wrong here.
First of all, when I redefine the schema and make the field FILENAME a maximum length of 2000 then the next error message is that the system wants to insert something into the field NAME, also the error says that the actual value is 1072 bytes long and the field limit is 255. When I exceed that field too I get the same error on the field TYPE.
After exceeding all relevant fields in the SYSTEM table I get the error:
Checking back into the database table with MySQL there is no value longer than 60 bytes. So I wonder what's going wrong and where the values of always 1072 bytes are coming from. Are you sure they're not created by the driver?
Comment #4
aaaristo commentedAre you using your patch for E_STRICT warnings when doing this test?
Actually i've reinstalled a fresh version of drupal-7.0-alpha3 with the last -dev of my driver and it simply installs without any issue...
Please try without the E_STRICT flag and without patches if you where...
Comment #5
jurgenhaasAfter having done all the test described in #787256 I now get the error
It's different from above and again, this happens with all the latest unpatched versions of Drupal 7 and Oracle project.
Comment #6
aaaristo commentedIn the query method of database.inc you can find 2 commented syslog... If you uncomment those lines you can trace your statements in the error_log of your httpd. It would be interesting to know what value you are trying to insert.
It definitely looks like you are using the -dev release.. Or there is some kind of windows related issue.
Let's try to find it.
Comment #7
jurgenhaasI've now installed alpha4 and your unpatched latest oracle driver and I get the following error:
RELEASE SAVEPOINT savepoint_1 (prepared: RELEASE SAVEPOINT savepoint_1 ) e: SQLSTATE[HY000]: General error: 900 OCIStmtExecute: ORA-00900: invalid SQL statement (ext\pdo_oci\oci_statement.c:146) args: Array ( )
Nothing in the syslog.
Comment #8
aaaristo commentedOk, i'm going to try the alpha4 this night.. i'm actually using the alpha3...
Looks like SAVEPOINTs for rollback have been added in the last release.
Comment #9
jurgenhaasThanks a lot, this is great support and this is very promissing regarding Oracle support. I hope I can be of ongoing help in this process and I'd love to contribut somehow on an ongoing basis. For now, my part can mainly be testing and reports.
Comment #10
aaaristo commentedOk found it. I just commited a new version of -dev fixing the ref value passing in query.inc.
I also fixed the savepoint issue. No "savepoint release" in oracle.. But savepoints are safely overwritten
so it all works fine by simply ignoring the release command.
Be sure to download the repackaged version.. because the drupal.org packaging system is asynchronous and takes
some time to rebuild..
@jurgenhaas thank you for traking down the problem... I hope you can support this driver anytime soon.. just keep looking around and submitting patches.
Comment #11
jurgenhaasGetting much further now. This time the error happens much later when 50% of the standard profile has already been done. There error message:
Comment #12
aaaristo commentedAre you using alpha4 with last -dev oracle driver? Can you attach your oracle/query.inc?
Comment #13
jurgenhaasYes, that's the combination I'm using. The query.inc is attached.
Comment #14
aaaristo commentedI cannot reproduce it. Can you install the attached patch to debug values in the syslog and give me back the last "value: " you find in the error_log before the ORA-01461 error.
This error should not exists because the driver prevents it translating values > 4000 chars in BLOBs (DatabaseConnection_oracle::cleanupArgValue method).
Comment #15
aaaristo commented...attaching the patch
Comment #16
jurgenhaasIt's really bad, I can't find anything in the syslog. (Note: there are plenty of PHP entries in the syslog with the id 3 which is an undefined warning, but I remember that has been something related to PHP 5.2.9 and is unrelated to the current issue).
However, what I have been doing is taking screenshots during installation (see attached screenshots from 1-4). It's interesting that installation continues after those two errors and at the end, it says that I should configure the site but no form is displayed.
After that, if I delete the database and run the installation again, the error reporting is different. Drupal does not dontinue to install but displays the error from #11 above.
Comment #17
jurgenhaasI've improved logging a bit and attached is a log file which shows all entries of execute() in query.inc. The last entry has been a record being written to the table sessions, but similar entries happaned before and I don't understand why this last one should fail. But maybe this helps you to drag down the problem.
Comment #18
aaaristo commentedActually the last entry in your log is the famous batch table update... The strange thing here is that the cleanupArgValue function should translate this long value to a BLOB automagically. This is not happening and so the statement fails. It looks like a PHP issue with variable passed by reference... Can you test this php with your installation please?
It would be useful if you can upgrade to PHP 5.2.12.
Comment #19
jurgenhaasThe output of that PHP script is
Upgrading PHP within an existing XAMP installation seems a bit tricky.
Comment #20
aaaristo commentedooops... retry this please:
Comment #21
jurgenhaasHere you go:
Comment #22
aaaristo commentedOk, in your SQL the
"###value:"
is produced after cleanupArgValue in the query.inc like in my patch?
If yes can you debug a bit more the cleanupArgValue method:
Comment #23
jurgenhaasAre you sure? The ###value in the last incident looks exactly the same as the ###fields value just above, there is no difference. And that value is supposed to be stored in the field 'batch' which is a string field and not LONG, so I doubt that this one is causing the error. Or am I misreading something?
Anyways, I'm doing more debugging in the cleanup for you and post the log asap.
Comment #24
jurgenhaasAttached is the improved log file with more details about the cleanup.
Comment #25
aaaristo commentedyes and is 1323 charcaters.. So no blob translation is needed (the batch column should be 4000 chars long so no error should came up)... Forgive the debug... the cleanupArgValue is working correctly..
Comment #26
aaaristo commentedCan u try logging the $batch['id'] value please?
Comment #27
jurgenhaasAttached an extended log file, the conditions are displayed as "###condition: [value]'
Comment #28
jurgenhaasAny ideas what else we could try to get this working?
Comment #29
aaaristo commentedcan you please try reinstalling (install.php) with the attached query.inc? I think is a problem linked some way to PHP reference / how the PDO_OCI driver use those references in your configuration. If the attached file will not work i'm going to setup a windows machine with php 5.2.9 to try out your config so that i can debug it locally. On my installations the problem simply do not occur.
Comment #30
jurgenhaasUnfortunately, this doesn't help yet.
However, I realized that there are more calls to bindParam() in query.inc, so far I had only debugged the update class but not the insert class. I've enhanced the new query.inc to debug the insert class as well and attached the latest log file. I haven't found anything that would be causing that error but maybe you do. I was thinking that maybe not the last bindParam() in the log may be the evil?
Comment #31
vmiliano commentedI am seeing the same or a similar issue with 7 alpha 4 and the latest -dev of the oracle driver:
An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: http://d7a43.localhost:8084/install.php?q=install.php&profile=minimal&locale=en&id=1&op=do StatusText: OK ResponseText: {"status":true,"percentage":"100","message":"Completed 12 of 12.\u003cbr \/\u003eInstalled \u003cem\u003eMinimal\u003c\/em\u003e module."}Uncaught exception thrown in shutdown function.PDOException: UPDATE "BATCH" SET batch=:db_update_placeholder_0 WHERE (bid = :db_condition_placeholder_0) e: SQLSTATE[HY000]: General error: 1461 OCIStmtExecute: ORA-01461: can bind a LONG value only for insert into a LONG column (ext\pdo_oci\oci_statement.c:146) args: Array ( ) in _batch_shutdown() (line 516 of C:\Documents and Settings\vmiliano\My Documents\Sites\drupal-7.0-alpha4\includes\batch.inc).I am testing both regular and minimal installs of Drupal 7 alpha 4 under Oracle XE and Zend Server (I couldn't get the Acquia Stack working with OCI) on Windows XP. This error appears right after step 10 of 12, which installs Blocks.
Continuing to the error page shows no errors, but the Drupal index.php home page shows this:
Comment #32
aaaristo commentedI'am actually installing XAMPP on a windows vm to reproduce the problem...
Just to check have you all used the Univ version of oracle xe ? (The one with utf8 support) If not you should.
Comment #33
aaaristo commentedOk... good news, i was able to reproduce it on windows.. tomorrow i'm going to check it.
Comment #34
aaaristo commentedI guys looks like you (on windows) are facing this PDO_OCI bug:
http://bugs-beta.php.net/bug.php?id=40787&edit=1
I remember i was having the same problem on linux but at some point of php 5.2.x (where x > 9)
it disappeared.
So to make it work meanwhile they solve it you can simply resize the:
define('ORACLE_MAX_VARCHAR2_LENGTH',4000);
to read
define('ORACLE_MAX_VARCHAR2_LENGTH',1332);
at the top of database.inc.
This will probably slowdown a bit the driver because more values will be transalted to blobs, but actually is the only way to make it work on windows i think.
My conf:
XAMPP 1.7.3 (yes finally i tried to use the more recent php that should include the more recent pdo_oci but nothing changed)
Drupal 7 alpha 4
Oracle driver last -dev + 1332 hack (as said)
So with this hack it installs smoothly on my test env. Once the PDO_OCI maintainers solve the problem you can simply bring the value back to 4000 and existing values will be preserved while new values will be handled faster.
cheers,
andrea
Comment #35
aaaristo commentedComment #36
aaaristo commentedComment #37
vmiliano commentedThanks! Drupal 7 alpha 4 appears to install cleanly for me on Oracle XE on Windows, now.
I've run into additional issues with contrib modules like devel, but I will open separate tickets for those.
Comment #38
jurgenhaasGreat work @andrea.gariboldi, it works here as well. Thanks a lot.
Comment #39
aaaristo commented@vmiliano remeber you can use oracle exception_queries global variable from settings.php to translate wrong statements on the fly:
a quick example:
Comment #40
aaaristo commentedComment #41
aaaristo commentedis a PDO_OCI bug.