Bug #76330 [Com]: XPath only works in a linux server not local windows IIS
| From: | peehaa@php.net | Date: | Fri, 11 May 2018 15:18:22 +0000 |
| Subject: | Bug #76330 [Com]: XPath only works in a linux server not local windows IIS | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-215206@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76330&edit=1
ID: 76330
Comment by: peehaa@php.net
Reported by: kj-8791 at hotmail dot com
Summary: XPath only works in a linux server not local windows
IIS
Status: Open
Type: Bug
Package: *XML functions
Operating System: windows 10 enterprise
PHP Version: 7.2.5
Block user comment: N
Private report: N
New Comment:
Also make sure the data you get in is what you think it is.
Previous Comments:
------------------------------------------------------------------------
[2018-05-11 15:17:24] peehaa@php.net
You are using the STFU operator (@) which prevent you from seeing what is going wrong.
Remove it and check the error message.
------------------------------------------------------------------------
[2018-05-11 15:13:51] kj-8791 at hotmail dot com
Description:
------------
problem is only $data is null in a local windows IIS even if i connect a domain to my localhost, so
a question is Windows 10 Enterprise lacking something default as PHP stats XPath is integrated and
is working in a linux enviroment??
i have PHP 7.2.5 plus Microsoft VC15 runtime
no changes are made to the system files standard installation of PHP
Question? What is needed for this to work in windows?
as Windows Enterprise should have all needed because PHP code works
Test script:
---------------
//Get parsing url for retrieving forex data
$parseurl="https://www.investing.com/technical/technical-summary";
//Create XPath object
$parsedoc=new DOMDocument();@$parsedoc->loadHTMLFile($parseurl);$xpath=new DOMXPath($parsedoc);
$data=$xpath->query('//*[@id="technical_summary_container"]/table/tbody/tr[3]/td[2]')->item(0)->nodeValue."\n";
echo $data;
Expected result:
----------------
$data should have one of this results
Strong Sell
Sell
Neutral
Buy
Strong Buy
Actual result:
--------------
$data is null in a windows 10 Enterprise PHP standard installation, without plugins and external
packages
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76330&edit=1