An error occurred while pushing apns-PHP iOS! Failedtoconnect: 13 Permissiondenied

Source: Internet
Author: User
{Code...} What is the problem !! Very urgent ~ Many of the methods mentioned on the Internet do not work, and a file is changed: {code...} and the above error occurs again. Indicates that the system is completely dizzy.
Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Permission denied) in /var/www/html/MyWork/apns/index.php on line 50Failed to connect: 13 Permission denied 

What is going on here !! Very urgent ~ Many methods mentioned on the Internet do not work.
Then I changed the file:

php\Warning: stream_socket_client(): Unable to set private key file `/var/www/html/MyWork/apns/cert.pem' in /var/www/html/MyWork/apns/index.php on line 50Warning: stream_socket_client(): failed to create an SSL handle in /var/www/html/MyWork/apns/index.php on line 50Warning: stream_socket_client(): Failed to enable crypto in /var/www/html/MyWork/apns/index.php on line 50Warning: stream_socket_client(): unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Unknown error) in /var/www/html/MyWork/apns/index.php on line 50Failed to connect: 0 

The above error occurs again. Indicates that the system is completely dizzy.

Reply content:
Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Permission denied) in /var/www/html/MyWork/apns/index.php on line 50Failed to connect: 13 Permission denied 

What is going on here !! Very urgent ~ Many methods mentioned on the Internet do not work.
Then I changed the file:

php\Warning: stream_socket_client(): Unable to set private key file `/var/www/html/MyWork/apns/cert.pem' in /var/www/html/MyWork/apns/index.php on line 50Warning: stream_socket_client(): failed to create an SSL handle in /var/www/html/MyWork/apns/index.php on line 50Warning: stream_socket_client(): Failed to enable crypto in /var/www/html/MyWork/apns/index.php on line 50Warning: stream_socket_client(): unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Unknown error) in /var/www/html/MyWork/apns/index.php on line 50Failed to connect: 0 

The above error occurs again. Indicates that the system is completely dizzy.

'Permission denied 'should be a Permission issue.
You can try to run it with the administrator privilege.

On the top floor, try root.

It has little to do with php and has nothing to do with ios... Permission problems

On linux, the permission is 777, or is it not a permission issue?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.