SitePoint Sponsor

User Tag List

Page 4 of 4 FirstFirst 1234
Results 76 to 100 of 100
  1. #76
    ameeck@gmail.com
    SitePoint Community Guest
    Great Work, But i have an problem, when i create an article, the system like passes the addarticle nad i get returned to the admin by the header, but the article isnt there...

  2. #77
    SitePoint Member
    Join Date
    Sep 2005
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have a questions, the script like skips adding the article, and only hops me to the admin index after creating the article...i dont now, whats after it, a its pretty important for me..

  3. #78
    xcelcius
    SitePoint Community Guest
    I get: Fatal error: Call to undefined function: domxml_new_doc() in the createArticle form. Any idea why?

  4. #79
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,037
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    It's because your particular install of PHP doesn't support that function.

    If you check your php.ini you will see all of the extensions supported and I'll bet DOMXML isn't.

    More about it here: http://ca.php.net/manual/en/ref.domxml.php
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development

  5. #80
    pomppa
    SitePoint Community Guest
    I get an error at index.php :

    Warning: domxml_open_file(): Start tag expected, '<' not found in ..../index.php on line 42

    Fatal error: Call to a member function on a non-object in ..../index.php on line 46

    Why?

  6. #81
    yug
    SitePoint Community Guest
    i get the same thing as pomppa.

  7. #82
    a-v0id
    SitePoint Community Guest
    You'll need to remove the *.LCK files in the "xml/" directory for functionality.

    Very well written, comprehensive and simple enough to build on, even if your code isnt' used. Thank you.

  8. #83
    SitePoint Member
    Join Date
    May 2006
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The other day I came across this ancient tutorial searching for just the concept it describes and teaches, only to find, to my chagrin, that it's so old that it uses dom_xml rather than DOM, thus making a significant rewrite necessary to utilize it with PHP 5.

    I, and definitely many other (newbies) around here, would be greatly appreciative of an updating of this tutorial and its examples to PHP 5 nativity.

  9. #84
    a-v0id
    SitePoint Community Guest
    j doe:
    If you came searching for "just the concept" (like I did), this article should have answered every question you were looking for.

    I certainly feel that this article is as relevant and fresh as it was the day it was written. PHP 4 is still in great usage.

    Why don't you re-write the article for PHP 5 if you're man enough ;)

    (Shouldn't be hard really, kudos if you do!)

  10. #85
    SitePoint Member
    Join Date
    Aug 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help

    I get this error :

    Fatal error: Call to undefined function: domxml_open_file() in .../xmltest/index.php on line 42

    plz help. I have deleted all the .LCK files from XML directory.

  11. #86
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,037
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mhashmi.com
    I get this error :

    Fatal error: Call to undefined function: domxml_open_file() in .../xmltest/index.php on line 42

    plz help. I have deleted all the .LCK files from XML directory.
    It's because the version of PHP you are running does not support DOMXML. Not many versions did or do.
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development

  12. #87
    SitePoint Member
    Join Date
    Aug 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    domxml

    what is meant by DOMXML, is it a kind?

  13. #88
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,037
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    DOMXML is an extension of PHP4. Depending on your system it can be added via .dll's and changing the php.ini in Windows or recompiling PHP and editing the php.ini on unix/linux systems.

    It's great if it's installed but not many distributions have it. For a long time it was considered experimental and now although it is a mature extension it will not continue into later versions of PHP; ie: PHP5.

    There's more info here: http://ca3.php.net/manual/en/ref.domxml.php
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development

  14. #89
    deric
    SitePoint Community Guest
    I'm just wondering if there is a way to display the results in ascending order.

    I've utilized this code for a 'blog' type feature on a website. the articles need to be named after the date (i.e. august 26th, 2006 is "112606",etc). the code prints them in descending order... the problem is that the newest article will be the last.

    any help?

  15. #90
    Jason Hammons
    SitePoint Community Guest
    I can't seem to get this code to work. on index.php i'm getting the following errors:

    Warning: domxml_open_file() [function.domxml-open-file]: Start tag expected, '<' not found in /home/hammo/public_html/xmlcms/xmltest/index.php on line 42

    Fatal error: Call to a member function on a non-object in /home/hammo/public_html/xmlcms/xmltest/index.php on line 46

  16. #91
    Anonymous
    SitePoint Community Guest
    Great article

  17. #92
    tim
    SitePoint Community Guest
    it loads fine but when i create an xml it doesnt save to the xml folder?

  18. #93
    ivan ivanov
    SitePoint Community Guest
    That is just a nice tutorial and I found little things to fix mostly due to windows I am running.I hope this will answer the question about creating xml files not where it is expected to. I am running EasyPHP1-8 and it saves the files in apache dir. Just change the path to where you want it created and it will be fine(at addArticle.php I had to do $filename = "../www/test4/xml/".$id . ".xml"; while in updateArticle.php I did this c://program files/easyphp1-8/www/test4/xml/). But here is a fix for the search part:
    put
    $searchTerm = $search;
    before
    if (eregi($searchTerm, $keywords) or eregi($searchTerm,$headline)){
    line to get it working.

    Once again Thanks !

  19. #94
    We're from teh basements.
    Join Date
    Apr 2007
    Posts
    1,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Without even reading the article, I'll tell you it ain't gonna happen here. I wrote an online store/shopping cart using XML once. Maintaining and updating the code using all those DOM methods and XPath expressions was the most tedious thing I've ever done - even more so than using serialized PHP objects. If you want to use files instead of a database server, SQLite is the way to go.

  20. #95
    SitePoint Member
    Join Date
    Sep 2008
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Thanks for the article

    All the thing are correct but I'm having one problem

    when i load addArticle.php page it gives these two errors

    [ Warning: domnode::append_child() expects parameter 1 to be object, null given in C:\xampp\htdocs\cms\addArticle.php on line 6

    Fatal error: Call to a member function set_attribute() on a non-object in C:\xampp\htdocs\cms\addArticle.php on line 23 ]

    so what is the problem , I'm using xampp for testing php in windows environment , can you tell me what is the problem.


  21. #96
    Rowan Wernham
    SitePoint Community Guest
    Hi, I have built this system up quite a lot into a simple customized CMS for a gallery.

    Its been working well but I have one question. When it builds the index file by opening all the files in the directory is there any way to govern in which order it opens the files?

    There is no logic to it at present as far as I can tell.. they dont open alphabetically, by date created, etc..

    This means that on my index page which links through to artist pages the artists are not in a controllable order..

    Alphabetical is what I would prefer in this case..

  22. #97
    atul
    SitePoint Community Guest
    It followed your tutorial even added the source code and tried but it doesn't work when we click on xyz.xml to edit it.

    can you explain it please

  23. #98
    Atul
    SitePoint Community Guest
    Sorry i forgot to mention the error, This is the error message while trying to edit the file :

    Fatal error: Call to undefined function domxml_open_file() in /home/avi1984/public_html/xmltest/editArticle.php on line 32

  24. #99
    SitePoint Wizard bronze trophy
    Join Date
    Oct 2001
    Location
    Vancouver BC Canada
    Posts
    2,037
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Atul,
    That means that domxml_open_file() isn't supported in your build of PHP. If you're hosted on a shared server it's likely you won't be able to fix that but if you have control of the server, you can customize your build of PHP to include the XML and XSLT extensions required.
    Andrew Wasson | www.lunadesign.org
    Principal / Internet Development

  25. #100
    Brendan
    SitePoint Community Guest
    So, I must be missing something, but how are you calling variables from other pages? I see that you define a variable on a page with a form, than you call it on that form's processing page. Could you please explain the mechanics?
    thanks!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •