inserting Arabic text into oracle using PHP

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.
Claudia_PrestoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aamir SaeedCommented:
Please set your browser encoding as unicode and then try.
0
Claudia_PrestoAuthor Commented:
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
Aamir SaeedCommented:
what is your field data type?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Claudia_PrestoAuthor Commented:
text
char
0
Aamir SaeedCommented:
plz change your field collation to utf8_general_ci
0
Claudia_PrestoAuthor Commented:
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
hernst42Commented:
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
Claudia_PrestoAuthor Commented:
I opened apachectl file, but I don't know how to add NLS_LANG to apachectl
0
hernst42Commented:
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
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Claudia_PrestoAuthor Commented:
thank you very much
It works great
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.