Jump to content

Elko

Members
  • Posts

    9
  • Joined

  • Last visited

Elko's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi, I'm using CURL in PHP to communicate to an ssl secured remote server from Johnny. The cert is located on the server and referenced by it's full path for CURL: curl_setopt($c, CURLOPT_CAINFO, CERT_PATH); curl_setopt($c, CURLOPT_SSL_VERIFYPEER, 1); I got the PEM file a few months back from here: http://curl.haxx.se/docs/caextract.html The error I get when trying to use CURL: SSL certificate problem: unable to get local issuer certificate The CURL requests worked on different hosters with this setup. The full path to the cert is correct because PHP can load the file. Am I missing something? Edit: Again, after just testing around it starts working when the option to use the custom cert is simply omitted. So the fix is to remove 'curl_setopt($c, CURLOPT_CAINFO, CERT_PATH);' so CURL uses the default setting. Issue solved.
  2. Hi, I tried CORS (cross origin resource sharing), just because I have some JS using it. Is it disabled on the Johnny? I support it with the PHP script (setting header). It works on different web-hosts. Specifically I get the following error in Chrome and Firefox: 'No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.' Here is the code I used: PHP: // Allow from any origin if (isset($_SERVER['HTTP_ORIGIN'])) { header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}"); header('Access-Control-Allow-Credentials: true'); header('Access-Control-Max-Age: 86400'); // cache for 1 day } // Access-Control headers are received during OPTIONS requests if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') { if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD'])) header("Access-Control-Allow-Methods: GET, POST, OPTIONS"); if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS'])) header("Access-Control-Allow-Headers: {$_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']}"); exit(0); } // old: /* header("Access-Control-Allow-Origin: *"); header("Access-Control-Expose-Headers: Origin"); header('Access-Control-Allow-Methods: GET, POST'); header("Origin: ".CURRENT_HOST); */ Issue solved after doing some research again: In some other included PHP scripts there was a blank line before "&--#60;?php". This caused already output disallowing any headers to be set. web development... Btw. it seems like I can't set the title to [solved] myself
  3. Thank you! I only have one active account. I tried to set up a second one because the confirmation mails did not arrive at my email provider. I had the issue before with a different hoster, and it turnout out that the ip of the mail sender was banned due to spam mails. I assume the ip from helionet or so is also banned. The email provider is 'web.de'. But I received the mail now at my live.com account.
  4. Ports below 1024 are out of my reach. 9073 would do. Sadly UDK doesn't support UDP through unrealscript anymore, so with TCP it requires this port, it seems.
  5. I tried port 80 and 443 on a local testserver. In this case, I do not receive timeouts anymore and the request finishes in at most a few seconds. However, I do not receive the data (ports are forwarded). The reason for this is probably somewhere on my end because it is the same with other webhosters. The gameserver is rented from SimRai and you only get a few ports assigned to use. I highly doubt, my application is allowed/ able to use the ports 80 or 443. I can open a support ticket for that though. Is there a way to amend this port blocking policy of yours? Thank you for the reply!
  6. Hi, I have a problem getting direct socket connections to work to my gameserver from the Johnny Server using the PHP React library. It is based on the stream_socket_client(..) method and never quits the loop until the timeout kicks in (25 seconds). The same code worked with other website hosters. I did a test right now. Any ideas? Greetings, Elko
×
×
  • Create New...