Greg Donald wrote:
On Mon, 2005-11-14 at 03:55 -0500, Roman Ivanov wrote:
What features do you need from a framework?
Convention over configuration. (Yaml, not XML. ActiveRecord not
Propel/Phing.)
Hard to do in pure PHP. But I tried:
Dan Rossi wrote:
Personally, i am trying to avoid all these frameworks until
everyones ideas are collabroated into one as i think they only work for
some or for the developers purposes only.
What features do you need from a framework?
--
PHP General Mailing List (http://www.php.net/)
To
Richard Lynch wrote:
But it ain't easy the first time.
If you're using DB to store session data, and trying to improve session
security, than it ain't easy even the second time. Or the third. In
fact, I gave up on that extension before it became easy. After that my
session-related code
Richard Lynch wrote:
If you had anything other than $_OCLEAN in an echo and friends, then
you would know you were screwing up.
Personally, if I pull something info from the database, then I do not
usually sanitize it. Yes, I know it's less secure, but I'm willing to
take such (negligible)
Richard Lynch wrote:
On Thu, November 10, 2005 3:29 pm, GamblerZG wrote:
IMO, the best way is to re-generate SIDs on each request, but such
method will decrease perfomance of a script.
But if Cookies are off, you just destroyed their Back button in
their browser, which should be a crime
Curt Zirzow wrote:
There is a pecl extension that you can register, custom
superglobals although it comes with some extra stuff as well:
http://php.net/runkit
I wish it would be a part of core distribution. Would be extremely useful.
--
PHP General Mailing List (http://www.php.net/)
To
Richard Lynch wrote:
IP is useless for identification or authentication of the general
web-surfer:
Users behind firwalls will all appear to be from one (1) IP
AOL users change IPs faster than drummers change underwear
I think it's still reasonable to restrict a session to a single IP.
--
Chris Shiflett wrote:
GamblerZG wrote:
I think it's still reasonable to restrict a session to a single IP.
No, it's not, for all of the reasons Richard mentioned and more.
I agree that using only IP to identify session is bad.
Using only SID is ok.
Using SIDs that are tied to a single IP
Richard Lynch wrote:
AOL users WILL change their IP in a single [web-surfing] session.
Ugh... I did not know that. That's horrible.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
GamblerZG wrote:
This comes at a price of a small inconvinience for
dial-up users (since they would need to login on each reconnect), but I
think such price it reasonable.
Ok, scrap this statement. I did not know about AOL thing.
But this one still stands:
IMO, the best way is to re
Richard Lynch wrote:
Please pay attention.
Sorry, I did not see your message when I posted that.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I'm using this, but I'm not sure whether it's bug-free:
preg_match('/^([.0-9a-z_+-]+)@([0-9a-z-]+\.)+[0-9a-z]{2,6}$/i', $email);
Note: IIRC, PEAR function will invalidate all adresses in museum TLD.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
James Benson wrote:
Would it not be better something like valid_email()
email_validate()?
Anyway, I agree that PHP needs such function.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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
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 ;)
--
PHP General Mailing List (http://www.php.net/)
To
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
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
Leonard Burton wrote:
[[tag with db query]]
table
trtdcolname/tdtdcolname/tdtdcolname/td/tr
trtd%var1%/tdTd%var2%/tdtd%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
Miles Thompson wrote:
You missed the most important: This list works, why break it?
Nope, I did not miss it. It's just not a proper reply to the message. I
did not suggest to disable mailing lists or change them in any way, so
the break factor does not apply.
--
Best regards,
Roman S.I.
Larry E. Ullman wrote:
One of the fallacies in your argument is that the lack of an official
forum on php.net implies such distaste for message boards. I don't
have a big screen TV but I have anything but distaste for them!
Well, let me give you a different example. I don't have a TV at all,
Robert Cummings wrote:
On Sat, 2005-11-05 at 00:56, GamblerZG wrote:
Miles Thompson wrote:
You missed the most important: This list works, why break it?
Nope, I did not miss it. It's just not a proper reply to the message. I
did not suggest to disable mailing lists or change them in any way
PS: Sorry for missing verbs and articles in my last message. I have a
good excuse: it't 2:22 AM here. *smilie*
--
Best regards,
Roman S.I.
http://sf.net/projects/naturalgine/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
John Taylor-Johnston wrote:
I'm using PHP Version 4.3.9 and MySQL 4.1.12. I recently upgraded from
PHP 4.1.x and MySQL 4.0.x.
Basically my SQL below now render empty set. It worked until my upgrade.
Basically ORDER BY relevancy DESC no longer works, I think!?
I got help building this $SQL
Robert Cummings wrote:
On Sat, 2005-11-05 at 02:17, GamblerZG wrote:
Robert Cummings wrote:
On Sat, 2005-11-05 at 00:56, GamblerZG wrote:
Miles Thompson wrote:
You missed the most important: This list works, why break it?
Nope, I did not miss it. It's just not a proper reply
Oliver Grätz wrote:
GamblerZG schrieb:
But what benefit is there is having it as an explicitly abstract
class? Why can't it just be a normal class definition which you
inherit from?
The idea is that a high-level language should prohobit you from doing
things that do not make sence. Why
Alan Lord wrote:
But what benefit is there is having it as an explicitly abstract
class? Why can't it just be a normal class definition which you
inherit from?
The idea is that a high-level language should prohobit you from doing
things that do not make sence. Why they implemented it in PHP?
The second one is by using two
different
apache modules. It *does not break anything*, but it's a pain to
setup.
Judging sheerly by functionality and compatibility the second ways is
better.
However, judging from what I know about PHP, nobody tries to make that
way easier, because everybody
Richard Lynch wrote:
PHP developers assume that PHP5 will be frequently used to parse PHP4
scripts. Why?
Because that's how the real world works.
The real world works that way because, as you just said, installing 2
php modules side by side is a great deal of system administration.
And
Since nobody ansvered the real question my previous message, I will
re-phrase it.
PHP developers assume that PHP5 will be frequently used to parse PHP4
scripts. Why? And what's so horrible about using separate engines to run
php 4 and 5 scripts?
--
PHP General Mailing List
Robert Cummings wrote:
On Wed, 2005-10-12 at 17:31, GamblerZG wrote:
Since nobody ansvered the real question my previous message, I will
re-phrase it.
PHP developers assume that PHP5 will be frequently used to parse PHP4
scripts. Why? And what's so horrible about using separate engines
Recently, I asked my hosting provider when they are going to switch to
PHP5. They replied that it will not happen any time soon, since they
will install PHP5 only on new servers. Their reasoning was simple: PHP5
will inevitably break some old scripts, and it's just not worh all the
trouble.
?php //parse this with mod_php4
function class_method($var){ }
?
?php5 //parse this with mod_php5
class clazz implements Something{
function method($var) {
}
}
?
Ummm, maybe your speaking alien, but could you clarify how that solves
the problem you are addressing?
First, if every
It does? I wouldn't waste my money with a host that was unable to
provide PHP 5 support, at least in some way. I think the it will
break lots of scripts is a cop-out. There are various ways to allow
both on one server. Assuming they're technically proficient enough of
course.
'What is the best
On the final hand, if you pass the pages off from apache to a php
exe or module.. How does Apache know which one to pass it to? Php4 or
Php5?
By the processing instruction target. That's what it's there for. I
guess php 5 and 4 are not the best examples, since php5 already uses
'?php'
Kilbride, James wrote:
Perhaps I'm missing something but doesn't Apache hand off to PHP before
it looks at anything inside the file? Doesn't it hand it off at the fact
that the target is SomeFile.php. So the tag ?php4/5/6/X doesn't mean
anything since by the time the tag gets read it's already
Richard Davey wrote:
You either code for PHP4 or you code for 5.
That's exactly my point.
Backwards compatibility doesn't slow down the evolution of a language
Not true. Quite a few of the discussions of new features and even some
bugfixes end up on can't be done because of BC.
And if
I'm not speaking about session_set_save_handler, I'm considering
writing session handler from scratch. Is it a bad idea? If so, why?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
eval('? '.$code.' ?php');
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
What's keeping you.
There are no official PHP forums.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
When you have objects stored on disk, it's usually very convenient to
read them on demand. However, MySQL is clearly not meant for this
purpose. Query overhead, complexity of SQL needed, and some other
limitation make object storage and retrieval a headache.
The question is, is it possible to
Maybe it's just me, but the core concept of __autoload() seems to be
broken to me. Moreover, every proposed solution I've heard about is
totally inside the box. I would do it like this:
1) Define $_AUTOLOAD superglobal.
2) If I need SomeClass to be autoloaded I write this:
Did you have some code that you need help debugging?
Since you have asked...
http://fs.net/projects/naturalgine
Could you please download the latest version, open tools/objects.php and
look at getObjects() function? Just take a look at it, and you will
undesrstand what am I talking about,
set_magic_quotes_runtime( 0 );
This is for database, not for showing data in browser. For browser you
need to kill all unknow tags and all unknown properties of known tags.
Afterwards, you need to prepend http:// to any urls that have unknow
protocols. Alternatively, you can make sure that
Sebastian wrote:
yea.. takes hours... sometimes 6+ or more.
i dont post that much to the list for this reason.. if it stays like
this i'll just unsubscribe.. its pointless... this is suppose to be
E-mail, not post office mail.
I don't understand why everyone like these mailing lists so much.
I would like to know, whether using @ is a good practice. For example, I
have an array of unknown length $array.
Is it all right write something like this:
@list($first, $second) = $array;
or is it better to do length check?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
Problem: I have db with users, groups, passwords and permissions. I need
to restrict access to some files for general public, but allow certain
groups to download those files. Access restrictions should be based on
permissions in the database.
I can set_time_limit() to a very big number,
You can ask about a question. You can even try to improve the
performance of a function. But at the end of the day unless you can
come up with something that will do what the PHP community at large
expects *and* it is faster it's not going to happen.
How exactly PHP community at large supposed
Are there any decent resources dedicated to PHP code optimization? By
decent I mean ones that do not ask you to completely ruin readability
for the sake of extra 0.003 seconds.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
The best way to go about it is to get a code profiler. apd / xdebug /
Zend are popular choices.
Can't seem to install apd 0.9something or xdebug 1.0.something. pear calls
phpize, which in turn outputs some cryptic message and exits. (In case of APD
it's something like error on line 59. I'm not
DB Error: constraint violation
What DB do you use?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Why include_once() is doing some fancy logic, which nobody needs?
Why array_shift() re-indexes arrays?
Why 2 simple string comparisons are slower than one preg_match()?
Why microtime(TRUE) returns only fraction of real time that is smaller
than 1?
Why microtime() does not return float in the
Why don't you RTFM?
There is nothing in manual that answers any of those questions.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
What fancy logic? And why does no one need it?
I'm referring to this:
http://archives.devshed.com/a/ng/557-22943/
Now surely you can RTFM and find more answers. If you disagree with the
way that some things work you have a couple of options;
a. Contact the PHP development group and explain
A sample use:
[...]
'include_once' allows me to lazy load -- and thus optimize my
application. Sure, it may be a slight performance hit -- but not nearly
that of loading the files in question.
I do not question usefulness of include_once(). In fact, currently I'm
developing application that might
Somewhere around here I asked about human-readable serialization and
there was no solution that fitted my needs. So I wrote my own
serialize/deserialize pair. The decode function is different from the
one I posted here before. This function, in my opinion, is written very
efficiently, but it's
Please replace die($res-getMessage()) with
user_error($res-getMessage(), E_USER_ERROR) and then post the output.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
class MyClass {
function static_method() {
echo 'I'm in static_method !';
}
}
You can call the function statically using the double colon ( :: )
operator :
Ahem. Double colon does now works with dynamic names. If I'm not
mistaken, call_user_func(array('class', 'function')) is the
I ment: Double colon does no_t_ works with dynamic names.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ok, I wrote something that fits my needs. But, as I said, it is slow. Too slow. Is anyone
except me interested in human-editable serialize? Can anyone help me with optimization?
And please do not tell me that I need to write it in C++. The thing should be portable.
==
When I went to a site that lists and compares CMS programs, I was
overwhelmed by at least 100 listings. Again, I would like to rely on
personal experience. What I am seeking is a CMS that will provide users
at my client (a Yacht Club) to update news items, and if possible,
update a calendar
You are looking for serialize here. I bet you'd be better off with an
existing XML format for something like this though.
WDDX is an unusual extension for most of the hosting providers. And
writing my own XML serialization mechanism is an overkill. Moreover, XML
is not-compact, harder to edit
Ok, let me ask in a different way. Is there any way to make eval to
parse only data structures, without executing any functions it may
encounter?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Why would you _manually_ edit a serialized array??? One would think you
would UNSERIALIZE (http://us4.php.net/unserialize) the serialized array
*before* working with the data.
Well, I guess my initial posting was a bit misleading. I'm writing a
content management system, and that system needs
Output of serialize() is barely readable and definetely is not suited
for manual editing.
It is quite simple to create var_export() clone that does not add junk
to it's output. But then I would need to exec() the string to get a data
structure back, which is bad security practice.
Is there
64 matches
Mail list logo