Symfony framework access problems in China mobile cmwap network, symfonycmwap_PHP tutorial

Source: Internet
Author: User
Symfony framework access problems in China mobile cmwap network, symfonycmwap. Symfony framework access problems in China mobile cmwap network. symfonycmwap recently used the symfony framework to provide backend services for mobile apps. it is found that problems may occur in China mobile cmwap network, all requests for symfony framework access in China mobile cmwap network, symfonycmwap

Recently, I used the symfony framework to backend the mobile app. I found that problems may occur in the China Mobile cmwap network. all requests are routed to the root path.

The left figure shows the original $ _ SERVER object, and the right figure shows the $ request-> server object.
Because request_uri is modified, any request will be routed to the root path by the symfony framework.
An x-original-url request header is missing.
The reason is in the Request class source code of symfony.

We can see that when there is an x-original-url request header, it will be taken directly as the request-uri, but China Mobile cmwap is quite disgusting. This header is passed but not passed, change the code

There is also the framework startup file bootstrap. php. cache, which also contains this code. just change it.


What restrictions does China Mobile have on CMWAP?

China Mobile imposes limits on CMWAP to distinguish between the two in applications, mainly because it can only access IP addresses in the GPRS network (10. *. *. *), but none

Access the Internet through a route. (Mobile networks in a few regions may not have this restriction .) We use CMWAP to browse web pages on the Internet through the WAP gateway protocol or it provides

.
Speaking of this, it naturally reminds me of our company's network. I believe many working friends have similar experiences. The company's network does not provide routing and NAT on the Gateway, just

Provides an HTTP proxy that can access the Internet. In this way, we will not be able to directly use QQ, MSN and other non-HTTP application software (fortunately they also provide HTTP proxy connection methods ).

). CMWAP is also

(4) Applicability

The scope of application is the most important concern. CMNET has full Internet access, which is not mentioned here. let's take a look at CMWAP. Because of the limitations mentioned above

The application scope of CMWAP depends on the support provided by the WAP gateway. Currently, China Mobile's WAP gateway only provides HTTP proxy protocol (port 80 and port 8080) and WAP gateway protocol.

(Port 9201 ). (According to some netizens, port 1080 is also open, but cannot be connected. This may be a Socks backdoor used inside mobile devices. ^_^ ).

China Mobile's internal cmwap Ip address and port problems

You can call 10086 to ask if cmnet and cmwap are billed the same way. if they are the same, changing cmwap to cmnet will be faster.

Cmnet and cmwap in Beijing are no longer differentiated

Vivo recently used the symfony framework to backend the mobile app and found that problems may occur in the China Mobile cmwap network, all requests...

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.