1. xpath not working, subscription to mailing lists weirdness

    Date: 04/09/06 (PHP Community)    Keywords: php, html, xml, web, linux, spam, apache

    Hi there.

    I'm trying to load an XHTML file as a DOMDocument, and get its text using xpath to find the node. Something's going wrong somewhere, but I can't figure out what.<br /><br /><a name="cutid1"></a><br />I've used xpath a number of times before, from xslt (Xalan and MSXML2) and C++ (libxml2, Xerces and MSXML2), so I thought I had a good idea of what I was doing. The test case I've got this down to (from reading the PHP docs for <a href="/go.php?http://uk.php.net/manual/en/print/function.dom-domxpath-evaluate.php">DOMXPath->evaluate()</a> and <a href="/go.php?http://uk.php.net/manual/en/print/function.dom-domxpath-query.php">DOMXPath->query()</a> is pretty short.<br /><br />The first file is pretty simple - it's just the data file for the second one to load.<br /><br /><b>page1.php</b><br /><pre> <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <shtml xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Title

    Body



    The second is the one that does the work.

    page2.php
    
    
    
    
    Home page.
    
    
    query($path, $context);
    
            $obj = new ReflectionObject($list);
            print("

    Search from \"" . $context->nodeName . "\" for \"" . $path . "\" (" . $obj->getName() . ")

    \n"); print("
      \n"); for ($i = 0; $i < $list->length; ++$i) { print("
    • " . $list->item($i)->nodeName . "
    • \n"); } print("
    \n"); } $dom = new DOMDocument(); $dom->load("page1.php"); print("

    Document Element node name: " . $dom->documentElement->nodeName . "

    \n"); pathsearch($dom, $dom, "/html/head/title"); pathsearch($dom, $dom, "/"); pathsearch($dom, $dom->documentElement, "/"); pathsearch($dom, $dom, "/*"); pathsearch($dom, $dom, "/html"); pathsearch($dom, $dom, "//html"); pathsearch($dom, $dom->documentElement, "."); pathsearch($dom, $dom->documentElement, "./*"); pathsearch($dom, $dom->documentElement, "./head"); pathsearch($dom, $dom->documentElement, ".//head"); pathsearch($dom, $dom->documentElement, ".//head/*"); pathsearch($dom, $dom->documentElement, ".//head/title"); pathsearch($dom, $dom->documentElement, ".//head//title"); ?>


    I get an empty nodelist for the first pathsearch(), which is the one I'm looking for.

    The second and third calls to pathsearch() check that I can actually access the root node, and get a non-empty list, as expected.

    Call 4 ("/*") finds "html", but 5 and 6 ("/html" and "//html") find nothing. An empty result for "//html" is very odd, considering "/*" finds an "html" node.

    Calls 7-13 try finding other nodes starting from the documentElement() (/html) just in case it doesn't like calling without a context. Of these, only 7 and 8 ("." and "./*") succeed with non-empty results. However the results I get are exactly what I'd expect ("html" and {"head", "body"} respectively) which leaves me even more confused as to why all the others are failing.

    Any help here would be appreciated. Even just reproducing my results would be good, so I know it's not just my setup that's b0rked.

    (I'm running php 5.1.2 with libxml 2.6.23 on apache 2.0.55 on linux 2.6.15. More system info can be provided if necessary)


    I originally tried to subscribe to the php-general mailing list to ask this question there, but haven't been able to, and have had no reply from php-list-admin@lists.php.net or postmaster@lists.php.net.


    I've sent a couple of requests, both from the website and via email, to subscribe to php-general@lists.php.net. Each time I've got the "confirm subscribe to php-general@lists.php.net" reply and replied to it. Each time, I've replied using both of the methods they suggest, but have received nothing since. No "welcome to the list" message, no list messages, no bounces, nothing. I've checked by spam folder, and it's not getting filed there.

    So, I tried emailing php-list-admin@lists.php.net which is supposedly staffed by people. I did that on March 31 and again on April 4. Nothing. No replies, no bounces, nothing.

    So, on April 7 I tried emailing postmaster@lists.php.net. Again nothing.

    Does anyone know WTF is going on over there? Why the hell don't they answer their goddamn email? I've been polite, and I've asked just for some kind of reply to let me know that someone is at least reading my messages. Even a "We're not going to help you" would be more useful that goddamn silence.

    So, does anyone else know if they are just a bunch of useless fucktards, or what?

    Source: http://community.livejournal.com/php/436121.html

  2. RedHat Acquires JBoss: Great News for Java / J2EE and Linux Community

    Date: 04/10/06 (Java Web)    Keywords: java, linux

    I am very happy for JBoss. Redhat has entered into a definitive agreement to acquire JBoss. This is sure to have long ranging implications for Java / J2EE adoption on Linux. "It is at Red Hat's very core to help unlock the power of open source and open communities to innovate across industries, geographies and economies," [...]

    Source: http://blog.taragana.com/index.php/archive/redhat-acquires-jboss-great-news-for-java-and-linux-community/

  3. How To Create HardLinks, Junctions and SymbolicLinks on Windows

    Date: 04/10/06 (Java Web)    Keywords: linux

    Hardlinks and symbolic links are common to Unix / Linux / Solaris file systems. However they are not normally available under windows. The NTFS filesystem of Windows NT4 / W2K / WXP / WXP64 supports HardLink functionality, but HardLinks can only be created via the POSIX command ln, which is shipped with the Windows resourcekit. [...]

    Source: http://blog.taragana.com/index.php/archive/how-to-create-hardlinks-junctions-and-symboliclinks-on-windows/

  4. Red Hat-JBoss something of a surprise

    Date: 04/10/06 (Open Source)    Keywords: java, linux

    For Red Hat, it's an important move away from commodity Linux and towards the Service Oriented Architecture (SOA) area, where JBoss' Java-based middleware is an important component. JBoss gets to go public without filing any paperwork.

    Source: http://blogs.zdnet.com/open-source/?p=616

  5. Leaner virtualization coming to Windows, Linux

    Date: 04/13/06 (Application Development)    Keywords: linux, microsoft

    Microsoft works to make one copy of Windows look like many, while the Linux equivalent gains ground.

    Source: http://news.zdnet.com/2100-9593_22-6060601.html

  6. Get a frog..a Fedora frog that is

    Date: 04/13/06 (Open Source)    Keywords: browser, linux

    Fedora Frog is a GUI-based install script for Linux that automates the installation of things like Macromedia Flash, Adobe's PDF, and your browser.

    Source: http://blogs.zdnet.com/open-source/?p=619

  7. :: linux question ::

    Date: 04/18/06 (Computer Geeks)    Keywords: linux

    I wanted to get some opinions from people. I'm relatively new to linux, but have been a g33k my whole life. I have suse 10 running on my laptop and i've been having NOTHING but trouble with missing libraries / dependancies. It seems that no matter what I try to run (via RPM or compile) I'm missing something, somewhere. I've spent almost 2 weeks just downloading libraries and it's making me absolutely crazy. I have aptget and was hoping it would fix a few of my problems, but still I can't get many things working (gtkpod, vlc, xine dvd libraries, network manager, kismet just to name a few off the top of my head)

    I'm open to the idea of switching distributions, will that help me at all? I was debating either fedora or ubunutu/kubuntu. Wanted to know what people with linux experience have to say about this. Any help would be apreciated!

    Source: http://community.livejournal.com/computergeeks/912371.html

  8. Waiting for desktop Linux

    Date: 04/21/06 (Open Source)    Keywords: linux

    Advertising can do for desktop Linux what radio did for the Godot play -- make people feel comfortable. And if they feel comfortable, some will buy. At that point, if those buyers are happy, the momentum will really build.

    Source: http://blogs.zdnet.com/open-source/?p=627

  9. Proof that desktop Linux market is growing

    Date: 04/24/06 (Open Source)    Keywords: linux

    FarStone Technologies will re-sell its RestoreIT disaster recovery package through Linspire under the name RestoreIT Linux Edition. The announcement was made today at the Desktop Linux Summit in San Diego.

    Source: http://blogs.zdnet.com/open-source/?p=630

  10. Microsoft piracy pop-up is persistent

    Date: 04/28/06 (Computer Geeks)    Keywords: software, linux, microsoft

    Big Vole is watching you

    MICROSOFT HAS BEEN quietly piloting its Software Genuine Advantage programme in Norway and in Sweden since November.

    This week, the scheme has been be extended to the United States, United Kingdom, Malaysia, Australia and New Zealand.

    Details of the scheme have been available for some while on this page here, where we found the text of the message you can expect to see on your screen should you be considered a pirate:

    "It appears that you could be a victim of software piracy. The copy ofWindows installed on this computer is not considered to be genuine byMicrosoft.

    The notification will continue to display until your computer is running genuine Microsoft Windows."

    Microsoft says that every time a notification is displayed, the userwill receive detailed information about the specific validationfailure. The information includes steps that can be taken to resolvethe problem.

    These don't seem to include, "try Linux instead".

    We'll be interested to hear how you get on.. ยต

    Source: http://community.livejournal.com/computergeeks/917558.html

  11. Does this exist?

    Date: 05/10/06 (HTML Help)    Keywords: html, web, linux

    I'm looking for a Web page that can translate normal text into displayed HTML code, but I'm not sure if such a site exists.

    For example, some sort of page where I could input the following block of text (noting the bold, italics, and paragraphs):

    Condoleezza Rice's abrupt dismissal of a letter from Iran's president might only strengthen hardline attitudes and mistrust of America, some Iranians warned Tuesday.

    As President Mahmoud Ahmadinejad began a high-profile visit to a key Muslim country, Indonesia, a former top Iranian official said Rice's response will give new justification to those who oppose ties with the U.S.

    Iran's former ambassador to France, Sadeq Kharrazi, said the letter -- the first from an Iranian head of state to an American president in 27 years -- "could have been a turning point in relations."

    ... and have it spit out:
    <p><b>Condoleezza Rice</b>'s abrupt dismissal of a letter from Iran's president might only strengthen hardline attitudes and mistrust of America, some Iranians warned Tuesday.</p><p>As President <b>Mahmoud Ahmadinejad</b> began a high-profile visit to a key Muslim country, Indonesia, a former top Iranian official said Rice's response will give new justification to those who oppose ties with the U.S.<p><p>Iran's former ambassador to France, <i>Sadeq Kharrazi</i>, said the letter -- the first from an Iranian head of state to an American president in 27 years -- "could have been a turning point in relations."</p>

    ... which could then be easily copied and pasted.

    All it would be required to do is simple HTML -- bold, italics, links, lists, and paragraphs -- although if it comes down to it, only paragraphs are truly necessary. Essentially, programs like Frontpage do this if you work in the WYSIWYG editor and then immediately view the code, but a Web-based system would be easier for what I'm trying to do.

    Does anyone here know of such a site? (Or, alternatively, a free program that could be run on a Linux machine to do the same thing.) Thank you for any help!

    Source: http://community.livejournal.com/htmlhelp/2296816.html

  12. Image editing

    Date: 05/22/06 (PHP Development)    Keywords: php, browser, database, linux

    Hello All.

    I want to write an application that does the following.

    1)Upload an image from browser,
    2)Resize the image to 300 x N
    3)Save the image to a database table or file system.
    4)Create a thumbnail of that image sized to 75 x N
    5) Save the thumbnail to a database table or file system.

    I have all mechanics of the database table or file structure down as well as the uploading of the file. I am not sure how to do the image editing part however. I am assuming after some research that the GD library is what I want to use. Is that correct? Or do I have to write an interface to GIMP? That wont work, because although I am developing on Linux its gonna end up on a Windows server.

    Can I install GD after PHP has been installed?

    Thanks for any advice on how to accomplish this task.

    Source: http://community.livejournal.com/php_dev/68567.html

  13. Should Linux International Become a User Group?

    Date: 05/22/06 (Open Source)    Keywords: linux

    What do Linux users need or want with a user group?

    Source: http://blogs.zdnet.com/open-source/?p=657

  14. PHP creating PDF + Excel

    Date: 05/28/06 (PHP Community)    Keywords: php, linux, google

    I was wondering if anyone had any experience creating on the fly PDF or Excel files via PHP? I'm currently working on a script that I wish to be able to do so but however I'm not familiar with PEAR and the main thing I've been able to find via Google is the PDFLib which requires Pear. Excel seems easy enough, I found this : http://www.stargeek.com/php_scripts.php?script=2 and it looks like it should work with PHP 5 on a Linux system, but if there's a better method please let me know. So mainly I'm looking for how to create PDF files dynamically on a Linux system using PHP.

    Thanks,
    Exeyel

    Source: http://community.livejournal.com/php/453749.html

  15. Who is the web user?

    Date: 05/29/06 (PHP Community)    Keywords: php, templates, web, linux

    ** sorted, thanks.


    Hi,
    I have a Linux server that I am slowly learning how to use. A friend of mine who is very good with Linux not available for lots of questions set it up for me. I am at the moment trying to install Smarty Templates. I have a question about part of the installation instructions that I have copied below.

    In our example, the document root is /web/www.domain.com/docs and the
    web server username is "nobody". We will keep our Smarty files under
    /web/www.domain.com/smarty

    Who is the web server username that nobody is referring to?


    Another question I have is about the location of the Smarty files. The installation docs suggest /usr/local/lib/php/Smarty/

    Why that directory particularly? There was no php directory in /usr/local/lib/. I set one up and copied the files as instructed. I am just curious about that choice of location.


    Thanks

    Source: http://community.livejournal.com/php/454125.html

  16. Ubuntu Linux to Support Sparc Based Sun Niagara Servers

    Date: 05/30/06 (Java Web)    Keywords: linux

    Sun Microsystems is getting support for its Sparc-based Niagara servers from Canonical, the Linux distributor of Ubuntu, the companies said on Tuesday. The free Debian-based Ubuntu distribution of Linux, launched in 2004 by South African dot-com billionaire Mark Shuttleworth, has already attracted millions of individual desktop users. But with the “Dapper Drake” release of Ubuntu set [...]

    Source: http://blog.taragana.com/index.php/archive/ubuntu-linux-to-support-sparc-based-sun-niagara-servers/

  17. Decent PC spec suggestions?

    Date: 06/01/06 (Computer Geeks)    Keywords: linux

    I am planning on building a pc in the near future and i had a few bar bones specs that i would want, and i just wanted to know you anybody had anything to add to them:

    Intel Pentuim 4 w/HT 3GHz
    nVidia GeForce 256MB Video Card
    1GB RAM
    160GB HD
    Windows XP Media Center w/ dual-boot SuSE Linux

    Most part will be coming from my pal that works at Intel, becasue whenever the drop a palette, they give everything on it away for free. This means that i should be spending about $100-$200 on this computer. I mainly want something that will churn through The Sims 2 and be able to play DVDs, and Churn through internet tasks like buttuh.

    Source: http://community.livejournal.com/computergeeks/929477.html

  18. Grossly misconfigured, or just misunderstood?

    Date: 06/03/06 (Web Development)    Keywords: asp, web, linux, apache

    I've been doing some contract work for my former employer, who has been having some major difficulties. Their webhost migrated them with little warning and no support from a shared account on a Linux Apache server to a shared account on an Windows IIS server running Plesk. They rely heavily on Perl/CGI scripts, and the migration naturally broke all of them, despite assurances that it would not.

    So my job has been to get their scripts running again. However, this hit a major snag when I realized that their new server provides no server error logs. I've never worked with IIS before, but this seemed very wrong to me. Without the error logs, how are they supposed to debug their scripts? Numerous calls to the webhost's lackadaisical tech support were met with only incompetence (people who didn't know what server error logs were) and weak denials ("I don't think we can let you see those").

    So I told my client that these people were incompetent, that their server was grossly misconfigured (a lot of other things that ought to have worked didn't work), and that the way they were being treated by the host was totally inappropriate for the price they were paying (as I understand it, an expensive corporate rate). I get 24-hour tech support with almost zero delay from my $10-a-month shared host, yet it takes these people several days to return a call about even the simplest of questions, usually with inadequate, unhelpful responses. It seems to me that these people migrated to IIS without having any clue what they were doing, and wheedled their ill-informed clients into following, despite their not having any need for IIS, ASP, or anything else related.

    I managed to fix most of the scripts through blind trial and error, ugly hacks, and brute force. But I don't think they should be having to deal with this. However, I'm well aware that I don't know anything about IIS, and before I push the matter further, I wanted to make sure it wasn't my own incompetence that was getting in the way. Is there any reason why an IIS server shouldn't provide server error logs to shared clients? Is there some other way to debug scripts that I'm missing? Am I correct in assessing that this webhost is a sinking ship of fools, and in advising them to jump overboard before they go down with it?

    Source: http://community.livejournal.com/webdev/326423.html

  19. PHP Book

    Date: 06/07/06 (PHP Community)    Keywords: php, programming, mysql, sql, linux, apache

    Hello Friends

    I am a programmer in a Linux/Apache/MySQL/PHP shop. I also do some Windows programming in Delphi and have done lots of other stuff academically.

    I'm looking for a book on PHP that will help me with "bigger picture" and "higher level" design considerations. I'm looking for a book that contains complete solutions and ideas for solving medium to large problems. Object-oriented designs are a big plus.

    I'm also looking for a great reference manual.

    I've been poking around looking at reviews, but I would like to have the opinions of some serious PHP programmers first.

    Thank you!

    Source: http://community.livejournal.com/php/458470.html

  20. Blocking internet services

    Date: 06/07/06 (Computer Geeks)    Keywords: linux

    I need some help. In short, I need to know how to stop selected internet services (HTTP, AIM, BT), but still allow traffic to and from it's connected server.

    About a year ago I set up a Linux box at my moms office. They needed basically a print server. They had issues on Windows with people using the net for things they shouldn't be doing at work. So I basically said "I'll show them..." and it worked. Now, they need to use the machine to use a program to manage their work orders. I'm going to install Windows 98 or XP depending on the responses written.

    Ideally I'm looking for a packet shaping program that I can set up as an administrator to block the services mentioned above so while they're logged in, they can't use them. I know this can be done with some hardware and the DD-WRT firmware and the like, but I'm looking for a cheap solution. Its a small housing authority. Thanks

    Source: http://community.livejournal.com/computergeeks/932501.html

Previous page  ||  Next page


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home