php-general Digest 6 Mar 2010 16:57:20 -0000 Issue 6624

2010-03-06 Thread php-general-digest-help

php-general Digest 6 Mar 2010 16:57:20 - Issue 6624

Topics (messages 302578 through 302579):

Re: PEAR clases don't work with PHP 5.3
302578 by: Lester Caine

XML functions
302579 by: Ahmad F AlTwaijiry

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---

Michael A. Peters wrote:

Martín Marqués wrote:

A few days ago I upgraded my development server with PHP 5.3, and
found that some pear packages stopped working giving FATAL ERRORs,
like this (this one is from package Image_Graph):

PHP Fatal error: Call to undefined method
Image_Graph_Plotarea_Element::Image_Graph_Element() in
/usr/share/php/Image/Graph/Layout.php on line 73

I found that the problem is when calling the parents constructors like
parent::ClassName.

Changing that fixes the problem, but there are alot of clases with
this problem.

Are these problems being addressed?



I found similar problems with some of the pear stuff I use when I tried
5.3.0 awhile back. For the present, I am just sticking with 5.2.x branch
and will give some time for the various pear maintainers to work out the
kinks.

One thing you can do is file bug reports with the pear components you
use. I did not because I moved my test server back to 5.2.x thus I would
have no way of testing whether the fixes actually worked, but if you
have a box you can dedicate to 5.3.x testing, file the bug reports and
it will bring the problem to the attention of the pear maintainers.

Some pear packages are better maintained than others.


It is not just PEAR that needs a lot of work to make it compatible with PHP5.3 !
pecl needs some TLC as well, along with a large number of projects providing 
third party add-ons, or using PHP.


We need to keep 5.2.x supported as a switch to PHP5.3 IS NOT a simple option, 
and will take a lot longer before it is a practical one for many users.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php
---End Message---
---BeginMessage---

Dears

When i checked the php manual i found many Solutions to read/write xml  
files and im confused now :)


Which function/library is better and is there any new article that  
compare each function/library?


Thanks

Ahmad AlTwaijiry
http://www.AlTwaijiry.com
---End Message---


php-general Digest 7 Mar 2010 05:03:44 -0000 Issue 6625

2010-03-06 Thread php-general-digest-help

php-general Digest 7 Mar 2010 05:03:44 - Issue 6625

Topics (messages 302580 through 302589):

Re: XML functions
302580 by: Andre Polykanine
302581 by: Ashley Sheridan
302582 by: Michael A. Peters
302583 by: Michael A. Peters

int $number = decode_dtmf(string wavefile)
302584 by: Thilo Klein

int $number = decode_dtmf(string $wavefile)
302585 by: Thilo Klein

Parse a string containing name and email
302586 by: Don
302587 by: Manuel Lemos

Mail Function In PHP
302588 by: Kannan
302589 by: Devendra Jadhav

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---
Hello Ahmad and all,

  I will expand a little bit your question joining to it: what is
  the better technique to make an RSS feed on the website? The
  website is manually written, no CMS.
-- 
With best regards from Ukraine,
Andre
Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @ 
jabber.org
Yahoo! messenger: andre.polykanine; ICQ: 191749952
Twitter: m_elensule

- Original message -
From: Ahmad F AlTwaijiry ah...@altwaijiry.com
To: php-gene...@lists.php.net php-gene...@lists.php.net
Date: Saturday, March 6, 2010, 7:00:04 PM
Subject: [PHP] XML functions

Dears

When i checked the php manual i found many Solutions to read/write xml  
files and im confused now :)

Which function/library is better and is there any new article that  
compare each function/library?

Thanks

Ahmad AlTwaijiry
http://www.AlTwaijiry.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

---End Message---
---BeginMessage---
On Sat, 2010-03-06 at 21:50 +0200, Andre Polykanine wrote:

 Hello Ahmad and all,
 
   I will expand a little bit your question joining to it: what is
   the better technique to make an RSS feed on the website? The
   website is manually written, no CMS.
 -- 
 With best regards from Ukraine,
 Andre
 Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @ 
 jabber.org
 Yahoo! messenger: andre.polykanine; ICQ: 191749952
 Twitter: m_elensule
 
 - Original message -
 From: Ahmad F AlTwaijiry ah...@altwaijiry.com
 To: php-gene...@lists.php.net php-gene...@lists.php.net
 Date: Saturday, March 6, 2010, 7:00:04 PM
 Subject: [PHP] XML functions
 
 Dears
 
 When i checked the php manual i found many Solutions to read/write xml  
 files and im confused now :)
 
 Which function/library is better and is there any new article that  
 compare each function/library?
 
 Thanks
 
 Ahmad AlTwaijiry
 http://www.AlTwaijiry.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


That's a very different question, and ought to be in a new thread.
Please don't hijack threads like this.

Thanks,
Ash
http://www.ashleysheridan.co.uk


---End Message---
---BeginMessage---

Ahmad F AlTwaijiry wrote:

Dears

When i checked the php manual i found many Solutions to read/write xml 
files and im confused now :)


Which function/library is better and is there any new article that 
compare each function/library?


I use DOMDocument.
It works best if the input file you are reading is UTF-8.

It has some issues I haven't yet figured out related to namespaces, 
sometimes when loading perfectly valid XML that uses namespaces for 
import into another document, I lose the namespace and get default 
prepended to the node name. I do not understand why it feels it needs to 
do this, but it apparently does in some cases.


For those cases, I currently use hackish workarounds where I remove the 
namespace with a preg_replace before import into the DOM and then add 
the namespace again using the DOM tools after it has been imported.


Where I have run into this problem is MathML and SVG within XHTML when I 
cache the MathML/SVG as a string in APC for import into documents.


It is not so much an issue with SVG in XHTML as SVG probably is best 
done as an object rather than directly embedded (but when generating SVG 
via DOMDocument I have a similar problem if I am using xlink namespace) 
but it is a problem with MathML which is usually done inline.


It could just be that I'm doing things wrong, but the documentation 
isn't exactly full of working example code.


So anyway, if you use namespaces, you may run into a few frustrating 
kinks, but DOMDocument is what I use, and it is very convenient because 
it is very similar to the JavaScript DOM2 methods (I believe intentionally).
---End Message---
---BeginMessage---

Andre Polykanine wrote:

Hello Ahmad and all,

  I will expand a little bit your question joining to it: what is

[PHP] XML functions

2010-03-06 Thread Ahmad F AlTwaijiry

Dears

When i checked the php manual i found many Solutions to read/write xml  
files and im confused now :)


Which function/library is better and is there any new article that  
compare each function/library?


Thanks

Ahmad AlTwaijiry
http://www.AlTwaijiry.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] XML functions

2010-03-06 Thread Andre Polykanine
Hello Ahmad and all,

  I will expand a little bit your question joining to it: what is
  the better technique to make an RSS feed on the website? The
  website is manually written, no CMS.
-- 
With best regards from Ukraine,
Andre
Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @ 
jabber.org
Yahoo! messenger: andre.polykanine; ICQ: 191749952
Twitter: m_elensule

- Original message -
From: Ahmad F AlTwaijiry ah...@altwaijiry.com
To: php-general@lists.php.net php-general@lists.php.net
Date: Saturday, March 6, 2010, 7:00:04 PM
Subject: [PHP] XML functions

Dears

When i checked the php manual i found many Solutions to read/write xml  
files and im confused now :)

Which function/library is better and is there any new article that  
compare each function/library?

Thanks

Ahmad AlTwaijiry
http://www.AlTwaijiry.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] XML functions

2010-03-06 Thread Ashley Sheridan
On Sat, 2010-03-06 at 21:50 +0200, Andre Polykanine wrote:

 Hello Ahmad and all,
 
   I will expand a little bit your question joining to it: what is
   the better technique to make an RSS feed on the website? The
   website is manually written, no CMS.
 -- 
 With best regards from Ukraine,
 Andre
 Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @ 
 jabber.org
 Yahoo! messenger: andre.polykanine; ICQ: 191749952
 Twitter: m_elensule
 
 - Original message -
 From: Ahmad F AlTwaijiry ah...@altwaijiry.com
 To: php-general@lists.php.net php-general@lists.php.net
 Date: Saturday, March 6, 2010, 7:00:04 PM
 Subject: [PHP] XML functions
 
 Dears
 
 When i checked the php manual i found many Solutions to read/write xml  
 files and im confused now :)
 
 Which function/library is better and is there any new article that  
 compare each function/library?
 
 Thanks
 
 Ahmad AlTwaijiry
 http://www.AlTwaijiry.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


That's a very different question, and ought to be in a new thread.
Please don't hijack threads like this.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] XML functions

2010-03-06 Thread Michael A. Peters

Ahmad F AlTwaijiry wrote:

Dears

When i checked the php manual i found many Solutions to read/write xml 
files and im confused now :)


Which function/library is better and is there any new article that 
compare each function/library?


I use DOMDocument.
It works best if the input file you are reading is UTF-8.

It has some issues I haven't yet figured out related to namespaces, 
sometimes when loading perfectly valid XML that uses namespaces for 
import into another document, I lose the namespace and get default 
prepended to the node name. I do not understand why it feels it needs to 
do this, but it apparently does in some cases.


For those cases, I currently use hackish workarounds where I remove the 
namespace with a preg_replace before import into the DOM and then add 
the namespace again using the DOM tools after it has been imported.


Where I have run into this problem is MathML and SVG within XHTML when I 
cache the MathML/SVG as a string in APC for import into documents.


It is not so much an issue with SVG in XHTML as SVG probably is best 
done as an object rather than directly embedded (but when generating SVG 
via DOMDocument I have a similar problem if I am using xlink namespace) 
but it is a problem with MathML which is usually done inline.


It could just be that I'm doing things wrong, but the documentation 
isn't exactly full of working example code.


So anyway, if you use namespaces, you may run into a few frustrating 
kinks, but DOMDocument is what I use, and it is very convenient because 
it is very similar to the JavaScript DOM2 methods (I believe intentionally).


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] XML functions

2010-03-06 Thread Michael A. Peters

Andre Polykanine wrote:

Hello Ahmad and all,

  I will expand a little bit your question joining to it: what is
  the better technique to make an RSS feed on the website? The
  website is manually written, no CMS.


I wrote a class to do it -

http://www.phpclasses.org/browse/package/5942.html

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] int $number = decode_dtmf(string wavefile)

2010-03-06 Thread Thilo Klein

Hello,

I want to read a wav-file CCITT u-Law 64 kbit/s, 8Bit, Mono, 8 kHz into 
PHP which contains a DTMF-Code and I want PHP to output the numbers, so 
I am looking for a function like


int $number = decode_dtmf(string wavefile);

Is such a function available or is someone kind enough to code it under 
the GPL?


Regards

Thilo Klein

PS: PHP5 is running on an apache webserver over here

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] int $number = decode_dtmf(string $wavefile)

2010-03-06 Thread Thilo Klein

Hello,

I want to read a wav-file CCITT u-Law 64 kbit/s, 8Bit, Mono, 8 kHz into
PHP which contains a DTMF-Code and I want PHP to output the numbers, so
I am looking for a function like

int $number = decode_dtmf(string $wavefile);

Is such a function available or is someone kind enough to code it under
the GPL?

Regards

Thilo Klein

PS: PHP5 is running on an apache webserver over here


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Parse a string containing name and email

2010-03-06 Thread Don
Hi,

I am pulling email values out of a database and the format is as follows:

John Smithjohn.sm...@somedomain.com

I need to parse the string into two variables as such

$name = John Smith
$email = john.sm...@somedomain.com

What would be the easiest way to do this?

Thanks. 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Parse a string containing name and email

2010-03-06 Thread Manuel Lemos
Hello,

on 03/06/2010 11:34 PM Don said the following:
 Hi,
 
 I am pulling email values out of a database and the format is as follows:
 
 John Smithjohn.sm...@somedomain.com
 
 I need to parse the string into two variables as such
 
 $name = John Smith
 $email = john.sm...@somedomain.com
 
 What would be the easiest way to do this?

You may want to take a look at the MIME parser package. It comes with a
separate class name RFC 822 addresses that can be used exactly to parse
e-mail addresses in any valid format that may appear in message headers:

http://www.phpclasses.org/mimeparser

-- 

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Mail Function In PHP

2010-03-06 Thread Kannan
Hello
   I am creating a application for our college using the
php.In that i want to send mail to all who are all the list.

For that i am just simply use the mail function in php without
configuring any mail system in the system.But the mail didn't send.
For sending the mails wat are requirements and if u have any tutorials
send it to me?

Thanks..










-- 
With regards,

Kannan. R. P,
Blog @: http://kannan4k.wordpress.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Mail Function In PHP

2010-03-06 Thread Devendra Jadhav
You need SMTP Server for this..
Read bellow link to know more how to configure SMTP Server in PHP

http://email.about.com/od/emailprogrammingtips/qt/Configure_PHP_to_Use_a_Remote_SMTP_Server_for_Sending_Mail.htm
http://email.about.com/od/emailprogrammingtips/qt/Configure_PHP_to_Use_a_Remote_SMTP_Server_for_Sending_Mail.htm

On Sun, Mar 7, 2010 at 10:24 AM, Kannan kanna...@gmail.com wrote:

 Hello
   I am creating a application for our college using the
 php.In that i want to send mail to all who are all the list.

 For that i am just simply use the mail function in php without
 configuring any mail system in the system.But the mail didn't send.
 For sending the mails wat are requirements and if u have any tutorials
 send it to me?

 Thanks..










 --
 With regards,

 Kannan. R. P,
 Blog @: http://kannan4k.wordpress.com/

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Devendra Jadhav
देवेंद्र जाधव


Re: [PHP] Mail Function In PHP

2010-03-06 Thread Kevin Kinsey

Kannan wrote:

Hello
   I am creating a application for our college using the
php.In that i want to send mail to all who are all the list.

For that i am just simply use the mail function in php without
configuring any mail system in the system.But the mail didn't send.
For sending the mails wat are requirements and if u have any tutorials
send it to me?

Thanks..


Hello,

Read the manual page for the mail() function ...

http://www.php.net/mail

Mail() requires an operating SMTP server.  This can be set
in php.ini, and possibly via the ini_set() function.  These
might be worth looking into:

$config1=ini_set(sendmail_path,/usr/sbin/sendmail -t -i);
$config2=ini_set(SMTP,localhost);
$config3=ini_set(smtp_port,25);

If you absolutely can't run an SMTP server or use a
remote server, you'd probably have to hack something
together with sockets or streams.

My $0.02,

Kevin Kinsey

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Parse a string containing name and email

2010-03-06 Thread Kevin Kinsey

Don wrote:

Hi,

I am pulling email values out of a database and the format is as follows:

John Smithjohn.sm...@somedomain.com

I need to parse the string into two variables as such

$name = John Smith
$email = john.sm...@somedomain.com

What would be the easiest way to do this?

Thanks. 


[36] Sun 07.Mar.2010 0:27:35
[kad...@archangel][~/scripts] cat split
?php
$data=John Smithj...@foo.com;
list($name,$email)=explode(,str_replace(,,$data));
echo $name's email address is $email;
?

[37] Sun 07.Mar.2010 0:27:40
[kad...@archangel][~/scripts] php split
John Smith's email address is j...@foo.com

Throw in a foreach() and some data writes or w/e, and you're done.

Kevin Kinsey

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php