Bug #17486 [Opn]: simplexml_load_file()
| From: | ajtrichards at gmail dot com | Date: | Sun, 13 Jun 2010 20:12:31 +0000 |
| Subject: | Bug #17486 [Opn]: simplexml_load_file() | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-3933@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=17486&edit=1
ID: 17486
Updated by: ajtrichards@gmail.com
Reported By: ajtrichards at gmail dot com
Summary: simplexml_load_file()
Status: Open
Type: Bug
Package: Services_Twitter
Operating System: Windows XP
Package Version: 0.6.1
PHP Version: 5.3.2
Roadmap Versions:
New Comment:
The data dir is:
C:\php\data
Previous Comments:
------------------------------------------------------------------------
[2010-06-12 21:29:10] shupp
The api.xml file is in the PEAR @data_dir@ directory. What is the
output of this for you?
pear config-get data_dir
I cannot reproduce the problem, I'm on a unix platform. Can you locate
the file anywhere in your PEAR installation?
------------------------------------------------------------------------
[2010-06-11 22:44:13] alex__richards
I have now got this to work only by editing the Twitter.php file.
FROM:
$xmlApi = simplexml_load_file($d . 'api.xml');
TO:
$xmlApi = simplexml_load_file('api.xml');
I've then inclucded the api.xml file in the same directory as my source
file
------------------------------------------------------------------------
[2010-06-11 22:25:41] alex__richards
Description:
------------
Copied your example in the documentation folder.
Recieved the following error:
Warning: simplexml_load_file() [function.simplexml-load-file]: I/O
warning : failed to load external entity
"file:///C:/PHP/PEAR/Services/../data/api.xml" in
C:\PHP\PEAR\Services\Twitter.php on line 569
Test script:
---------------
<?php
require_once 'Services/Twitter.php';
$username = 'alex__richards';
$password = '**********';
try {
$twitter = new Services_Twitter($username, $password);
$msg = $twitter->statuses->update("A test update....");
print_r($msg);
}catch(Services_Twitter_Exception $e) {
echo $e->getMessage();
}
Expected result:
----------------
Status updated
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=17486&edit=1