Fatal Error Call To A Member Function Xpath
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring fatal error call to a member function get() on a non-object in developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask fatal error call to a member function bind_param() on a non-object in Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join fatal error call to a member function bind_param() on boolean them; it only takes a minute: Sign up Fatal Error: Call to member function xpath to non-object AFTER uploading to provider up vote 0 down vote favorite I'm trying to extract data from a tumblr XML-Feed and it works
Fatal Error Call To A Member Function Fetch_assoc() On A Non-object In
perfectly on my local MAMP-Server. However, having uploaded it to my provider's server I get the following error: Fatal error: Call to a member function xpath() on a non-object in /home/httpd/vhosts/anthronaut.net/subdomains/nico/httpdocs/scripts/tumblr.php on line 19 Here's the part of the code in question: $request_url = "http://nicolasblandin.tumblr.com/api/read"; $xml = simplexml_load_file($request_url); $posts = $xml->xpath("/tumblr/posts/post"); My hunch is that the serverside settings need to be changed. I found one setting allow_url_fopenand set it to true, however with no success. Any ideas would be fatal error call to a member function query() on a non-object greatly appreciated! Thanks php xpath share|improve this question edited Nov 22 '13 at 23:38 asked Nov 22 '13 at 13:58 Anthronaut 6817 What do you get when you retrieve the URL using wgetor curl? Is it a valid XML document? –Marcus Rickert Nov 22 '13 at 14:07 Yes, wget retrieves a valid XML document. It also works perfectly on my local MAMP-Server. –Anthronaut Nov 22 '13 at 23:35 Are you using a proxy? –Marcus Rickert Nov 23 '13 at 1:21 No proxy involved. –Anthronaut Nov 23 '13 at 1:47 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote The problem seems to be that simplexml_load_file returns an array of type SimpleXMLElement. So, changing the third line of your code to $posts = $xml[0]->xpath("/tumblr/posts/post"); seems to solve the issue. The real question is now: why does it actually work in the other case? share|improve this answer answered Nov 23 '13 at 2:26 Marcus Rickert 3,01121323 Good morning! Thanks for the hint, but unfortunately also this didn't help. However, in order to isolate the error, I just tried the script on a different server and it works, as it did on my local machine. So it must be an issue with my provider's PHP settings, I will dig into that. Thanks for the help! –Anthronaut Nov 23 '13 at 10:31 ad
that make connections all over the world. Join today Download & Extend Drupal Core Distributions Modules Themes WordPress MigrateIssues Fatal error: Call to a member function xpath() on a non-object fatal error call to a member function find() on a non-object in wordpress_migrate/wordpress_source.inc on line 73 Closed (cannot reproduce)Project:WordPress MigrateVersion:7.x-1.x-devComponent:User interfacePriority:NormalCategory:Bug reportAssigned:UnassignedReporter:diqidoqCreated:January 21,
Fatal Error Call To A Member Function Fetch() On A Non-object
2011 - 05:05Updated:February 8, 2012 - 01:44 Log in or register to update this issue I have tried to regulary
Fatal Error Call To A Member Function Execute() On A Non-object
import 88 Wordpress articles and 4 pages without success. The articles include custom fields and [captions] and 95% of them are published, the rest are drafts. Not sure what else can cause http://stackoverflow.com/questions/20146655/fatal-error-call-to-member-function-xpath-to-non-object-after-uploading-to-prov this. If you have any questions to my configuration, let me know. But basically I did nothing special but configurating wordpress migrate to treat articles as articles and pages as pages and categories as categories and so on. Thanks for this much needed module to get the advanced wordpress users over, who are now looking for options behind the limits of wordress! Hope to get https://www.drupal.org/node/1034792 it work soon. Best regards Comments Comment #1 diqidoq CreditAttribution: diqidoq commented January 21, 2011 at 5:08am and ... jumping over to content overview shows me this 5 times now: Warning: simplexml_load_file() [function.simplexml-load-file]: public://wordpress/wordpress.2011-01-21.xml:1331: parser error : Entity 'Uuml' not defined in wordpress_migrate_import_form_submit() (line 200 of /www/htdocs/a-drupal7-testspace/sites/all/modules/wordpress_migrate/wordpress_migrate.pages.inc). I will take a look at the .inc file. Log in or register to post comments Comment #2 diqidoq CreditAttribution: diqidoq commented January 21, 2011 at 5:22am Using wordpress version 3.0.4 (latest) - if this info helps... PS: I've tried another time with using exported articles only. Another error mentioning attachment.inc line 51 occured on a white screen (like with the others) before import finishes. Now all titles are imported without content body. greetings Log in or register to post comments Comment #3 diqidoq CreditAttribution: diqidoq commented January 21, 2011 at 5:18am Deleting the names of the imported content listings (which are visible without any imported article working now) the following error occures: Class name must be a valid object or a string in /www/htdocs/a-drupal7-testspace/sites/all/modules/migrate/includes/base.inc on line 389 It looks like there is something completely messed up. Log in or register to post comments
Search Username Password Remember Me? Register Lost Password? facebook google twitter rss Free Web Developer Tools http://forums.devshed.com/php-development-5/fatal-error-call-function-xpath-object-667426.html Advanced Search Forum Programming Languages PHP Development Fatal error: Call to a member function xpath() on a non-object in ... Thread: Fatal error: https://kb.magenting.com/content/21/53/en/magento-fatal-error-call-to-a-member-function-xpath-on-a-non-object-in-app-code-core-mage-core-model-layoutphp-on-line-154.html Call to a member function xpath() on a non-object in ... Share This Thread Tweet This + 1 this Post To Linkedin Subscribe fatal error to this Thread Subscribe to This Thread January 13th, 2010,12:35 PM #1 No Profile Picture Punhal View Profile View Forum Posts Registered User Devshed Newbie (0 - 499 posts) Join Date Jan 2010 Posts 2 Rep Power 0 Fatal error: Call to a member function fatal error call xpath() on a non-object in ... I need help with this small problem I do not understand. Why is it gives me this error? Fatal error: Call to a member function xpath() on a non-object in ... My code is very simples: PHP Code:
//Identifica??odaCidadeeIdioma
$cidade='Lisbon';//Cidade
$idioma='pt-pt';//Idiomaderesposta(pt-pt)
//URLprincipaldaAPI
$googleWeather='...google.com/ig/ap';
//CriarURLcomparametrosdeentrada(CidadeeIdioma)
$apiUrl=$googleWeather.'?weather='.urlencode($cidade).'&hl='.$idioma;
//Obterresultado
$resultado=
Secure Hosting Live Stores Showcase Knowledge Base FAQ Instant response Categories Magenting Common Questions Access Domains Migration / Transfer Payments Magento General Configuration Magenting Specific Products and Categories Localization Shipping Extensions Themes Navigation All categories Magenting Hosting Magento General Configuration Magenting Specific Products and Categories Content Management Localization Shipping Extensions Themes Troubleshooting Magento backend Magento frontend Magento Connect Sitemap Support ServiceIn doubt? Just let us know KnowledgeBase » Magento » Troubleshooting » Magento frontend Magento • Fatal error: Call to a member function xpath() on a non-object in /app/code/core/Mage/Core/Model/Layout.php on line 154 Article ID #1078 Revision: 1.3Last update: 2011-10-16 Symptoms After editing / uploading a layout (an XML file) the following error message is logged: PHP Fatal error: Call to a member function xpath() on a non-object in /app/code/core/Mage/Core/Model/Layout.php on line 154 Cause The reason of the error message is that some XML path in the changed/uploaded XML file is invalid. Solution To solve the error you need to correct the XML content you recently modified or rollback the changes in layout (app/design/frontend/*/*/layout/*.xml) files. Often, copy-pasted content (from forums/boards/blogs) contains non-ASCII characters instead of quotes/dashes, please ensure that all quotes in the pasted XML content are correct, or simply replace them. Did this article help you solve your issue? Magento • Fatal error: Call to a member function xpath() on a non-object in /app/code/core/Mage/Core/Model/Layout.php on line 154 Average rating: 3.58 (12 votes) completely useless 1 2 3 4 5 most valuable Rate this article Tags: errors Records in this category Fatal error: Method Varien_Object::__tostring() cannot take arguments. How do I solve this?Magento • "There has been an error processing your request"Magento shows blank/empty page. How do I solve this?Call to a member function toHtml() on a non-object in app/code/core/Mage/Core/Model/Layout.php on line 529Invalid method Mage_Page_Block_Template_Links::addLinkBlockMagento error: Invalid attribute name: custom_use_parent_settings[solution] Magento: Cannot retrieve entity config: core/store_groupMagento • Fatal error: Call to a member function xpath() on a non-object in /app/code/core/Mage/Core/Model/Layout.php on line 154Invalid method Mage_Wishlist_Model_Item::canConfigureCom