php-general Digest 1 Oct 2010 09:51:34 -0000 Issue 6968

2010-10-01 Thread php-general-digest-help

php-general Digest 1 Oct 2010 09:51:34 - Issue 6968

Topics (messages 308377 through 308380):

Re: file_get_contents() failing on CentOS.
308377 by: Richard Quadling

Re: PHP Email Question
308378 by: J Ravi Menon

Re: Which PHP 5.3 documentation generators have you found?
308379 by: Andrew Mason

htmlMicroscope-1.3.3, logAndHandler-0.8.2, with full sources.
308380 by: Rene Veerman

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---
On 30 September 2010 20:27, Adam Richardson simples...@gmail.com wrote:
 On Thu, Sep 30, 2010 at 5:02 AM, Richard Quadling rquadl...@gmail.com
 wrote:

 Hi.

 I'm trying to help a friend with a CentOS setup.

 He's installed PHP and SOAP using yum install php-soap and he is
 having problems.

 I assisted in the developed the php script he is using and it is
 working fine on Windows.

 In testing, we can do ...

 # wget http://www.php.net

 but not ...

 # php -r echo file_get_contents('http://www.php.net');
 PHP Warning:  file_get_contents(http://www.php.net): failed to open
 stream: HTTP request failed!  in Command line code on line 1


 I've checked allow_url_fopen and that is set to 1

 As a test ...

 # php -d allow_url_fopen=1 -r echo
 file_get_contents('http://www.php.net');
 PHP Warning:  file_get_contents(http://www.php.net): failed to open
 stream: HTTP request failed!  in Command line code on line 1
 (This works fine on windows system)

 # php -d allow_url_fopen=0 -r echo
 file_get_contents('http://www.php.net');
 PHP Warning:  file_get_contents(): URL file-access is disabled in the
 server configuration in Command line code on line 1
 PHP Warning:  file_get_contents(http://www.php.net): failed to open
 stream: no suitable wrapper could be found in Command line code on
 line 1

 Neither will actually return the contents.

 Considering wget works and PHP doesn't _AND_ that this is linux, I'm lost.

 Wireshark shoes no communication at all when PHP is used to try and
 get to www.php.net, but it does show everything accurately when using
 wget.

 I've got the output of php -i and of the debug data from wget.

 So. Any pointers, suggestions, things to read/try/etc.

 Regards,

 Richard.

 --
 Richard Quadling
 Twitter : EE : Zend
 @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

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


 Some firewalls used to take exception to file_get_contents() requests whilst
 still allowing some http requests, and if I recall correctly, CentOS uses a
 pretty old version of PHP, so perhaps it's worth checking out:
 bugs[dot]php[dot]net/bug[dot]php?id=40197
 A shot in the dark.
 Adam
 P.S. - The link kept getting my reply marked as spam.  That pesky little
 php.net ;)

 --
 Nephtali:  PHP web framework that functions beautifully
 http://nephtaliproject.com


Thanks for that. I've passed the details on.

OOI, wget uses HTTP/1.1 ...

---request begin---
GET / HTTP/1.0
User-Agent: Wget/1.11.4 Red Hat modified
Accept: */*
Host: www.php.net
Connection: Keep-Alive


The bug report certainly matches the behaviour.

-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
---End Message---
---BeginMessage---
On Wed, Sep 29, 2010 at 1:37 PM, Joe Jackson priory...@googlemail.com wrote:
 Hi

 I am trying the following snippet as Bostjan  suggested, and an email is
 getting sent when I submit the form however in the body of the email I am
 getting none of the form data in the body of the email.  All I am getting is
 the letter 'z' ?  Also in the from field of the email this is showing as my
 email address and not the email address of the user who has sent the form

 Any ideas on where I am going wrong with this snippet?  Any advice would be
 much appreciated

 $msgContent = Name: . $values['name'] .\n;
 $msgContent .= Address: . $values['address'] .\n;
 $msgContent .= Telephone: . $values['telephone'] .\n;
 $msgContent .= Email Address: . $values['emailaddress'] .\n;
 $msgContent .= Message: . $values['message'] .\n;

 function ProcessForm($values)
 {
     mail('myemail:domain.com', 'Website Enquiry', $msgContent, From:
 \{$values['name']}\ {$values['emailaddress']});

  // Replace with actual page or redirect :P
     echo htmlheadtitleThank you!/title/headbodyThank
 you!/body/html;

Not sure if it it is a typo above, are you actually passing
$msgContent in the function above? If it is a global variable, you
would need to add a 'global' declaration:

function ProcessForm($values)
{
   global $msgContent;

mail('myemail:domain.com', 'Website Enquiry', $msgContent, From:
\{$values['name']}\ {$values['emailaddress']}\r\n);
.

php-general Digest 1 Oct 2010 22:43:11 -0000 Issue 6969

2010-10-01 Thread php-general-digest-help

php-general Digest 1 Oct 2010 22:43:11 - Issue 6969

Topics (messages 308381 through 308396):

Little Parsing help...
308381 by: Don Wieland
308382 by: Richard Quadling
308391 by: Don Wieland

Friday's Post
308383 by: tedd
308384 by: Robert Cummings
308386 by: Gary
308388 by: Adam Richardson
308389 by: Bob McConnell
308392 by: Peter Lind
308393 by: Paul M Foster
308394 by: Floyd Resler
308395 by: Per Jessen
308396 by: Nathan Rixham

Re: Friday's Post (WOT)
308385 by: Jay Blanchard

Re: PHP Email Question
308387 by: kranthi

Re: file_get_contents() failing on CentOS.
308390 by: kranthi

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,

I am building a web Song DB. That will simple song chord charts in the  
DB.  I would like the ability to do KEY changes for the different  
songs. I am looking for some direction on how to do this. This was my  
original thought but I  am open if there is a better way.


I defined a table called Chords (here is the mySQL Dump):

DROP TABLE IF EXISTS `Chords`;

CREATE TABLE `Chords` (
  `id` int(11) NOT NULL auto_increment,
  `original_note` varchar(2) default NULL,
  `up_note` varchar(2) default NULL,
  `down_note` varchar(2) default NULL,
  `flatted` varchar(2) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;

LOCK TABLES `Chords` WRITE;
/*!4 ALTER TABLE `Chords` DISABLE KEYS */;
INSERT INTO `Chords`  
(`id`,`original_note`,`up_note`,`down_note`,`flatted`)

VALUES
(1,'A','A#','G#',NULL),
(2,'A#','B','A','Bb'),
(3,'B','C','A#',NULL),
(4,'C','C#','B',NULL),
(5,'C#','D','C','Db'),
(6,'D','D#','C#',NULL),
(7,'D#','E','D','Eb'),
(8,'E','F','D#',NULL),
(9,'F','F#','E',''),
(10,'F#','G','F','Gb'),
(11,'G','G#','F#',NULL),
(12,'G#','A','G','Ab');

/*!4 ALTER TABLE `Chords` ENABLE KEYS */;
UNLOCK TABLES;

---

now this is a sample of my Music Charts:

 C Dm7Em
This is the first line of my song
 C/E  Em7Dm7
and I know it can get real long
 Gm7  Am7
If you know I will say
 G/BC
That it will help to ease the day

What I was hoping for is to check patterns in the CHORD LINES. I  
realize I need to mark which lines do PHP will now which line to  
parse. I was thinking that the user would add a asterisk * at the  
beginning of the chord line like so:


*C Dm7Em
This is the first line of my song
* C/E  Em7Dm7
and I know it can get real long
* Gm7  Am7
If you know I will say
* G/BC
That it will help to ease the day

Then have PHP look for occurrences in the lines that begin with an *.

So if I want to transpose up 1/2 step, it would look like this:

*C# D#m7Fm
This is the first line of my song
* C#/F  Fm7D#m7
and I know it can get real long
* G#m7  A#m7
If you know I will say
* G#/CC#
That it will help to ease the day


So if I want to transpose up 1/2 step, it would look like this:

*B C#m7D#m
This is the first line of my song
* B/D#  D#m7C#m7
and I know it can get real long
* F#m7  G#m7
If you know I will say
* F#/A#B
That it will help to ease the day

I guess the challenge would that once the value was changed, it would  
not get changed again it same process. Also, I need to make sure that  
EXACT Case is only changed. For example, there might be a chord like  
Asus add 9 where I would not want the a of add9 to change.


Any suggestions would be appreciated.

Don Wieland
---End Message---
---BeginMessage---
On 1 October 2010 14:35, Don Wieland d...@pointmade.net wrote:
 Hello,

 I am building a web Song DB. That will simple song chord charts in the DB.
  I would like the ability to do KEY changes for the different songs. I am
 looking for some direction on how to do this. This was my original thought
 but I  am open if there is a better way.

 I defined a table called Chords (here is the mySQL Dump):

 DROP TABLE IF EXISTS `Chords`;

 CREATE TABLE `Chords` (
  `id` int(11) NOT NULL auto_increment,
  `original_note` varchar(2) default NULL,
  `up_note` varchar(2) default NULL,
  `down_note` varchar(2) default NULL,
  `flatted` varchar(2) default NULL,
  PRIMARY KEY  (`id`)
 ) 

[PHP] htmlMicroscope-1.3.3, logAndHandler-0.8.2, with full sources.

2010-10-01 Thread Rene Veerman
Hi.

I've just fixed many bugs in two free components of mine;

htmlMicroscope (63kb) is used to display very large php/js arrays and
objects in the browser,
in a collapsed but expandable view. It's loaded with features that make
browsing large
datasets fun. This 1.3.3 release fixes many of the bugs that remained.

logAndHandler (29+63=92kb) is used to catch all PHP warnings, errors and
notices in $_SESSION, and
then let them be requested by the browser after window.onload in a hide-able
pane in body.
It allows applications to report details in an array, which is then
displayed by htmlMicroscope.
And it also creates a XHTML javascript log, again with htmlMicroscope
integration, and also support for console.trace().

The link for the demos is somewhat unstable at the moment,
i hope to get that improved within a month.
http://mediabeez.ws/downloads is the link to the demos.

For now, it may be best to go to
http://code.google.com/p/rene7705-assorted-libraries/ and get the
sources to run on your own php server. Mysql isn't used.

I should note that this release works best with firefox.
Browser compatibility remains an issue, to be dealt with later.
Perhaps you can help, the puzzles aren't easy.
Chrome kinda works, haven't tested safari yet.

I welcome any improvements or suggestions you might have for these
components.

For the interested, here's the problems with IE compatibility;
http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/74f75b92-591b-4108-84d7-7dcbbd2728f6
http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/0144911a-3037-45a7-8a59-4f200aa26bb4


-- 
/*  _\|/_ _.._
(o o)   ,'.::.--..:._
.oOO-{_}-OOo--./::/_,-o)::;_`-._
| |   `-';'`,--`-`
| Greetings from Rene AJM Veerman |   ;::;'|,','
|   rene7...@gmail.com  | ,'::/  ;:::/, :.
|   http://facebook.com/rene7705  |/,':/  /::;' \ ':\
| |   :'.:: ,-''   . `.::\
| |   \.:;':.`:: .:
| |   (;' ;;;   .::' :|
| |\,:;;  \ `::.\.\
| |`);''::'  `:
| |  `.: ..  -. ' :. :/  _.-'
_.-
| |  `.: ..  -. ' :. :/  _.-'
_.-
| My free open-source |;._.:._.;,-=_(.-'  __
`._
| web components: |  ,;'  _..-''  .,-''
 `-._
|   http://mediabeez.ws/downloads |   _,'.-''  _..``'.'`-'`.
 `
|   http://code.google.com/u/rene7705 |   _.-_..--''   \ \ `.`.
| | -'  _.``'   \  ` SSt
| |   ,'
`*/


[PHP] Little Parsing help...

2010-10-01 Thread Don Wieland

Hello,

I am building a web Song DB. That will simple song chord charts in the  
DB.  I would like the ability to do KEY changes for the different  
songs. I am looking for some direction on how to do this. This was my  
original thought but I  am open if there is a better way.


I defined a table called Chords (here is the mySQL Dump):

DROP TABLE IF EXISTS `Chords`;

CREATE TABLE `Chords` (
  `id` int(11) NOT NULL auto_increment,
  `original_note` varchar(2) default NULL,
  `up_note` varchar(2) default NULL,
  `down_note` varchar(2) default NULL,
  `flatted` varchar(2) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;

LOCK TABLES `Chords` WRITE;
/*!4 ALTER TABLE `Chords` DISABLE KEYS */;
INSERT INTO `Chords`  
(`id`,`original_note`,`up_note`,`down_note`,`flatted`)

VALUES
(1,'A','A#','G#',NULL),
(2,'A#','B','A','Bb'),
(3,'B','C','A#',NULL),
(4,'C','C#','B',NULL),
(5,'C#','D','C','Db'),
(6,'D','D#','C#',NULL),
(7,'D#','E','D','Eb'),
(8,'E','F','D#',NULL),
(9,'F','F#','E',''),
(10,'F#','G','F','Gb'),
(11,'G','G#','F#',NULL),
(12,'G#','A','G','Ab');

/*!4 ALTER TABLE `Chords` ENABLE KEYS */;
UNLOCK TABLES;

---

now this is a sample of my Music Charts:

 C Dm7Em
This is the first line of my song
 C/E  Em7Dm7
and I know it can get real long
 Gm7  Am7
If you know I will say
 G/BC
That it will help to ease the day

What I was hoping for is to check patterns in the CHORD LINES. I  
realize I need to mark which lines do PHP will now which line to  
parse. I was thinking that the user would add a asterisk * at the  
beginning of the chord line like so:


*C Dm7Em
This is the first line of my song
* C/E  Em7Dm7
and I know it can get real long
* Gm7  Am7
If you know I will say
* G/BC
That it will help to ease the day

Then have PHP look for occurrences in the lines that begin with an *.

So if I want to transpose up 1/2 step, it would look like this:

*C# D#m7Fm
This is the first line of my song
* C#/F  Fm7D#m7
and I know it can get real long
* G#m7  A#m7
If you know I will say
* G#/CC#
That it will help to ease the day


So if I want to transpose up 1/2 step, it would look like this:

*B C#m7D#m
This is the first line of my song
* B/D#  D#m7C#m7
and I know it can get real long
* F#m7  G#m7
If you know I will say
* F#/A#B
That it will help to ease the day

I guess the challenge would that once the value was changed, it would  
not get changed again it same process. Also, I need to make sure that  
EXACT Case is only changed. For example, there might be a chord like  
Asus add 9 where I would not want the a of add9 to change.


Any suggestions would be appreciated.

Don Wieland

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



Re: [PHP] Little Parsing help...

2010-10-01 Thread Richard Quadling
On 1 October 2010 14:35, Don Wieland d...@pointmade.net wrote:
 Hello,

 I am building a web Song DB. That will simple song chord charts in the DB.
  I would like the ability to do KEY changes for the different songs. I am
 looking for some direction on how to do this. This was my original thought
 but I  am open if there is a better way.

 I defined a table called Chords (here is the mySQL Dump):

 DROP TABLE IF EXISTS `Chords`;

 CREATE TABLE `Chords` (
  `id` int(11) NOT NULL auto_increment,
  `original_note` varchar(2) default NULL,
  `up_note` varchar(2) default NULL,
  `down_note` varchar(2) default NULL,
  `flatted` varchar(2) default NULL,
  PRIMARY KEY  (`id`)
 ) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;

 LOCK TABLES `Chords` WRITE;
 /*!4 ALTER TABLE `Chords` DISABLE KEYS */;
 INSERT INTO `Chords` (`id`,`original_note`,`up_note`,`down_note`,`flatted`)
 VALUES
        (1,'A','A#','G#',NULL),
        (2,'A#','B','A','Bb'),
        (3,'B','C','A#',NULL),
        (4,'C','C#','B',NULL),
        (5,'C#','D','C','Db'),
        (6,'D','D#','C#',NULL),
        (7,'D#','E','D','Eb'),
        (8,'E','F','D#',NULL),
        (9,'F','F#','E',''),
        (10,'F#','G','F','Gb'),
        (11,'G','G#','F#',NULL),
        (12,'G#','A','G','Ab');

 /*!4 ALTER TABLE `Chords` ENABLE KEYS */;
 UNLOCK TABLES;

 ---

 now this is a sample of my Music Charts:

                 C     Dm7        Em
 This is the first line of my song
         C/E      Em7            Dm7
 and I know it can get real long
         Gm7          Am7
 If you know I will say
                 G/B                    C
 That it will help to ease the day

 What I was hoping for is to check patterns in the CHORD LINES. I realize I
 need to mark which lines do PHP will now which line to parse. I was thinking
 that the user would add a asterisk * at the beginning of the chord line
 like so:

 *                C     Dm7        Em
 This is the first line of my song
 *         C/E      Em7            Dm7
 and I know it can get real long
 *         Gm7          Am7
 If you know I will say
 *                 G/B                    C
 That it will help to ease the day

 Then have PHP look for occurrences in the lines that begin with an *.

 So if I want to transpose up 1/2 step, it would look like this:

 *                C#     D#m7        Fm
 This is the first line of my song
 *         C#/F      Fm7            D#m7
 and I know it can get real long
 *         G#m7          A#m7
 If you know I will say
 *                 G#/C                    C#
 That it will help to ease the day


 So if I want to transpose up 1/2 step, it would look like this:

 *                B     C#m7        D#m
 This is the first line of my song
 *         B/D#      D#m7            C#m7
 and I know it can get real long
 *         F#m7          G#m7
 If you know I will say
 *                 F#/A#                    B
 That it will help to ease the day

 I guess the challenge would that once the value was changed, it would not
 get changed again it same process. Also, I need to make sure that EXACT Case
 is only changed. For example, there might be a chord like Asus add 9 where
 I would not want the a of add9 to change.

 Any suggestions would be appreciated.

 Don Wieland

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



For each key I would guess you'd need the chord order, so if you
change key, you change chords accordingly.

I don't know if that is accurate.

If it is, then a song is recorded in a particular key.

The song will then play the chords/notes of that key. Key1, Note1,
Note2, Note2, Note3, Note4, Note1.

Change key, the same notes are played. For that key ... Key2, Note1,
Note2, Note2, Note3, Note4, Note1.

Or

Key4, Note1, Note2, Note2, Note3, Note4, Note1.

If this is the same for chords, then I'd go with :

A Key table (ID, Keyname) - all the names of the keys
A Notes table (ID, KeyID, Note, Sequence) - the notes in order per key
with a unique composite key of KeyID+Sequence
A Song table (ID, NormalKeyID, Title) - the key that the song is
normally sung in.
A Song Notes table (ID, SongID, NoteSequenceNumber) - Which notes are played.

Changing the NormalKeyID and using that ID with NoteSequenceNumber
should give you the new note to play.

I think.

-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

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



[PHP] Friday's Post

2010-10-01 Thread tedd

Hi gang:

What do you people think of the .NET framework?

Please provide your thoughts as to cost, maintenance, benefit, and 
whatever else you think important.


Thanks,

tedd
--
---
http://sperling.com/

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



Re: [PHP] Friday's Post

2010-10-01 Thread Robert Cummings

On 10-10-01 10:23 AM, tedd wrote:

Hi gang:

What do you people think of the .NET framework?

Please provide your thoughts as to cost, maintenance, benefit, and
whatever else you think important.


Until you posted this... I didn't... bah!

Cheers,
Rob.

:)


--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

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



RE: [PHP] Friday's Post (WOT)

2010-10-01 Thread Jay Blanchard
[snip]
What do you people think of the .NET framework?
[/snip]

I am not a fan.

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



Re: [PHP] PHP Email Question

2010-10-01 Thread kranthi
I cant see why you are getting the letter 'z' (assuming $msgContent
was referenced properly) . Complete code will be helpful to debug the
problem.

Also, Heredoc syntax will be more helpful in your situation. And usage
of global keyword is strongly discouraged in favor of $GLOBALS
superglobal array

http://php.net/GLOBALS
http://php.net/heredoc

Kranthi.
http://goo.gl/e6t3

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



Re: [PHP] Friday's Post

2010-10-01 Thread Adam Richardson
On Fri, Oct 1, 2010 at 10:23 AM, tedd tedd.sperl...@gmail.com wrote:

 Hi gang:

 What do you people think of the .NET framework?

 Please provide your thoughts as to cost, maintenance, benefit, and whatever
 else you think important.

 Thanks,

 tedd
 --
 ---
 http://sperling.com/

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


Powerful.

Developers typically have to maintain a subscription to MSDN to be
particularly effective, however the toolset is very polished.

Additional costs come into play if you're using ASP.Net, as the servers
require licenses, too.  However ASP.Net MVC represents a significant upgrade
over webforms ASP.Net (I've been developing websites using ASP.Net since
version 1, and I can't begin to count the number of times the markup and
postback model drove me nuts in the webforms version), and I'd have no
problem using ASP.Net MVC for most any web application.  Additionally, I use
Rackspace Cloud for hosting, and it's pretty easy and cheap to spin up a
Windows server when needed.

The .Net technologies all integrate very nicely.  For example, while the new
mobile OS is really late to the party (I'm not sure it will be able to
compete with Android and the iPhone), I can develop software for it using
technologies which would seem very familiar to any web or desktop
application developer.

I particularly appreciate F#, a functional language that looks a lot like
OCaml with a few .Net-centric additions, although C# has made some very nice
improvements that bring functional programming techniques to it language,
too.

That all said, I still use PHP for most of my web projects.  Why?  PHP is
fast, well-supported, cheap, and I like the community, although some
projects do seem to benefit from .Net (e.g., if web services are interacting
with a desktop app, it's easier to just build the whole thing using .Net
technologies.)

I could see the day when anything I would normally do in Flash is switched
over to Silverlight.  I just find it a better conceived development
environment for RIA than Flash.

Adam

-- 
Nephtali:  PHP web framework that functions beautifully
http://nephtaliproject.com


RE: [PHP] Re: Friday's Post

2010-10-01 Thread Bob McConnell
From: Gary

 tedd wrote:
 What do you people think of the .NET framework?
 
 It's a framework, like any other framework - can make your life
easier,
 can make your life harder by forcing you to take the path determined
as
 TOTP by its designers.
 
 That's The One True Path, not Top Of The Pops.

The installer and the license limit its use to just a subset of a single
platform. The attempts at producing clones on other platforms are
clouded by license and patent restrictions, and will perpetually be at
least one release behind the MS-Windows version.

In reality, .Net is a poor clone of the Java runtime environment, while
C# is a poor clone of the Java language. They were created after the
courts told Microsoft the Sun license did not allow them to subvert the
Java API to build applications that would only run on their OS.

Bob McConnell

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



Re: [PHP] file_get_contents() failing on CentOS.

2010-10-01 Thread kranthi
probably not the issue, but is the php engine behind a proxy server ?
wget uses the environment variable, but PHP does not

Kranthi.
http://goo.gl/e6t3

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



Re: [PHP] Little Parsing help...

2010-10-01 Thread Don Wieland
The logic I need is pretty straight forward, but I am having a hard  
time replicating it using PHP functions. I will try to break it down  
to it's simplest form:


I have a field that has several lines of text. Chords and Song Lyrics.

The Chord lines begin with an asterisk * and end with the line  
break. This is the string I want to parse. Lines with no asterisk at  
the beginning are ignored.


Based on 3 arrays of NOTES, I want SUBSTITUTE the text (based on exact  
text character patterns - just NOTES not the chord type) of the lines  
in my field that start with an asterisk *.


original_chord_array = A, A#, B, C, C#, D, D#, E, F, F#, G, G#
transpose_up_array = A#, B, C, C#, D, D#, E, F, F#, G, G#, A
transpose_down_array = G#, A, A#, B, C, C#, D, D#, E, F, F#, G

It is important that it only effects EXACT strings.  Notes will always  
be capitalized and chord types will be lower case. Maybe we can use  
that characteristic to better identify what to change. Here are some  
examples of chords:


A
Asus7
Csus add9
Dmaj7
F#m7
G#
C#dim no3

When I transpose UP these chords, just the NOTE should change:

A#
A#sus7
C#sus add9
D#maj7
Gm7
A
Ddim no3

When I transpose DOWN these chords, just the NOTE should change:

G#
G#sus7
Bsus add9
C#maj7
Fm7
G
Cdim no3

I am working on a function, but still not producing the proper  
results. Hopefully this break down is more clear and someone will bail  
me out ;-)


Thanks again for the feedback.

Don

On Oct 1, 2010, at 7:02 AM, Richard Quadling wrote:


Changing the NormalKeyID and using that ID with NoteSequenceNumber
should give you the new note to play.

I think.



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



Re: [PHP] Re: Friday's Post

2010-10-01 Thread Peter Lind
On 1 October 2010 17:11, Bob McConnell r...@cbord.com wrote:
 From: Gary

 tedd wrote:
 What do you people think of the .NET framework?

 It's a framework, like any other framework - can make your life
 easier,
 can make your life harder by forcing you to take the path determined
 as
 TOTP by its designers.

 That's The One True Path, not Top Of The Pops.

 The installer and the license limit its use to just a subset of a single
 platform. The attempts at producing clones on other platforms are
 clouded by license and patent restrictions, and will perpetually be at
 least one release behind the MS-Windows version.

 In reality, .Net is a poor clone of the Java runtime environment, while
 C# is a poor clone of the Java language. They were created after the
 courts told Microsoft the Sun license did not allow them to subvert the
 Java API to build applications that would only run on their OS.


C# has by now exceeded Java by quite a bit - and is, unlike Java, very
actively maintained and has fairly frequent releases with lots of new
functionality (4.0 was released this year and has functionality that
definitely makes me consider taking it on).

As for whether .Net is a better library than the JVM, I wouldn't be
able to judge that.

Regards
Peter

-- 
hype
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
BeWelcome/Couchsurfing: Fake51
Twitter: http://twitter.com/kafe15
/hype

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



Re: [PHP] Friday's Post

2010-10-01 Thread Paul M Foster
On Fri, Oct 01, 2010 at 10:23:31AM -0400, tedd wrote:

 Hi gang:
 
 What do you people think of the .NET framework?
 
 Please provide your thoughts as to cost, maintenance, benefit, and
 whatever else you think important.

I'll be politically incorrect and say that it's evil.

Microsoft is a well-documented monopolist corporation which typically
either steals or buys most of the original technologies it issues. (I
just saw a video where a guy bemoaned all the advertising Microsoft did
for Windows 7. Many, many of the amazing features of Window 7 have
existed for years in Linux and MacOS. And as far as I know, they still
don't have what Linuxers would call desktops and MacOS would call
workspaces or spaces.)

It's also a *corporation*, which means hitching your wagon to them is a
liability. Just ask users of PageMaker, MySQL, OpenOffice, etc.
PageMaker languishes in Adobe's hands now. MySQL users (and its original
developer) are still waiting for the next shoe to drop from Oracle.
Major Open Office developers have now forked OOo, because of whatever
Oracle is doing/going to do with the programs. As an example, I recently
went on an interview with my old boss, who, when I worked for him, did
FoxPro development on a widely used accounting package. That accounting
package was bought by a couple of corporations in the last few years,
and now languishes. Further, Microsoft recently announced the end of
life for FoxPro, the language it was written in.  Goodbye to a whole
industry of users and developers who based their business on a language
and software owned by corporations who simply have no time for them any
more. My old boss spent months searching for a comparable and
comparably-priced accounting package to take up the slack in his
business.

To .NET specifically, the framework was originally built on Java 1.4,
according to an acquaintance who knows much more about Microsoft
internally than I do. After a dispute with Sun over co-development of
Java, Microsoft went not invented here and created its own version of
the platform.

.Net is heavy and expensive, as detailed elsewhere.

I realize there are often economic issues involved, but let me reiterate
that I strongly advocate against using any language owned by a
corporation (like C#). I feel the same way about storing documents in
.doc format. We all know the version-to-version incompatibilities with
.doc format. But Microsoft can do anything they like with it; it belongs
to them.

Paul

-- 
Paul M. Foster

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



Re: [PHP] Friday's Post

2010-10-01 Thread Floyd Resler

On Oct 1, 2010, at 12:04 PM, Paul M Foster wrote:

 I'll be politically incorrect and say that it's evil.

It's funny you should say that because years ago I did a short video called 
PHP Commando.  PHP Commando was battling the evil forces of Dr. Dot Net and 
his sidekick, Macro Mae. Leave it to me to do a parody of a parody!

Take care,
Floyd


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



Re: [PHP] Re: Friday's Post

2010-10-01 Thread Per Jessen
Peter Lind wrote:

 C# has by now exceeded Java by quite a bit - 

I've been away from the Java scene since 2002 (when I worked for BEA
deploying J2EE on Linux/390), but assuming you're talking
about deployed lines of code or some other real-life measurement, I
find it hard to believe that C# should have exceeded Java. 

 and is, unlike Java, very actively maintained and has fairly frequent
 releases with lots of new functionality (4.0 was released this year
 and has functionality that definitely makes me consider taking it on).

Almost every newer programming language in the world has gone further
than Fortran, C, Cobol and PL/I, but they're all very much alive and
kicking.  And will each individually probably be able to muster
more deployed lines of code than any other language. 



-- 
Per Jessen, Zürich (12.1°C)


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



[PHP] Re: Friday's Post

2010-10-01 Thread Nathan Rixham

tedd wrote:

Hi gang:

What do you people think of the .NET framework?

Please provide your thoughts as to cost, maintenance, benefit, and 
whatever else you think important.


.NET is loaded up with patents and pretty much Microsoft only, however 
that said it is rather good. Previous versions of C# (1/2) are 
standardized under ECMA-Script 334 and 335 which covers a lot of .NET 
however doesn't include asp.net, ado.net and windows forms - thus a nice 
open source implementation and platform is quite common now, namely 
Mono, this is .net compatible and has good support/development and has 
been used for everything from the unity game engine through to sims 3. 
Might be worth having a quick look at DotGNU and portable.net (as well 
as mod_mono for apache http - which supports as.net pages etc).


Might be worth noting that Stallman (as in Richard Stallman from FSF) 
doesn't recommend using it because he's thinks MS will come with the 
patent trolls soon, however microsoft has effectively tied themselves in 
to a patent non assert (community promise) which would prevent this.


Also worth having a look at M for something different/interesting/from 
microsoft, and also OData which is a nice RESTful protocol.


Best,

Nathan


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



[PHP] PHP and SpatiaLite

2010-10-01 Thread TR Shaw
Anyone succeeded in geting php and SpatiaLite to work together?





[PHP] Since it is friday.... :)

2010-10-01 Thread Jason Pruim
Anyone know of a good and active general web design list? Looking for  
somewhere that I can post about javascript specifically :)


And happy friday to you all! :)



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