[PHP] PHP-Java Bridge: Connect PHP to MySQL using JNDI
Hi everyone! This is driving me nuts! I have setup a Linux webserver. Tomcat is running at the backend and is connected to Apache at the frontend using mod_proxy. At the moment I have a few test applications setup, which involves Apache sending JSP requests to Tomcat via mod_proxy. They all work fine. I also have some JSP code that uses a JNDI connection to the MySQL database using MySQL Connector / J. All the configuration is done in Tomcat in the XML files. This works fine too. Now what I want to do is use PHP code to connect to MySQL using JNDI, instead of using JSP code. This is where the sourceforge open-source PHP-Java Bridge comes into it. The php-java bridge is deployed in Tomcat's webapps folder (it came as a *.war file). This is all thats necessary for it to work according to their tech support. Is there anyone around that knows how to code this using PHP? I had a go at this, and my (most-likely awful) attempt is here: ?php require_once(java/Java.inc); require_once(java/JavaBridge.inc); try { $dbh = new PDO(java:comp/env/jdbc/TestDB); foreach ($dbh-query('SELECT * from testdata') as $row) { echo pre; print_r($row); echo /pre; } $dbh = null; } catch (PDOException $e) { print Error!: . $e-getMessage() . br/; die(); } ? Now I don't think that PDO will support what I have done, and that is to try and call the JNDI connection. I get the error message Error!: could not find driver Another attempt was to use the following code: ?php require_once(java/Java.inc); require_once(java/JavaBridge.inc); $conn = mysql_connect(java:comp/env/jdbc/TestDB); print $conn; ? But this gave the error: Warning - mysql_connect() [ function.mysql-connect function.mysql-connect ]: Unknown MySQL server host 'java' (1) I guess this post could have gone in the Java forum too, but I thought it was more of a PHP issue? Any help would be great. rgs J -- View this message in context: http://www.nabble.com/PHP-Java-Bridge%3A-Connect-PHP-to-MySQL-using-JNDI-tp21562460p21562460.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP-Java Bridge: Connect PHP to MySQL using JNDI
In general, if you are trying to get DB connections to work in a hybrid situation, and no native driver is behaving, try ODBC. It's crude, slow, and not pretty, but it should work. You can set it up so that you can go back later and dink around with drivers and re-compiling, but at least have a known working solution in the meantime. I don't do Java, so that's just general advice... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP-Java Bridge: Connect PHP to MySQL using JNDI
Thanks. However, I'm using this process as a test. In the proper application we will be using a JDBC or JDNI connection initiated by PHP to connect to our IDMS database. Its complicated but it means we have to use the PHP-Java Bridge, Java and JDBC. so we can't use ODBC. I'm using this as a test to get my head around the code. I've resorted to try and get it working with the JDBC connection coded in the script for now, and i'll move on to JNDI later. I have now got this code: ?php require_once (java/Java.inc); $drivermanager = new JavaClass('java.sql.DriverManager'); $conn1 = $drivermanager-getConnection(jdbc:mysql://localhost:3306/javatest?user=javauserpassword=javadude) or die(Unable to connect to MySQL); print $conn1; echo 'br /br /'; mysql_select_db(javatest, $conn1) or die('Could not connect: ' . mysql_error()); $result = mysql_query(SELECT id, foo, bar FROM testdata); while ($row = mysql_fetch_array($result)) { print ID:.$row{'id'}. Name:.$row{'foo'}. .$row{'bar'}.br; } mysql_close($conn1); ? This gives the following reply: com.mysql.jdbc.jdbc4connect...@22622262 Could not connect: It seems to connect Ok, but I think it gets stuck at the mysql_select_db() function because no database information is being extracted. I've tested a few things, and if I remove the $conn1 from this line: mysql_select_db(javatest, $conn1) or die('Could not connect: ' . mysql_error()); to give this: mysql_select_db(javatest) or die('Could not connect: ' . mysql_error()); I get the following error: com.mysql.jdbc.jdbc4connect...@22862286 Could not connect: Access denied for user 'root'@'localhost' (using password: NO) So I 'think' this indicates that the first lot of code connects OK - it just can't access the database. Maybe I'm using the wrong code to select the database??: mysql_select_db(javatest, $conn1) ; Can anyone see why my mysql_select_db() function is not working? Maybe its not possible to use this with the way that I have used the drivermanager-getConnection method? Please help :-(( -- View this message in context: http://www.nabble.com/PHP-Java-Bridge%3A-Connect-PHP-to-MySQL-using-JNDI-tp21562460p21565513.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php java intregration
On 6/2/06, Vedanta Barooah [EMAIL PROTECTED] wrote: i am setting up php_java.dll extension under windows/iis, my php version is 5.1.2. can any one point me to the download location of php_java.jar which is needed for the setup. Download Collection of PECL modules for PHP from the Windows binaries section of php.net/downloads.php. This is mentioned in php.net/java. Rabin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php java intregration
the pecl snapshots have the dll php_java.dll, but does not have the jar php_java.jar which is also required? - vedanta On 6/3/06, Rabin Vincent [EMAIL PROTECTED] wrote: On 6/2/06, Vedanta Barooah [EMAIL PROTECTED] wrote: i am setting up php_java.dll extension under windows/iis, my php version is 5.1.2. can any one point me to the download location of php_java.jar which is needed for the setup. Download Collection of PECL modules for PHP from the Windows binaries section of php.net/downloads.php. This is mentioned in php.net/java. Rabin -- *~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~* Vedanta Barooah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php java intregration
On 6/4/06, Vedanta Barooah [EMAIL PROTECTED] wrote: the pecl snapshots have the dll php_java.dll, but does not have the jar php_java.jar which is also required? I don't know about the snapshots, but the PECL zip on the download page does have the jar you are looking for. Rabin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php java intregration
hello all, i am setting up php_java.dll extension under windows/iis, my php version is 5.1.2. can any one point me to the download location of php_java.jar which is needed for the setup. i searched all the sites/mirrors but its not available. do i have to compile from source to get that jar? ... let me know,... thanks - regards, vedanta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP JAVA Error on linux
Java 2 SDK 1.4.2 PHP 4.3.3 linux fedora 1 the command is work fine from terminal but its not work fine from php give me this msg when I use exec system passthru : Error occurred during initialization of VM Could not reserve enough space for object heap
Re: [PHP] PHP JAVA Error on linux
Alawi albaity wrote: Java 2 SDK 1.4.2 PHP 4.3.3 linux fedora 1 the command is work fine from terminal but its not work fine from php give me this msg when I use exec system passthru : Error occurred during initialization of VM Could not reserve enough space for object heap What exactly are you refering to? are you trying to use the PHP Java extension or are you trying to execute an 'external java program'? if it's the latter you will need to increase the memory limit (default would be 8MB - not enough to start the JVM). If it's the former http://www.raditha.com/php/java.php might help. -- Raditha Dissanayake. - http://www.raditha.com/megaupload/upload.php Sneak past the PHP file upload limits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP JAVA Error on linux
I just edit php.ini and increase it to 200 its not work any suggestion does apache effect ? cuz its Usage memory limitid to 98M - Original Message - From: Alawi albaity [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 14, 2004 8:55 PM Subject: Re: [PHP] PHP JAVA Error on linux I try this its also not work ? ini_set(memory_limit,80M); echo 'pre'; // Outputs all the result of shellcommand ls, and returns // the last output line into $last_line. Stores the return value // of the shell command in $retval. $last_line = system('/usr/java/j2sdk1.4.2_05/bin/java -cp /home/hrrajco/public_html/test/lib/itext.jar com.lowagie.tools.encrypt_pdf /home/hrrajco/public_html/test/test.pdf /home/hrrajco/public_html/test/encrypted.pdf user master 128', $retval); // Printing additional info echo ' /pre hrLast line of the output: '.$last_line.' hrReturn value: '.$retval; ? - Original Message - From: raditha dissanayake [EMAIL PROTECTED] Cc: php-general [EMAIL PROTECTED] Sent: Wednesday, July 14, 2004 6:19 PM Subject: Re: [PHP] PHP JAVA Error on linux Alawi albaity wrote: Java 2 SDK 1.4.2 PHP 4.3.3 linux fedora 1 the command is work fine from terminal but its not work fine from php give me this msg when I use exec system passthru : Error occurred during initialization of VM Could not reserve enough space for object heap What exactly are you refering to? are you trying to use the PHP Java extension or are you trying to execute an 'external java program'? if it's the latter you will need to increase the memory limit (default would be 8MB - not enough to start the JVM). If it's the former http://www.raditha.com/php/java.php might help. -- Raditha Dissanayake. - http://www.raditha.com/megaupload/upload.php Sneak past the PHP file upload limits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP JAVA Error on linux
I also try by php cli is just work fine and tht by terminal but when I try from net its not work please give me a hand this command work fine from terminal php -f /home/hrrajco/public_html/test/test.php but from php file named test2.php is not work fine ? passthru(php -f /home/hrrajco/public_html/test/test.php); ? Please give me a hand - Original Message - From: Alawi albaity [EMAIL PROTECTED] To: php-general [EMAIL PROTECTED] Sent: Wednesday, July 14, 2004 10:04 PM Subject: Re: [PHP] PHP JAVA Error on linux I just edit php.ini and increase it to 200 its not work any suggestion does apache effect ? cuz its Usage memory limitid to 98M - Original Message - From: Alawi albaity [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 14, 2004 8:55 PM Subject: Re: [PHP] PHP JAVA Error on linux I try this its also not work ? ini_set(memory_limit,80M); echo 'pre'; // Outputs all the result of shellcommand ls, and returns // the last output line into $last_line. Stores the return value // of the shell command in $retval. $last_line = system('/usr/java/j2sdk1.4.2_05/bin/java -cp /home/hrrajco/public_html/test/lib/itext.jar com.lowagie.tools.encrypt_pdf /home/hrrajco/public_html/test/test.pdf /home/hrrajco/public_html/test/encrypted.pdf user master 128', $retval); // Printing additional info echo ' /pre hrLast line of the output: '.$last_line.' hrReturn value: '.$retval; ? - Original Message - From: raditha dissanayake [EMAIL PROTECTED] Cc: php-general [EMAIL PROTECTED] Sent: Wednesday, July 14, 2004 6:19 PM Subject: Re: [PHP] PHP JAVA Error on linux Alawi albaity wrote: Java 2 SDK 1.4.2 PHP 4.3.3 linux fedora 1 the command is work fine from terminal but its not work fine from php give me this msg when I use exec system passthru : Error occurred during initialization of VM Could not reserve enough space for object heap What exactly are you refering to? are you trying to use the PHP Java extension or are you trying to execute an 'external java program'? if it's the latter you will need to increase the memory limit (default would be 8MB - not enough to start the JVM). If it's the former http://www.raditha.com/php/java.php might help. -- Raditha Dissanayake. - http://www.raditha.com/megaupload/upload.php Sneak past the PHP file upload limits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php/java/mysql programmer needed
Hi If any one on this list has good experience in php/java/mysql programming integrated with Adobe GoLive for both Mac Window, please contact me directly as we have a couple of projects that need that expertise. -- Kind regards, Paul. Gondwana [EMAIL PROTECTED] http://www.gondwanastudio.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php/java/mysql programmer needed
Hi If any one on this list has good experience in php/java/mysql programming integrated with Adobe GoLive for both Mac Window, please contact me directly as we have a couple of projects that need that expertise. -- Kind regards, Paul. Gondwana [EMAIL PROTECTED] http://www.gondwanastudio.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Java extension--hopeless?
On Wed, 2003-11-26 at 20:17, Raditha Dissanayake wrote: Right, I agree this is a very bassakwards way of going about it.. In this instance, performance is not really an issue as much as politics.. but this comment is useful as we may be able to persuade them into providing information about the algorithm in use, to develop something more usable. We are the small fish, and the big fish provides this service.. it's politically beneficial to us if we could get it running in the short term, but it appears that the Java extension really isn't ready for prime time.. Fortunately I've made contact with the guy who developed the Java code, and he has a vested interest in getting it to work with PHP too, so maybe in the longer term we can find a better solution... Suggestion: ask your java developer to create JSP that uses the decoder bean. Host on the LAN. Post the encrypted data to it and recieve the decrypted response. This would be pathetic in terms of performance but you don't appear to be concerned about it. You would obviously want to do this over HTTPS instead of plain old HTTP Or a servlet filter is fine in this situation that redirects to the auth-website if cookie is not set or redirects to the associated php page. -- Ray -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Java extension--hopeless?
I am trying to find help or information on running the Java extension with PHP under Apache on Redhat Linux using a Sun JVM. I am aware that the PHP documentation says that the Java extension is experimental. I am also aware that people say the ISAPI version does not work well and that running PHP as a CGI should give better results. We've tried, and so far it doesn't seem to be more reliable. Oddly, it does work most of the time. However, maybe 3/10 times or so it gives an error. When using the Java extension with PHP running as ISAPI, PHP gives the error Unable to create Java Virtual Machine .. when running as a CGI I get that or one of several different errors--again, only part of the time. That is, when an error does appear, refreshing the page once or twice will usually bring up the correct output. A bit more background: The company I work for has a single sign-in system for web access. You check for a cookie and redirect to another site if the cookie is not set. That site authenticates the user via a web-based login, sets the cookie, and redirects back to your site. Your site then reads the cookie and decrypts it using a Java object. At first, I was frustrated that the cookie decrypter was only available in Java.. However, after a while I began to see why they chose to do it this way: so that you could decrypt the cookie from various languages and platforms, but they only needed to maintain one code base. Now, I'm just frustrated that PHP doesn't work very well with Java. Myself and several others have looked extensively for the answer to this and we've tried all the viable remedies that have been suggested. Does anyone have any suggestions? Also, can it be confirmed or denied that Java support will eventually be dropped from PHP? Plans to improve it? Thanks in advance for any help or pointers!! -- Kelly Hallman // Ultrafancy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Java extension--hopeless?
On Wed, 26 Nov 2003, Kelly Hallman wrote: I am trying to find help or information on running the Java extension with PHP under Apache on Redhat Linux using a Sun JVM. I am aware that the PHP documentation says that the Java extension is experimental. I am also aware that people say the ISAPI version does not work well and that running PHP as a CGI should give better results. We've tried, and so far it doesn't seem to be more reliable. Not sure how ISAPI has anything to do with Apache on Redhat here. But I guess you are just making two disjointed comments. Oddly, it does work most of the time. However, maybe 3/10 times or so it gives an error. When using the Java extension with PHP running as ISAPI, PHP gives the error Unable to create Java Virtual Machine .. when running as a CGI I get that or one of several different errors--again, only part of the time. That is, when an error does appear, refreshing the page once or twice will usually bring up the correct output. Ok, maybe not. So which is it? There is no ISAPI for Linux. At first, I was frustrated that the cookie decrypter was only available in Java.. However, after a while I began to see why they chose to do it this way: so that you could decrypt the cookie from various languages and platforms, but they only needed to maintain one code base. Having to run a Java emulator just to decode a cookie sounds absolutely nuts to me. Can you not get the algorithm for decrypting this cookie and simply write it in C? That's how everyone else achieves code portability. Now, I'm just frustrated that PHP doesn't work very well with Java. Myself and several others have looked extensively for the answer to this and we've tried all the viable remedies that have been suggested. Does anyone have any suggestions? Also, can it be confirmed or denied that Java support will eventually be dropped from PHP? Plans to improve it? The demand has been very low and volunteers to improve it are hard to find. If someone steps up to do it, it will improve. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Java extension--hopeless?
On Wed, 26 Nov 2003, Rasmus Lerdorf wrote: On Wed, 26 Nov 2003, Kelly Hallman wrote: I am aware that the PHP documentation says that the Java extension is experimental. I am also aware that people say the ISAPI version does not work well and that running PHP as a CGI should give better results. We've tried, and so far it doesn't seem to be more reliable. Not sure how ISAPI has anything to do with Apache on Redhat here. But I guess you are just making two disjointed comments. Yes, the statements were not connected, I just wanted to pre-empt a bunch of responses stating things I'd already read or already tried. Oddly, it does work most of the time. However, maybe 3/10 times or so it gives an error. When using the Java extension with PHP running as ISAPI, PHP gives the error Unable to create Java Virtual Machine .. when running as a CGI I get that or one of several different errors--again, only part of the time. That is, when an error does appear, refreshing the page once or twice will usually bring up the correct output. Ok, maybe not. So which is it? There is no ISAPI for Linux. ISAPI is probably not what I meant; I meant apache module version vs. CGI version. I have tried them both, and both give similar results. Sorry, I was talking to someone today who was referring to the apache module version as ISAPI.. I really have no idea what ISAPI exactly is (based on what you've said I'm guessing it's an IIS API), or if 'apache module version' is the correct terminology either... Sorry! :) Having to run a Java emulator just to decode a cookie sounds absolutely nuts to me. Can you not get the algorithm for decrypting this cookie and write it in C? That's how everyone else achieves portability. Right, I agree this is a very bassakwards way of going about it.. In this instance, performance is not really an issue as much as politics.. but this comment is useful as we may be able to persuade them into providing information about the algorithm in use, to develop something more usable. We are the small fish, and the big fish provides this service.. it's politically beneficial to us if we could get it running in the short term, but it appears that the Java extension really isn't ready for prime time.. Fortunately I've made contact with the guy who developed the Java code, and he has a vested interest in getting it to work with PHP too, so maybe in the longer term we can find a better solution... The demand has been very low and volunteers to improve it are hard to find. If someone steps up to do it, it will improve. That is what I expected to hear. I didn't expect any magic bullet answer, I am just looking for comments like the ones you gave--so I have some substantiation if the answer ends up being we can't get it to go. Thanks!! -- Kelly Hallman // Ultrafancy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Java extension--hopeless?
Right, I agree this is a very bassakwards way of going about it.. In this instance, performance is not really an issue as much as politics.. but this comment is useful as we may be able to persuade them into providing information about the algorithm in use, to develop something more usable. We are the small fish, and the big fish provides this service.. it's politically beneficial to us if we could get it running in the short term, but it appears that the Java extension really isn't ready for prime time.. Fortunately I've made contact with the guy who developed the Java code, and he has a vested interest in getting it to work with PHP too, so maybe in the longer term we can find a better solution... Suggestion: ask your java developer to create JSP that uses the decoder bean. Host on the LAN. Post the encrypted data to it and recieve the decrypted response. This would be pathetic in terms of performance but you don't appear to be concerned about it. You would obviously want to do this over HTTPS instead of plain old HTTP best regards -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP, Java, a strange number...
Hi, I am having problems trying to get PHP to return a Java .jar file. Basically, the jar is reported as corrupted by Opera, or any browser and Java 1.3. I have tracked this down to a strange number at the start of the message body: If I access the jar file directly (no PHP), I get (viewed by packet sniffing) Header stuff, Content Type: text/html; charset=ISO-8859-1 CRLF CRLF 190 CRLF jar file When I use: ?php header(Content-Type: text/html; charset=ISO-8859-1); readfile(tj.jar); ? I get: Header stuff, Content Type: text/html; charset=ISO-8859-1 jar file and it doesn't work. So I tried adding: ?php header(Content-Type: text/html; charset=ISO-8859-1); header(\n\n190\n); readfile(../_JAVARES/car/jammer.jar); ? and it works again, in ANY browser and ANY java version. So what is the '190' at the start of the message all about? It gets wierder though. My real PHP script has a session. and when I use: ?php session_start(); header(Content-Type: text/html; charset=ISO-8859-1); readfile(tj.jar); ? I now get: Header stuff, including lots of cache-limiting bits Content Type: text/html; charset=ISO-8859-1 CRLF CRLF 2000 CRLF jar file The '190' is now '2000', and this fails to load in Opera Java 1.3, but works with IE6 Java 1.1 or Java 1.3. So why is PHP changing this number to 2000? Is there a way to stop it? Thank you for your time, Dom -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Java
Hi I hope there is anybody out there familiar with PHP and Java. I've got the following Code: ?php $instan = new Java(DBUser); echo $instan ; $system = new Java(java.util.Vector); echo$system ; ? If I only use one of the two objects, which one doesn't matter, it works. IF I try to initiate them both PHP.exe is closing down on me. In Apache error log I get the folowing error: [Sun Jun 29 10:58:32 2003] [error] [client 127.0.0.1] Premature end of script headers: c:/apache/php4/php.exe Other than that I've seem to have a good configured System, as there are no more errors. I run a win2000 with apache 1.3.2 with php 4.3.1 thx Jan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php + java in winxp platform, reload dont work~
Dear all, i installed java jdk 1.4 and php 4.3.2 i tried to use java in php i edited the php.ini as follows [Java] extension=php_java.dll java.class.path = c:\php\extensions\php_java.jar java.home = C:\j2sdk1.4.1_01 java.library = C:\j2sdk1.4.1_01\jre\bin\server\jvm.dll java.library.path = c:\php\extensions and test it with following codes and it works (the code copy from php.net) ?php // get instance of Java class java.lang.System in PHP $system = new Java('java.lang.System'); // demonstrate property access print 'Java version='.$system-getProperty('java.version').' br'; print 'Java vendor=' .$system-getProperty('java.vendor').' br'; print 'OS='.$system-getProperty('os.name').' '. $system-getProperty('os.version').' on '. $system-getProperty('os.arch').' br'; // java.util.Date example $formatter = new Java('java.text.SimpleDateFormat', , dd, 'at' h:mm:ss a ); print $formatter-format(new Java('java.util.Date')); ? however the problem is when i first run this page in IE, it works i click the reflesh button, it works but if i closed the IE, and load the page in a new broswer, it show Fatal error: Unable to create Java Virtual Machine i have to restart the apache server to get it work again, so what is going on? Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP + Java (integration problem)
Somebody works with PHP + JAVA with some similar configuration to this Linux red-hat Java j2sdk1.4.1_01 PHP 4.3.1 Somebody already obtained to make to function this sh... has the sections: [Java] php.ini java.class.path = /usr/local/lib/php/php_java.jar :/usr/local/apache/htdocs :/usr/local/java/j2sdk1.4.1_01/bin java.library.path = /usr/local/lib/php/extensions/no-debug-non-zts-20020429 java.home = /usr/local/java/j2sdk1.4.1_01 java.library = /usr/local/java/j2sdk1.4.1_01/jre/lib/i386/libjava.so extension_dir = /usr/local/lib/php/extensions/no-debug-non-zts-20020429 extension=java.so [SET] [.bash_profile] LD_LIBRARY_PATH=/oracle/client/lib: /oracle/client/jdbc/lib :/usr/local/java/j2sdk1.4.1_01/jre/lib/i386/server :/usr/local/java/j2sdk1.4.1_01/jre/lib/i386 Script starts to run (it does not give error) but returns nothing (he is one 20 minutes executing and it returns the page cannot be shown), while the programs in php are normal running. Any help is coming well. thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php-java formatting
Hello all, I am using a javascript alert box in one of my php pages to tell the user they didn't fill out all the required fields. As I check each field, if it is blank I am adding to the alert string: $alertstring=Missing Mandatory Fields; if ($fname==''){ $alertstring=$alertstring.First Name; } etc I am then out putting the code with prints. ? Print script alert('$alertstring') /script; This all works fine except I want each empty field of the alert box to be on it's own line. I try adding \n to the lines of the alert string but it prints out the \n. How can I format this string so that it shows correctly in the alert box? Thanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-java formatting
I am using a javascript alert box in one of my php pages to tell the user they didn't fill out all the required fields. As I check each field, if it is blank I am adding to the alert string: $alertstring=Missing Mandatory Fields; if ($fname==''){ $alertstring=$alertstring.First Name; } etc I am then out putting the code with prints. ? Print script alert('$alertstring') /script; This all works fine except I want each empty field of the alert box to be on it's own line. I try adding \n to the lines of the alert string but it prints out the \n. How can I format this string so that it shows correctly in the alert box? Try using br, maybe, or ask on a Javascript list. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-java formatting
This all works fine except I want each empty field of the alert box to be on it's own line. I try adding \n to the lines of the alert string but it prints out the \n. How can I format this string so that it shows correctly in the alert box? Just you use '\n' but you have to do something wrong. Look this: $x = 'Fill fields:\nfirstname\nsurname\nfirm'; echo script alert('$x'); /script; On the screen you get: Fill fields: firstname surname firm It works in Netscape and Internet Explorer. -- Krzysztof Dziekiewicz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP + Java
Does anyone have PHP 4.2.3 and Java running together? I need to see how you have the php.ini file set up... Here is mine and it just hangs... [Java] java.class.path=/usr/local/lib/php/php_java.jar java.home=/usr/local/java java.library=/usr/local/java/jre/lib/i386/hotspot/libjvm.so extensions_dir=/usr/local/lib/php/extensions/no-debug-non-zts-20020429 extension=java.so Thanks, -- Ray Hunter email: [EMAIL PROTECTED] www:http://venticon.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php, java and ssl
Hi, I have a java class which uses ssl to perform some banking operations. As I have been instructed, I downloaded certificates, classes (both jar files and class files) and installed them. While testing from console, class established ssl connection to remote host and completed transaction. While usign within php after making required configuration I get the following error: java.net.SocketException: Default SSL context init failed: Algorithm SunX509 not available Please note that, all other java functions are working. Only this function fails. The same code, the same class works from console without any errors. Only php raises this error, and only for ssl. Here is my system: Linux Redhat 7.1 with kernel 2.4.2 apache 1.3.26 php 4.2.3 java 1.4.0 (02) sdk openssl 0.9.6g Thanx...
Re: [PHP] php, java and ssl
You might want to submit it as a bug report in bugs.php.net. PLeasee add to it the more detailed instructions. -- Maxim Maletsky [EMAIL PROTECTED] www.PHPBeginner.com // where PHP Begins On Mon, 14 Oct 2002 11:11:23 +0300 A3-Mail Proxy Handler [EMAIL PROTECTED] wrote: Hi, I have a java class which uses ssl to perform some banking operations. As I have been instructed, I downloaded certificates, classes (both jar files and class files) and installed them. While testing from console, class established ssl connection to remote host and completed transaction. While usign within php after making required configuration I get the following error: java.net.SocketException: Default SSL context init failed: Algorithm SunX509 not available Please note that, all other java functions are working. Only this function fails. The same code, the same class works from console without any errors. Only php raises this error, and only for ssl. Here is my system: Linux Redhat 7.1 with kernel 2.4.2 apache 1.3.26 php 4.2.3 java 1.4.0 (02) sdk openssl 0.9.6g Thanx... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP/Java: Type Casting
Hello, I am using php 4.2.3 with the jdk1.3.1_04 running on RedHat 7.2 and apache 1.3.22. The terms Factory and Proxy are similar to their respective design patterns. I have a java Factory that creates Proxy objects. The Factory returns a base interface that can be cast as the class that was actually instantiated. The problem is that after I call the Factory method simpleCreateObject() from php I need to cast the variable returned as a derived class from within php. In java I would just cast the return value as whatever class I requested like so: // java code to cast return type as derived class per = (GenericProxy)tcpb.simpleCreateObject(Person, 0, null); // php code used to call simpleCreateObject() $per = $tcpb-simpleCreateObject('Person', 1, null); How can I cast $per as a different class? Thank you, Gardner -- Gardner Lloyd Bickford III TriAxial Data Systems 36 Brennan Street Watsonville, CA 95076 Phone: (831) 763-3697 x101 Fax: (831) 763-3699 Please note that the views expressed in this message are the views of the author alone and not necessarily the views of TriAxial Data Systems -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Java Extension
Hi I wanted to learn some new stuff and experiment with the PHP Java extension, what are the possibilities, what's cool about it, what are you guys using it for and where can i find some tutorials for it ? Had a look at php.net but can't find much info suitable for a newbie to this particular extension. Thanks :) Girish -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP, JAva history
I would like to see from where visitor come from mypage i need a function who return the last visited page prior to mine. I didn't found any function on php for that purpose and I'm thinking in mix Java and php for that purpose, using the browser history, Can someone show-me how can I do that. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP, JAva history
On 14 Jul 2002 at 13:42, Saci wrote: I would like to see from where visitor come from mypage i need a function who return the last visited page prior to mine. I didn't found any function on php for that purpose and I'm thinking in mix Java and php for that purpose, using the browser history, Can someone show-me how can I do that. Sounds like you want the REFERER, misspelling on purpose. Take a look here: http://www.php.net/manual/en/reserved.variables.php http://www.php.net/manual/en/ref.url.php Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP, Java integration failed: Red Hat 7.1, JDK 1.4, Apache 1.3x
All: None of the many online user posts in setting up Java connectivity from within PHP have worked. RPM or tarball. Do you know of anyone who has an RPM of PHP, with the standard MySQL, GD, Postgres, WDDX, etc...but also libphp_java.so correctly set-up? The Windows PHP has Java support right off the bat with an edit the the .ini file. On Win 98, no problems at all. But on my Linux paritions... There are at least dozens of people trying to get this to work. All of them could be helped with an RPM or a definitive answer. Why can't someone release linux binaries with this sort of thing compiled in? My system: Sun Java2 JDK 1.4.0, Red Hat 7.1, Apache 1.3x. I have tried all versions of PHP tarballs since 4.04p1 And I'm not alone in this frustration. Yes, sometimes there is a libphp_java. There is always the .jar file. But after editing the .ini, doing all manner of things with LD_LIBRARY_PATH/ldconfig, nothing! The best I ever got was a page that registered the .so module, but never finished output. (I use a test page with phpinfo(), then and a sample call to get a Java timestamp. In this circumstance, the page cuts off before the sample Java timestamp and instance. Any help or leads would be appreciated. Regards, WJ Burns -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php+java on freebsd
Can anyone tell me how to get java support for php working? I compiled apache with -pthread option, I properly configured php.ini (phpinfo() agrees), but I cannot overcome this: (the message appears as a PHP error when trying to create any java objects) Fatal error: Unable to load Java Library /usr/local/jdk1.1.8/lib/i386/green_threads/libjava.so, error: /usr/local/jdk1.1.8/lib/i386/green_threads/libjava.so: Undefined symbol fmod in /usr/home/ivoras/public_html/jver.php on line 4 apparently, libjava.so links to a symbol 'fmod', which is in libm.so, but libjava.so is not linked to use libm.so. (?) (all jdk1.1.8 binaries are actually using compat3x libraries) (I have no preference for a JDK, I just need the stuff working.) -- -- Ashes to ashes, DOS to DOS ivoras @ fer.hr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP, Java, and Apache
I am trying to sort out several technologies and how they fit together. The basic problem I want to solve is to be able to use BrowserHawk, a JavaBean by CyScape, from a PHP script. In researching how to do this (and there are several relevant articles written) I have come across several different options and do not know how to weigh the pros and cons to come with the right combination of configurations. I am running Apache Server 1.3.23, PHP 4.1.1, and Java 2 SDK 1.4.0 on a RedHat 7.0 system. 1. There appear to be two choices of configuring Java with PHP: (a) rebuild PHP with Java support (./configure --with-java ...) and (b) integrate PHP into a servlet environment. 2. Apparently (see http://www.intechra.net/bh/install.html) in order to accomplish 1.(a) I must use the dynamic loading method (--with-apxs) to build PHP, which means I must also rebuild Apache (./configure --enable-module=so --enable-module=SHARED_CORE) Question: why? If I am rebulding PHP with Java support then why does Apache care? 3. What exactly does 1.(b) mean? How does one integrate PHP into a servlet environment, and how does this affect the Apache configuration? Sure, Apache will spawn a servlet to execute a php script, and another servlet (a JVM) to execute the BrowserHawk Java Bean.. but is this better? Is it hard to configure the system like this? 4. I have also run across an article advocating installing PHP as an Apache DSO, a dynamically loadable module. wait a second I thought PHP already was by default a dynamically loadable module to Apache! This is very fuzzy to me. Any advice on sorting this out for this web technology newbie would be appreciated. For example, is there one preferred configuration (dare I say.. a standard?) for getting PHP, Java, and Apache working together? TIA, Rich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP/Java/SOAP
Is there a webserver (Tomcat?) that supports both servlets/JSP and PHP? If so, is it possible to have PHP and servlet/JSP code collaborating? I'm looking into using SOAP (apache project's implementation) but I need some of PHP's functionality. thanks in advance, thalis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP/Java/SOAP
We use iPlanet here, and it has Servlet support built in. (nice config menus, too). PHP works fine too, it just takes a little brain power to install it correctly.. Anyway, we do have a little servlet guarding a secure directory, and it uses the PHP engine to grab the templates, same as every other page on the site. I'm sorry I can't give you the servlet code, as I didn't develop it myself, but I just wanted to let you know that it's been done. It just needed a little code somewhere in the servlet telling it to push included .php files through the engine first, before displaying them.. -Original Message- From: Thalis A. Kalfigopoulos [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 1:24 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP/Java/SOAP Is there a webserver (Tomcat?) that supports both servlets/JSP and PHP? If so, is it possible to have PHP and servlet/JSP code collaborating? I'm looking into using SOAP (apache project's implementation) but I need some of PHP's functionality. thanks in advance, thalis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP/Java/SOAP
Is there a webserver (Tomcat?) that supports both servlets/JSP and PHP? If so, is it possible to have PHP and servlet/JSP code collaborating? I'm looking into using SOAP (apache project's implementation) but I need some of PHP's functionality. You can use Tomcat and Apache together. There's an Apache-Tomcat HOWTO somewhere around. I found it on Google. Then you can set up PHP to run on Apache as normal. The kewl way to do things is to create your XML files from a PHP script and redirect the user to the XML when your script is over. HTH, Matt thanks in advance, thalis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php java script
Hi I am doing a scroll bar with javascript and info pulled from MySQL. So I execute query and create an array with php called messages. Then when my page is loaded I guess this array should be available to JavaScript under the same name except the $. Am I right here or not? The java script error is : messages not defined the code is: html body table trtdScroll Text/td/tr trtd script language='JavaScript1.2' ?php include(mydbconnection.php3); if(gettype($messages) != array) { $messages = array(); } $query=select * from text; $results=mysql_query($query); while($result = mysql_fetch_array($results)) { $texttitle=$result['title']; $body=$result['body']; $mytext=$texttitle; $mytext=$body; array_push($messages, $mytext); } reset($messages); ? if(messages.length1) { id=1 } ... /script /td/tr/table /body /html Regards Ajdin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php java script
JavaScript has no idea what PHP does... it doesn't even know PHP exists. So your PHP script has to output your JavaScript in its entirety. You need to have a line that not only defines message as an array, but populates it. I would put a for loop after your reset($messages) line that echo's each element into a JavaScript Array Statement Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com - Original Message - From: AJDIN BRANDIC [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, September 14, 2001 10:07 AM Subject: [PHP] php java script Hi I am doing a scroll bar with javascript and info pulled from MySQL. So I execute query and create an array with php called messages. Then when my page is loaded I guess this array should be available to JavaScript under the same name except the $. Am I right here or not? The java script error is : messages not defined the code is: html body table trtdScroll Text/td/tr trtd script language='JavaScript1.2' ?php include(mydbconnection.php3); if(gettype($messages) != array) { $messages = array(); } $query=select * from text; $results=mysql_query($query); while($result = mysql_fetch_array($results)) { $texttitle=$result['title']; $body=$result['body']; $mytext=$texttitle; $mytext=$body; array_push($messages, $mytext); } reset($messages); ? if(messages.length1) { id=1 } ... /script /td/tr/table /body /html Regards Ajdin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP/Java, Receiving Error message.
I have had PHP/Java running for a while and Haven't had any issues with the standard classes. I was recently given a jar file containing a bunch of classes to be used on a project. I get the following error on several of the methods when called: Warning: java.lang.NoSuchMethodException: initialize Now this method definitely exists. The syntax I am using is as follows: $Class = new Java(long.path.to.class); $Method = $Class-initialize(12345, George, 123 spiff Street, suite 121, Hometown, USA, 12345, UPG); I am not real solid with java yet so even a simple problem can hang me up with this. Does the length of the class path cause any issues? Other methods in other classes work fine. So I am pretty much lost at this point any help would be great. Bill Koch -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP JAVA: Odd Behavior
Hi, I got something very odd while trying to run php with java. First, my system specs: My System: Windows NT4.0 SP6 (same happens on Windows XP) Apache 1.3.20 PHP 4.0.6 Sun Microsystems JDK 1.3.1 Java settings from php.ini: [Java] java.class.path=D:\php406\java\php_java.jar;D:\jdk\lib java.home=D:\jdk java.library=D:\jdk\bin\hotspot\jvm.dll java.library.path=D:\php406\extensions\ Program I am running: ?php $system = new Java(java.lang.System); print Java version=.$system-getProperty(java.version). br; print Java vendor= .$system-getProperty(java.vendor). br; print OS=.$system-getProperty(os.name). . $system-getProperty(os.version). on . $system-getProperty(os.arch). br; $formatter = new Java(java.text.SimpleDateFormat, , dd, 'at' h:mm:ss a ); print $formatter-format(new Java(java.util.Date)); ? When I start the apache server service, the program runs ok (several reloads on the browser). But, if I close the browser and open it again, the program no longer runs and give me a Fatal error: Unable to create Java Virtual Machine in d:\http\info.php3 on line 9. After several reloads, sometimes I get it to run again (just one time). If I restart the apache server service, the program works again, but with the same behavior: if I close the browser window and open it again, it does not work. While all the above is happening, if a go to the command prompt and type: d:\php406\php d:\http\myprogram.php3, it works fine, every time. I ran out of options and, if anyone could help, I'll appreciate. Tks, Marcos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP Java
Hi, Can anyone point me to some tutorials on communicating with Java Applets using PHP? Hoping to hear from you. Best Regards Feroze === Jar Jar Binks will be Jedi!
[PHP] PHP Java: Apache processes
I have what appears to be a successful implementation of Java support compiled into PHP running on an Apache server. Specifics: PHP: 4.0.5 Java: 1.3.1 (Sun) Apache: 1.3.19 OS: Redhat 6.2 The problem I'm experiencing has to do with finding multiple Apache child processes spawned but never closed for each call to Java. They show up with ' rt_sigsuspend ' in a PS listing. My guess, based on looking for that term on the net, is that it may have to do with the Java RunTime not being able to exit and hanging. Over a day or two, three developers can crank the Apache processes up near 300. I'd appreciate any help with this. I'm currently cleaning up with a cron script, but I'd like to solve the problem if at all possible. -Jim Kirkpatrick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP Java ?
While working on some web sites which contain mouse over java, and then adding in some db stuff via php/mysql, the java seems to break. Is there something special I need to do to prevent that break? Is this a common problem? Does using templates get around that problem ? Thanks ! ___ Jack Sasportas Innovative Internet Solutions Phone 305.665.2500 Fax 305.665.2551 www.innovativeinternet.com www.web56.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP Java ?
They are totally un-related. Make sure that the final HTML on the page (some of it generated by PHP) is corrent and doesn't break the Java/Javascript. Michael Jack Sasportas wrote: While working on some web sites which contain mouse over java, and then adding in some db stuff via php/mysql, the java seems to break. Is there something special I need to do to prevent that break? Is this a common problem? Does using templates get around that problem ? Thanks ! ___ Jack Sasportas Innovative Internet Solutions Phone 305.665.2500 Fax 305.665.2551 www.innovativeinternet.com www.web56.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP Java ?
If it's javascript, then be careful about echoing PHP variables into Javascript strings. If you have something like (in Javascript) var myString = '?php echo $phpString; ?'; and $phpString contains any apostrophes, then the javascript will break because Javascript thinks the string has ended prematurely. E.g, if $phpString is My cat's pajamas then the javascript would be sent to the browser thus: var myString = 'My cat's pajamas'; and you can see that there are too many single quotes, which will, of course, cause Javascript's high-powered debugging utilities to kick in and give you a highly useful error report. Pete. While working on some web sites which contain mouse over java, and then adding in some db stuff via php/mysql, the java seems to break. Is there something special I need to do to prevent that break? Is this a common problem? Does using templates get around that problem ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP Java ?
I am echoing the javascript and other html, and at this point *not* putting values into the javascript. I take a string like so: $string= JavaCode HTMLStuff ; I make sure that *everything* in the quotes has only sinlge quotes no double quotes so that PHP doesn't think its the end of the string, then I echo $string; Somehow the java mouseover breaks, then I tried taking the java mouseover single quotes and putting them back to double quotes preceeded by a \ to tell php to ignore that quote, but that didn't work either. Is it the way I am echoing or something ? Thanks ! Peter Dudley wrote: If it's javascript, then be careful about echoing PHP variables into Javascript strings. If you have something like (in Javascript) var myString = '?php echo $phpString; ?'; and $phpString contains any apostrophes, then the javascript will break because Javascript thinks the string has ended prematurely. E.g, if $phpString is My cat's pajamas then the javascript would be sent to the browser thus: var myString = 'My cat's pajamas'; and you can see that there are too many single quotes, which will, of course, cause Javascript's high-powered debugging utilities to kick in and give you a highly useful error report. Pete. While working on some web sites which contain mouse over java, and then adding in some db stuff via php/mysql, the java seems to break. Is there something special I need to do to prevent that break? Is this a common problem? Does using templates get around that problem ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- ___ Jack Sasportas Innovative Internet Solutions Phone 305.665.2500 Fax 305.665.2551 www.innovativeinternet.com www.web56.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP Java ?
Is there any way that we can see the page? That might help in sorting out the problem Thank you Brian Paulson Sr. Web Developer [EMAIL PROTECTED] http://www.chieftain.com 1-800-269-6397 -Original Message- From: Jack Sasportas [mailto:[EMAIL PROTECTED]] Sent: Friday, May 04, 2001 11:22 AM To: php Subject: Re: [PHP] PHP Java ? I am echoing the javascript and other html, and at this point *not* putting values into the javascript. I take a string like so: $string= JavaCode HTMLStuff ; I make sure that *everything* in the quotes has only sinlge quotes no double quotes so that PHP doesn't think its the end of the string, then I echo $string; Somehow the java mouseover breaks, then I tried taking the java mouseover single quotes and putting them back to double quotes preceeded by a \ to tell php to ignore that quote, but that didn't work either. Is it the way I am echoing or something ? Thanks ! Peter Dudley wrote: If it's javascript, then be careful about echoing PHP variables into Javascript strings. If you have something like (in Javascript) var myString = '?php echo $phpString; ?'; and $phpString contains any apostrophes, then the javascript will break because Javascript thinks the string has ended prematurely. E.g, if $phpString is My cat's pajamas then the javascript would be sent to the browser thus: var myString = 'My cat's pajamas'; and you can see that there are too many single quotes, which will, of course, cause Javascript's high-powered debugging utilities to kick in and give you a highly useful error report. Pete. While working on some web sites which contain mouse over java, and then adding in some db stuff via php/mysql, the java seems to break. Is there something special I need to do to prevent that break? Is this a common problem? Does using templates get around that problem ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- ___ Jack Sasportas Innovative Internet Solutions Phone 305.665.2500 Fax 305.665.2551 www.innovativeinternet.com www.web56.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php java problem
Normally, I am using php4.0.4 at apache 1.3.19 on windows98. It works fine. However, after i added the following lines to the php.ini, none of my original php pages can be shown. The browser just "loading".. Can anyone help me to solve this problem? The line I have added: java.class.path="c:\php\extensions\php_java.jar;C:\jdk1.3\jre\lib;C:\jdk1.3\jre\bin\" java.home="C:\jdk1.3\bin;C:\jdk1.3\jre\bin\" java.library.path="c:\php\extensions\;C:\jdk1.3\jre\bin\" java.library=C:\jdk1.3\jre\bin\classic\jvm.dll extension=php_java.dll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php java problem
On Tue, 13 Mar 2001 16:45, vvsalon wrote: Normally, I am using php4.0.4 at apache 1.3.19 on windows98. It works fine. However, after i added the following lines to the php.ini, none of my original php pages can be shown. The browser just "loading".. Can anyone help me to solve this problem? The line I have added: java.class.path="c:\php\extensions\php_java.jar;C:\jdk1.3\jre\lib;C:\jd k1.3\jre\bin\" java.home="C:\jdk1.3\bin;C:\jdk1.3\jre\bin\" java.library.path="c:\php\extensions\;C:\jdk1.3\jre\bin\" java.library=C:\jdk1.3\jre\bin\classic\jvm.dll extension=php_java.dll Check your log files, especially the error file as there may be clues there. -- David Robley| WEBMASTER Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet| http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]