OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
php-general Digest 27 Feb 2008 11:42:13 -0000 Issue 5317

php-general-digest-helplists.php.net
Date: Wed Feb 27 2008 - 05:42:13 CST


php-general Digest 27 Feb 2008 11:42:13 -0000 Issue 5317

Topics (messages 270244 through 270269):

Re: Question about PHP Licence and it's future!
        270244 by: Daniel Brown
        270246 by: Andrés Robinet

Re: Shopping Carts
        270245 by: Kista Tucker
        270248 by: tedd

Re: checking for and enforcing https
        270247 by: Bastien Koert

email with style (again)
        270249 by: tedd
        270250 by: Andrés Robinet

Re: How do you send stylized email?
        270251 by: Manuel Lemos
        270252 by: Paul Scott
        270267 by: Zoltán Németh

Checking an array against user input?
        270253 by: Keikonium
        270254 by: Robert Cummings
        270255 by: Keikonium
        270256 by: Robert Cummings
        270258 by: Keikonium
        270259 by: Robert Cummings
        270260 by: Keikonium
        270261 by: Chris

crc check for JPEG file exists
        270257 by: Olav Mørkrid
        270262 by: Aleksandar Vojnovic
        270263 by: Per Jessen
        270269 by: Bojan Tesanovic

Re: php-5.2.5 glibc detected *** free()
        270264 by: pmenier
        270265 by: pmenier
        270266 by: pmenier

Cannot even come up with the beginning of a regex
        270268 by: Dotan Cohen

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


On Tue, Feb 26, 2008 at 6:01 PM, tedd <tedd.sperlinggmail.com> wrote:
> At 5:10 PM -0500 2/26/08, Andrés Robinet wrote:
> >let's play soccer tomorrow
>
> Oh No, that's not the way you guys say it. You say it like:
>
> Let's play SSSSOOOOOOCCCCCCCCCEEEERRRRRRRR tomorrow.

    I believe the word is "futbol."

--
</Dan>

Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>

attached mail follows:


> -----Original Message-----
> From: Daniel Brown [mailto:parasanegmail.com]
> Sent: Tuesday, February 26, 2008 6:22 PM
> To: tedd
> Cc: php-generallists.php.net
> Subject: Re: [PHP] Question about PHP Licence and it's future!
>
> On Tue, Feb 26, 2008 at 6:01 PM, tedd <tedd.sperlinggmail.com> wrote:
> > At 5:10 PM -0500 2/26/08, Andrés Robinet wrote:
> > >let's play soccer tomorrow
> >
> > Oh No, that's not the way you guys say it. You say it like:
> >
> > Let's play SSSSOOOOOOCCCCCCCCCEEEERRRRRRRR tomorrow.
>
> I believe the word is "futbol."
>
> --
> </Dan>
>
> Daniel P. Brown
> Senior Unix Geek
> <? while(1) { $me = $mind--; sleep(86400); } ?>
 
Yeah, FUTBOL, FUTBOL, FUTBOL!

Look what's the first team according to FIFA
http://www.fifa.com/worldfootball/ranking/lastranking/gender=m/fullranking.html

He he he (now, I'll get tons of emails from Brazilians on this list)

attached mail follows:


Thank you, Dan B., Tedd, Dan H., and Jason:

I don't mind subcontracting and have already stated to my client that this
could possibly happen. I definitely want a quality product. I will work
hard within a reasonable timeframe and if I'm not satisfied with my work,
I'll call someone. One concern of mine is that the person/company I
subcontract may cost as much as the entire amount this client is paying.
Any idea what making a shopping cart work safely and properly might cost?

I appreciate all of you sending encouragement. I'm learning more and more
each day; the momentum is in a positive direction. Just wish it was faster.

Thanks again,
Kista

--
Independent Artist

Kista Tucker Dance
http://kistatucker.com
kistarochester.rr.com

Anakeko Productions
http://anakeko.com
designsanakeko.com

On 2/25/08 12:17 PM, "Daniel Brown" <parasanegmail.com> wrote:

> On Fri, Feb 22, 2008 at 9:17 PM, Kista Tucker <kistarochester.rr.com> wrote:
>> Oh my gosh!
> [snip!]
>
> Kista,
>
> The response you got from Tedd is probably the most accurate and
> best advice you could get on this subject.
>
> DO NOT, by any means, attempt to write your own cart. It's
> reinventing the wheel, and if you don't have the experience in
> PHP/MySQL/security/eCommerce/data retention/inventory tracking/module
> development/API controls/SDK development/et cetera, then you run much
> more of a risk of losing the client than to suggest a well-developed,
> resilient, well-supported, established shopping cart. For that, I
> think Zen Cart is a fine option, regardless of the opinions of others.
>
> And, when all else fails, remember that there is a whole community
> of developers out there (and here) who would be more than willing to
> help you with your project(s) for a fair price. If your client wants
> quality and reliability, just remember that he or she will get what
> they pay for.... and while the software may be free and open source,
> it still requires someone knowledgeable to get it all going in the
> right direction.
>
> Stealing from the context of Tedd's message (specifically: "Try
> not to be the guru here, but....") arises a very well-known quote:
>
> Jack-of-all-trades: Master of none.
>
> If you do design, stick with that. Otherwise, you're effectively
> stating to your client that you don't respect them enough to provide
> the best possible service and products, and that any bare minimum will
> do.
>
> And with that, I hope you know that I'm by no means attempting to
> insult your intelligence, but only offering advice from my own
> experience. ;-P

attached mail follows:


At 7:24 PM -0500 2/26/08, Kista Tucker wrote:
>Thank you, Dan B., Tedd, Dan H., and Jason:
>
>I don't mind subcontracting and have already stated to my client that this
>could possibly happen. I definitely want a quality product. I will work
>hard within a reasonable timeframe and if I'm not satisfied with my work,
>I'll call someone. One concern of mine is that the person/company I
>subcontract may cost as much as the entire amount this client is paying.
>Any idea what making a shopping cart work safely and properly might cost?
>
>I appreciate all of you sending encouragement. I'm learning more and more
>each day; the momentum is in a positive direction. Just wish it was faster.
>
>Thanks again,
>Kista

Kista:

<my take>

As I said, I might buy a shopping cart and get the shopping cart
support to install it and then bill the client accordingly plus my
time.

I had good success using this:

http://www.shop-script.com/

As you can see, the top of the line is $299.00 -- so the cost of the
shopping cart isn't much.

However, setting up the merchandise is a different problem. How do
you populate the database with the customer's inventory? What does
the customer have? How it's stored? And so on.

I had one client who had about 600 items and wanted a shopping cart
with a back-end to maintain their inventory. The bid I gave them was
$10k and I would have it finished in two months.

They didn't bite, but that gives you an idea of the cost involved (ay
lease mine). Maybe I overbid -- I don't know. But, I do know that
what they wanted would have racked a lot of my time.

I just finished a back-end project that took me about a week. The
client paid $1k up-front and another $1k when I finished. He seemed
happy with my work and the time frame. I would be happy with two
grand a week -- too bad it's not consistent.

I do know this, if you underbid and get the work, they will work you
to death. So let them know beforehand that you are in it to help them
AND you do this for a living, not for grins.

Also, keep track of your time and bill accordingly. If you justify
your time, the client will take it better. If you bid for an entire
project, then you eat any overtime. So be careful making bids but
also keep in mind that even an underbid will give you experience and
that's worth something.

Never admit to a client that you don't know something -- instead say
that you'll look into it for him.

Be careful about what mistakes you admit to, unless you have
liability insurance. Some of this stuff can be downright expensive.

Backup everything as you go and document everything (i.e., what you
did, what time, and why). If you do anything with a client's
database, back it up first. If you do anything with a clients site,
backup what was there before you did anything. In other words, cover
your butt in all matters and make sure that you can return things
back to the way they were.

</my take>

That's it for now. Tune in next week.

Cheers and good luck,

tedd

--
-------
http://sperling.com http://ancientstones.com http://earthstones.com

attached mail follows:


----------------------------------------
> Date: Tue, 26 Feb 2008 17:39:13 -0500
> From: rickniof.net
> To: php-generallists.php.net
> Subject: Re: [PHP] checking for and enforcing https
>
> On Tue, Feb 26, 2008 at 04:46:38PM -0500, Daniel Brown wrote:
>>
>> Of course, getting into that is a completely different discussion
>> from the post made by the OP.... whom, as it appears, gave up and took
>> off when Tedd *hijacked* his thread. ;-P
>
> No, I've been reading all the posts and have learned and implemented.
>
> Works great.
>
> I've had nothing to add although I've been somewhat annoyed by the
> excessive quoting.
>
> --
> "The most important thing in life is not simply to capitalize on your
> gains. Any fool can do that. The important thing is to profit from your
> losses. That requires intelligence, and makes the difference between a
> man of sense and a fool." -- Dale Carnegie
> Rick Pasotto rickniof.net http://www.niof.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Now thats excessive quoting ;-)

Bastien
_________________________________________________________________

attached mail follows:


Ok gang:

What's wrong with the following code?

It sends the email OK, but nothing is styled.

Where did I go wrong?

Thanks,

tedd

--- code

<?php

$to = "tedd.sperlinggmail.com";
$body = make_mail();
$subject = "Subject";
$fromaddress = "teddsperling.com";
$fromname = "tedd";

send_mail($to, $body, $subject, $fromaddress, $fromname, $attachments=false);

echo('Email sent');

?>

<?php

function make_mail()
{
$message = <<<EOT

<span style="font-weight: bold;">Title:</span> A title of something
<span style="font-weight: bold;">Presenter:</span> By someone

tedd

EOT;
return $message;
}

function send_mail($to, $body, $subject, $fromaddress, $fromname,
$attachments=false)
{
$eol="\r\n";

// Common Headers
$headers .= "From: ".$fromname."<".$fromaddress.">".$eol;
$headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol;
$headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol;
$headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol;
$headers .= "X-Mailer: PHP v".phpversion().$eol;

// HTML Version
$msg .= "Content-Type: text/html; charset=iso-8859-1".$eol;
$msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol;
$msg .= $body.$eol.$eol;

// SEND THE EMAIL
ini_set(sendmail_from,$fromaddress);
$mail_sent = mail($to, $subject, $msg, $headers);

ini_restore(sendmail_from);

return $mail_sent;
}
?>
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com

attached mail follows:


> -----Original Message-----
> From: tedd [mailto:tedd.sperlinggmail.com]
> Sent: Tuesday, February 26, 2008 8:33 PM
> To: php-generallists.php.net
> Subject: [PHP] email with style (again)
>
> Ok gang:
>
> What's wrong with the following code?
>
> It sends the email OK, but nothing is styled.
>
> Where did I go wrong?
>
> Thanks,
>
> tedd
>
> --- code
>
> <?php
>
> $to = "tedd.sperlinggmail.com";
> $body = make_mail();
> $subject = "Subject";
> $fromaddress = "teddsperling.com";
> $fromname = "tedd";
>
> send_mail($to, $body, $subject, $fromaddress, $fromname,
> $attachments=false);
>
> echo('Email sent');
>
> ?>
>
>
> <?php
>
> function make_mail()
> {
> $message = <<<EOT
>
> <span style="font-weight: bold;">Title:</span> A title of something
> <span style="font-weight: bold;">Presenter:</span> By someone
>
> tedd
>
> EOT;
> return $message;
> }
>
> function send_mail($to, $body, $subject, $fromaddress, $fromname,
> $attachments=false)
> {
> $eol="\r\n";
>
> // Common Headers
> $headers .= "From: ".$fromname."<".$fromaddress.">".$eol;
> $headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol;
> $headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol;
> $headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol;
> $headers .= "X-Mailer: PHP v".phpversion().$eol;
>
> // HTML Version
> $msg .= "Content-Type: text/html; charset=iso-8859-1".$eol;
> $msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol;
> $msg .= $body.$eol.$eol;

Shouldn't this be added?
$msg .= "MIME-Version: 1.0".$eol;
...

And, actually, shouldn't this be placed in the $headers variable? Like:

$headers = "MIME-Version: 1.0".$eol;
$headers .= "Content-Type: text/html; charset=iso-8859-1".$eol;
$headers .= "Content-Transfer-Encoding: 8bit".$eol.$eol;
$headers .= "From: ".$fromname."<".$fromaddress.">".$eol;
$headers .= "Reply-To: ".$fromname."<".$fromaddress.">".$eol;
$headers .= "Return-Path: ".$fromname."<".$fromaddress.">".$eol;
$headers .= "Message-ID: <".time()."-".$fromaddress.">".$eol;
$headers .= "X-Mailer: PHP v".phpversion(); // I REMOVED THE LAST $eol, IS IT
NECESSARY???

$msg .= $body.$eol.$eol;
...

>
> // SEND THE EMAIL
> ini_set(sendmail_from,$fromaddress);
> $mail_sent = mail($to, $subject, $msg, $headers);
>
> ini_restore(sendmail_from);
>
> return $mail_sent;
> }
> ?>
> --
> -------
> http://sperling.com http://ancientstones.com http://earthstones.com
>
> --

Regards,

Rob

Andrés Robinet | Lead Developer | BESTPLACE CORPORATION 
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308 |
TEL 954-607-4207 | FAX 954-337-2695 |
Email: infobestplace.net  | MSN Chat: bestbestplace.net  |  SKYPE: bestplace |
 Web: bestplace.biz  | Web: seo-diy.com

attached mail follows:


Hello,

on 02/26/2008 11:53 AM tedd said the following:
>>> $message = <<<EOT
>>> Title: This is a title of the Event.
>>> Time: This the time of the Event.
>>>
>>> Please show up on time.
>>> EOT
>>>
>>> mail('exampleexample.com' , 'An Event' , $message);
>>>
>>> If so, how do you style it?
>>>
>>> If not, how do you send stylized email?
>>
>> The easiest way is this:
>>
>> $message = <<<EOT
>> <span style="color: red">
>> Title: This is a title of the Event.
>> Time: This the time of the Event.
>> </span>
>>
>> Please show up on time.
>> EOT
>>
>> mail('exampleexample.com' , 'An Event' , $message, 'Content-Type:
>> text/html');
>
> Duh!
>
> I should have thought of that.

Be careful. Do not send HTML only messages or else some mail systems
(notably Hotmail for instance) will discard your messages as if they
were spam.

The right solution to send HTML messages is to use multipart/alternative
messages so you can specify an alternative text to show in mail clients
that do not support HTML messages.

It is a bit more complex solution, but if you want all people to get
your message, it is necessary. To simplify the problem you may want to
use a ready to use PHP component that can compose multipart/alternative
messages. I use this popular MIME message composing class. Try the
test_simple_html_mail_message example script for instance.

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos

PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/

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

attached mail follows:


On Tue, 2008-02-26 at 22:52 -0300, Manuel Lemos wrote:
> messages. I use this popular MIME message composing class. Try the
> test_simple_html_mail_message example script for instance.
>
> http://www.phpclasses.org/mimemessage
>
>

Hehe, I was holding my breath for Manuel to come on to this thread!

if($subject === 'something to do with mail')
{
    $this->punt('mimemessage', 'phpclasses.org');
}
else {
    sleep(86400);
}

;)

--Paul

All Email originating from UWC is covered by disclaimer
http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm

attached mail follows:


2008. 02. 26, kedd keltezéssel 11.27-kor Daniel Brown ezt írta:
> On Tue, Feb 26, 2008 at 10:57 AM, Robert Cummings <robertinterjinn.com> wrote:
> > Marriage?? That's for backwards people stuck in ancient pointless
> > traditions >:) And moreso in today's culture... it's just a commercial
> > suckfest when your money could better go to student loans and raising a
> > family.
>
> http://debianddan.com/
>
> CC: Debs
>

congratulations :)

greets
Zoltán Németh

> --
> </Dan>
>
> Daniel P. Brown
> Senior Unix Geek
> <? while(1) { $me = $mind--; sleep(86400); } ?>
>

attached mail follows:


Hello all,

I am new to this news group, and figured this was the fastest way to get a
good, helpful answer. Here is my problem:

I have an array that I set up with numbers 00 thru 99. Now, I have some
timestamps that look somewhat like this:

[00:01:70]
[00:06:50]
[00:12:07]
[00:15:04]
[00:19:75]

I am making a script that will convert them into this:

[00:01.70]
[00:06.50]
[00:12.07]
[00:15.04]
[00:19.75]

(notice the period ( . ) instead of the colon ( : ) after the fourth number)

My problem is that I don't know how to achieve this. This is the code I have
so far:

$nums = array("01", "02", "03", "04", "05", "06", "07", "08", "09", "10",
"11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22",
"23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34",
"35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46",
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58",
"59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70",
"71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82",
"83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94",
"95", "96", "97", "98", "99", "00");
$x = array_search($nums,$nums);

$format1 = array("[$x:$x:$x]", "[$x:$x.$x]");
$format2 = array("[$x:$x.$x]", "[$x:$x:$x]");

It is linked up with a textbox and a button if that matters any. I just need
to beable to have the script look at the array, and match it with whatever
the user types in. Unless there is a different way to get what I need?

Thank you,

Keikonium

attached mail follows:


On Wed, 2008-02-27 at 00:36 -0500, Keikonium wrote:
> Hello all,
>
> I am new to this news group, and figured this was the fastest way to get a
> good, helpful answer. Here is my problem:
>
> I have an array that I set up with numbers 00 thru 99. Now, I have some
> timestamps that look somewhat like this:
>
> [00:01:70]
> [00:06:50]
> [00:12:07]
> [00:15:04]
> [00:19:75]
>
> I am making a script that will convert them into this:
>
> [00:01.70]
> [00:06.50]
> [00:12.07]
> [00:15.04]
> [00:19.75]

$newTimestamp = $oldTimestamp;
$newTimestamp[5] = '.';

Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'

attached mail follows:


I am a bit confused by your code, Rob. The timestamps will always change
(and have text after them) and that is what I am trying to take into
account. Perhaps having my entire code might be of more use:

<html>
<head>
<title>Lyrics Editor</title>

<?php
$letters = array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l",
"m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z");
$lower = array("aint", "i've", "i'd", " id ", "i''ll", " ill ", " dont ",
"i'm", " im ", " i ", "]a", "]b", "]c", "]d", "]e", "]f", "]g", "]h", "]i",
"]j", "]k", "]l", "]m", "]n", "]o", "]p", "]q", "]r", "]s", "]t", "]u",
"]v", "]w", "]x", "]y", "]z");
$upper = array("ain't", "I've", "I'd", " I'd ", "I''ll", " I'll ", " don't
", "I'm", " I'm ", " I ", "]A", "]B", "]C", "]D", "]E", "]F", "]G", "]H",
"]I", "]J", "]K", "]L", "]M", "]N", "]O", "]P", "]Q", "]R", "]S", "]T",
"]U", "]V", "]W", "]X", "]Y", "]Z");

$nums = array("01", "02", "03", "04", "05", "06", "07", "08", "09", "10",
"11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22",
"23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34",
"35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46",
"47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58",
"59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70",
"71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82",
"83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94",
"95", "96", "97", "98", "99", "00");
$x = array_search($nums,$nums);

$format1 = array("[$x:$x:$x]", "[$x:$x.$x]");
$format2 = array("[$x:$x.$x]", "[$x:$x:$x]");

$textarea = '';
//****************************
if (isset($_POST['uppercase']))
{
$textarea = $_POST['entry'];
$textarea = str_replace($lower, $upper, $_POST['entry']);
}
//****************************
else if (isset($_POST['format1']))
{
$textarea = $_POST['entry'];
$textarea = str_replace($format1, $format2, $_POST['entry']);
}
//****************************
else if (isset($_POST['format2']))
{
$textarea = $_POST['entry'];
$textarea = str_replace($format2, $format1, $_POST['entry']);
}
//****************************
?>

</head>
<body>

<FORM NAME ="form1" METHOD ="POST" ACTION ="lyricseditor.php">
  <textarea name="entry" cols="70" rows="20"><?PHP print
stripslashes($textarea); ?></textarea>
  <p>Convert first letter to uppercase: <input type="submit"
name="uppercase" value="Convert..."></p>
  <p>Convert to [xx:xx:xx] format: <input type="submit" name="format1"
value="Convert..."></p>
  <p>Convert to [xx:xx.xx] format: <input type="submit" name="format2"
value="Convert..."></p>
</FORM>

</body>
</html>

"Robert Cummings" <robertinterjinn.com> wrote in message
news:1204092181.18306.1113.camelblobule...
>
> On Wed, 2008-02-27 at 00:36 -0500, Keikonium wrote:
>> Hello all,
>>
>> I am new to this news group, and figured this was the fastest way to get
>> a
>> good, helpful answer. Here is my problem:
>>
>> I have an array that I set up with numbers 00 thru 99. Now, I have some
>> timestamps that look somewhat like this:
>>
>> [00:01:70]
>> [00:06:50]
>> [00:12:07]
>> [00:15:04]
>> [00:19:75]
>>
>> I am making a script that will convert them into this:
>>
>> [00:01.70]
>> [00:06.50]
>> [00:12.07]
>> [00:15.04]
>> [00:19.75]
>
> $newTimestamp = $oldTimestamp;
> $newTimestamp[5] = '.';
>
> Cheers,
> Rob.
> --
> .------------------------------------------------------------.
> | InterJinn Application Framework - http://www.interjinn.com |
> :------------------------------------------------------------:
> | An application and templating framework for PHP. Boasting |
> | a powerful, scalable system for accessing system services |
> | such as forms, properties, sessions, and caches. InterJinn |
> | also provides an extremely flexible architecture for |
> | creating re-usable components quickly and easily. |
> `------------------------------------------------------------'

attached mail follows:


Show me an example of actual text where you want to update the format.

Cheers,
Rob.

On Wed, 2008-02-27 at 01:42 -0500, Keikonium wrote:
> I am a bit confused by your code, Rob. The timestamps will always change
> (and have text after them) and that is what I am trying to take into
> account. Perhaps having my entire code might be of more use:
>
> <html>
> <head>
> <title>Lyrics Editor</title>
>
> <?php
> $letters = array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l",
> "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z");
> $lower = array("aint", "i've", "i'd", " id ", "i''ll", " ill ", " dont ",
> "i'm", " im ", " i ", "]a", "]b", "]c", "]d", "]e", "]f", "]g", "]h", "]i",
> "]j", "]k", "]l", "]m", "]n", "]o", "]p", "]q", "]r", "]s", "]t", "]u",
> "]v", "]w", "]x", "]y", "]z");
> $upper = array("ain't", "I've", "I'd", " I'd ", "I''ll", " I'll ", " don't
> ", "I'm", " I'm ", " I ", "]A", "]B", "]C", "]D", "]E", "]F", "]G", "]H",
> "]I", "]J", "]K", "]L", "]M", "]N", "]O", "]P", "]Q", "]R", "]S", "]T",
> "]U", "]V", "]W", "]X", "]Y", "]Z");
>
> $nums = array("01", "02", "03", "04", "05", "06", "07", "08", "09", "10",
> "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22",
> "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34",
> "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46",
> "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58",
> "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70",
> "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82",
> "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94",
> "95", "96", "97", "98", "99", "00");
> $x = array_search($nums,$nums);
>
> $format1 = array("[$x:$x:$x]", "[$x:$x.$x]");
> $format2 = array("[$x:$x.$x]", "[$x:$x:$x]");
>
> $textarea = '';
> //****************************
> if (isset($_POST['uppercase']))
> {
> $textarea = $_POST['entry'];
> $textarea = str_replace($lower, $upper, $_POST['entry']);
> }
> //****************************
> else if (isset($_POST['format1']))
> {
> $textarea = $_POST['entry'];
> $textarea = str_replace($format1, $format2, $_POST['entry']);
> }
> //****************************
> else if (isset($_POST['format2']))
> {
> $textarea = $_POST['entry'];
> $textarea = str_replace($format2, $format1, $_POST['entry']);
> }
> //****************************
> ?>
>
> </head>
> <body>
>
> <FORM NAME ="form1" METHOD ="POST" ACTION ="lyricseditor.php">
> <textarea name="entry" cols="70" rows="20"><?PHP print
> stripslashes($textarea); ?></textarea>
> <p>Convert first letter to uppercase: <input type="submit"
> name="uppercase" value="Convert..."></p>
> <p>Convert to [xx:xx:xx] format: <input type="submit" name="format1"
> value="Convert..."></p>
> <p>Convert to [xx:xx.xx] format: <input type="submit" name="format2"
> value="Convert..."></p>
> </FORM>
>
> </body>
> </html>
>
>
> "Robert Cummings" <robertinterjinn.com> wrote in message
> news:1204092181.18306.1113.camelblobule...
> >
> > On Wed, 2008-02-27 at 00:36 -0500, Keikonium wrote:
> >> Hello all,
> >>
> >> I am new to this news group, and figured this was the fastest way to get
> >> a
> >> good, helpful answer. Here is my problem:
> >>
> >> I have an array that I set up with numbers 00 thru 99. Now, I have some
> >> timestamps that look somewhat like this:
> >>
> >> [00:01:70]
> >> [00:06:50]
> >> [00:12:07]
> >> [00:15:04]
> >> [00:19:75]
> >>
> >> I am making a script that will convert them into this:
> >>
> >> [00:01.70]
> >> [00:06.50]
> >> [00:12.07]
> >> [00:15.04]
> >> [00:19.75]
> >
> > $newTimestamp = $oldTimestamp;
> > $newTimestamp[5] = '.';
> >
> > Cheers,
> > Rob.
> > --
> > .------------------------------------------------------------.
> > | InterJinn Application Framework - http://www.interjinn.com |
> > :------------------------------------------------------------:
> > | An application and templating framework for PHP. Boasting |
> > | a powerful, scalable system for accessing system services |
> > | such as forms, properties, sessions, and caches. InterJinn |
> > | also provides an extremely flexible architecture for |
> > | creating re-usable components quickly and easily. |
> > `------------------------------------------------------------'
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'

attached mail follows:


Here is an example of the text I want to update:

[01:19:23]And the city lit up the night
[01:21:04]With the green glow of the Camlin Hotel

[01:37:49][01:26:82]Ghosts are in the radio,
[01:42:13][01:31:53]They sing along, they sing along

[02:02:14]It's on and the ghosts in the radio
[02:05:80]Are singing along

"Robert Cummings" <robertinterjinn.com> wrote in message
news:1204094854.18306.1118.camelblobule...
> Show me an example of actual text where you want to update the format.
>
> Cheers,
> Rob.
>
>
> On Wed, 2008-02-27 at 01:42 -0500, Keikonium wrote:
>> I am a bit confused by your code, Rob. The timestamps will always change
>> (and have text after them) and that is what I am trying to take into
>> account. Perhaps having my entire code might be of more use:
>>
>> <html>
>> <head>
>> <title>Lyrics Editor</title>
>>
>> <?php
>> $letters = array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k",
>> "l",
>> "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z");
>> $lower = array("aint", "i've", "i'd", " id ", "i''ll", " ill ", " dont ",
>> "i'm", " im ", " i ", "]a", "]b", "]c", "]d", "]e", "]f", "]g", "]h",
>> "]i",
>> "]j", "]k", "]l", "]m", "]n", "]o", "]p", "]q", "]r", "]s", "]t", "]u",
>> "]v", "]w", "]x", "]y", "]z");
>> $upper = array("ain't", "I've", "I'd", " I'd ", "I''ll", " I'll ", "
>> don't
>> ", "I'm", " I'm ", " I ", "]A", "]B", "]C", "]D", "]E", "]F", "]G", "]H",
>> "]I", "]J", "]K", "]L", "]M", "]N", "]O", "]P", "]Q", "]R", "]S", "]T",
>> "]U", "]V", "]W", "]X", "]Y", "]Z");
>>
>> $nums = array("01", "02", "03", "04", "05", "06", "07", "08", "09", "10",
>> "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22",
>> "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34",
>> "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46",
>> "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58",
>> "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70",
>> "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82",
>> "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94",
>> "95", "96", "97", "98", "99", "00");
>> $x = array_search($nums,$nums);
>>
>> $format1 = array("[$x:$x:$x]", "[$x:$x.$x]");
>> $format2 = array("[$x:$x.$x]", "[$x:$x:$x]");
>>
>> $textarea = '';
>> //****************************
>> if (isset($_POST['uppercase']))
>> {
>> $textarea = $_POST['entry'];
>> $textarea = str_replace($lower, $upper, $_POST['entry']);
>> }
>> //****************************
>> else if (isset($_POST['format1']))
>> {
>> $textarea = $_POST['entry'];
>> $textarea = str_replace($format1, $format2, $_POST['entry']);
>> }
>> //****************************
>> else if (isset($_POST['format2']))
>> {
>> $textarea = $_POST['entry'];
>> $textarea = str_replace($format2, $format1, $_POST['entry']);
>> }
>> //****************************
>> ?>
>>
>> </head>
>> <body>
>>
>> <FORM NAME ="form1" METHOD ="POST" ACTION ="lyricseditor.php">
>> <textarea name="entry" cols="70" rows="20"><?PHP print
>> stripslashes($textarea); ?></textarea>
>> <p>Convert first letter to uppercase: <input type="submit"
>> name="uppercase" value="Convert..."></p>
>> <p>Convert to [xx:xx:xx] format: <input type="submit" name="format1"
>> value="Convert..."></p>
>> <p>Convert to [xx:xx.xx] format: <input type="submit" name="format2"
>> value="Convert..."></p>
>> </FORM>
>>
>> </body>
>> </html>
>>
>>
>> "Robert Cummings" <robertinterjinn.com> wrote in message
>> news:1204092181.18306.1113.camelblobule...
>> >
>> > On Wed, 2008-02-27 at 00:36 -0500, Keikonium wrote:
>> >> Hello all,
>> >>
>> >> I am new to this news group, and figured this was the fastest way to
>> >> get
>> >> a
>> >> good, helpful answer. Here is my problem:
>> >>
>> >> I have an array that I set up with numbers 00 thru 99. Now, I have
>> >> some
>> >> timestamps that look somewhat like this:
>> >>
>> >> [00:01:70]
>> >> [00:06:50]
>> >> [00:12:07]
>> >> [00:15:04]
>> >> [00:19:75]
>> >>
>> >> I am making a script that will convert them into this:
>> >>
>> >> [00:01.70]
>> >> [00:06.50]
>> >> [00:12.07]
>> >> [00:15.04]
>> >> [00:19.75]
>> >
>> > $newTimestamp = $oldTimestamp;
>> > $newTimestamp[5] = '.';
>> >
>> > Cheers,
>> > Rob.
>> > --
>> > .------------------------------------------------------------.
>> > | InterJinn Application Framework - http://www.interjinn.com |
>> > :------------------------------------------------------------:
>> > | An application and templating framework for PHP. Boasting |
>> > | a powerful, scalable system for accessing system services |
>> > | such as forms, properties, sessions, and caches. InterJinn |
>> > | also provides an extremely flexible architecture for |
>> > | creating re-usable components quickly and easily. |
>> > `------------------------------------------------------------'
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
> --
> .------------------------------------------------------------.
> | InterJinn Application Framework - http://www.interjinn.com |
> :------------------------------------------------------------:
> | An application and templating framework for PHP. Boasting |
> | a powerful, scalable system for accessing system services |
> | such as forms, properties, sessions, and caches. InterJinn |
> | also provides an extremely flexible architecture for |
> | creating re-usable components quickly and easily. |
> `------------------------------------------------------------'

attached mail follows:


On Wed, 2008-02-27 at 01:53 -0500, Keikonium wrote:
> Here is an example of the text I want to update:
>
> [01:19:23]And the city lit up the night
> [01:21:04]With the green glow of the Camlin Hotel
>
> [01:37:49][01:26:82]Ghosts are in the radio,
> [01:42:13][01:31:53]They sing along, they sing along
>
> [02:02:14]It's on and the ghosts in the radio
> [02:05:80]Are singing along

<?php

$text =
    preg_replace(
        '/\[([[:digit:]]{2}):([[:digit:]]{2}):([[:digit:]]{2})\]/ms',
        '[\\1:\\2.\\3]', $text );

?>

Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'

attached mail follows:


YESSSS! That works perfectly ^_^. Thank you very much for helping out a PHP
noob lol.

"Robert Cummings" <robertinterjinn.com> wrote in message
news:1204095406.18306.1121.camelblobule...
> On Wed, 2008-02-27 at 01:53 -0500, Keikonium wrote:
>> Here is an example of the text I want to update:
>>
>> [01:19:23]And the city lit up the night
>> [01:21:04]With the green glow of the Camlin Hotel
>>
>> [01:37:49][01:26:82]Ghosts are in the radio,
>> [01:42:13][01:31:53]They sing along, they sing along
>>
>> [02:02:14]It's on and the ghosts in the radio
>> [02:05:80]Are singing along
>
> <?php
>
> $text =
> preg_replace(
> '/\[([[:digit:]]{2}):([[:digit:]]{2}):([[:digit:]]{2})\]/ms',
> '[\\1:\\2.\\3]', $text );
>
> ?>
>
> Cheers,
> Rob.
> --
> .------------------------------------------------------------.
> | InterJinn Application Framework - http://www.interjinn.com |
> :------------------------------------------------------------:
> | An application and templating framework for PHP. Boasting |
> | a powerful, scalable system for accessing system services |
> | such as forms, properties, sessions, and caches. InterJinn |
> | also provides an extremely flexible architecture for |
> | creating re-usable components quickly and easily. |
> `------------------------------------------------------------'

attached mail follows:


Keikonium wrote:
> I am a bit confused by your code, Rob.

$newTimestamp = $oldTimestamp;
$newTimestamp[5] = '.';

means make the 6th character (remember php is 0 based so the first
character is index 0) a '.'.

--
Postgresql & php tutorials
http://www.designmagick.com/

attached mail follows:


hello

is crc32() an acceptable way of managing whether a JPEG file exists
(in a database or similar collection)?

i mean doing a crc32() on the binary data of the JPEG file, and then
check the database if there is already another entry with the same
CRC.

the database has relatively few images (some thousands).

is there any chance of collision (two different JPEG images generating
the same CRC) that is anywhere near likely, or is this extremely
remote?

advice would be appreciated.

attached mail follows:


I would rather use md5_file() for file uniqueness.

Aleksander

Olav Mørkrid wrote:
> hello
>
> is crc32() an acceptable way of managing whether a JPEG file exists
> (in a database or similar collection)?
>
> i mean doing a crc32() on the binary data of the JPEG file, and then
> check the database if there is already another entry with the same
> CRC.
>
> the database has relatively few images (some thousands).
>
> is there any chance of collision (two different JPEG images generating
> the same CRC) that is anywhere near likely, or is this extremely
> remote?
>
> advice would be appreciated.
>
>

attached mail follows:


Olav Mørkrid wrote:

> is crc32() an acceptable way of managing whether a JPEG file exists
> (in a database or similar collection)?
>
> i mean doing a crc32() on the binary data of the JPEG file, and then
> check the database if there is already another entry with the same
> CRC.
>
> the database has relatively few images (some thousands).

I use an md5 checksum for that sort of thing.

/Per Jessen, Zürich

attached mail follows:


Don't use CRC it is not made for purpose you want, you should use some
better algo and of course MD5 is much better, though in my company we
had collision
with md5 but we are working on more than a billion data set.
I have tried to use crc32 on some data and it happened to have very high
collision ...

On Feb 27, 2008, at 7:49 AM, Olav Mørkrid wrote:

> hello
>
> is crc32() an acceptable way of managing whether a JPEG file exists
> (in a database or similar collection)?
>
> i mean doing a crc32() on the binary data of the JPEG file, and then
> check the database if there is already another entry with the same
> CRC.
>
> the database has relatively few images (some thousands).
>
> is there any chance of collision (two different JPEG images generating
> the same CRC) that is anywhere near likely, or is this extremely
> remote?
>
> advice would be appreciated.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

Bojan Tesanovic
http://www.carster.us/

attached mail follows:


Mario Guenterberg a écrit :
> On Sat, Feb 23, 2008 at 12:03:16PM +0100, phppmenier.net wrote:
>> Hello all
>>
>> I got "glibc detected" errors about several php extensions on my debian
>> box both by executing php-cgi or php-cli.
>>
>> Config:
>> # cat /proc/version
>> Linux version 2.6.24-rc7-vs2.2.0.5.0.7 (rootetch) (gcc version 4.1.2
>> 20061115 (prerelease) (Debian 4.1.1-21)) #2 SMP
>>
>> # gcc --version
>> gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
>>
>> # dpkg -l libc6
>> libc6 2.3.6.ds1-13etch5
>>
>> I'm running on debian-etch stable/backports.
>>
>> I build php-5.2.5 with this configure line:
>>
>> ./configure --enable-bcmath --enable-calendar --enable-exif
>> --enable-ftp --enable-shmop --enable-soap --enable-sockets
>> --enable-sysvmsg --enable-sysvsem --enable-sysvshm
>> --enable-memory-limit --enable-wddx --enable-fastcgi --enable-dio
>> --enable-dmalloc --enable-force-cgi-redirect --enable-discard-path
>> --with-gmp=shared,/usr --with-gettext=shared,/usr
>> --with-mysql=shared,/usr --with-pdo-mysql=shared,/usr
>> --with-mysqli=shared --with-gd=shared --with-jpeg-dir=/usr
>> --with-png-dir=/usr --with-zlib --with-zlib-dir=/usr
>> --with-xpm-dir=/usr --with-freetype-dir=/usr --with-libt1=/usr
>> --enable-gd-native-ttf --with-pgsql=shared,/usr
>> --with-pdo-pgsql=shared,/usr --with-curl=shared,/usr
>> --with-curlwrappers --with-xsl --with-xmlrpc --enable-xslt
>> --with-xslt-sablot=/usr --with-mhash=shared,/usr
>> --enable-dba=shared,/usr --with-gdbm=/usr --with-db4=/usr --with-cdb
>> --with-mm=/usr --with-bz2=shared,/usr --with-imap=shared,/usr
>> --with-kerberos --with-imap-ssl --with-readline --with-pcre-regex
>> --enable-pcntl --enable-simplexml --enable-ctype
>> --with-ming=shared,/usr --with-ncurses=shared,/usr --enable-mbstring
>> --with-inifile --with-flatfile --with-iconv --with-ldap=shared,/usr
>> --enable-gd-native-ttf --with-dom=/usr --with-dom-xslt=/usr
>> --with-dom-exslt=/usr --with-expat-dir=/usr --with-zip=shared,/usr
>> --with-openssl=/usr --with-snmp=shared,/usr --with-ttf=shared,/usr
>> --with-libxml-dir=/usr --enable-dbase --enable-dbx --enable-dio
>> --enable-filepro --enable-sqlite-utf8 --with-mcrypt=shared,/usr
>> --with-pspell=shared,/usr --with-unixODBC=shared,/usr
>>
>> The errors occurs when i want to activate several shared extensions:
>> pgsql, snmp, mcrypt.
>>
>> I'm really confused because if i build these extensions statically all
>> works fine ( ./configure ..blabla... --with-pgsql ... --with-mcrypt )
>>
>> I've a little script script to test pgsql connection :
>>
>> <?
>> $dbconn = pg_connect("host=192.168.0.230 port=5432 user=demo
>> password=demo dbname=demo");
>> $query = pg_exec ($dbconn, "SELECT * FROM agenda");
>> ....
>> ?>
>>
>> If i call this script via a web browser i got in apache log:
>>
>> [Fri Feb 22 21:40:30 2008] [error] [client 192.168.0.22] *** glibc
>> detected *** free(): invalid pointer: 0xb6b3f880 ***
>> [Fri Feb 22 21:40:30 2008] [error] [client 192.168.0.22] Premature end
>> of script headers: listepg.php
>>
>> If i call this script on command line, same error:
>>
>> etch:/web/clients/client1/www# php -c ../php.ini listepg.php
>> connexion*** glibc detected *** free(): invalid pointer: 0xb48b8280 ***
>> Abandon
>>
>> I'm knocking my head on the walls since several months about this issue
>> which i didn't meet with previous versions of php (i compile myself
>> since php-5.0.0RC1). All was working fine until i upgrade to php-5.2.x.
>>
>> More strange: i've installed php-xxx.deb from dotdeb packages (added in
>> my sources.list) where these extensions are shared and in this case all
>> works fine. I've asked dotdeb developper what may cause this issue on my
>> box but he couldn't spent many time to debug my problem.
>>
>> In doubt, i've reinstalled all libxxxx-dev invoked by configure script
>> but always same error. I've tried on 2 others machines with same distro
>> and i got same error, too.
>>
>> I think i make a mistake during php configuration but can't find where.
>>
>> Any help/idea please ...
>>
>> If you need more info, i can provide them
>
> Hello
>
> download the php-xxx.diff.gz from dotdeb source repo and see if there
> any differences in the debian/rules file from this diff to your
> configure options. The debian/control file has listed all the
> dependencies for build the php-xxx.deb packages. See also in this file
> for mistakes in your environment.
>
> Greetings
> Mario
>

Thanks for your answer Mario.

I've effectively found many diff with dotdeb configure scripts.

I will try a new compil next week and keep you informed.

thanks again
Patrick

attached mail follows:


Mario Guenterberg a écrit :
> On Sat, Feb 23, 2008 at 12:03:16PM +0100, phppmenier.net wrote:
>> Hello all
>>
>> I got "glibc detected" errors about several php extensions on my debian
>> box both by executing php-cgi or php-cli.
>>
>> Config:
>> # cat /proc/version
>> Linux version 2.6.24-rc7-vs2.2.0.5.0.7 (rootetch) (gcc version 4.1.2
>> 20061115 (prerelease) (Debian 4.1.1-21)) #2 SMP
>>
>> # gcc --version
>> gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
>>
>> # dpkg -l libc6
>> libc6 2.3.6.ds1-13etch5
>>
>> I'm running on debian-etch stable/backports.
>>
>> I build php-5.2.5 with this configure line:
>>
>> ./configure --enable-bcmath --enable-calendar --enable-exif
>> --enable-ftp --enable-shmop --enable-soap --enable-sockets
>> --enable-sysvmsg --enable-sysvsem --enable-sysvshm
>> --enable-memory-limit --enable-wddx --enable-fastcgi --enable-dio
>> --enable-dmalloc --enable-force-cgi-redirect --enable-discard-path
>> --with-gmp=shared,/usr --with-gettext=shared,/usr
>> --with-mysql=shared,/usr --with-pdo-mysql=shared,/usr
>> --with-mysqli=shared --with-gd=shared --with-jpeg-dir=/usr
>> --with-png-dir=/usr --with-zlib --with-zlib-dir=/usr
>> --with-xpm-dir=/usr --with-freetype-dir=/usr --with-libt1=/usr
>> --enable-gd-native-ttf --with-pgsql=shared,/usr
>> --with-pdo-pgsql=shared,/usr --with-curl=shared,/usr
>> --with-curlwrappers --with-xsl --with-xmlrpc --enable-xslt
>> --with-xslt-sablot=/usr --with-mhash=shared,/usr
>> --enable-dba=shared,/usr --with-gdbm=/usr --with-db4=/usr --with-cdb
>> --with-mm=/usr --with-bz2=shared,/usr --with-imap=shared,/usr
>> --with-kerberos --with-imap-ssl --with-readline --with-pcre-regex
>> --enable-pcntl --enable-simplexml --enable-ctype
>> --with-ming=shared,/usr --with-ncurses=shared,/usr --enable-mbstring
>> --with-inifile --with-flatfile --with-iconv --with-ldap=shared,/usr
>> --enable-gd-native-ttf --with-dom=/usr --with-dom-xslt=/usr
>> --with-dom-exslt=/usr --with-expat-dir=/usr --with-zip=shared,/usr
>> --with-openssl=/usr --with-snmp=shared,/usr --with-ttf=shared,/usr
>> --with-libxml-dir=/usr --enable-dbase --enable-dbx --enable-dio
>> --enable-filepro --enable-sqlite-utf8 --with-mcrypt=shared,/usr
>> --with-pspell=shared,/usr --with-unixODBC=shared,/usr
>>
>> The errors occurs when i want to activate several shared extensions:
>> pgsql, snmp, mcrypt.
>>
>> I'm really confused because if i build these extensions statically all
>> works fine ( ./configure ..blabla... --with-pgsql ... --with-mcrypt )
>>
>> I've a little script script to test pgsql connection :
>>
>> <?
>> $dbconn = pg_connect("host=192.168.0.230 port=5432 user=demo
>> password=demo dbname=demo");
>> $query = pg_exec ($dbconn, "SELECT * FROM agenda");
>> ....
>> ?>
>>
>> If i call this script via a web browser i got in apache log:
>>
>> [Fri Feb 22 21:40:30 2008] [error] [client 192.168.0.22] *** glibc
>> detected *** free(): invalid pointer: 0xb6b3f880 ***
>> [Fri Feb 22 21:40:30 2008] [error] [client 192.168.0.22] Premature end
>> of script headers: listepg.php
>>
>> If i call this script on command line, same error:
>>
>> etch:/web/clients/client1/www# php -c ../php.ini listepg.php
>> connexion*** glibc detected *** free(): invalid pointer: 0xb48b8280 ***
>> Abandon
>>
>> I'm knocking my head on the walls since several months about this issue
>> which i didn't meet with previous versions of php (i compile myself
>> since php-5.0.0RC1). All was working fine until i upgrade to php-5.2.x.
>>
>> More strange: i've installed php-xxx.deb from dotdeb packages (added in
>> my sources.list) where these extensions are shared and in this case all
>> works fine. I've asked dotdeb developper what may cause this issue on my
>> box but he couldn't spent many time to debug my problem.
>>
>> In doubt, i've reinstalled all libxxxx-dev invoked by configure script
>> but always same error. I've tried on 2 others machines with same distro
>> and i got same error, too.
>>
>> I think i make a mistake during php configuration but can't find where.
>>
>> Any help/idea please ...
>>
>> If you need more info, i can provide them
>
> Hello
>
> download the php-xxx.diff.gz from dotdeb source repo and see if there
> any differences in the debian/rules file from this diff to your
> configure options. The debian/control file has listed all the
> dependencies for build the php-xxx.deb packages. See also in this file
> for mistakes in your environment.
>
> Greetings
> Mario
>

Thanks for your answer Mario.

I've effectively found many diff with dotdeb configure scripts.

I will try a new compil next week and keep you informed.

thanks again
Patrick

attached mail follows:


Mario Guenterberg a écrit :
> On Sat, Feb 23, 2008 at 12:03:16PM +0100, phppmenier.net wrote:
>> Hello all
>>
>> I got "glibc detected" errors about several php extensions on my debian
>> box both by executing php-cgi or php-cli.
>>
>> Config:
>> # cat /proc/version
>> Linux version 2.6.24-rc7-vs2.2.0.5.0.7 (rootetch) (gcc version 4.1.2
>> 20061115 (prerelease) (Debian 4.1.1-21)) #2 SMP
>>
>> # gcc --version
>> gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
>>
>> # dpkg -l libc6
>> libc6 2.3.6.ds1-13etch5
>>
>> I'm running on debian-etch stable/backports.
>>
>> I build php-5.2.5 with this configure line:
>>
>> ./configure --enable-bcmath --enable-calendar --enable-exif
>> --enable-ftp --enable-shmop --enable-soap --enable-sockets
>> --enable-sysvmsg --enable-sysvsem --enable-sysvshm
>> --enable-memory-limit --enable-wddx --enable-fastcgi --enable-dio
>> --enable-dmalloc --enable-force-cgi-redirect --enable-discard-path
>> --with-gmp=shared,/usr --with-gettext=shared,/usr
>> --with-mysql=shared,/usr --with-pdo-mysql=shared,/usr
>> --with-mysqli=shared --with-gd=shared --with-jpeg-dir=/usr
>> --with-png-dir=/usr --with-zlib --with-zlib-dir=/usr
>> --with-xpm-dir=/usr --with-freetype-dir=/usr --with-libt1=/usr
>> --enable-gd-native-ttf --with-pgsql=shared,/usr
>> --with-pdo-pgsql=shared,/usr --with-curl=shared,/usr
>> --with-curlwrappers --with-xsl --with-xmlrpc --enable-xslt
>> --with-xslt-sablot=/usr --with-mhash=shared,/usr
>> --enable-dba=shared,/usr --with-gdbm=/usr --with-db4=/usr --with-cdb
>> --with-mm=/usr --with-bz2=shared,/usr --with-imap=shared,/usr
>> --with-kerberos --with-imap-ssl --with-readline --with-pcre-regex
>> --enable-pcntl --enable-simplexml --enable-ctype
>> --with-ming=shared,/usr --with-ncurses=shared,/usr --enable-mbstring
>> --with-inifile --with-flatfile --with-iconv --with-ldap=shared,/usr
>> --enable-gd-native-ttf --with-dom=/usr --with-dom-xslt=/usr
>> --with-dom-exslt=/usr --with-expat-dir=/usr --with-zip=shared,/usr
>> --with-openssl=/usr --with-snmp=shared,/usr --with-ttf=shared,/usr
>> --with-libxml-dir=/usr --enable-dbase --enable-dbx --enable-dio
>> --enable-filepro --enable-sqlite-utf8 --with-mcrypt=shared,/usr
>> --with-pspell=shared,/usr --with-unixODBC=shared,/usr
>>
>> The errors occurs when i want to activate several shared extensions:
>> pgsql, snmp, mcrypt.
>>
>> I'm really confused because if i build these extensions statically all
>> works fine ( ./configure ..blabla... --with-pgsql ... --with-mcrypt )
>>
>> I've a little script script to test pgsql connection :
>>
>> <?
>> $dbconn = pg_connect("host=192.168.0.230 port=5432 user=demo
>> password=demo dbname=demo");
>> $query = pg_exec ($dbconn, "SELECT * FROM agenda");
>> ....
>> ?>
>>
>> If i call this script via a web browser i got in apache log:
>>
>> [Fri Feb 22 21:40:30 2008] [error] [client 192.168.0.22] *** glibc
>> detected *** free(): invalid pointer: 0xb6b3f880 ***
>> [Fri Feb 22 21:40:30 2008] [error] [client 192.168.0.22] Premature end
>> of script headers: listepg.php
>>
>> If i call this script on command line, same error:
>>
>> etch:/web/clients/client1/www# php -c ../php.ini listepg.php
>> connexion*** glibc detected *** free(): invalid pointer: 0xb48b8280 ***
>> Abandon
>>
>> I'm knocking my head on the walls since several months about this issue
>> which i didn't meet with previous versions of php (i compile myself
>> since php-5.0.0RC1). All was working fine until i upgrade to php-5.2.x.
>>
>> More strange: i've installed php-xxx.deb from dotdeb packages (added in
>> my sources.list) where these extensions are shared and in this case all
>> works fine. I've asked dotdeb developper what may cause this issue on my
>> box but he couldn't spent many time to debug my problem.
>>
>> In doubt, i've reinstalled all libxxxx-dev invoked by configure script
>> but always same error. I've tried on 2 others machines with same distro
>> and i got same error, too.
>>
>> I think i make a mistake during php configuration but can't find where.
>>
>> Any help/idea please ...
>>
>> If you need more info, i can provide them
>
> Hello
>
> download the php-xxx.diff.gz from dotdeb source repo and see if there
> any differences in the debian/rules file from this diff to your
> configure options. The debian/control file has listed all the
> dependencies for build the php-xxx.deb packages. See also in this file
> for mistakes in your environment.
>
> Greetings
> Mario
>

Thanks for your answer Mario.

I've effectively found many diff with dotdeb configure scripts.

I will try a new compil next week and keep you informed.

thanks again
Patrick

attached mail follows:


Hi all, it's been a while since I've written with a regex problem.
This time, I'm stumped.

I've got some text that needs to have five letters, if found not at
the end of a word, to be replaced with different letters. For
instance, should the letter "a" be found at the end of a word, leave
it alone. Should the letter "a" be found anywhere else in the word
(beginning, middle, or by itself) then change it into "A". Sound
frustrating? It is, at least to me. Can someone help out?

For those who want more details for curiosity's sake, I'm writing a
Hebrew transliteration engine for the gibberish.co.il website. This
function will handle the Final Letter situations.

Thanks in advance.

Dotan Cohen

http://what-is-what.com
http://gibberish.co.il
×-ב-×’-ד-×”-ו-×–-×—-ט-×™-ך-×›-ל-×-מ-ן-× -ס-×¢-×£-פ-×¥-צ-×§-ר-ש-ת

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?