Windows Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsWindows Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 4th, 2003, 12:20 PM
dave_mwi dave_mwi is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Posts: 93 dave_mwi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 40 m 53 sec
Reputation Power: 8
Send a message via AIM to dave_mwi
Question IIS "access denied" with php and java

I get this error when trying to run a simple php script:

Fatal error: Unable to load Java Library C:\j2sdk1.4.1\jre\bin\server, error: Access is denied. in c:\inetpub\wwwroot\php\java.php on line 3

So basically php is telling me that the server, in this case IIS 5.0 is not allowing access to C:\j2sdk1.4.1\jre\bin\server\jvm.dll.

I've tried web sharing on that directory but this isn't working. I'm afraid maybe I don't know enough about IIS management to solve this one. It seems like this kind of an issue to me.

fyi -- the php script causin the problem is:

PHP Code:
<?php

$systemInfo 
= new Java("java.lang.System");

print 
"Total seconds since January 1, 1970: 
"
.$systemInfo->currentTimeMillis();

?>
__________________
Dave

Reply With Quote
  #2  
Old January 4th, 2003, 01:28 PM
hedge hedge is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2002
Posts: 693 hedge User rank is Sergeant (500 - 2000 Reputation Level)hedge User rank is Sergeant (500 - 2000 Reputation Level)hedge User rank is Sergeant (500 - 2000 Reputation Level)hedge User rank is Sergeant (500 - 2000 Reputation Level)hedge User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 Days 23 h 47 m 32 sec
Reputation Power: 20
IIS at install creates a user IUSR_<machinename> that the webserver runs as. You need to provide this user access.

Reply With Quote
  #3  
Old January 4th, 2003, 03:34 PM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,917 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 15 h 7 m 10 sec
Reputation Power: 279
It's probably an NTFS issue, just highlight that dll and go to security, then allow the user as hedge wrote.

Reply With Quote
  #4  
Old January 4th, 2003, 06:26 PM
dave_mwi dave_mwi is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Posts: 93 dave_mwi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 40 m 53 sec
Reputation Power: 8
Send a message via AIM to dave_mwi
I actually found a solution this morning...this is taken from

http://php.networkedsystems.co.uk/m...kr/ref.java.php

######################################

** Success with W2K Server, PHP 4.3.0 as IIS5 SAPI module and J2SDK1.4.1_01 **

After a bunch of annoyingly spurious "access violation" and "Unable to create Java Virtual Machine" errors
I changed the php.ini setting for java.library from:

"C:\j2sdk1.4.1_01\jre\bin\client\jvm.dll"

to:

"C:\j2sdk1.4.1_01\jre\bin\server\jvm.dll"

All above examples now work perfectly incuding my own classes and those at
http://www.onlamp.com/pub/a/php/2001/06/14/php_jav.html (thanks to emilebosch above on 18-Oct-2001 07:19).

I'd really like to know the difference between 'client' and 'server' JVM versions if anyone can illuminate us.

Notes:

1. Manual install of PHP 4.3.0 to C:\php with the following relevant extracts from php.ini:

extension=php_java.dll
[Java]
java.class.path = "C:\php\extensions\php_java.jar;C:\java\packages\"
java.home = "C:\j2sdk1.4.1_01\bin"
java.library = "C:\j2sdk1.4.1_01\jre\bin\server\jvm.dll"
java.library.path = "C:\php\extensions"

2. Default installation of latest Java SDK from Sun

3. Win2K Server SP2 with all(?) patches

4. My own classes are placed in C:\java\packages\

Hope this helps some people.

Regards

-Neil

#######################################
Thanks Neil. Well, it looks like it might not necessarily have been a server issue.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsWindows Help > IIS "access denied" with php and java


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT