APNS issues with windows server Push Notification iOS - php

I'm having issues when uploading and running my php script to a windows web server.
The php (with accompanying certificate and key) works on my local machine, but not when I upload and run the script from the web server.
Is this a certificate issue? I've followed many different tutorials, but am obviously missing some fundamental piece.
The tutorial I used to get the push working on my Mac's local MAMP server is: http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1
I've also found the following thread which seems to have solved the issue, but I can seem to get it working myself :( ... "This took me forever to figure out but I finally pieced it all together from the minor clues people left." http://arashnorouzi.wordpress.com/2011/06/19/sending-apple-push-notifications-in-asp-net-and-c-–-part-4-apns-sharp-c-wrapper-class/

You need to download the certificate for the APPID that you register on the developer portal. That certificate must be converted into a P12 format to be used on Windows.
If you are running Yosemite, the easiest way to do this is to import the certificate to your keychain, then export it to a .p12 file.

Related

AWS S3 server problem with files downloading in script PHP

Maybe I will find some help here. We're trying since several days to complete file downloading from s3 in PHP laravel with the apache app server. The readStream() or download() function of the drive s3 class is not working giving a 504 gateway timeout error. I think there's an access problem. Two important points are that the upload is working normally and the download is working in local application with local server. I'm not in charge of the server management and I don't have many informations about the server but to access to FTP (via FileZilla for example) the external team in a foreign country has to whitelist my IP. Maybe there's is a firewall issue? Since it's working in local application, there is surely a problem with the configuration of the server? We're working for several days on this problem and I really need someone with more knowledge about these types of issues.
Thanks.

Run code calendar google in localhost but not working in online server

I got it to work using a service account and some steps based on this answer, here is what I did: here
This is work in local host.
i move all code to server , but not working online server.
Is it true to copy composer file without change?
Thanks.
this problem was, php version host.

Http request refused on Windows environment but not on OSX (mac)

I am working on a React web app with npm for the first time. I'm done with the development and now putting the built package on the web server (bluehost).
All is working well on my Mac: the web app allows getting data from mySQL via php, and posting back to the database.
But when I try the same app (on the same URL, same server, script, same everything...) on my Windows machine, I get an error on the first http request used for authentication.
OPTION http://example.com/script.php net::ERR_CONNECTION_REFUSED
First I thought this was a browser issue.
But I don't get the error on Chrome on my mac but do on Chrome on my Windows, as well as FireFox.
Again, I do not get this error when I test the app on my mac.
Could anybody please give me some direction to solve this?
Thank you!

Downloading file in Android browser data transfer failed

We've been searching for the cause of this issue for a few days now so maybe somebody has some insight.
We're using php to force a download of files (in this case mp3) from the server into PC browsers and Android devices. The code works fine on PC. On ALL Android devices we've tested, the GET request will trigger the download manager to attempt to get the file, but Android won't respect the attached filename, instead showing the name of the script, and the file download will ultimately fail with the following message:
Download Failed - Data connection failed
Attempting to download the file from a test site running on my computer with the EXACT same code works correctly.
I created a brand new server yesterday with the exact same operating system (CentOS) and version of PHP (5.5.16), dropped my php script onto that box and attempted again from my Android device and it WORKED perfectly. Again, EXACT same php code.
All signs are pointing to the answer being a server (mis)configuration problem. I didn't set up this server, nor do I have root access, so my testing options have been limited to trying to get my sandbox servers to "break" and start reproducing the same behavior.
I'd include PHP code, but I have 2 separate environments where the code works fine. If I run dev tools in my desktop browser against the working and non-working environments and compare responses, they are identical from what I can tell. The headers are identical and the payload is the exact same size. Something is causing Android to not like the response from one server, and like the response from the other.
Some insight, or at least a place to start would be helpful. The only two things that are different between my environments are:
Working sandbox environment is responding with HTTP 1.0 and the SSL
cert is from Rapid SSL. The sandbox environment will work with or without SSL turned on.
Non-working staging/production environments are responding with HTTP
1.1 and the SSL cert is a wildcard cert from COMODO.
I wish I could be more helpful but I've exhausted the usual, obvious questions that responders would ask on here. If you need more info, or want to see phpinfo dumps, I can provide.
Thanks in advance for any assistance.
EDIT - The Android request are showing in the access logs and there are no errors. From a server log perspective, everything looks perfect.

Impossible SSL CAS-certificates with phpCAS and examples. It only works without SSL server verification

I am doing a CAS integration with a project that I am doing with my university. The final integration should be made with symfony2, however first I need to make the example code working.
I finally get working the example_simple.php example with phpCAS 1.3.2 , however the directive:
phpCAS::setNoCasServerValidation();
is the enabled one. I think I should use instead:
phpCAS::setCasServerCACert($cas_server_ca_cert_path);
However when I enable this second one (and disable the other) then the authorization does not work anymore. Here is the relevant output line error of the log:
could not open URL 'https://cas_server.fi/cas/serviceValidate?service=http%3A%2F%2Flocalhost%2Fphpcas2%2Fdocs%2Fexamples%2Fexample_simple.php&ticket=ST-115606-M1Omd1cHWzbLbmxa1nYV-cas' to validate (CURL error #60: SSL certificate problem: unable to get local issuer certificate) [Client.php:2763]
The cas server provided me two .crt files:
MYCASRootCA.crt
MYCASLinuxSUBCA.crt
And they are suppose to be installed in my system (Ubuntu 13.10). They are in different places, such a /etc/ssl/certs/MYCASLinuxSUBCA.pem but also:
/usr/share/ca-certificates/lut/MYCASRootCA.crt
/usr/share/ca-certificates/lut/MYCASLinuxSUBCA.crt
So assuming that the variable $cas_server_ca_cert_path has to have one of these .crt files or .pem dirs (such a /usr/share/ca-certificates/lut/MYCASLinuxSUBCA.crt) I cannot make it work. What I am doing it wrong? My client-server (no the cas server) is in my localhost. Is it a problem? Should I avoid use setCasServerCACert command? Why is it happening?
I've also tried to use the curl-ca-bundle.crt certificate provided by my XAMP instalation (Xampp 1.8.3).
I am a little bit lost with certificates as you can see.
I read about problems with phpCAS and recent Ubuntu versions in https://github.com/Jasig/phpCAS/issues?state=open. However I cannot make this working with the master code, even without certification (by default).
Any ideas would be appreciated...
I have found the solution asking in the github library: https://github.com/Jasig/phpCAS/issues/119
The reason is that the curl binary used by PHP in my xampp installation is different from the system's curl binary. The system one has access to /etc/ssl/certs/ certificates, but the xampp curl does not have (unless you don't indicate it, of course). By default, it searches in a special certificate-bundle-file.
Finally I have found the real certificate for my cas-server and I am using it, however maybe you want to use other proposed solution at the end of the discussion thread if you are having a similar problem.

Categories