473,791 Members | 3,216 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Oracle/PHP problem

Cross-posted to comp.databases. oracle.misc and comp.lang.php ...

Using PHP 4.3.11 on Linux and ADODB data abstraction library.

Oracle client version is 10.1.

Can successfully connect to remote database (version 9.2.0.6 on Linux
NLS_LANG=AL32UT F8).

When doing a simple select from a view:
select RTS_LOAD from VW_R_PROJECTED_ LOAD_OUTPUT
I get the error message:
ociexecute(): OCIStmtExecute: ORA-01858: a non-numeric character was found
where a numeric was expected in adodb/461/drivers/adodb-oci8.inc.php on
line 942
1858: ORA-01858: a non-numeric character was found where a numeric was
expected

This happens even if I just select count(*) from the view.

Using SQLPlus from the web server I don't have any problems at all
selecting from the view, so it is definitely valid.

If in my PHP script I directly query the underlying table that this Oracle
view is based on, I have no problem.

Any clues?

Geoff M
Feb 28 '06 #1
3 2645
Geoff Muldoon wrote:
Cross-posted to comp.databases. oracle.misc and comp.lang.php ...

Using PHP 4.3.11 on Linux and ADODB data abstraction library.

Oracle client version is 10.1.

Can successfully connect to remote database (version 9.2.0.6 on Linux
NLS_LANG=AL32UT F8).

When doing a simple select from a view:
select RTS_LOAD from VW_R_PROJECTED_ LOAD_OUTPUT
I get the error message:
ociexecute(): OCIStmtExecute: ORA-01858: a non-numeric character was found
where a numeric was expected in adodb/461/drivers/adodb-oci8.inc.php on
line 942
1858: ORA-01858: a non-numeric character was found where a numeric was
expected

This happens even if I just select count(*) from the view.

Using SQLPlus from the web server I don't have any problems at all
selecting from the view, so it is definitely valid.

If in my PHP script I directly query the underlying table that this Oracle
view is based on, I have no problem.

Any clues?

Geoff M


Hi Geoff,

Assuming you set up the whole thing right, and you had some experience with
adodb... well, in that case it sounds like a firstclass bug to me. :-(

I would contact John Lim (jlim#natsoft.c om, replace# with @) and ask him he
has a clue, and maybe he can fix it for you right away if you ask nicely.
:-)

Regards,
Erwin Moller
Feb 28 '06 #2
On Tue, 28 Feb 2006 14:37:33 +1100, Geoff Muldoon
<ge***********@ trap.gmail.com> wrote:
Cross-posted to comp.databases. oracle.misc and comp.lang.php ...

Using PHP 4.3.11 on Linux and ADODB data abstraction library.

Oracle client version is 10.1.

Can successfully connect to remote database (version 9.2.0.6 on Linux
NLS_LANG=AL32U TF8).

When doing a simple select from a view:
select RTS_LOAD from VW_R_PROJECTED_ LOAD_OUTPUT
I get the error message:
ociexecute() : OCIStmtExecute: ORA-01858: a non-numeric character was found
where a numeric was expected in adodb/461/drivers/adodb-oci8.inc.php on
line 942
1858: ORA-01858: a non-numeric character was found where a numeric was
expected

This happens even if I just select count(*) from the view.

Using SQLPlus from the web server I don't have any problems at all
selecting from the view, so it is definitely valid.

If in my PHP script I directly query the underlying table that this Oracle
view is based on, I have no problem.

Any clues?


Try enabling debug on the ADOdb connection so you can see what it is actually
tring to execute (rather than what you expect it is executing) - just to make
sure.

My initial thought is NLS issues - implicit conversions somewhere in the view?

ORA-01858 is thrown by date conversions - don't think anything else throws
that, IIRC.

What's NLS_DATE_FORMAT set to?

What's the definition of the view?

When you queried the table directly, did you use *exactly* the same SQL as the
view definition?

--
Andy Hassall :: an**@andyh.co.u k :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Feb 28 '06 #3
an**@andyh.co.u k says...
My initial thought is NLS issues - implicit conversions somewhere in the view?
Bingo.

Although in my PHP code I always use explicit (to_date) date conversion in
any SQL, it appears that querying a view that has been successfully
compiled using implicit date conversion causes the problem.

Odd that PHP and/or AdoDB and/or OCI appears to be attempting to
"revalidate " the view when simply selecting from it. Don't know if this
is version specific or even at what stage (PHP/AdoDb/OCI/Oracle Client)
it's kicking in.

Just recompiled the view with explicit date conversion and moving on, no
time to chase further.

Thanks Andy and Erwin for your pointers, owe you one.

Geoff
ORA-01858 is thrown by date conversions - don't think anything else throws
that, IIRC.

What's NLS_DATE_FORMAT set to?

What's the definition of the view?

When you queried the table directly, did you use *exactly* the same SQL as the
view definition?

Feb 28 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2892
by: simianphile | last post by:
OK, I had a problem that I've now fixed but I can't really understand what was causing it in the first place. I have an intranet site that uses basic authentication to allow users to view and update information from an Oracle DB (ver 8.1.6 -- ancient, I know). Anyway, the site worked fine as long as the machine accessing the ASP page was running Win 2k but when an XP machine tried to view the page, the client got an error: Microsoft...
3
14525
by: Harry | last post by:
Using Oracle 8i enterprise on win 2000 (sp3) Installed the standard configuration & whenever I make a connection it takes about 10 secs. It's running on a P1900 with 1gb Ram so no reason there for slowness. Once I'm connected the queries work pretty much instantanously but to connect using SQLPLUS, Toad, ODBC, OLEDB all take about 10 secs. I connect using OLEDB from Visual Basic development environment & after the 1st connection...
1
8819
by: Phil Hindmoor | last post by:
Hi, I am sure if anyone can help me, you guys can! I am an Informix Developer, moving to Oracle 8i and later databases. I am struggling to find the Oracle equivelant to many of the useful Informix features that I have come to rely upon. I have looked through the Oracle/Infomix groups and some helpful users have posted some solutions, but many of them seem to be very complex work-arounds for features that were readily available in
5
102558
by: SerGioGio | last post by:
Hello, I am going nuts. I am trying to connect to my local ORACLE instance using ODBC. It used to work few weeks ago, but it fails now. Connection with: - SQL*plus: connection works! - DataDirect 5.0 Oracle Wire protocol (3rd party ODBC driver): connection works when I hit the driver's "test connection"
4
5215
by: Ellen K. | last post by:
Hi all, Being that so far I didn't get an answer to my below problem on the Oracle newsgroup, I figured it couldn't hurt to try here. While at my current job I've been working with mostly SQL Server, now I need to connect to our Oracle Financials running on HP-UX. The Oracle DBA set me up as a user and installed the Oracle client on my box and I have the tnsnames file, but I still can't establish a connection to the database from my...
11
13280
by: Ellen K | last post by:
Hi all, I set up our Oracle Financials as a linked server to one of my SQL Server boxes. On running a test query, I got the following error message: OLE DB provider 'MSDAORA' supplied inconsistent metadata for a column. Metadata information was changed at execution time. OLE DB error trace . The Oracle datatype of the column with the supposedly inconsistent
63
25667
by: Nick Palmer | last post by:
Hi all, Is there a DB2 equivilant to Oracle's DB Link functionality ? I have two DB2 databases and I need to get access to the tables in one from the other. In Oracle I would just create a DB Link between the two instances. Is such a thing possible between two DB2 databases ? Thanks in advance, Nick
2
6825
by: Steve Foo | last post by:
I have been posting this question in google group, EE, and Oracle OTN forum and still no cannot find a suitable solution for it. I have contacted Singapore Microsoft support regarding the problem .Unfortunately they are not able to help me and eventually direct me here i'm not 100% sure if this problem is due to ODP.net provider or asp.net IIS setting Hopefully Microsoft Experts here can help me up. Thx Introduction...
13
7483
by: Chris Botha | last post by:
The machine is running XP Pro with all the latest service packs, etc. I must access an Oracle database so I installed the Oracle client stuff. I can query Oracle from a Windows app, no problem. Using the exact same code (copy and paste) into a Web app I get the following error "Error while trying to retrieve text for error ORA-01019". Security I thought, so I use Impersonation on the Web site, then the aspnet_wp.exe crashes with "The...
2
3572
by: Ruslan A Dautkhanov | last post by:
Hello ! I'm about to install O9i on FreeBSD box. uname -a: FreeBSD stat2.scn.ru 5.2.1-RELEASE-p3 FreeBSD 5.2.1-RELEASE-p3 #2: Fri Apr 23 19:19:43 KRAST 2004 rd@stat2.scn.ru:/usr/src/sys/i386/compile/RDSTAT2-ORACLE i386 uname -a under oracle user : Linux stat2.scn.ru 2.4.2 FreeBSD 5.2.1-RELEASE-p3 #2: Fri Apr 23 19:19:43 KRAST 2004 i686 unknown
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10156
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9997
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9030
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4110
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.