Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-10-2009, 03:16 PM
|
#1
|
Senior Member
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
|
Java and PHP - pls hlp
Hi,
Ok, I hope there's an answer for this one...
I run a server (CentOS 5.2) with Java and PHP installed.
The code for the applet in the client page is:
(html excluded - I assume that this is ok...)
Quote:
<applet
code = "t1.ac4.AC4.class"
name = "AC4 - maintenance entry"
width = "800"
height = "600"
hspace = "0"
vspace = "0"
align = "top"
>
<param name="EID" value=1>
</applet>
<applet
code = "t1.ac4.AC4.class"
name = "AC4 - maintenance entry"
width = "800"
height = "600"
hspace = "0"
vspace = "0"
align = "top"
>
<param name="EID" value=<?php=Session("EID")?>>
</applet>
|
Where the top bit is a test and belongs in the ac4.html, the other (lower) one stands in ac4.php.
When I enter the full URL
the page shows a grey block - of a failed applet.
with
I only get a blank page, and no page source...
The title does'nt show either.
Is there an issue with permissions? I ran a test with a clock applet and that runs, so the server can "dish" out applets...
Please help...
Big tnx
Thor
(PS I could'nt decide where to put this cry for help - if the alternative was something else, then I apologise, of course)
Last edited by ButterflyMelissa; 04-10-2009 at 03:18 PM.
Reason: URLs escaped the page...oops :D
|
|
|
04-10-2009, 03:28 PM
|
#2
|
Member
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653
Rep:
|
Quote:
Originally Posted by linusr@flanders
Code:
<param name="EID" value=<?php=Session("EID")?>>
|
Hi linusr,
Shouldn't that be:
Code:
<param name="EID" value="<?php echo $_SESSION['EID'];?>">
?
$_SESSION is one of the superglobal arrays in PHP, and you need square brackets to access the elements of an array (unless, of course, you've declared a function called Session). To output a value to the page, you need to echo it, and it will need a semicolon at the end of the statement.
Arrays in PHP
Hope this helps,
Rob
Last edited by Robhogg; 04-10-2009 at 03:31 PM.
|
|
|
04-10-2009, 03:33 PM
|
#3
|
Senior Member
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Original Poster
|
Hi Rob!
Tnx 4 the reply, let me implement the Rite-A-WAy!!!
Thor
|
|
|
04-10-2009, 03:46 PM
|
#4
|
Senior Member
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Original Poster
|
No go...I still only get a blank page, I even changed the applet's parameters:
Quote:
<applet
code = "t1.ac4.floop.class"
name = "AC4 - maintenance entry"
width = "800"
height = "600"
hspace = "0"
vspace = "0"
align = "top"
>
<param name="EID" value=<?php=$_SESSION['EID'];?>>
</applet>
Error loading the applet...
(rest of the HTML)
|
(floop.class does'nt even exist - should'nt I @ least get a classnotfountexception or the like?)
to force it to load a non-existing Class, but the same results manifest themselves. I even deleted the page, and there I do get a 404 page (notfound)
(slightly depressed sigh...)
Thor
|
|
|
04-10-2009, 05:46 PM
|
#5
|
Member
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653
Rep:
|
Quote:
Originally Posted by linusr@flanders
No go...I still only get a blank page...
|
Hmm... You said the page was completely blank, no source code? I've got an idea that that sort of problem may be caused by server timeouts (trying to remember something I was reading a couple of weeks back). I've had a go myself (on Apache running on Localhost) and am not getting any errors for missing parameter/wrong class name (or even uncomiled Java Source code), but I am still getting a grey box on't page.
Have you had a look at the web server logs, to see if there are any revealing error messages? For the missing class file, I have this in access.log:
localhost - - [10/Apr/2009:23:28:09 +0100] "GET /flibble.class HTTP/1.1" 404 355 "-" "Java(tm) 2 SDK, Standard Edition v1.6.0_0 Java/1.6.0_0"
... and this in error.log:
[Fri Apr 10 23:28:09 2009] [error] [client 127.0.0.1] File does not exist: /var/www/htdocs/flibble.class
There was no error logged for the missing parameter.
I must admit, in my first post I jumped on the first thing I noticed, and assumed you were trying to access session variables via PHP. Yes, I know what assume makes  .
Oh, and I should have asked, you asked about permissions - what are the permissions on the various files?
Last edited by Robhogg; 04-10-2009 at 06:09 PM.
|
|
|
04-11-2009, 03:14 AM
|
#6
|
Senior Member
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Original Poster
|
Hi, and thanks (I keep saying that - this forum really helps me), ok, here's the scoop so far.
I looked in the log '/var/log/httpd/error_log) and found I had a syntax error in my PHP code, so, the PHP engine "eeeps" out and shows a blank 'stare'...
I corrected that and did get a grey (failed) applet - but that seems to be due to the fact that I did'nt set the Session Var yet. The log mentions something like "Undefined Index" - so that's already a big Quantum Leap ahead 4 me!
Life would be easier if I had some sort of console, especially @ client-side, so I could "vent" messages using the System.out.println() directive...the jconsole is cool enough, but it shows statistics only - unless I've missed the clue here
Ok, so far, I know where to "tickle" the ol' girl... :-)
Tnx!!!
Thor
|
|
|
All times are GMT -5. The time now is 02:30 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|