Solved

inserting Arabic text into oracle using PHP

Posted on 2007-03-18
10
1,051 Views
Last Modified: 2013-12-19
I am upgrading an old software system ,I have installed Apache 1.3 on a fedora 5 system, I have Oracle 9 on another server and I want to insert ARABIC text into Oracle using PHP 4
the old software is written in Delphi and uses AMERICAN_AMERICA.AR8MSWIN1256 coding for inserting Arabic Data into data base
I have no problem with reading Arabic Data from Oracle ( which have been inserted using Delphi ), but when I want to insert data, ????? is inserted instead of correct text
I have set ENV Variables in my httpd.conf but it didn't work
please help me solving this problem.
0
Comment
Question by:Claudia_Presto
  • 5
  • 3
  • 2
10 Comments
 
LVL 14

Expert Comment

by:Aamir Saeed
ID: 18744404
Please set your browser encoding as unicode and then try.
0
 

Author Comment

by:Claudia_Presto
ID: 18744562
I have tried this before, but nothing happened
I have set browser encoding to UTF-8, Arabic(windows-1256 ),arabic(Iso-8859-6) , but non of them worked !
0
 
LVL 14

Expert Comment

by:Aamir Saeed
ID: 18744575
what is your field data type?
0
 

Author Comment

by:Claudia_Presto
ID: 18744620
text
char
0
 
LVL 14

Expert Comment

by:Aamir Saeed
ID: 18744718
plz change your field collation to utf8_general_ci
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:Claudia_Presto
ID: 18746563
I can not change anything in DataBase, I have to use old data base configuration ! any other Idea ?!
I think there is some problem with my Apache or php configuration, because right now we can insert Arabic text into Oracle using Delphi without any problem !
0
 
LVL 48

Expert Comment

by:hernst42
ID: 18747075
Setting the NLS_LANG via httpd.conf does not work for php and oracle correctly. You will need to set the NLS_LANG before executing the httpd-binary. Either do this in your apachectl or std-envvars file.

Also make sure the encoding of your webpage is set accoringly.
0
 

Author Comment

by:Claudia_Presto
ID: 18747320
I opened apachectl file, but I don't know how to add NLS_LANG to apachectl
0
 
LVL 48

Accepted Solution

by:
hernst42 earned 500 total points
ID: 18747690
add the following lines before
# --------------------                              --------------------
# ||||||||||||||||||||   END CONFIGURATION SECTION  ||||||||||||||||||||

NLS_LANG=AMERICAN_AMERICA.AR8MSWIN1256
export NLS_LANG

then use apachectl to stop and start the webserver
0
 

Author Comment

by:Claudia_Presto
ID: 18787639
thank you very much
It works great
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
join 2 views with 5 conditions 3 43
nagios 4 php error after installation 6 73
Is this error or Notice in php error log? 6 32
How do I put a session for a radio button? 4 12
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This article discusses how to create an extensible mechanism for linked drop downs.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now