Caucho Forums  

This forum is permanently closed because of spam. For free community support, please visit Google Groups:

Go Back   Caucho Forums > Quercus

View Poll Results: What is your biggest problem in the implementation of PHP in a Java environment using
setting encoding 1 100.00%
calling jsp php 0 0%
calling php jsp 0 0%
access to database 0 0%
other 0 0%
Multiple Choice Poll. Voters: 1. You may not vote on this poll

Thread Tools Display Modes
Old 05-15-2011, 07:19 PM
andreluiz1111 andreluiz1111 is offline
Junior Member
Join Date: May 2011
Posts: 4
Default Problem in implementing PHP project in a Java environment using the QUERCUS

During the project execution in a PHP environment using JAVA QUERCUS that the following problems:
1. A PHP project running normally in XAMPP (apache) accessing bank POSTGRES, encoding LATIN1 via ODBC
2. In NetBeans 6.9.1 has been installed Quercus and the PHP Project
3. The project JAVA accesses the same database from PHP and displays the contents of the fields correctly (in Portuguese accent)
4. When the JSP page calls the PHP, it runs normally but the displayed contents of the bank does not recognize LATIN1 encoding (accents and characters in Portuguese)
5. It is as if done in Java via JDBC access recognizes the POSTGRES database with encoding LATIN1, but when you run PHP page accessing the database with encoding POSTGRES LATIN1 via any ODBC configuration is incompatible.
Reply With Quote
Old 05-19-2011, 01:58 PM
domdorn domdorn is offline
Join Date: Dec 2009
Location: Vienna / Austria
Posts: 97


could you please clarify some thing?

Are you referring to ODBC or JDBC?
Quercus does not have support for ODBC but uses JDBC to connect to PostgreSQL.

What do you mean by "When the JSP page calls the PHP" ?
Are you accessing PHP from a JSP page?
Please post some code on how you're doing this.

Point 5: Are you saying, that when accessing the PostgreSQL Database from Quercus, the output is messed up? Have I understood this correctly? I'm still not sure, if we're talking about ODBC or JDBC here - please clarify.
Reply With Quote
Old 05-20-2011, 03:14 PM
andreluiz1111 andreluiz1111 is offline
Junior Member
Join Date: May 2011
Posts: 4
Default response attached with examples

We are including a PHP project that already exists in Windows / tomcat / quercus.
The PHP project as shown below is configured to access postgres database via ODBC.
All the Java classes created access the same database via JDBC.
The problem is how to run PHP pages without changing the code of the PHP project.
How do I change the outside configuration of PHP to access the postgres ODBC database, so that the Windows / tomcat / quercus can understand.
Example configuration of the ODBC driver for the database accessed by the PHP project.

When run on Windows / Apache works normally
The problem occurs when I'm on Windows ambienete / tomcat / quercus, where the implementation has an error in displaying attributes of the bank with accentuation.

The project follows the following procedures:
1. Initiated by the index.jsp page,
2. Accesses the database to check postgres url to be called in case default.php


3. This page defaul.php typically run in a Windows apache.
It connects to postgres database via ODBC, where there are several pages running on this type of access.

4. How do I embed an existing php project, where all access is already configured to postgres via ODBC? how to migrate without much code change?

5. Running on Windows / tomcat / quercus he normally access the postgres database, but does not display LATIN1 (set to ISO-8859-1, is that correct or should be CP1252)

When running on Windows / Tomcat / Quercus, a PHP page, every execution of html is displayed correctly, but the attributes accessed from the database are shown with error.

In the example below, the HTML is correct, but the attributes accessed from the bank with this error

Because the Windows / tomcat / quercus can run a PHP page that already exists and is configured to access the database via ODBC?

Example snippet of PHP code with passing parameters to access the postgres database.
Attachments Pending Approval
File Type: pdf response attached with examples - caucho.doc 2.pdf
Reply With Quote
Old 05-20-2011, 03:24 PM
andreluiz1111 andreluiz1111 is offline
Junior Member
Join Date: May 2011
Posts: 4
Default Post was split due to size limitations.

Examples of images in previous post.

Model configuration for PHP ODBC and ACCESS BANK POSTGRES example of error in the display of attributes, where correct html code and display the bank attributes the problem.

Follow the attached example index.jsp page that will call and PHP
excerpt from the PHP page that will connect to postgres database via ODBC.

There is a possibility to change this setting to access external form without changing the existing PHP code?
Attachments Pending Approval
File Type: pdf response attached with examples - caucho 3.pdf
Reply With Quote

encoding, java, php, postgres, quercus

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 09:17 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.