From: <php...@li...> - 2007-02-01 08:51:54
|
Quick litte rundown of my configuration (/etc/php.d/java.ini): java.java_home = /opt/jdk1.5.0_11/ java.java = /opt/jdk1.5.0_11/bin/java java.lib.path = /opt/jdk1.5.0_11/jre/lib/* *I use a java app provided by iveri.co.za which installs a cert here -> /opt/jdk1.5.0_11/jre/lib/security/cacerts and the app here -> /opt/jdk1.5.0_11/jre/lib/iveri/ my <?php //code $enterprise = new Java('com.iveri.enterprise.Enterprise'); $enterprise->setCertificateID("{blah}"); $enterprise->setGateway("blah"); $enterprise->prepare("Transaction", "Debit", "blah", "Test"); $enterprise->setAttribute("MerchantReference", 1); $enterprise->setTag("Amount", "123"); // R1.23 $enterprise->setTag("CCNumber","4242424242424242"); $enterprise->setTag("ExpiryDate", "122009"); $resultStatus = $enterprise->execute(); ?> * *if i run the code in java it works perfectly, ie my execute method will run without a hiccup, but if i run the execute method in php-java-bridge then i get the following error**: *Fatal error*: Uncaught [o(Exception):"java.lang.Exception: Invoke failed: [o(Enterprise)]->execute. Cause: com.iveri.enterprise.ResultException: [255] CertificateID '{blah}' not configured. Cannot recover key Responsible VM: 1.5.0_11@http://java.sun.com/" at: #-14 com.iveri.enterprise.c.a(Unknown Source) #-13 com.iveri.enterprise.c.c(Unknown Source) #-12 com.iveri.enterprise.c.b(Unknown Source) #0 /var/www/html/debit.php(27): Java->__call('execute', Array) #1 /var/www/html/debit.php(27): Java->execute() #2 {main}] thrown in */var/www/html/debit.php* on line *27** * I suspect the stand alone VM cant find the correct paths to grab cert data... Any pointers or help, much appreciated. Regards, Hess Gee |
From: <php...@li...> - 2007-02-02 13:46:24
|
Figured something out today. Seems my app will run in a console (via #!/bin/env php) with no hiccups. Now if i take the exact same php code and try run it through apache, then i get the problem mentioned (check first post to this thread). This leads me to believe that apache doesn't have rights to access certain paths on my box. Could someone point me in the right direction, i think i have to setup apache differently to access my java installed certs and other security files... |
From: <php...@li...> - 2007-02-10 12:43:43
|
> This leads me to believe that apache doesn't have > rights to access certain > paths on my box. It runs in a sand box (uid/gid: apache/apache). Furthermore, if you use RedHat Linux (or any compatible Linux version, Fedora, Centos, ...), the Security Enhanced Linux rules shipped with the JavaBridge RPM deny all socket, file, ... access except files tagged with tmp_t. Regards, Jost Boekemeier ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de |
From: <php...@li...> - 2007-03-01 10:33:47
|
Hi Jost. I dont know if you had followed my previous post here http://sourceforge.net/mailarchive/forum.php?thread_id=3D31573703&forum_id= =3D42415, but i assume you would have. Would you care to elaborate on the sandbox and on how i could possibly get the bridge to access the paths i require, btw i have disabled SEL so i assume the rules are not active... Regards, Sky On 2/10/07, php...@li... < php...@li...> wrote: > > > > This leads me to believe that apache doesn't have > > rights to access certain > > paths on my box. > > It runs in a sand box (uid/gid: apache/apache). > > Furthermore, if you use RedHat Linux (or any > compatible Linux version, Fedora, Centos, ...), the > Security Enhanced Linux rules shipped with the > JavaBridge RPM deny all socket, file, ... access > except files tagged with tmp_t. > > > Regards, > Jost Boekemeier > > > > > > > > ___________________________________________________________ > Der fr=FChe Vogel f=E4ngt den Wurm. Hier gelangen Sie zum neuen Yahoo! Ma= il: > http://mail.yahoo.de > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier. > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronim= o > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat= =3D121642 > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2007-03-01 20:13:20
|
Hi Sky, > Would you care to elaborate on the sandbox and on > how i could possibly get > the bridge to access the paths i require, btw i have > disabled SEL so i > assume the rules are not active... I'd expect that a chown root:root /usr/lib/php/modules/RunJavaBridge chmod 111 /usr/lib/php/modules/RunJavaBridge setenforce Permissive should run Java as root with all permissions. Or you start Java manually, for example with java -jar JavaBridge.jar SERVLET:8080 or via tomcat for example. And use the pure PHP implementation (require_once("http://localhost:8080/JavaBridge/java/Java.inc") or the following php.ini setting: [java] java.servlet=On java.hosts=127.0.0.1:8080 If the problem persists please open a ticket (please use http://sourceforge.net/tracker/?func=add&group_id=117793&atid=679233) Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |
From: <php...@li...> - 2007-02-01 09:23:08
|
Quick litte rundown of my configuration (/etc/php.d/java.ini): java.java_home = /opt/jdk1.5.0_11/ java.java = /opt/jdk1.5.0_11/bin/java java.lib.path = /opt/jdk1.5.0_11/jre/lib/* *I use a java app provided by iveri.co.za which installs a cert here -> /opt/jdk1.5.0_11/jre/lib/security/cacerts and the app here -> /opt/jdk1.5.0_11/jre/lib/iveri/ my <?php //code $enterprise = new Java('com.iveri.enterprise.Enterprise'); $enterprise->setCertificateID("{blah}"); $enterprise->setGateway("blah"); $enterprise->prepare("Transaction", "Debit", "blah", "Test"); $enterprise->setAttribute("MerchantReference", 1); $enterprise->setTag("Amount", "123"); // R1.23 $enterprise->setTag("CCNumber","4242424242424242"); $enterprise->setTag("ExpiryDate", "122009"); $resultStatus = $enterprise->execute(); ?> * *if i run the code in java it works perfectly, ie my execute method will run without a hiccup, but if i run the execute method in php-java-bridge then i get the following error* *: *Fatal error*: Uncaught [o(Exception):"java.lang.Exception : Invoke failed: [o(Enterprise)]->execute. Cause: com.iveri.enterprise.ResultException: [255] CertificateID '{blah}' not configured. Cannot recover key Responsible VM: 1.5.0_11@http://java.sun.com/" at: #-14 com.iveri.enterprise.c.a(Unknown Source) #-13 com.iveri.enterprise.c.c(Unknown Source) #-12 com.iveri.enterprise.c.b(Unknown Source) #0 /var/www/html/debit.php(27): Java->__call('execute', Array) #1 /var/www/html/debit.php(27): Java->execute() #2 {main}] thrown in */var/www/html/debit.php* on line *27** * I suspect the stand alone VM cant find the correct paths to grab cert data... Any pointers or help, much appreciated. Regards, Hess Gee |