Simplexml_load_string is unavailable on the server! Thank you!

Source: Internet
Author: User
Simplexml_load_string is unavailable on the server! Thank you!
$xml = simplexml_load_string($string);print_r($xml);

Error 500 is reported when running on the server,


Reply to discussion (solution)

echo 1;$xml = simplexml_load_string($string);print_r($xml);

If the preceding output is not reported as 500, you can output 1;
How can this problem be solved?

$ What is string?

$ What is string?



 
  
  Forty What? 
  
   Joe
   
  
   Jane
     I know that's the answer -- but what's the question? 
 XML;echo 1;$xml = simplexml_load_string($string);print_r($xml);
I remember you answered this question ~

In any case, you must enable the php error display function during debugging (do not bother yourself)
Do not block any error checks.

$ What is string?



This is an extension of php on the server,
I have no problem with the local code, and the transfer server is faulty,
The php version of the server is 7. the local version is 5.6.

In any case, you must enable the php error display function during debugging (do not bother yourself)
Do not block any error checks.



Is this the case?
I used phpstorm to open all the check errors. no error was reported.

In any case, you must enable the php error display function during debugging (do not bother yourself)
Do not block any error checks.


I think it may be because the configuration of my server is incorrect, but I don't know where to start.

Of course, this is possible, but it is always necessary to see the error information for targeted processing.

Of course, this is possible, but it is always necessary to see the error information for targeted processing.


I set display_errors in php. ini to On, and the page still reports Error 500, no print error

Of course, this is possible, but it is always necessary to see the error information for targeted processing.




If you know the problem, the system reports an error saying you cannot find this method.


In any case, you must enable the php error display function during debugging (do not bother yourself)
Do not block any error checks.


I think it may be because the configuration of my server is incorrect, but I don't know where to start.



I was wondering if SimpleXML is an extension Library. I checked that SimpleXML is a built-in extension of php and should not be configured.

Php7 is some http://php.net/manual/zh/function.simplexml-load-string.php

Check whether spelling is correct.

Php7 is some http://php.net/manual/zh/function.simplexml-load-string.php

Check whether spelling is correct.


First, I will use php-m to check the php loaded modules.

SimpleXML

Then I checked whether the spelling was correct and the spelling was correct.


Or error


What causes this?

Php7 is some http://php.net/manual/zh/function.simplexml-load-string.php

Check whether spelling is correct.


This is the environment version.

You can repeat the line of code in plain text.
It is best not to type in IDE, at least close the input method (the editor has seen many code errors recently)

You can repeat the line of code in plain text.
It is best not to type in IDE, at least close the input method (the editor has seen many code errors recently)



I restarted the server, php-fpm, and nginx. thank you very much!

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.