php-general Digest 6 Nov 2005 06:59:29 -0000 Issue 3778

Topics (messages 225167 through 225201):

Re: No forums?
        225167 by: Richard Davey
        225172 by: Lester Caine
        225180 by: GamblerZG
        225182 by: GamblerZG
        225183 by: GamblerZG
        225186 by: Robert Cummings
        225187 by: Robert Cummings
        225189 by: Richard Leclair
        225193 by: Leonard Burton
        225196 by: GamblerZG
        225200 by: Richard Davey

Re: PHP 4.4.1 on Apache 2.0.x issue
        225168 by: James Benson
        225170 by: Max Belushkin
        225176 by: James Benson
        225192 by: Max Belushkin

Re: PGP 5 start up issue
        225169 by: Vizion

Template style question
        225171 by: Leonard Burton
        225175 by: Florent Monnier
        225177 by: James Benson
        225178 by: Robert Cummings
        225181 by: James Benson
        225184 by: Robert Cummings
        225190 by: James Benson
        225194 by: Leonard Burton
        225197 by: GamblerZG

php mac folder
        225173 by: Ross
        225174 by: eoghan
        225179 by: Larry E. Ullman
        225188 by: Ross
        225191 by: Ross

preg for unicode strings?
        225185 by: Andy Pieters
        225195 by: Robin Vickery
        225199 by: Niels Ganser
        225201 by: Andy Pieters

Re: How can I track the value in php
        225198 by: comex

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
Hi,

Saturday, November 5, 2005, 3:09:01 AM, you wrote:

> AFAIK, there are no "official" forums for PHP. Considering the fact
> that PHP is a web development tool, such distaste for message boards
> is ironic at the least. So why exactly there aren't any forums on
> php.net?

How about some good logistical reasons? php.net does not exist in any
one location. It does not serve any one language. There are over 100
mirror sites across the entire world handling php.net, from Thailand
to South Africa.

The site is offered in 30+ different languages, English, Chinese,
Swedish, Japanese, etc.

To be true to the php project, if it were to start a forum it would
have to be mirrored across all of these servers, unless you're
advocating country elitism for this forum? (and no, it is not fair to
force users in say Africa to have to connect to a US server).

There is NO off the shelf forum software that can cope with a
distributed forum in this manner, with content and user repositories
spread across so many diverse networks. When you post a message on a
US server, how long before it should appear on the Slovenia mirror? If
it's not instant, it is less useful than the mailing list. So unless
this forum syncs across the 100+ mirrors on an application level,
you're left with a hardware level link-up (duplication of the database
perhaps, whatever). Eitherway it's quite some work, not to mention
expense, especially to keep it real-time.

The reason the mailing list *works* is that the content is delivered
to the people, the people don't have to seek it out. For those in
relatively low-bandwidth countries they get to choose which messages
they want prior to actually downloading them (most mailing packages
offer a read-headers option).

So if you want a "hosted in one country / location" PHP forum there
are plenty out there already, I can think of 4 in my bookmarks alone.
I can't think of any that will give you replies from some of the most
talented php developers in the world though.

If you want one that truly offers what the mailing list provides
already - you're going to have to write it, because it doesn't exist.
Start now and we'll check in on your progress in a years time :)

Cheers,

Rich
-- 
Zend Certified Engineer
PHP Development Services
http://www.corephp.co.uk

--- End Message ---
--- Begin Message ---
GamblerZG wrote:

I do not see anything horrible in my message. It's not like I'm _demanding_ something, or suggesting to tear down mailing lists. Neither did I suggest that mailing lists suck. In case of php.internals they totally make sense. But I _do_ think that forum efficient in case of high-volume messaging.

Having had to endure the newgroup interface while my eMail address was being bounced, I much prefer being able to manage the content of my eMail folders. I don't have to have a network connection while searching or reviewing material and I can add my own local notes as well. Forums are even more restrictive than newsgroups so I don't see that they add anything that is not currently available, and this list has considerably less traffic than some of the others I am a moderator on ;)

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
Treasurer - Firebird Foundation Inc.

--- End Message ---
--- Begin Message --- Assuming something is not a logical fallacy, just like inability to use inductive logic is not a virtue, but rather an extreme case of sophism (I mean the original sophism, which was a name for a certain philosophy).

> Well, it IS extra work.

If nobody needs forums, than the notion of the fact that creating them would require some activity is irrelevant.

If, on the other hand, forums are needed, than the concern should be phrased differently altogether. BTW, what IS you concern?

> The mailing list exists and, many  believe, work just fine.

Currently, the universe is the way it is and, many believe, it works just fine. Why should we do anything at all?

--
Best regards,
Roman S.I.

http://sf.net/projects/naturalgine/

--- End Message ---
--- Begin Message ---
Lester Caine wrote:
> Forums
> are even more restrictive than newsgroups so I don't see that they add
> anything that is not currently available, and this list has considerably
> less traffic than some of the others I am a moderator on ;)

--- End Message ---
--- Begin Message ---
Lester Caine wrote:
GamblerZG wrote:

I do not see anything horrible in my message. It's not like I'm _demanding_ something, or suggesting to tear down mailing lists. Neither did I suggest that mailing lists suck. In case of php.internals they totally make sense. But I _do_ think that forum efficient in case of high-volume messaging.


Having had to endure the newgroup interface while my eMail address was being bounced, I much prefer being able to manage the content of my eMail folders. I don't have to have a network connection while searching or reviewing material and I can add my own local notes as well. Forums are even more restrictive than newsgroups so I don't see that they add anything that is not currently available, and this list has considerably less traffic than some of the others I am a moderator on ;)


I understand that mail lists are convenient for many people. But personally, I would like forums because I do not read all the messages here. Newsgroup partially solves the problem, but it's quite slow, and I can't post from a computer where I did not configure email client. PDA is no good either.

Plus, forums have other nice features: formatting, syntax highlighting, images, ability to edit messages and make them sticky. Also, you can monitor a single thread by email, without receiving all of the messages in the forum.

Finally, forum can be much more newbie-friendly if you allow anonymous users to post. It is the main reason I think there are many other people who would also like to have web conference. Instead of «subscribe, post, wait, receive gadzillion of mails, receive needed reply, unsubscribe, delete gadzillion of mails», it would be just «post, wait, receive reply».

--
Best regards,
Roman S.I.

http://sf.net/projects/naturalgine/

--- End Message ---
--- Begin Message ---
On Sat, 2005-11-05 at 15:24, GamblerZG wrote:
> Assuming something is not a logical fallacy, just like inability to use 
> inductive logic is not a virtue, but rather an extreme case of sophism 
> (I mean the original sophism, which was a name for a certain philosophy).
> 
>  > Well, it IS extra work.
> 
> If nobody needs forums, than the notion of the fact that creating them 
> would require some activity is irrelevant.
> 
> If, on the other hand, forums are needed, than the concern should be 
> phrased differently altogether. BTW, what IS you concern?
> 
>  > The mailing list exists and, many  believe, work just fine.
> 
> Currently, the universe is the way it is and, many believe, it works 
> just fine. Why should we do anything at all?

Why should we continue to listen to your argument, you have your stance
and it's obvious by your responses you are trolling because you
flippantly dismiss all the very valid reasons that have been given to
you.

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.          |
`------------------------------------------------------------'

--- End Message ---
--- Begin Message ---
On Sat, 2005-11-05 at 16:04, GamblerZG wrote:
> It is the main reason I think there are many other people 
> who would also like to have web conference. Instead of «subscribe, post, 
> wait

And how many of these "many" other people in your guesstimate have come
forward to support your notion?

Perhaps you, and they can go ahead and start up your forum. As was
suggested already, if you build it, and if they come, they (the Gods of
PHP) might just officialize it. You have your mandate, feel free to stop
trolling now.

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.          |
`------------------------------------------------------------'

--- End Message ---
--- Begin Message ---
I'm afraid I'm going to have to agree with Rob Cummings on this one.
I have a comment and suggestion:


"Comment":
There is far too much 'spam' about a long-dealt with issue which keeps
flying around, clogging up mailing lists.  It can sometime happens when
people either feel they need to have the last say, or that they are simply
competitive and cannot be "seen to be wrong" in other people's eyes (when,
in fact - nobody really cares anymore on the issue).

When all that is required is for interested parties to air their issues in
emails among themselves, they still insist on including the whole of the
mailing list - if (in their eyes) the opinions of others are important, this
only highlights their insecurities.


"Suggestion:"
To those who don't want to be part of this thread for the next week or two,
simply setup a mail filter with "RE: [PHP] No forums?" in the subject. :P
I'm onto it now.   :)


Regards,
Richie !



> -----Original Message-----
> From: Robert Cummings [mailto:[EMAIL PROTECTED]
> Sent: Sunday, 6 November 2005 5:09 am
> To: GamblerZG
> Cc: PHP-General
> Subject: Re: [PHP] No forums?
> 
> On Sat, 2005-11-05 at 16:04, GamblerZG wrote:
> > It is the main reason I think there are many other people
> > who would also like to have web conference. Instead of <subscribe, post,
> > wait
> 
> And how many of these "many" other people in your guesstimate have come
> forward to support your notion?
> 
> Perhaps you, and they can go ahead and start up your forum. As was
> suggested already, if you build it, and if they come, they (the Gods of
> PHP) might just officialize it. You have your mandate, feel free to stop
> trolling now.
> 
> 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
> 

--- End Message ---
--- Begin Message ---
HI All,

I use gmail and find it to deal with the threading quite nicely.  And
as Richie suggests I can set the filter up very easily.

I think using gmail is much better than a forum but then again, if
someone were to come up with a solution to where a distributed fourm
could be created and have it merged with the mailing list, now there
might be something useful, even if redundant.

Thanks,


--
Leonard Burton, N9URK
[EMAIL PROTECTED]


"The prolonged evacuation would have dramatically affected the
survivability of the occupants."


--
Leonard Burton, N9URK
[EMAIL PROTECTED]


"The prolonged evacuation would have dramatically affected the
survivability of the occupants."

--- End Message ---
--- Begin Message ---
Richard Davey wrote:
> php.net does not exist in any one location.

It's an interesting perspective. Thanks for an insightful reply.

> Start now and we'll check in on your progress in a years time :)

You're joking, but I might actually do it. I was thinking about such forum before. It could be useful for many purposes.

--
Best regards,
Roman S.I.

http://sf.net/projects/naturalgine/

--- End Message ---
--- Begin Message ---
Hi,

Saturday, November 5, 2005, 11:30:29 PM, you wrote:

 >> Start now and we'll check in on your progress in a years time :)

> You're joking, but I might actually do it. I was thinking about such
> forum before. It could be useful for many purposes.

It would be *extremely* useful, but I imagine quite a nightmare to
code properly, or someone would have done so already.

Even so - somebody has to be first, no reason why it can't be you. I
think a years estimate was a conservative one given the scale of the
project, but possible.

Cheers,

Rich
-- 
Zend Certified Engineer
PHP Development Services
http://www.corephp.co.uk

--- End Message ---
--- Begin Message --- Ok fair enough, I see your problem now, cant say ive had this and been using 4.4.1 since the day it came out (compiled my own on debian though), maybe you should try calling that function from the second file but without actually defining the function for that file to see whether you can access the in-memory function, if it works then you have an issue with memory like you say, but why are you using two identical functions in two different files anyway, that sounds like a very bad thing to do if two scripts are called the same time with the same function name its gonna cause problems aint it?


It would also be helpful to see the mquery() script - maybe someone else may know more then!


You may also want to try compiling your own PHP and see if its PHP or the distro bundled version causing problems.



HTH




Max Belushkin wrote:
On Saturday 05 November 2005 17:49, James Benson wrote:

I've had a different set of scripts employing a different "func.php".
However, in both of those, mquery() is defined. But
they do *not* include anything else, and the


So you defined mquery() in both files and one include's or require's the
other file?


I'm sorry, but what wasn't clear in my post? A *separate* set of scripts includes a *separate* "func.php", and even not by relative, but by absolute paths! Example:
/home/test1/index.php:
<?php include ("/home/test1/func.php"); ?>
/home/test2/index.php:
<?php include ("/home/test2/func.php"); ?>

Both func.php are the same, defining a function mquery, which connects to mysql, and returns.

After working with the index.php in Test1 until I get the "Cannot redefine error", I go to test2, and I get the error that *that function was defined in /home/test1/func.php". Test1, while I'm in Test2, and that never ever ever ever (...) includes *anything* from Test1. So the *Test1* func.php is still sitting somewhere in memory in the thread test2 is being loaded on - thus, include_once does not help, as the test2 func.php is NOT included. The weird thing is, $inc_done isn't defined either for the PHP thread, as when I tried the piece of code I quoted in my last message, the include_once still went through.

How can this be happening? I do not know, but since a downgrade to 4.4.0 fixed it all back proper, I am seriously beginning to suspect a problem or undocumented (widely documented, at least) change in PHP 4.4.1 on FreeBSD ports.

--- End Message ---
--- Begin Message ---
> It would also be helpful to see the mquery() script - maybe someone else
> may know more then!

  Well, mquery is simply "mysql_query($query);", in the stipped-down version 
I've had to resort to for testing. Basically, does nothing, since even 
mysql_connect that USED to be at the start of func.php got removed in the 
tests.

  I'm quessing this is a FreeBSD 5.1-PHP 4.4.1 specific issue by now, but 
until now, no one on the FreeBSD mailing lists seems to have cried "wolf", so 
I'll wait and see what on earth is going on...

--- End Message ---
--- Begin Message --- I cant see this being an issue with PHP because it would do that for every function, have you tried using a different function, something simple say,


function echo_this($param)
{
        echo "$param";
}



Try that like your mquery function in both files and see what happens, could be your script considering your not prepared to share your code nobody could say for sure that it's not your code until they actually see it!


Hope you find the solution!


James





Max Belushkin wrote:
It would also be helpful to see the mquery() script - maybe someone else
may know more then!


Well, mquery is simply "mysql_query($query);", in the stipped-down version I've had to resort to for testing. Basically, does nothing, since even mysql_connect that USED to be at the start of func.php got removed in the tests.

I'm quessing this is a FreeBSD 5.1-PHP 4.4.1 specific issue by now, but until now, no one on the FreeBSD mailing lists seems to have cried "wolf", so I'll wait and see what on earth is going on...

--- End Message ---
--- Begin Message ---
> I cant see this being an issue with PHP because it would do that for
> every function, have you tried using a different function, something
> simple say,

  I've been trying it in various ways - for the simplest functions, it takes 
hundreds of request to appear, for the more involved things which employ 
database functions, for example, it only takes 5-10 requests.

  The main issue is that all of this has been working for over 3 years, let 
alone tiny problems with apache/openssl upgrades, but there has been nothing 
like the upgrade of PHP 4.4.0 to 4.4.1 - which is what makes me wonder, what 
DID change so radically in PHP 4.4.1, or is it just a porting problem?

--- End Message ---
--- Begin Message ---
On Saturday 05 November 2005 08:58,  the author Unknown Unknown contributed to 
the dialogue on-
 Re: [PHP] PGP 5 start up issue: 

>On 11/5/05, Unknown Unknown <[EMAIL PROTECTED]> wrote:
>> On 11/4/05, Vizion <[EMAIL PROTECTED]> wrote:
>> > php 5 on windows xp with apache 2 and mysql 5.
>> >
>> > Php start up unable to load dynamic library:
>> > E:\php\ext\php_bz2.dll with error 'The specified module could not be
>> > found'
>> > same for and php_yaz.dll
>> > I have php5ts.dll in both E:\php\ and E:\php\ext
>> >
>> > I had a similar problem for php_mcrypt which was solved by installing
>> > libmcrypt.dll in E:\windows\system32 but I just cannot seem to solve the
>> >
>> > problems with these two.
>> >
>> > I tried copying versions of yaz.dll and php_yaz.dll from
>> > http://www.indexdata.dk/phpyaz but to no avail. That only screwed up php
>> > 5
>> > because those versions seemed to be looking for php4ts.dll rather than
>> > php5ts.dll so I seemed to have got stumped.
>> >
>> > Can anyone help out?
>> >
>> > Thanks in advance
>> >
>> > david
>> >
>> >
>> >
>> > --
>> > 40 yrs navigating and computing in blue waters.
>> > English Owner & Captain of British Registered 60' bluewater Ketch S/V
>> > Taurus.
>> > Currently in San Diego, CA. Sailing bound for Europe via Panama Canal
>> > after
>> > completing engineroom refit.
>> >
>> > --
>> > PHP General Mailing List (http://www.php.net/)
>> > To unsubscribe, visit: http://www.php.net/unsub.php
>> >
>> >  i recommend you change php.ini and make the extensions folder e:\php\
>>
>> or whatever you use, it would probably fix the problem
>
>  oh and also check spelling and if windows has read/write/execute
>permissions make sure there is proper persmissions
I have tried placing the php.ini file in \windows and \windows\system32 and 
tried it in both places to no avail.

All the other extensions load fine - the problem seems to be peculiar to these 
two.
The spelling is fine...

david

-- 
40 yrs navigating and computing in blue waters.
English Owner & Captain of British Registered 60' bluewater Ketch S/V Taurus.
 Currently in San Diego, CA. Sailing bound for Europe via Panama Canal after 
completing engineroom refit.

--- End Message ---
--- Begin Message ---
Greetings,

HI All, I hope all is well.

I have set up a template parser.  Basically, it parses the template
and finds tags with tag_name.dat file and then includes the
tag_name.dat file.  I have considered a few other options but as of
now I think I like what I have come up with.

The only problem that I have in my design is that I have to hard code
tables in the dat file mixing php and html.  I would prefer to be able
to do something like:

[[tag with db query]]
<table>
<tr><td>colname</td><td>colname</td><td>colname</td></tr>
<tr><td>%var1%</td><Td>%var2%</td><td>%var3%</td></tr>
</table>
[[/tag with db query]]

I would like it to be able to parse the line with the %var1% (which is
the column name with % or some other indicator on each side) in it and
then have it generate how many ever rows as nessecary.

Currently, my parsing engine loads the template, preg_splits() it so
each template tag is on a new line, and then passes through the
resulting array and executes the code for whatever tag is chosen.

There are a couple ideas that I have thought of but have not thought
of any real good way so I am turning to the list.

Thanks for all of your help on this list!

--
Leonard Burton, N9URK
[EMAIL PROTECTED]


"The prolonged evacuation would have dramatically affected the
survivability of the occupants."

--- End Message ---
--- Begin Message ---
Perhaps you could get inspirations and tips from:
http://pear.php.net/search.php?q=template&in=packages

--- End Message ---
--- Begin Message ---
Give smarty a try rather than re-inventing the wheel


http://smarty.php.net




James



Leonard Burton wrote:
Greetings,

HI All, I hope all is well.

I have set up a template parser.  Basically, it parses the template
and finds tags with tag_name.dat file and then includes the
tag_name.dat file.  I have considered a few other options but as of
now I think I like what I have come up with.

The only problem that I have in my design is that I have to hard code
tables in the dat file mixing php and html.  I would prefer to be able
to do something like:

[[tag with db query]]
<table>
<tr><td>colname</td><td>colname</td><td>colname</td></tr>
<tr><td>%var1%</td><Td>%var2%</td><td>%var3%</td></tr>
</table>
[[/tag with db query]]

I would like it to be able to parse the line with the %var1% (which is
the column name with % or some other indicator on each side) in it and
then have it generate how many ever rows as nessecary.

Currently, my parsing engine loads the template, preg_splits() it so
each template tag is on a new line, and then passes through the
resulting array and executes the code for whatever tag is chosen.

There are a couple ideas that I have thought of but have not thought
of any real good way so I am turning to the list.

Thanks for all of your help on this list!

--
Leonard Burton, N9URK
[EMAIL PROTECTED]


"The prolonged evacuation would have dramatically affected the
survivability of the occupants."

--- End Message ---
--- Begin Message ---
On Sat, 2005-11-05 at 14:55, James Benson wrote:
> Give smarty a try rather than re-inventing the wheel
>
> http://smarty.php.net

What's wrong with re-inventing the wheel? I guess your car or bike has
wooden wheels eh!? I mean if nobody had re-invented the wheel from the
wooden version, that's all that would exist. I guess if nobody had
re-invented the operating system we'd all be stuck with MS-DOS or
whatever came before that, and so on and so forth. "Don't re-invent the
wheel" is such an ignorant statement.

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.          |
`------------------------------------------------------------'

--- End Message ---
--- Begin Message ---
Robert Cummings wrote:
On Sat, 2005-11-05 at 14:55, James Benson wrote:

Give smarty a try rather than re-inventing the wheel

http://smarty.php.net


What's wrong with re-inventing the wheel? I guess your car or bike has
wooden wheels eh!? I mean if nobody had re-invented the wheel from the
wooden version, that's all that would exist. I guess if nobody had
re-invented the operating system we'd all be stuck with MS-DOS or
whatever came before that, and so on and so forth. "Don't re-invent the
wheel" is such an ignorant statement.

Cheers,
Rob.



Their is nothing at all wrong with re-inventing the wheel but where templating engines are concerned I dont see anyone coming up with new ideas that has not already been thought up by some tom, dick or harry, plus with all the 1000's of engines already created their is bound to be one that suits everyones requirements.


My suggestion could save hours, weeks or maybe even months of programming time dont you think?



James

--- End Message ---
--- Begin Message ---
On Sat, 2005-11-05 at 15:25, James Benson wrote:
> Robert Cummings wrote:
> > On Sat, 2005-11-05 at 14:55, James Benson wrote:
> > 
> >>Give smarty a try rather than re-inventing the wheel
> >>
> >>http://smarty.php.net
> > 
> > 
> > What's wrong with re-inventing the wheel? I guess your car or bike has
> > wooden wheels eh!? I mean if nobody had re-invented the wheel from the
> > wooden version, that's all that would exist. I guess if nobody had
> > re-invented the operating system we'd all be stuck with MS-DOS or
> > whatever came before that, and so on and so forth. "Don't re-invent the
> > wheel" is such an ignorant statement.
> > 
> > Cheers,
> > Rob.
> 
> 
> 
> Their is nothing at all wrong with re-inventing the wheel but where 
> templating engines are concerned I dont see anyone coming up with new 
> ideas that has not already been thought up by some tom, dick or harry, 
> plus with all the 1000's of engines already created their is bound to be 
> one that suits everyones requirements.

Perhaps, but similar issues crop up for content management systems and
many people end up rolling their own after being disgusted with none of
the myriad of existing system fitting their needs.

> My suggestion could save hours, weeks or maybe even months of 
> programming time dont you think?

Maybe, unless he's just enjoying the learning experience, which IMHO can
be priceless.

Either way, I jumped on your reply because you didn't word it as a
suggestion, you worded it as a command.

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.          |
`------------------------------------------------------------'

--- End Message ---
--- Begin Message ---


Robert Cummings wrote:
On Sat, 2005-11-05 at 15:25, James Benson wrote:

Robert Cummings wrote:

On Sat, 2005-11-05 at 14:55, James Benson wrote:


Give smarty a try rather than re-inventing the wheel

http://smarty.php.net


What's wrong with re-inventing the wheel? I guess your car or bike has
wooden wheels eh!? I mean if nobody had re-invented the wheel from the
wooden version, that's all that would exist. I guess if nobody had
re-invented the operating system we'd all be stuck with MS-DOS or
whatever came before that, and so on and so forth. "Don't re-invent the
wheel" is such an ignorant statement.

Cheers,
Rob.



Their is nothing at all wrong with re-inventing the wheel but where templating engines are concerned I dont see anyone coming up with new ideas that has not already been thought up by some tom, dick or harry, plus with all the 1000's of engines already created their is bound to be one that suits everyones requirements.


Perhaps, but similar issues crop up for content management systems and
many people end up rolling their own after being disgusted with none of
the myriad of existing system fitting their needs.


My suggestion could save hours, weeks or maybe even months of programming time dont you think?


Maybe, unless he's just enjoying the learning experience, which IMHO can
be priceless.

Either way, I jumped on your reply because you didn't word it as a
suggestion, you worded it as a command.

Cheers,
Rob.



Fair enough, everyone has their own opinion :-)

--- End Message ---
--- Begin Message ---
Hi All,

On 11/5/05, Robert Cummings <[EMAIL PROTECTED]> wrote:
> On Sat, 2005-11-05 at 14:55, James Benson wrote:
> > Give smarty a try rather than re-inventing the wheel
> >
> > http://smarty.php.net

Reinventing the wheel is much better than either the LGPL or GPL.
Writing GPL or LGPL code on PHP is just wrong.  Either keep the code
for your own use or use the PHP license.  Most of the stuff I see that
is distributed under the [L]*GPL isn't worth much.  If PHP can be
written under the PHP license why can't small little apps that is
written in PHP?  I release my code snippets (from time to time) under
either the PHP or BSD license.

Thanks for you answers.  I will look through the pear classes and see
what kind of things it is doing.


--
Leonard Burton, N9URK
[EMAIL PROTECTED]


"The prolonged evacuation would have dramatically affected the
survivability of the occupants."


--
Leonard Burton, N9URK
[EMAIL PROTECTED]


"The prolonged evacuation would have dramatically affected the
survivability of the occupants."

--- End Message ---
--- Begin Message ---
Leonard Burton wrote:
[[tag with db query]]
<table>
<tr><td>colname</td><td>colname</td><td>colname</td></tr>
<tr><td>%var1%</td><Td>%var2%</td><td>%var3%</td></tr>
</table>
[[/tag with db query]]

I would like it to be able to parse the line with the %var1% (which is
the column name with % or some other indicator on each side) in it and
then have it generate how many ever rows as nessecary.

Currently, my parsing engine loads the template, preg_splits() it so
each template tag is on a new line, and then passes through the
resulting array and executes the code for whatever tag is chosen.

Why don't you use PHP itself?

//db query
?>
<table>
<tr><td>colname</td><td>colname</td><td>colname</td></tr>
<?php
foreach ($row = query($result)) {
echo "<tr><td>$row[var1]</td><Td>$row[var2]</td><td>$row[var3]</td></tr>";
}
?>
</table>
<?php
db query


--
Best regards,
Roman S.I.

http://sf.net/projects/naturalgine/

--- End Message ---
--- Begin Message ---
Hello,

I have a setup question for php for mac.

I have shared my windows folder 'wwwroot' across the network but when I 
preview my .php file it connot find it because the specified php folder on 
the mac is http://127.0.0.1/~myname/Sites

I suppose I have to change the php.ini to include the networked folder as a 
php location but i cannot  find it.

I am not so sure of the file system with mac (just got it) and cannot find 
this folder/usr/local/php5. I can find 'User' and 'myname' folders.Does Mac 
have a show hidden system folders function like windows??

Any help with how I can run php files on  the networked folder  or about the 
mac folder system will be a great help.

Thanks,

Ross 

--- End Message ---
--- Begin Message ---

On 5 Nov 2005, at 19:37, Ross wrote:

Hello,

I have a setup question for php for mac.

I have shared my windows folder 'wwwroot' across the network but when I preview my .php file it connot find it because the specified php folder on
the mac is http://127.0.0.1/~myname/Sites

I suppose I have to change the php.ini to include the networked folder as a
php location but i cannot  find it.

I am not so sure of the file system with mac (just got it) and cannot find this folder/usr/local/php5. I can find 'User' and 'myname' folders.Does Mac
have a show hidden system folders function like windows??

Any help with how I can run php files on the networked folder or about the
mac folder system will be a great help.

Thanks,

Ross

Hello...
about the mac:
you can user terminal to get there:
whereis php # maybe try this first
cd /usr/local/php5
or open finder and apple key + shift + g and type it in there.

--- End Message ---
--- Begin Message ---
I have shared my windows folder 'wwwroot' across the network but when I preview my .php file it connot find it because the specified php folder on
the mac is http://127.0.0.1/~myname/Sites

Actually the folder is ~myname/Sites but the URL should just be http://127.0.0.1/~myname You should not use "Sites" in the URL, as the Mac is already setup to redirect ~myname to the user's Sites directory.

Hope that helps,
Larry

--- End Message ---
--- Begin Message ---
I now have a link wwwroot on the desktop how do I make it a 'document root' 
so I can run php files that are in it??



""Ross"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hello,
>
> I have a setup question for php for mac.
>
> I have shared my windows folder 'wwwroot' across the network but when I 
> preview my .php file it connot find it because the specified php folder on 
> the mac is http://127.0.0.1/~myname/Sites
>
> I suppose I have to change the php.ini to include the networked folder as 
> a php location but i cannot  find it.
>
> I am not so sure of the file system with mac (just got it) and cannot find 
> this folder/usr/local/php5. I can find 'User' and 'myname' folders.Does 
> Mac have a show hidden system folders function like windows??
>
> Any help with how I can run php files on  the networked folder  or about 
> the mac folder system will be a great help.
>
> Thanks,
>
> Ross 

--- End Message ---
--- Begin Message ---
I now can get the php.ini  file and use bbedit to edit it. I also have a 
disk image for wwwroot and can see the files (on my Mac system at 
NETWORK/MSHOME). These files are saved on the windows harddrive

How do I now configure so I can run the php files from Dreamweaver??

Ross
""Ross"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>I now have a link wwwroot on the desktop how do I make it a 'document root' 
>so I can run php files that are in it??
>
>
>
> ""Ross"" <[EMAIL PROTECTED]> wrote in message 
> news:[EMAIL PROTECTED]
>> Hello,
>>
>> I have a setup question for php for mac.
>>
>> I have shared my windows folder 'wwwroot' across the network but when I 
>> preview my .php file it connot find it because the specified php folder 
>> on the mac is http://127.0.0.1/~myname/Sites
>>
>> I suppose I have to change the php.ini to include the networked folder as 
>> a php location but i cannot  find it.
>>
>> I am not so sure of the file system with mac (just got it) and cannot 
>> find this folder/usr/local/php5. I can find 'User' and 'myname' 
>> folders.Does Mac have a show hidden system folders function like 
>> windows??
>>
>> Any help with how I can run php files on  the networked folder  or about 
>> the mac folder system will be a great help.
>>
>> Thanks,
>>
>> Ross 

--- End Message ---
--- Begin Message ---
Hi List

I am doing some data validation and the following regexp fails

[\W]

When using characters like £ or €

Obviously because they are technically more then one character, even though 
they are only displayed as one.

The script is encoded in UTF-8

Anybody know a fix for this?

With kind regards


Andy


-- 
Now listening to The Prophet - I Can't Stand It on amaroK
Geek code: www.vlaamse-kern.com/geek
Registered Linux User No 379093
If life was for sale, what would be its price?
www.vlaamse-kern.com/sas/ for free php utilities
--

Attachment: pgpBVYn6obj9Q.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
On 11/5/05, Andy Pieters <[EMAIL PROTECTED]> wrote:
>
> I am doing some data validation and the following regexp fails
> [\W]
> When using characters like £ or €
> The script is encoded in UTF-8

Are you using the 'u' modifier to put PCRE in utf-8 mode?

preg_match( '/\W/u', $text);

  -robin

--- End Message ---
--- Begin Message ---
Andy,

you might want to check out 
http://www.regular-expressions.info/unicode.html

Please note two things while using the described syntax:
1. You have to additionally use the u modificator.
2. While \p{Ll} for instance works in PHP, \p{Lowercase_Letter} doesn't.

Regards,
Niels


> Hi List
>
> I am doing some data validation and the following regexp fails
>
> [\W]
>
> When using characters like £ or €
>
> Obviously because they are technically more then one character, even
> though they are only displayed as one.
>
> The script is encoded in UTF-8
>
> Anybody know a fix for this?
>
> With kind regards
>
>
> Andy

--- End Message ---
--- Begin Message ---
Hi 

Thank you for your reply.

My regexp was 

/^([a-zA-Z]{3,}|[\W])/

Meaning match any string that is either
3 letters
or
1 word character

I'd like to change this to
3 letters
or
1 currency character

So I changed the regexp accordingly
/^([a-zA-Z]{3,}|[\p{Sc}])/u

And I tested with £

but it fails.

Any ideas?

With kind regards


Andy

On Sunday 06 November 2005 02:11, Niels Ganser wrote:
> Andy,
>
> you might want to check out
> http://www.regular-expressions.info/unicode.html
>
> Please note two things while using the described syntax:
> 1. You have to additionally use the u modificator.
> 2. While \p{Ll} for instance works in PHP, \p{Lowercase_Letter} doesn't.
>
> Regards,
> Niels
>
> > Hi List
> >
> > I am doing some data validation and the following regexp fails
> >
> > [\W]
> >
> > When using characters like £ or €
> >
> > Obviously because they are technically more then one character, even
> > though they are only displayed as one.
> >
> > The script is encoded in UTF-8
> >
> > Anybody know a fix for this?
> >
> > With kind regards
> >
> >
> > Andy

-- 
Now listening to Top! Radio Live www.topradio.be/stream on amaroK
Geek code: www.vlaamse-kern.com/geek
Registered Linux User No 379093
If life was for sale, what would be its price?
www.vlaamse-kern.com/sas/ for free php utilities
--

Attachment: pgpPm0f0Pp3nO.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
> in my index page, I firstly inlcude_once a A.php file, where i defined an
> array, secondly I include another .php file named B.php, where I want to use
> the array, I have claimed it as global type, but it seems I can't retrieve
> any value from the array.

When you include a PHP file, it will be executed in the current
context (AFAIK).  If you're not including it from a function, then it
should be global automatically.  The global keyword makes variables in
functions global.

Maybe this is obvious, but are you sure you have <?php in the B.php?

What does var_dump($xxx); say, if $xxx is the array name?

--- End Message ---

Reply via email to