Re: [PHP] php get rss tag using DOM

2009-07-03 Thread Michael A. Peters
Michael A. Peters wrote: Rodgerr wrote: Morris-25 wrote: Hi, I am trying to write a programme to read a rss xml file. ... ... scan anyone tell me how to get the url attribute? I wrote some codes similar: $doc = new DOMDocument; $doc->load($myFlickrRss); $r = $doc->getElementsByT

Re: [PHP] php get rss tag using DOM

2009-07-03 Thread Michael A. Peters
Rodgerr wrote: Morris-25 wrote: Hi, I am trying to write a programme to read a rss xml file. ... ... scan anyone tell me how to get the url attribute? I wrote some codes similar: $doc = new DOMDocument; $doc->load($myFlickrRss); $r = $doc->getElementsByTagName('media:content');

Re: [PHP] is there a way to get more info about *why* the initial (DB PEAR) connect to db is failing?

2009-07-03 Thread Phpster
On Jul 3, 2009, at 7:31 PM, Govinda wrote: my code: require 'DB.php'; // $db=DB::connect('db_program://user:passw...@hostname/database'); if (DB::isError($db)) { die("Can't connect: " . $db->getMessage ()); } is returning: "Can't connect: DB Error: connect failed" Any advi

Re: [PHP] php get rss tag using DOM

2009-07-03 Thread Rodgerr
Morris-25 wrote: > > Hi, > > I am trying to write a programme to read a rss xml file. > > ... > > ... > > scan anyone tell me how to get the url attribute? I wrote some codes > similar: > > > $doc = new DOMDocument; > $doc->load($myFlickrRss); > > $r = $doc->getElementsByTagName('

[PHP] Browser Alert

2009-07-03 Thread tedd
Hi gang: I just wasted a day trying to figure out why a standard html form using enctype='multipart/form-data" wasn't uploading images as it should in Safari. Sometimes it would work and sometimes it wouldn't. Sometimes I would get the spinning "loading X" of death in the address-bar and s

Re: [PHP] Writing to a file

2009-07-03 Thread Jason Carson
> On Fri, Jul 3, 2009 at 06:01, Jason Carson wrote: >> Hello everybody, >> >> How would I go about writing stuff to a file but in between the >> tags? > > The current industry standard is a combination of text editor and > keyboard, but there are many options. > > More specifically, are yo

[PHP] is there a way to get more info about *why* the initial (DB PEAR) connect to db is failing?

2009-07-03 Thread Govinda
my code: require 'DB.php'; // $db=DB::connect('db_program://user:passw...@hostname/database'); $db=DB::connect('mysql://metheuser:myp...@www.mydomain.com/ mydatabase'); if (DB::isError($db)) { die("Can't connect: " . $db->getMessage()); } is returning: "Can't connect:

[PHP] Re: Writing to a file

2009-07-03 Thread Shawn McKenzie
Jason Carson wrote: > Hello everybody, > > How would I go about writing stuff to a file but in between the > tags? > > Example, say I have config.php as follows... > > > $hostname = "localhost"; > $database = "database"; > $username = "username"; > $password = "password"; > > ?> > > How wou

Re: [PHP] cannot figure out permissions for fopen/fwrite

2009-07-03 Thread Shawn McKenzie
Mari Masuda wrote: > Yes, currently the tmp folder (or any folders in my Apache htdocs > folder) is not accessible to the web due to the Mac's built-in firewall > set to block all incoming traffic except network time and something > installed by Adobe when I installed CS4 (e.g., Photoshop, InDesign

Re: [PHP] php-general mail server on blackhole list

2009-07-03 Thread Daniel Brown
On Fri, Jul 3, 2009 at 10:52, The Doctor wrote: >  13 RCVD_IN_JMF_BL         RBL: Sender listed in JMF-BLACK >                        [216.92.131.4 listed in hostkarma.junkemailfilter.com] > > truns up in my spamc test. > > Please fix! I've processed the removal from their erroneous blacklist,

[PHP] php-general mail server on blackhole list

2009-07-03 Thread The Doctor
13 RCVD_IN_JMF_BL RBL: Sender listed in JMF-BLACK [216.92.131.4 listed in hostkarma.junkemailfilter.com] truns up in my spamc test. Please fix! -- Member - Liberal International This is doc...@nl2k.ab.ca Ici doc...@nl2k.ab.ca God, Queen and country! Beware An

Re: [PHP] apc breaks pear::mdb2

2009-07-03 Thread Michael A. Peters
Daniel Brown wrote: On Fri, Jul 3, 2009 at 07:00, Michael A. Peters wrote: Fatal error: Class 'PEAR' not found in /usr/share/pear/MDB2/Driver/mysql.php on line 876 Have you installed PEAR's PEAR module? I know it sounds a bit redundant, but see if that works for you. From the command li

Re: [PHP] apc breaks pear::mdb2

2009-07-03 Thread Daniel Brown
On Fri, Jul 3, 2009 at 07:00, Michael A. Peters wrote: >> >> Fatal error:  Class 'PEAR' not found in >> /usr/share/pear/MDB2/Driver/mysql.php on line 876 Have you installed PEAR's PEAR module? I know it sounds a bit redundant, but see if that works for you. From the command line: pe

Re: [PHP] Writing to a file

2009-07-03 Thread Daniel Brown
2009/7/3 Sándor Tamás (HostWare Kft.) : > The classic method is: > 1.) read the whole file into an array of strings. > 2.) search for the last line > 3.) insert a string BEFORE the last line. > 4.) write back the whole file to the same name > > Classic file handling does allow you to append to the

Re: [PHP] Writing to a file

2009-07-03 Thread Daniel Brown
On Fri, Jul 3, 2009 at 06:01, Jason Carson wrote: > Hello everybody, > > How would I go about writing stuff to a file but in between the > tags? The current industry standard is a combination of text editor and keyboard, but there are many options. More specifically, are you trying to wr

Re: [PHP] Sessions

2009-07-03 Thread Richard Heyes
Hi, > .. This is precisely what I do, albeit my file is called config.php, and not init.php. Not that it makes a jot of difference. This file is used to setup the environment, so that way everything I commonly need is available simply by including one file. One thing to note though is that a data

Re: [PHP] Writing to a file

2009-07-03 Thread Paul Scott
Jason Carson wrote: > How would I go about writing stuff to a file but in between the > tags? > http://www.php.net/file_put_contents -- Paul http://www.paulscott.za.net/ http://twitter.com/paulscott56 http://avoir.uwc.ac.za -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vi

Re: [PHP] apc breaks pear::mdb2

2009-07-03 Thread Michael A. Peters
Michael A. Peters wrote: php 5.2.10 apc 3.0.19 With apc enabled, pear package mdb2 breaks with following error: Fatal error: Class 'PEAR' not found in /usr/share/pear/MDB2/Driver/mysql.php on line 876 disabling apc and site works just dandy again. ; Enable apc extension module extension =

Re: [PHP] Writing to a file

2009-07-03 Thread Michael A. Peters
Jason Carson wrote: Hello everybody, How would I go about writing stuff to a file but in between the tags? Example, say I have config.php as follows... How would I go about adding stuff at the end of the file, but before the ?> tag? IMHO that's kind of dangerous. Better to have an xml f

[PHP] apc breaks pear::mdb2

2009-07-03 Thread Michael A. Peters
php 5.2.10 apc 3.0.19 With apc enabled, pear package mdb2 breaks with following error: Fatal error: Class 'PEAR' not found in /usr/share/pear/MDB2/Driver/mysql.php on line 876 disabling apc and site works just dandy again. ; Enable apc extension module extension = apc.so ; Options for the a

Re: [PHP] Writing to a file

2009-07-03 Thread HostWare Kft.
The classic method is: 1.) read the whole file into an array of strings. 2.) search for the last line 3.) insert a string BEFORE the last line. 4.) write back the whole file to the same name Classic file handling does allow you to append to the end of a file, or recreate as a whole. Usually thes

Re: [PHP] Writing to a file

2009-07-03 Thread Stuart
2009/7/3 Jason Carson : > Hello everybody, > > How would I go about writing stuff to a file but in between the > tags? > > Example, say I have config.php as follows... > > > $hostname = "localhost"; > $database = "database"; > $username = "username"; > $password = "password"; > > ?> > > How would

[PHP] Writing to a file

2009-07-03 Thread Jason Carson
Hello everybody, How would I go about writing stuff to a file but in between the tags? Example, say I have config.php as follows... How would I go about adding stuff at the end of the file, but before the ?> tag? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] Sessions

2009-07-03 Thread Stuart
2009/7/3 Ashley Sheridan : > On Friday 03 July 2009 09:41:40 Tom Chubb wrote: >> 2009/7/3 Luke >> >> > 2009/7/3 Daniel Brown >> > >> > > On Thu, Jul 2, 2009 at 23:27, Jason Carson wrote: >> > > > Hello all, >> > > > >> > > > Do I have to add session_start() at the beginning of every page so >> >

Re: [PHP] Sessions

2009-07-03 Thread Tom Chubb
2009/7/3 Ashley Sheridan > On Friday 03 July 2009 09:41:40 Tom Chubb wrote: > > 2009/7/3 Luke > > > > > 2009/7/3 Daniel Brown > > > > > > > On Thu, Jul 2, 2009 at 23:27, Jason Carson > wrote: > > > > > Hello all, > > > > > > > > > > Do I have to add session_start() at the beginning of every pag

Re: [PHP] Sessions

2009-07-03 Thread Ashley Sheridan
On Friday 03 July 2009 09:41:40 Tom Chubb wrote: > 2009/7/3 Luke > > > 2009/7/3 Daniel Brown > > > > > On Thu, Jul 2, 2009 at 23:27, Jason Carson wrote: > > > > Hello all, > > > > > > > > Do I have to add session_start() at the beginning of every page so > > > > that the $_SESSION variables work

Re: [PHP] Sessions

2009-07-03 Thread Tom Chubb
2009/7/3 Luke > 2009/7/3 Daniel Brown > > > On Thu, Jul 2, 2009 at 23:27, Jason Carson wrote: > > > Hello all, > > > > > > Do I have to add session_start() at the beginning of every page so that > > > the $_SESSION variables work on all pages or do I use session_start() > on > > > the first page

Re: [PHP] Timezone details

2009-07-03 Thread Michael A. Peters
Manoj Singh wrote: Hi All, Is there any function in PHP which will provide me the details of any timezone such as current time, DST, offset etc. Thanks in advance, Manoj It's called date http://php.net/manual/en/function.date.php The manual page on the function tells you how to get all tha

Re: [PHP] Sessions

2009-07-03 Thread Luke
2009/7/3 Daniel Brown > On Thu, Jul 2, 2009 at 23:27, Jason Carson wrote: > > Hello all, > > > > Do I have to add session_start() at the beginning of every page so that > > the $_SESSION variables work on all pages or do I use session_start() on > > the first page and something else on other page

[PHP] Timezone details

2009-07-03 Thread Manoj Singh
Hi All, Is there any function in PHP which will provide me the details of any timezone such as current time, DST, offset etc. Thanks in advance, Manoj