Jump to content

rrotstain

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rrotstain's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Nevermind... fixed it. Didn't realize SELinux was turned on. Turned it into permissive mode and everything started working. Thanks guys. --Ronen
  2. I should also mention that using the URL http://localhost seems to work. But as soon as I introduce a port number to the URL, it doesn't. Not sure why adding a port number (i.e. http://localhost:8090) would make it stop working. --Ronen
  3. Thanks for the suggestions. Allow_url_fopen is set to "On" in php.ini file so I think that part should be good. After adding the lines: error_reporting(E_ALL); ini_set('display_errors', '1'); I now get the error failed to open stream: Permission denied in /home/roner/public_html/fgc.php Not sure what kind of permissions it's talking about. All directories leading up to this one have execute permission granted and the fgc.php file is chmod'ed as 777. Any ideas? Ronen
  4. Hi guys, I have a very simple php script that's supposed to work but doesn't. The script looks like this... <?php $response = file_get_contents("http://localhost:8090/MyWebApp/MyServlet", false, NULL) echo $response ?> which seems to return nothing. This is supposed to call a java servlet on the local machine. However, the servlet does not get called (I put a breakpoint in the servlet so I'd know if it were called). When I navigate to this php from a web browser, I get back an empty page (as if there's an error or something). However, if I change the above line to use http://www.google.com as the URL, it works (I can hit the php page from my browser and get back a google-looking page, minus some pictures and what not). For some reason, the call to a localhost URL does not seem to work, even though the servlet is, in fact, running. I have tested this by calling "curl http://localhost:8090/MyWebApp/MyServlet" from my linux terminal and correctly getting the servlet response. Does anyone know why this does not work in PHP? Thanks, --Ronen
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.