Why is the php Project unable to obtain the remote webpage content under the server?

Source: Internet
Author: User
Why can't the php project obtain the remote webpage content on the server? PHP & nbsp; the project runs locally. you can use CURL & nbsp; to obtain the content of a remote webpage, but the content of a remote webpage cannot be obtained on the server. why, where can I modify the problem? The server is a mac & nbs php Project. why cannot I obtain the content of a remote webpage on the server?
The PHP project runs locally. you can use CURL to obtain the content of a remote webpage, but you cannot obtain the content of the remote webpage on the server. why? where is the problem, how can I modify it?
The server is a mac OS server and the environment is already in the system.
------ Solution --------------------
Maybe the CURL module of the server is not installed
------ Solution --------------------
Phpinfo: Check whether the cURL module is installed.
------ Solution --------------------
What's wrong? post it and check it out.
------ Solution --------------------
1. check the php error_log
2. check whether the network is accessible
3. check security policies between servers, such as iptables.
------ Solution --------------------
This problem is easily resolved in the not-online phase, that is, if remote server access is not yet online and hosts is required, then the machine executing curl must also have hosts.
------ Solution --------------------
Two cases:
1. check whether CURL is enabled
2. check whether the server can access the Internet.
Ouba
------ Solution --------------------
Yes,
------ Solution --------------------
From the log, it seems that the php environment on the server is faulty...
Disable Zend-related modules and try again.
------ Solution --------------------
Reference:
The following error occurs in the log:
[Fri Feb 10 14:18:29 2012] [error] [client 10.0.1.165] PHP Fatal error: Uncaught exception 'zend _ Controller_Dispatcher_Exception 'with message 'invalid controller specified (favicon. ic ......

Try a basic web page. This error cannot be seen. Key error messages are not displayed.
------ Solution --------------------
File_get_contents.

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.