LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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

Reply
 
Search this Thread
Old 04-10-2009, 03:16 PM   #1
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,203
Blog Entries: 23

Rep: Reputation: 279Reputation: 279Reputation: 279
Cool 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 Thor_2.0; 04-10-2009 at 03:18 PM. Reason: URLs escaped the page...oops :D
 
Old 04-10-2009, 03:28 PM   #2
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 85
Quote:
Originally Posted by linusr@flanders View Post
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.
 
Old 04-10-2009, 03:33 PM   #3
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,203
Blog Entries: 23

Original Poster
Rep: Reputation: 279Reputation: 279Reputation: 279
Hi Rob!

Tnx 4 the reply, let me implement the Rite-A-WAy!!!

Thor
 
Old 04-10-2009, 03:46 PM   #4
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,203
Blog Entries: 23

Original Poster
Rep: Reputation: 279Reputation: 279Reputation: 279
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
 
Old 04-10-2009, 05:46 PM   #5
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 85
Quote:
Originally Posted by linusr@flanders View Post
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.
 
Old 04-11-2009, 03:14 AM   #6
Thor_2.0
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,203
Blog Entries: 23

Original Poster
Rep: Reputation: 279Reputation: 279Reputation: 279
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
 
  


Reply

Tags
applet, java, server


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Alternative JVM - pls hlp Thor_2.0 Programming 4 04-02-2009 01:40 PM
installation probs pls hlp ZINZIN Linux - Newbie 4 03-18-2006 01:58 AM
macromedia flash for linux hlp pls!!!! mlu Linux - Software 3 12-01-2004 10:20 PM
mozilla firefox with JRE 1.5 hlp pls!!!! mlu Linux - Software 1 11-30-2004 06:29 PM
Nvidia problem in Slackware 8.1 pls hlp MaraXus Linux - Hardware 4 10-18-2002 06:36 PM


All times are GMT -5. The time now is 12:00 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration