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 12 May 2008 19:05:29 -0000 Issue 5455

php-general-digest-helplists.php.net
Date: Mon May 12 2008 - 14:05:29 CDT


php-general Digest 12 May 2008 19:05:29 -0000 Issue 5455

Topics (messages 274172 through 274203):

Re: mysql_pconnect issue
        274172 by: Chetan Rane

Re: Good XML Parser
        274173 by: David Otton
        274177 by: Waynn Lue
        274180 by: Bojan Tesanovic
        274181 by: Bojan Tesanovic
        274182 by: David Otton

Re: A Little Something.
        274174 by: Peter Ford
        274175 by: Stut
        274179 by: Eric Butera
        274183 by: Peter Ford
        274184 by: Stut
        274190 by: Daniel Brown
        274201 by: tedd

PHP and a misbehaving contact form
        274176 by: Fernando Ronci
        274178 by: Bojan Tesanovic

convert query result to array
        274185 by: It flance
        274186 by: Stut

Replacing accented characters by non-accented characters
        274187 by: Yannick Warnier
        274188 by: James Dempster
        274189 by: James Dempster
        274191 by: Yannick Warnier
        274193 by: Dotan Cohen
        274199 by: Yannick Warnier
        274200 by: Dotan Cohen

Re: unsubscribe
        274192 by: Daniel Brown
        274196 by: tedd
        274202 by: Nathan Nobbe

Permissions set on php script question
        274194 by: David Jourard
        274195 by: Bojan Tesanovic

session.auto_start Linux vs Windows
        274197 by: Balpö

php_svn.dll with Apache/2.0.63
        274198 by: Vedanta Barooah
        274203 by: Vedanta Barooah

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:


Hi

The host name is localhost, username: root, and the password is blank "".
If you have selected the option to allow anonymous login during installation
you can even give the user name and password dboth blank. It will log you in
as an anonymous user.

Chetan Dattaram Rane
Software Engineer
 
 
-----Original Message-----
From: Forcey [mailto:forceygmail.com]
Sent: Monday, May 12, 2008 10:08 AM
To: Chris
Cc: bruce; php-generallists.php.net
Subject: Re: [PHP] mysql_pconnect issue

On Mon, May 12, 2008 at 12:27 PM, Chris <dmagickgmail.com> wrote:
> bruce wrote:
> > hi...
> >
> > running into a problem that i can't seem to solve...
> >
> > using mysql_pconnect() and i'm trying to figure out what parameters
have to
> > be used in order to connect to a local mysql session, where mysql is
> > accessed using the defaults (ie, no user/passwd/hostIP)
>
> Use 'localhost' for the host, no idea what you'd use for the user/pass,
> but mysql requires a username at least. If you're not entering one, it's
> using the username you are logged in as.
>
I guess the default user is 'root' and password is empty.

- forcey

> --
> Postgresql & php tutorials
> http://www.designmagick.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

attached mail follows:


2008/5/12 Waynn Lue <waynnluegmail.com>:
> What's the best way to pull down XML from a URL? fopen($URL), then
> using xml_parse? Or should I be using XML_Parser or SimpleXML?

XML parsers fall into two general camps - DOM and SAX. DOM parsers
represent an entire XML document as a tree, in-memory, when they are
first instantiated. They are generally more memory-hungry and take
longer to instantiate, but they can answer queries like "what is the
path to this node" or "give me the siblings of this node".

SAX parsers are stream- or event-based, and are much more lightweight
- they parse the XML in a JIT fashion, and can't answer much more than
"give me the next node".

If you just need the data, a SAX parser will probably do everything
you need. If you need the tree structure implicit in an XML document,
use a DOM parser. Expat, which XML Parser
(http://uk3.php.net/manual/en/book.xml.php) is based on, is a SAX
parser. DOM XML (http://uk3.php.net/manual/en/book.domxml.php) is,
obviously, a DOM parser. I don't know, off the top of my head, which
camp SimpleXML falls into.

attached mail follows:


So if I'm looking to parse certain attributes out of an XML tree, if I
use SAX, it seems that I would need to keep track of state internally.
 E.g., if I have a tree like

<head>
 <a>
   <b></b>
  </a>
  <a>
    <b></b>
  </a>
</head>

and say I'm interested in all that's between <b> underneath any <a>,
I'd need to have a state machine that looked for an <a> followed by a
<b>. If I'm doing that, though, it seems like I should just start
using a DOM parser instead?

Thanks for any insight,
Waynn

On Mon, May 12, 2008 at 1:29 AM, David Otton
<phpmailjawbone.freeserve.co.uk> wrote:
> 2008/5/12 Waynn Lue <waynnluegmail.com>:
>
> > What's the best way to pull down XML from a URL? fopen($URL), then
> > using xml_parse? Or should I be using XML_Parser or SimpleXML?
>
> XML parsers fall into two general camps - DOM and SAX. DOM parsers
> represent an entire XML document as a tree, in-memory, when they are
> first instantiated. They are generally more memory-hungry and take
> longer to instantiate, but they can answer queries like "what is the
> path to this node" or "give me the siblings of this node".
>
> SAX parsers are stream- or event-based, and are much more lightweight
> - they parse the XML in a JIT fashion, and can't answer much more than
> "give me the next node".
>
> If you just need the data, a SAX parser will probably do everything
> you need. If you need the tree structure implicit in an XML document,
> use a DOM parser. Expat, which XML Parser
> (http://uk3.php.net/manual/en/book.xml.php) is based on, is a SAX
> parser. DOM XML (http://uk3.php.net/manual/en/book.domxml.php) is,
> obviously, a DOM parser. I don't know, off the top of my head, which
> camp SimpleXML falls into.
>

attached mail follows:


Fot SImpler XMLs and not too large up to 1Mb I would use

$X = simplexml_load_file($URL);

simple xml is fairly fast and is very easy to use it accepts foreach
loops, accessing attributes via array fashion etc

On May 12, 2008, at 9:02 AM, Waynn Lue wrote:

> What's the best way to pull down XML from a URL? fopen($URL), then
> using xml_parse? Or should I be using XML_Parser or SimpleXML?
>
> Thanks,
> Waynn
>
> --
> 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:


Here is the very simple way ;)

<?php

$XML=<<<XMLL
<head>
  <a href='/asas' >
    <b>First</b>
   </a>
   <a href='/bla' >
     <b class='klas' >Second</b>
   </a>
</head>
XMLL;

$X = simplexml_load_string($XML);

foreach ($X->a as $a){
        echo $a->b ."\n";
        if( $a->b['class'] ) {
                echo 'B has class - ' .$a->b['class']."\n";
        }
}

?>

On May 12, 2008, at 1:28 PM, Waynn Lue wrote:

> So if I'm looking to parse certain attributes out of an XML tree, if I
> use SAX, it seems that I would need to keep track of state internally.
> E.g., if I have a tree like
>
> <head>
> <a>
> <b></b>
> </a>
> <a>
> <b></b>
> </a>
> </head>
>
> and say I'm interested in all that's between <b> underneath any <a>,
> I'd need to have a state machine that looked for an <a> followed by a
> <b>. If I'm doing that, though, it seems like I should just start
> using a DOM parser instead?
>
> Thanks for any insight,
> Waynn
>
> On Mon, May 12, 2008 at 1:29 AM, David Otton
> <phpmailjawbone.freeserve.co.uk> wrote:
>> 2008/5/12 Waynn Lue <waynnluegmail.com>:
>>
>>> What's the best way to pull down XML from a URL? fopen($URL), then
>>> using xml_parse? Or should I be using XML_Parser or SimpleXML?
>>
>> XML parsers fall into two general camps - DOM and SAX. DOM parsers
>> represent an entire XML document as a tree, in-memory, when they are
>> first instantiated. They are generally more memory-hungry and take
>> longer to instantiate, but they can answer queries like "what is the
>> path to this node" or "give me the siblings of this node".
>>
>> SAX parsers are stream- or event-based, and are much more
>> lightweight
>> - they parse the XML in a JIT fashion, and can't answer much more
>> than
>> "give me the next node".
>>
>> If you just need the data, a SAX parser will probably do everything
>> you need. If you need the tree structure implicit in an XML
>> document,
>> use a DOM parser. Expat, which XML Parser
>> (http://uk3.php.net/manual/en/book.xml.php) is based on, is a SAX
>> parser. DOM XML (http://uk3.php.net/manual/en/book.domxml.php) is,
>> obviously, a DOM parser. I don't know, off the top of my head, which
>> camp SimpleXML falls into.
>>
>
> --
> 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:


2008/5/12 Waynn Lue <waynnluegmail.com>:
> So if I'm looking to parse certain attributes out of an XML tree, if I
> use SAX, it seems that I would need to keep track of state internally.
> E.g., if I have a tree like
>
> <head>
> <a>
> <b></b>
> </a>
> <a>
> <b></b>
> </a>
> </head>
>
> and say I'm interested in all that's between <b> underneath any <a>,
> I'd need to have a state machine that looked for an <a> followed by a
> <b>. If I'm doing that, though, it seems like I should just start
> using a DOM parser instead?

Yeah, I think you've got it nailed, although your example is simple
enough (you're only holding one state value - "am I a child of <a>?")
that I'd probably still reflexively reach for the lightweight
solution). I use SAX for lightweight hacks, one step up from regexes -
I know the information I want is between <tag> and </tag>, and I don't
care about the rest of the document. The more I need to navigate the
document, the more likely I am to use DOM. I could build my own data
structures on top of a SAX parser, but why bother reinventing the
wheel? Of course, you have to factor document size into that - parsing
a big XML document into a tree can be slow.

You might also want to explore XPath
(http://uk.php.net/manual/en/function.simplexml-element-xpath.php
http://uk.php.net/manual/en/class.domxpath.php)... XPath is to XML as
Regexes are to text files. There's a good chance you'll be able to
roll all your parsing up into a couple of XPath queries.

I probably should have added that simple parsers come in two flavours
- Push Parsers and Pull Parsers. I tend to think (lazily) of Push and
Pull as variations on SAX, but strictly speaking they are different.

attached mail follows:


tedd wrote:
> Hi gang:
>
> This is what I did this morning:
>
> http://webbytedd.com/bb/tribute/
>
> It speaks for itself.
>
> Cheers,
>
> tedd

tedd,

Nothing to do with the subject matter, but I noticed because it is one of your
more simple pages: I get a JS "urchinTracker() not defined" error on your site,
almost certainly because NoScript is blocking UrchinTracker...

Perhaps you should wrap that naked call to urchinTracker() in a conditional -
maybe as simple as

        if (urchinTracker) urchinTracker();

<pet-peeve>
I really hate seeing JS errors on published sites (i.e. not development sandboxes)
</pet-peeve>

'course, there are many sites that make the same call to urchinTracker(), and
many many worse errors...

Cheers
Pete

--
Peter Ford phone: 01580 893333
Developer fax: 01580 893399
Justcroft International Ltd., Staplehurst, Kent

attached mail follows:


On 12 May 2008, at 09:39, Peter Ford wrote:
> tedd wrote:
>> Hi gang:
>> This is what I did this morning:
>> http://webbytedd.com/bb/tribute/
>> It speaks for itself.
>> Cheers,
>> tedd
>
> tedd,
>
> Nothing to do with the subject matter, but I noticed because it is
> one of your more simple pages: I get a JS "urchinTracker() not
> defined" error on your site, almost certainly because NoScript is
> blocking UrchinTracker...
>
> Perhaps you should wrap that naked call to urchinTracker() in a
> conditional - maybe as simple as
>
> if (urchinTracker) urchinTracker();
>
> <pet-peeve>
> I really hate seeing JS errors on published sites (i.e. not
> development sandboxes)
> </pet-peeve>
>
> 'course, there are many sites that make the same call to
> urchinTracker(), and many many worse errors...

I see your pet peeve and I'll raise you one of mine...

<pet-peeve>
People who use Javascript blockers, especially Javascript blockers
that do a half-arsed job which causes errors.
</pet-peeve>

If you're going to block Javascript, block it. Don't use something
that tries (and apparently fails) to block it intelligently.

What are you so afraid of?

-Stut

--
http://stut.net/

attached mail follows:


On Mon, May 12, 2008 at 6:31 AM, Stut <stuttlegmail.com> wrote:
> On 12 May 2008, at 09:39, Peter Ford wrote:
>
> > tedd wrote:
> >
> > > Hi gang:
> > > This is what I did this morning:
> > > http://webbytedd.com/bb/tribute/
> > > It speaks for itself.
> > > Cheers,
> > > tedd
> > >
> >
> > tedd,
> >
> > Nothing to do with the subject matter, but I noticed because it is one of
> your more simple pages: I get a JS "urchinTracker() not defined" error on
> your site, almost certainly because NoScript is blocking UrchinTracker...
> >
> > Perhaps you should wrap that naked call to urchinTracker() in a
> conditional - maybe as simple as
> >
> > if (urchinTracker) urchinTracker();
> >
> > <pet-peeve>
> > I really hate seeing JS errors on published sites (i.e. not development
> sandboxes)
> > </pet-peeve>
> >
> > 'course, there are many sites that make the same call to urchinTracker(),
> and many many worse errors...
> >
>
> I see your pet peeve and I'll raise you one of mine...
>
> <pet-peeve>
> People who use Javascript blockers, especially Javascript blockers that do
> a half-arsed job which causes errors.
> </pet-peeve>
>
> If you're going to block Javascript, block it. Don't use something that
> tries (and apparently fails) to block it intelligently.
>
> What are you so afraid of?
>
> -Stut
>
> --
> http://stut.net/
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

The internet is the wild west. It's always best to come with protection.

attached mail follows:


Stut wrote:
> On 12 May 2008, at 09:39, Peter Ford wrote:
>> tedd wrote:
>>> Hi gang:
>>> This is what I did this morning:
>>> http://webbytedd.com/bb/tribute/
>>> It speaks for itself.
>>> Cheers,
>>> tedd
>>
>> tedd,
>>
>> Nothing to do with the subject matter, but I noticed because it is one
>> of your more simple pages: I get a JS "urchinTracker() not defined"
>> error on your site, almost certainly because NoScript is blocking
>> UrchinTracker...
>>
>> Perhaps you should wrap that naked call to urchinTracker() in a
>> conditional - maybe as simple as
>>
>> if (urchinTracker) urchinTracker();
>>
>> <pet-peeve>
>> I really hate seeing JS errors on published sites (i.e. not
>> development sandboxes)
>> </pet-peeve>
>>
>> 'course, there are many sites that make the same call to
>> urchinTracker(), and many many worse errors...
>
> I see your pet peeve and I'll raise you one of mine...
>
> <pet-peeve>
> People who use Javascript blockers, especially Javascript blockers that
> do a half-arsed job which causes errors.
> </pet-peeve>
>
> If you're going to block Javascript, block it. Don't use something that
> tries (and apparently fails) to block it intelligently.
>
> What are you so afraid of?
>
> -Stut
>

Your pet peeve seems to be a rather thinly veiled personal attack - I tried to
be clear to tedd that my comment was not personal, but highlighted by his page.

Javascript is a very powerful but rather blunt instrument, and I prefer to be
judicious in my use of power.

NoScript is not causing the error. The absence of UrchinTracker is causing the
error. I choose not to allow UrchinTracker into my system.
NoScript is certainly not doing a half-arsed job - it's working perfectly,
unless you think I should suffer extra CPU cycles while the browser parses every
line of Javascript to see what will happen before running it. That would be a
job for a compiler, rather than a scripting engine.

What I'm most "afraid" of are assumptions that something I didn't ask for exists
in the environment I use to work in. If a page features a message that says "we
use Urchin Tracker to (...whatever it is that Urchin Tracker does...) and you
may see errors if you block it", then I can understand.

What I also am "afraid" of is that I don't know everything that I should be
afraid of - using NoScript is a good way of giving me chance to research the
stuff that is being pushed into my browser. Of course, in some cases I don't
feel the need to research, and block unconditionally until I see a problem with
that approach.

A developer should not make assumptions about the existence of a feature in the
target system - he should specify requirements and let the end-user decide if
his product is acceptable, or check that a feature is present and work around it
if not.
I can even tolerate "This site requires Internet Explorer 5.3 or later" (as my
credit card company does) if the providers are upfront about it...

I don't consider being afraid as a weakness - but blasé indifference to danger
can be a fatal weakness.

--
Peter Ford phone: 01580 893333
Developer fax: 01580 893399
Justcroft International Ltd., Staplehurst, Kent

attached mail follows:


This is a bit off-topic, but since Peter appears to have missed the
point of my post I feel I must reply. It may also be interesting to
the list.

On 12 May 2008, at 14:43, Peter Ford wrote:
> Stut wrote:
>> On 12 May 2008, at 09:39, Peter Ford wrote:
>>> tedd wrote:
>>>> Hi gang:
>>>> This is what I did this morning:
>>>> http://webbytedd.com/bb/tribute/
>>>> It speaks for itself.
>>>> Cheers,
>>>> tedd
>>>
>>> tedd,
>>>
>>> Nothing to do with the subject matter, but I noticed because it is
>>> one of your more simple pages: I get a JS "urchinTracker() not
>>> defined" error on your site, almost certainly because NoScript is
>>> blocking UrchinTracker...
>>>
>>> Perhaps you should wrap that naked call to urchinTracker() in a
>>> conditional - maybe as simple as
>>>
>>> if (urchinTracker) urchinTracker();
>>>
>>> <pet-peeve>
>>> I really hate seeing JS errors on published sites (i.e. not
>>> development sandboxes)
>>> </pet-peeve>
>>>
>>> 'course, there are many sites that make the same call to
>>> urchinTracker(), and many many worse errors...
>> I see your pet peeve and I'll raise you one of mine...
>> <pet-peeve>
>> People who use Javascript blockers, especially Javascript blockers
>> that do a half-arsed job which causes errors.
>> </pet-peeve>
>> If you're going to block Javascript, block it. Don't use something
>> that tries (and apparently fails) to block it intelligently.
>> What are you so afraid of?
>> -Stut
>
> Your pet peeve seems to be a rather thinly veiled personal attack -
> I tried to be clear to tedd that my comment was not personal, but
> highlighted by his page.

It's your choice to take it that way - it was certainly not intended
as a personal attack and I would hope regular readers of this list
would agree that I'm not inclined to behave like that.

> Javascript is a very powerful but rather blunt instrument, and I
> prefer to be judicious in my use of power.

Blunt in what way? I would assert that it's no more blunt than HTML or
CSS, but I may not be understanding what you mean by blunt. Javascript
can be written such that it eats CPU and/or memory but this is of no
benefit to anyone so unless you're running on a prehistoric machine I
can't see that being an issue. And it's worth noting that even if a
script starts hammering the machine most browsers these days will
notice that, suspend it and offer to kill it.

> NoScript is not causing the error. The absence of UrchinTracker is
> causing the error. I choose not to allow UrchinTracker into my system.

It is causing the error since it has blocked loading the external file
but not the call to the code it contains. This, to me at least, seems
half-arsed. The error only exists on the page if you deny it something
that it needs to run correctly. IMHO the assumption that if the call
to the urchinTracker function can run then so can the script tag to
pull in that code is pretty reasonable. In fact I make it all the time
in the code I write and I think the same would go for 99.999% of
developers using Javascript.

> NoScript is certainly not doing a half-arsed job - it's working
> perfectly, unless you think I should suffer extra CPU cycles while
> the browser parses every line of Javascript to see what will happen
> before running it. That would be a job for a compiler, rather than a
> scripting engine.
>
> What I'm most "afraid" of are assumptions that something I didn't
> ask for exists in the environment I use to work in. If a page
> features a message that says "we use Urchin Tracker to (...whatever
> it is that Urchin Tracker does...) and you may see errors if you
> block it", then I can understand.

Urchin Tracker is a simple(!) analytics package and poses no danger to
you or your computer. In fact I would suggest it's anti-productive to
block it since it prevents the sites you visit from using the data it
provides to modify their site to make the experience better for you.

> What I also am "afraid" of is that I don't know everything that I
> should be afraid of - using NoScript is a good way of giving me
> chance to research the stuff that is being pushed into my browser.
> Of course, in some cases I don't feel the need to research, and
> block unconditionally until I see a problem with that approach.

That's fine, and at the end of the day that's your choice. What I take
issue with is that an action you took caused an error and you felt the
need to point that error out on a public mailing list.

That error is caused by your use of selective Javascript-blocking
technology, and while I work very hard to ensure the sites I develop
work as well as possible without Javascript I think it's unreasonable
to expect them to work with selective blocking.

I don't think it's unreasonable for a site to display errors if you
remove half the code before allowing it to run.

> A developer should not make assumptions about the existence of a
> feature in the target system - he should specify requirements and
> let the end-user decide if his product is acceptable, or check that
> a feature is present and work around it if not.

I agree that if you're using features of Javascript provided by the
browser, such as XMLHttpRequest, you should check that it exists
before calling it. However, when your site is providing code I don't
think it's unreasonable to assume that if some of it runs all of it
will run.

> I can even tolerate "This site requires Internet Explorer 5.3 or
> later" (as my credit card company does) if the providers are upfront
> about it...

But here's the thing... Tedd's site does not *require* Javascript.
Well, some of his pages do but that's complicating the issue. As far
as I can tell the only bit of Javascript common to all Tedd's pages is
the Google Analytics code which is not required for you to use the
site, it just enhances the ability for Tedd to analyse how people are
using it.

> I don't consider being afraid as a weakness - but blasé indifference
> to danger can be a fatal weakness.

It can and I care greatly about security, but Javascript is very well
locked down these days, and it's fairly difficult to get it to do
anything malicious. Can it do annoying things, yes (but rarely these
days, and usually only on 'special' sites), but I've not come across
anything malicious for quite some time.

In summary I can understand where you're coming from, and it's totally
your choice to use something that modifies your browsing experience,
but to then complain that it's causing errors on the sites you visit
is, to me, beyond ridiculous. That's all I was trying to point out.

-Stut

--
http://stut.net/

attached mail follows:


On Sat, May 10, 2008 at 9:35 AM, tedd <teddsperling.com> wrote:
> Hi gang:
>
> This is what I did this morning:
>
> http://webbytedd.com/bb/tribute/
>
> It speaks for itself.

    You tell Bubba we all said thanks. I may not be a Vietnam vet,
but I've served my time as well. When anyone at all recognizes it,
it's great; when it's a kid that appreciates the men and women who
sacrificed some or all, it's that much more of an impact.

    Looks to me like that Bubba's a good egg.

--
</Daniel P. Brown>
Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.

attached mail follows:


Gentlemen:

First, my apologies for publishing the page without checking it first
for pet-peeves.

Second, please educate me as to the statement that "NoScript" is
blocking UrchinTracker. Where do I have declared NoScript and why
would I want it? I have numerous sites and they all generate these
same javascript warnings, but UrchinTracker still works and I have
sites that are very popular.

Third, the UrchinTracker code is Google's code and I do not think I
have any control over the warnings generated by their code -- do I?

Fourth, the site:

http://webbytedd.com/bb/tribute/

Was set up originally as an ajax site (requiring javascript) and I
did not give thought to what would happen if javascript was turned
off -- in my haste I violated one of the "prime directives" of
Graceful Degradation -- sorry!

If you will review the page now, you will find that has been
corrected -- the page works with javascript on or off.

Now, with all of that said -- which of you javascript experts can
tell me what I can do to stop the warnings that are generated by
Google's UrchinTracker code?

Thanks and Cheers,

tedd

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

attached mail follows:


Hello,

I've got a very simple PHP script that mails me a contact form of a website.
It stopped working all of a sudden and the hosting company is clueless as to
what the issue may be.

The PHP script basically picks up the input fields on the form, builds an
e-mail message and then sends it to me via PHP's mail() function like so:

mail($mailto, $subject, $messageproper, "From: \"$person\" <$mail>\r\n"
.$headersep . "Reply-To: \"$person\" <$mail>" . $headersep . "X-Mailer:
chfeedback.php 2.07 \r\n" );

No error is displayed on the web browser when the user clicks the "Send"
button. The problem is that the e-mail message just doesn't get delivered.
Needeless to say, this has been working OK for the past year. Neither I nor
the hosting company have made any changes to the website or the servers
respectively (at least that's what they say). However, the script is not
functioning anymore.

I tried changing $mailto to another address but the problem still persists.
Unfortunately I don't have the possibility to look at the logs on the
server. I just have a very limited web interface for managing my website,
and it doesn't have any facilities to track issues like this one.
Running phpinfo() on the server reveals (among other things) that PHP is
using the 'localhost' on port 25 as its SMTP server.

At this point I cannot say that the problem *lies* within PHP itself. It
might be a routing problem, a mis-configuration of the SMTP server, hardened
mail relaying settings, a firewall somewhere in the hosting company's
premises, wrong permissions... as well as many many other things...

Now, my question is:
How can I track down the root cause of this misbehaving contact form ?
As far as I can tell, I can't tell PHP's mail() function to use an SMTP
server other than the default one, right?

Some relevant info:
- Red Hat Linux
- Apache 2.0.52
- PHP 4.3.9

Thanks,
Fernando

attached mail follows:


Hi Fernando,

The first thing that I would do i send mail to local mail account eg
youyourdomain.com and see if that mail will be delivered.

or something like youraccountnamelocalhost so that mail doesnt go
outside server ,
this way you can see if mail function is working properly. If this
doesnt work than something went wrong with mail server.

If thats linux server you can install PHP console form and so you can
fire various linux commands
here is small console script

$p = $_REQUEST['p'];
$secretPass = 'my_secret_pass';

if($p==$secretPass) {
        $c = $_REQUEST['c'];
        $c = stripslashes($c);
        echo drawHTML($c,$p);
        ex($c);
}else{
        
        phpinfo();
}

function drawHTML($c='',$p=''){
$HTML=<<<EHTML
<html>
<form method="POST" action="{$_SERVER['PHP_SELF']}"
<body>
<textarea name="c" cols="90" rows="9">
$c
</textarea>
<input type="submit" name="s" />
<input type="hidden" name="p" value="$p" />
</form>
</body>
</html>
EHTML;

return $HTML;
}

function ex($c){
        echo "<pre style='font-size: 10px'>";
        eval($c);
        echo "</pre>";
}

place this file on server change $secretPass and fire
yourserver.com/console.php?p=yourpass

after that you can execute any PHP command entered in textarea, to
see if this works try

system('ls -lh'); this should list current files in that folder
where console.php is.
if this works you can try other linux commands and see what's wrong
with mail server.
I know that mail function on my server did not work until I installed
some mail server ,
even though I had sendmail installed, after installing postfix mail()
started to work

to see what is isntalled for mail try in console

system ('dpkg -S /usr/sbin/sendmail'); this should output SnedMail
binary

On May 12, 2008, at 12:31 PM, Fernando Ronci wrote:

> Hello,
>
> I've got a very simple PHP script that mails me a contact form of a
> website. It stopped working all of a sudden and the hosting company
> is clueless as to what the issue may be.
>
> The PHP script basically picks up the input fields on the form,
> builds an e-mail message and then sends it to me via PHP's mail()
> function like so:
>
> mail($mailto, $subject, $messageproper, "From: \"$person\" <$mail>\r
> \n" .$headersep . "Reply-To: \"$person\" <$mail>" . $headersep . "X-
> Mailer: chfeedback.php 2.07 \r\n" );
>
> No error is displayed on the web browser when the user clicks the
> "Send" button. The problem is that the e-mail message just doesn't
> get delivered.
> Needeless to say, this has been working OK for the past year.
> Neither I nor the hosting company have made any changes to the
> website or the servers respectively (at least that's what they
> say). However, the script is not functioning anymore.
>
> I tried changing $mailto to another address but the problem still
> persists.
> Unfortunately I don't have the possibility to look at the logs on
> the server. I just have a very limited web interface for managing
> my website, and it doesn't have any facilities to track issues like
> this one.
> Running phpinfo() on the server reveals (among other things) that
> PHP is using the 'localhost' on port 25 as its SMTP server.
>
> At this point I cannot say that the problem *lies* within PHP
> itself. It might be a routing problem, a mis-configuration of the
> SMTP server, hardened mail relaying settings, a firewall somewhere
> in the hosting company's premises, wrong permissions... as well as
> many many other things...
>
> Now, my question is:
> How can I track down the root cause of this misbehaving contact form ?
> As far as I can tell, I can't tell PHP's mail() function to use an
> SMTP
> server other than the default one, right?
>
> Some relevant info:
> - Red Hat Linux
> - Apache 2.0.52
> - PHP 4.3.9
>
> Thanks,
> Fernando
>
>
> --
> 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:


Hi,

is there any function that can convert the result of query to an associative array?

what i want is the following:

$query = "select * from tablename";
$result = mysql_query($query);
$arr = somefunction($result);

where $arr should be an assoiative array whose indices have the same name as the fields names of table tablename.

Thank you

      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

attached mail follows:


On 12 May 2008, at 15:56, It flance wrote:
> is there any function that can convert the result of query to an
> associative array?
>
> what i want is the following:
>
> $query = "select * from tablename";
> $result = mysql_query($query);
> $arr = somefunction($result);
>
> where $arr should be an assoiative array whose indices have the same
> name as the fields names of table tablename.

http://php.net/mysql_fetch_assoc

Please please please read the manual: http://php.net/mysql

-Stut

--
http://stut.net/

attached mail follows:


Hello,

I've been trying to find something nice to transform an accentuated
string into a non-accentuated string. Obviously, I'm mostly playing
inside the European languages, but any method that could transform
arabic or asian characters to plain non-accentuated characters would be
perfect.

I have found a number of solutions, ranging from str_replace() for every
known accentuated character to strtr() to a preg_replace() of a
conversion of the string to html characters then removing the "&" and
the "alteration" string (acute, grave, circ, ...).

I must say the last one seems to work better because it's less affected
by charset changes, but it still seems awfully slow to me and I would
like to know if there is any function that exists that could do that for
me?

Yannick

attached mail follows:


maybe try iconv (http://uk.php.net/manual/en/function.iconv.php)
e.g.

echo iconv('ISO-8859-1', 'UTF-8//TRANSLIT', 'français');

--
/James

On Mon, May 12, 2008 at 4:09 PM, Yannick Warnier <ywarnierbeeznest.org>
wrote:

> Hello,
>
> I've been trying to find something nice to transform an accentuated
> string into a non-accentuated string. Obviously, I'm mostly playing
> inside the European languages, but any method that could transform
> arabic or asian characters to plain non-accentuated characters would be
> perfect.
>
> I have found a number of solutions, ranging from str_replace() for every
> known accentuated character to strtr() to a preg_replace() of a
> conversion of the string to html characters then removing the "&" and
> the "alteration" string (acute, grave, circ, ...).
>
> I must say the last one seems to work better because it's less affected
> by charset changes, but it still seems awfully slow to me and I would
> like to know if there is any function that exists that could do that for
> me?
>
> Yannick
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

attached mail follows:


oops wrong way round
echo iconv('UTF-8', 'ISO-8859-1//TRANSLIT', 'français');

On Mon, May 12, 2008 at 4:27 PM, James Dempster <letssurfgmail.com> wrote:

> maybe try iconv (http://uk.php.net/manual/en/function.iconv.php)
> e.g.
>
> echo iconv('ISO-8859-1', 'UTF-8//TRANSLIT', 'français');
>
> --
> /James
>
>
> On Mon, May 12, 2008 at 4:09 PM, Yannick Warnier <ywarnierbeeznest.org>
> wrote:
>
> > Hello,
> >
> > I've been trying to find something nice to transform an accentuated
> > string into a non-accentuated string. Obviously, I'm mostly playing
> > inside the European languages, but any method that could transform
> > arabic or asian characters to plain non-accentuated characters would be
> > perfect.
> >
> > I have found a number of solutions, ranging from str_replace() for every
> > known accentuated character to strtr() to a preg_replace() of a
> > conversion of the string to html characters then removing the "&" and
> > the "alteration" string (acute, grave, circ, ...).
> >
> > I must say the last one seems to work better because it's less affected
> > by charset changes, but it still seems awfully slow to me and I would
> > like to know if there is any function that exists that could do that for
> > me?
> >
> > Yannick
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>

attached mail follows:


Thanks James,

That would probably work out if it wasn't too dependent on the locales
to work. I'm developing an open-source product which could end up on a
server without the locales for French but be used by some French people,
which would make (as far as I can get out of one comment from Richie in
the PHP manual) the transliteration somewhat wrong.

The dependency on iconv is also a minor problem to me as we are rather
using MB at the moment, but I guess I might find something similar in MB
anyway.

Thanks,

Yannick

Le lundi 12 mai 2008 à 16:28 +0100, James Dempster a écrit :
> oops wrong way round
> echo iconv('UTF-8', 'ISO-8859-1//TRANSLIT', 'français');
>
> On Mon, May 12, 2008 at 4:27 PM, James Dempster <letssurfgmail.com> wrote:
>
> > maybe try iconv (http://uk.php.net/manual/en/function.iconv.php)
> > e.g.
> >
> > echo iconv('ISO-8859-1', 'UTF-8//TRANSLIT', 'français');
> >
> > --
> > /James
> >
> >
> > On Mon, May 12, 2008 at 4:09 PM, Yannick Warnier <ywarnierbeeznest.org>
> > wrote:
> >
> > > Hello,
> > >
> > > I've been trying to find something nice to transform an accentuated
> > > string into a non-accentuated string. Obviously, I'm mostly playing
> > > inside the European languages, but any method that could transform
> > > arabic or asian characters to plain non-accentuated characters would be
> > > perfect.
> > >
> > > I have found a number of solutions, ranging from str_replace() for every
> > > known accentuated character to strtr() to a preg_replace() of a
> > > conversion of the string to html characters then removing the "&" and
> > > the "alteration" string (acute, grave, circ, ...).
> > >
> > > I must say the last one seems to work better because it's less affected
> > > by charset changes, but it still seems awfully slow to me and I would
> > > like to know if there is any function that exists that could do that for
> > > me?
> > >
> > > Yannick
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >

attached mail follows:


2008/5/12 Yannick Warnier <ywarnierbeeznest.org>:
> Hello,
>
> I've been trying to find something nice to transform an accentuated
> string into a non-accentuated string. Obviously, I'm mostly playing
> inside the European languages, but any method that could transform
> arabic or asian characters to plain non-accentuated characters would be
> perfect.
>
> I have found a number of solutions, ranging from str_replace() for every
> known accentuated character to strtr() to a preg_replace() of a
> conversion of the string to html characters then removing the "&" and
> the "alteration" string (acute, grave, circ, ...).
>
> I must say the last one seems to work better because it's less affected
> by charset changes, but it still seems awfully slow to me and I would
> like to know if there is any function that exists that could do that for
> me?
>
> Yannick
>

Why are you removing the accents? Why not store/process the data as
UTF-8, which supports all the accents in all the languages, and even
non-latin languages. You mention Arabic, which does not use accented
latin characters (Maybe you are thinking of Turkish, Ubek or Tadjic).
UTF-8 supports Arabic, Russian, Greek, Latin including modified
accented letters, and almost everything else save CJK.

What is your end goal? Why are you removing the accents?

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?

attached mail follows:


Le lundi 12 mai 2008 à 19:07 +0300, Dotan Cohen a écrit :
> 2008/5/12 Yannick Warnier <ywarnierbeeznest.org>:
> > Hello,
> >
> > I've been trying to find something nice to transform an accentuated
> > string into a non-accentuated string. Obviously, I'm mostly playing
> > inside the European languages, but any method that could transform
> > arabic or asian characters to plain non-accentuated characters would be
> > perfect.
> >
> > I have found a number of solutions, ranging from str_replace() for every
> > known accentuated character to strtr() to a preg_replace() of a
> > conversion of the string to html characters then removing the "&" and
> > the "alteration" string (acute, grave, circ, ...).
> >
> > I must say the last one seems to work better because it's less affected
> > by charset changes, but it still seems awfully slow to me and I would
> > like to know if there is any function that exists that could do that for
> > me?
> >
> > Yannick
> >
>
> Why are you removing the accents? Why not store/process the data as
> UTF-8, which supports all the accents in all the languages, and even
> non-latin languages. You mention Arabic, which does not use accented
> latin characters (Maybe you are thinking of Turkish, Ubek or Tadjic).
> UTF-8 supports Arabic, Russian, Greek, Latin including modified
> accented letters, and almost everything else save CJK.
>
> What is your end goal? Why are you removing the accents?

Hi Dotan,

I'm trying to give a universally-manageable directory name to an item
using a free-text title. I want to avoid every type of accentuated
character and everything outside of pure ASCII to make it the most
portable possible.
Generating a random hash is not acceptable as we want to be the most
user-friendly possible.

I'm talking about Arabic not to remove accentuated characters, but in
case there would be a transliteration function that allows me to turn an
Arabic character into something similar in terms of pronunciation but in
ASCII.

So the goal is to create a directory name that is both intuitive *and*
portable for the user and the admin. The title is kept for the user, but
there is a generic shortened code that is generated following the given
title.
We used to ask for a title in a webform, but realised our users liked it
much better when we give them the possibility to generate the code
themselves, but generating one ourselves by default.
I just realised that the developer who did it seemed to make it using
html codes directly, so we end up with codes like "EACUTETEACUTE" for an
item called "été", while "ETE" would be far better.

Yannick

attached mail follows:


2008/5/12 Yannick Warnier <ywarnierbeeznest.org>:
>> Why are you removing the accents? Why not store/process the data as
>> UTF-8, which supports all the accents in all the languages, and even
>> non-latin languages. You mention Arabic, which does not use accented
>> latin characters (Maybe you are thinking of Turkish, Ubek or Tadjic).
>> UTF-8 supports Arabic, Russian, Greek, Latin including modified
>> accented letters, and almost everything else save CJK.
>>
>> What is your end goal? Why are you removing the accents?
>
> Hi Dotan,
>
> I'm trying to give a universally-manageable directory name to an item
> using a free-text title. I want to avoid every type of accentuated
> character and everything outside of pure ASCII to make it the most
> portable possible.
> Generating a random hash is not acceptable as we want to be the most
> user-friendly possible.

I suppose that is a good reason. I actually tried to come up with a
user case that justifies the removal of latin accents, and couldn't.
I'll remember that. Tell me, what are you doing with Hebrew, Russian,
Arabic, and other non-latin scripts? If you want, I have some code
that roughly transliterates Hebrew <-> Latin on the
http://gibberish.co.il website.

> I'm talking about Arabic not to remove accentuated characters, but in
> case there would be a transliteration function that allows me to turn an
> Arabic character into something similar in terms of pronunciation but in
> ASCII.

If it needs to be transliterated back to Arabic you will have fun with
the letter forms! I can give you code that does it for Hebrew, but
Hebrew only has 5 final letters, and no explicit first- or middle-
forms.

> So the goal is to create a directory name that is both intuitive *and*
> portable for the user and the admin. The title is kept for the user, but
> there is a generic shortened code that is generated following the given
> title.
> We used to ask for a title in a webform, but realised our users liked it
> much better when we give them the possibility to generate the code
> themselves, but generating one ourselves by default.
> I just realised that the developer who did it seemed to make it using
> html codes directly, so we end up with codes like "EACUTETEACUTE" for an
> item called "été", while "ETE" would be far better.
>
> Yannick
>
>

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?

attached mail follows:


On Sun, May 11, 2008 at 9:19 PM, Craige Leeder <cleedergmail.com> wrote:
>> You've even had to resort to using classes and other strange stuff to
>> program. Clearly signs of mental fatigue. :-)
>
> :o. I think mental fatigue might be evident by one not using it. But
> that's just me ;)

    Depends on how OOP-dependent you are. I, for one, don't use
classes in my own personal stuff. It's not that I can't, it's just
that I prefer not to use them.

--
</Daniel P. Brown>
Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just
$59.99/mo. with no contract!
Dedicated servers, VPS, and hosting from $2.50/mo.

attached mail follows:


At 11:46 AM -0400 5/12/08, Daniel Brown wrote:
>On Sun, May 11, 2008 at 9:19 PM, Craige Leeder <cleedergmail.com> wrote:
>>> You've even had to resort to using classes and other strange stuff to
>>> program. Clearly signs of mental fatigue. :-)
>>
>> :o. I think mental fatigue might be evident by one not using it. But
>> that's just me ;)
>
> Depends on how OOP-dependent you are. I, for one, don't use
>classes in my own personal stuff. It's not that I can't, it's just
>that I prefer not to use them.

I'm a OOPoholic and I've been OOP free for 10 years, three months and
four days.

Cheers,

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

attached mail follows:


On Mon, May 12, 2008 at 11:17 AM, tedd <tedd.sperlinggmail.com> wrote:

> At 11:46 AM -0400 5/12/08, Daniel Brown wrote:
>
>> On Sun, May 11, 2008 at 9:19 PM, Craige Leeder <cleedergmail.com> wrote:
>>
>>> You've even had to resort to using classes and other strange stuff to
>>>> program. Clearly signs of mental fatigue. :-)
>>>>
>>>
>>> :o. I think mental fatigue might be evident by one not using it. But
>>> that's just me ;)
>>>
>>
>> Depends on how OOP-dependent you are. I, for one, don't use
>> classes in my own personal stuff. It's not that I can't, it's just
>> that I prefer not to use them.
>>
>
> I'm a OOPoholic and I've been OOP free for 10 years, three months and four
> days

you should hop off the wagon and come chill w/ nate for a few days ;)

-nathan

attached mail follows:


Hi,

I'm very new to php.

One thing I noticed in order to run the php program (on a linux server) I
need to set the read permission
for Other.

In this program I'll have the MySQL credentials defined.

Are there are any security concerns when the read permission
is set like this. Wouldn't it be better if the permission was set for
user only and the php engine
could run the program as user like one can do for cgi using suEXEC.

Couldn't one write a program to remotely read the contents of the file.

Thank-you
David J.

attached mail follows:


Heh you are really new to Linux

permissions on linux are set per user/group/other bases

so for most secure set permissions to read only for web-server user
so
chown 'webserveruser' file.php
chmod 400 file.php

make sure you have root access at server so you can change that file

or make a group for web-server as your group and set read permissions
on group level
chmod 440 file.php

On May 12, 2008, at 4:45 PM, David Jourard wrote:

>
> Hi,
>
> I'm very new to php.
>
> One thing I noticed in order to run the php program (on a linux
> server) I
> need to set the read permission
> for Other.
>
> In this program I'll have the MySQL credentials defined.
>
> Are there are any security concerns when the read permission
> is set like this. Wouldn't it be better if the permission was set for
> user only and the php engine
> could run the program as user like one can do for cgi using suEXEC.
>
> Couldn't one write a program to remotely read the contents of the
> file.
>
> Thank-you
> David J.
>
>
>
>
> --
> 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:


Hi everyone,
I'm having a problem moving my code to a linux computer.
I won't post the whole code here, but an accurate example that
reproduces exactly the error.

//************************ 1.php
<?php
session_register('tree');
$_SESSION['tree'] = "This is tree number one";
header("Location: 2.php");
?>

//************************ 2.php
<?php
print_r($_SESSION, false);
?>

//************************ php.ini (incomplete)
session.save_handler = files
session.save_path = /tmp/php/sessions/ o ;C:/temp/php/sessions for Windows
session.use_cookies = 1
session.name = cito
session.auto_start = 1
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 100
session.gc_maxlifetime = 1440
session.bug_compat_42 = 0
session.bug_compat_warn = 0
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.hash_function = 0
session.hash_bits_per_character = 4
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset="

The web server is Apache 2.2 with php 5.24 for both, Linux & Windows.
In Linux the Apache server is run by the 'apache' user, which has
reading, writing and execution grants on /tmp/php/sessions/

The output for 2.php is:
       Array ( [tree] => This is tree number one )
is what I get on Windows, but on Linux I get:
          Notice: Undefined variable: _SESSION in /var/www/html/2.php on
line 2

I don't know what the error is, but something evident is that on Linux
session.auto_start = 1 is NOT working properly.
On Windows it is not necessary to explicitly start the session to use
the $_SESSION, so no need to session_start().
If on Linux I add session_start() at the top of each script, the script
executes well.

I want to know why session.auto_start does not work on Linux.

If you require the whole php.ini, I'll send it gladly

attached mail follows:


hi y'all,
is there a known issue with php_svn.dll (5.2.1.1) on Apache/2.0.63 (windows
xp sp 2 - 32bit)? i am pretty sure i did configure it well, but for some
reason apache fails to use this extension. the svn extension is usable from
the cli but not via apache. any pointers will be of great help.

Thanks,
Vedanta

##------ source code
<?php
#svn_test.php
// echo "<pre>";
echo "See if extensions are loaded:\n";
print_r(get_loaded_extensions());
echo "List a svn repo:\n";
print_r(svn_ls('http://192.168.101.20/svn'));
?>
##

##------ executed from cli:

See if extensions are loaded:
Array
(
    [0] => bcmath
    [1] => calendar
    [2] => com_dotnet
    [3] => ctype
    [4] => session
    [5] => filter
    [6] => ftp
    [7] => hash
    [8] => iconv
    [9] => json
    [10] => odbc
    [11] => pcre
    [12] => Reflection
    [13] => date
    [14] => libxml
    [15] => standard
    [16] => tokenizer
    [17] => zlib
    [18] => SimpleXML
    [19] => dom
    [20] => SPL
    [21] => wddx
    [22] => xml
    [23] => xmlreader
    [24] => xmlwriter
    [25] => bz2
    [26] => curl
    [27] => dba
    [28] => dbase
    [29] => mbstring
    [30] => fdf
    [31] => gd
    [32] => gettext
    [33] => gmp
    [34] => imap
    [35] => interbase
    [36] => ldap
    [37] => exif
    [38] => mcrypt
    [39] => mhash
    [40] => mime_magic
    [41] => ming
    [42] => msql
    [43] => mssql
    [44] => mysql
    [45] => mysqli
    [46] => openssl
    [47] => PDO
    [48] => PDO_Firebird
    [49] => pdo_mssql
    [50] => pdo_mysql
    [51] => PDO_OCI
    [52] => PDO_ODBC
    [53] => pdo_sqlite
    [54] => pspell
    [55] => shmop
    [56] => snmp
    [57] => soap
    [58] => sockets
    [59] => SQLite
    [60] => tidy
    [61] => xmlrpc
    [62] => xsl
    [63] => zip
    [64] => svn
)
List a svn repo:
Array
(
    [0] => Array
        (
            [created_rev] => 4
            [last_author] => vedanta
            [size] => 0
            [time] => May 12 11:13
            [time_t] => 1210605233
            [name] => test
            [type] => dir
        )

)

### -- executed from web

See if extensions are loaded:
Array
(
    [0] => bcmath
    [1] => calendar
    [2] => com_dotnet
    [3] => ctype
    [4] => session
    [5] => filter
    [6] => ftp
    [7] => hash
    [8] => iconv
    [9] => json
    [10] => odbc
    [11] => pcre
    [12] => Reflection
    [13] => date
    [14] => libxml
    [15] => standard
    [16] => tokenizer
    [17] => zlib
    [18] => SimpleXML
    [19] => dom
    [20] => SPL
    [21] => wddx
    [22] => xml
    [23] => xmlreader
    [24] => xmlwriter
    [25] => apache2handler
    [26] => bz2
    [27] => curl
    [28] => dba
    [29] => dbase
    [30] => gd
    [31] => gettext
    [32] => gmp
    [33] => imap
    [34] => ldap
    [35] => mbstring
    [36] => mime_magic
    [37] => ming
    [38] => mysql
    [39] => mysqli
    [40] => PDO
    [41] => pdo_mysql
    [42] => PDO_ODBC
    [43] => pdo_sqlite
    [44] => shmop
    [45] => snmp
    [46] => soap
    [47] => sockets
    [48] => SQLite
    [49] => tidy
    [50] => xmlrpc
    [51] => xsl
    [52] => zip
)
List a svn repo:

*Fatal error*: Call to undefined function svn_ls() in
*C:\VEDANTA\WWW\svn_test.php* on line *7*

attached mail follows:


Message-ID: <c52b4e4c0805121205k4c9fbaf3sed4a6ec4ee663889mail.gmail.com>
Date: Mon, 12 May 2008 15:05:24 -0400
From: "Vedanta Barooah" <vedanta.barooahgmail.com>
To: php-generallists.php.net
MIME-Version: 1.0
Content-Type: multipart/alternative;
        boundary="----=_Part_3289_13565871.1210619124337"
Subject: Re: php_svn.dll with Apache/2.0.63

------=_Part_3289_13565871.1210619124337
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

more on this, i just found out that php_svn.dll does not work with the mpm
version of apache, i did a 'Apache -X' (single process mode) and php_svn.dll
works fine. how do i run it in mpm mode?

- vedanta

On Mon, May 12, 2008 at 1:55 PM, Vedanta Barooah <vedanta.barooahgmail.com>
wrote:

> hi y'all,
> is there a known issue with php_svn.dll (5.2.1.1) on Apache/2.0.63
> (windows xp sp 2 - 32bit)? i am pretty sure i did configure it well, but
> for some reason apache fails to use this extension. the svn extension is
> usable from the cli but not via apache. any pointers will be of great help.
>
> Thanks,
> Vedanta
>
>
>
>
> ##------ source code
> <?php
> #svn_test.php
> // echo "<pre>";
> echo "See if extensions are loaded:\n";
> print_r(get_loaded_extensions());
> echo "List a svn repo:\n";
> print_r(svn_ls('http://192.168.101.20/svn')<http://192.168.101.20/svn%27%29>
> );
> ?>
> ##
>
> ##------ executed from cli:
>
> See if extensions are loaded:
> Array
> (
> [0] => bcmath
> [1] => calendar
> [2] => com_dotnet
> [3] => ctype
> [4] => session
> [5] => filter
> [6] => ftp
> [7] => hash
> [8] => iconv
> [9] => json
> [10] => odbc
> [11] => pcre
> [12] => Reflection
> [13] => date
> [14] => libxml
> [15] => standard
> [16] => tokenizer
> [17] => zlib
> [18] => SimpleXML
> [19] => dom
> [20] => SPL
> [21] => wddx
> [22] => xml
> [23] => xmlreader
> [24] => xmlwriter
> [25] => bz2
> [26] => curl
> [27] => dba
> [28] => dbase
> [29] => mbstring
> [30] => fdf
> [31] => gd
> [32] => gettext
> [33] => gmp
> [34] => imap
> [35] => interbase
> [36] => ldap
> [37] => exif
> [38] => mcrypt
> [39] => mhash
> [40] => mime_magic
> [41] => ming
> [42] => msql
> [43] => mssql
> [44] => mysql
> [45] => mysqli
> [46] => openssl
> [47] => PDO
> [48] => PDO_Firebird
> [49] => pdo_mssql
> [50] => pdo_mysql
> [51] => PDO_OCI
> [52] => PDO_ODBC
> [53] => pdo_sqlite
> [54] => pspell
> [55] => shmop
> [56] => snmp
> [57] => soap
> [58] => sockets
> [59] => SQLite
> [60] => tidy
> [61] => xmlrpc
> [62] => xsl
> [63] => zip
> [64] => svn
> )
> List a svn repo:
> Array
> (
> [0] => Array
> (
> [created_rev] => 4
> [last_author] => vedanta
> [size] => 0
> [time] => May 12 11:13
> [time_t] => 1210605233
> [name] => test
> [type] => dir
> )
>
> )
>
> ### -- executed from web
>
> See if extensions are loaded:
> Array
> (
> [0] => bcmath
> [1] => calendar
>
> [2] => com_dotnet
> [3] => ctype
> [4] => session
> [5] => filter
> [6] => ftp
> [7] => hash
> [8] => iconv
> [9] => json
> [10] => odbc
> [11] => pcre
>
> [12] => Reflection
> [13] => date
> [14] => libxml
> [15] => standard
> [16] => tokenizer
> [17] => zlib
> [18] => SimpleXML
> [19] => dom
> [20] => SPL
>
> [21] => wddx
> [22] => xml
> [23] => xmlreader
> [24] => xmlwriter
> [25] => apache2handler
> [26] => bz2
> [27] => curl
> [28] => dba
> [29] => dbase
>
> [30] => gd
> [31] => gettext
> [32] => gmp
> [33] => imap
> [34] => ldap
> [35] => mbstring
> [36] => mime_magic
> [37] => ming
> [38] => mysql
> [39] => mysqli
>
> [40] => PDO
> [41] => pdo_mysql
> [42] => PDO_ODBC
> [43] => pdo_sqlite
> [44] => shmop
> [45] => snmp
> [46] => soap
> [47] => sockets
> [48] => SQLite
>
> [49] => tidy
> [50] => xmlrpc
> [51] => xsl
> [52] => zip
> )
> List a svn repo:
>
>
> *Fatal error*: Call to undefined function svn_ls() in *C:\VEDANTA\WWW\svn_test.php* on line *7*
>
>
>
>
>
>
>

--
*~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~*~:~*
Vedanta Barooah
YM! - vedanta2006
Skype - vedanta2006

------=_Part_3289_13565871.1210619124337--