e of validation than performance. I
felt your post was confusing so I'm sure others did too.
'Nuff pissing.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
How bored am I?
This bored: http://dev.stut.net/phpspeed/
Server is running PHP 5.1.2 (really should upgrade that) with no caches
of any sort.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
dmits
multiple arguments, and as the numbers will show, (or at least they do
in my machine), they are the second best option.
Done, but again it doesn't seem to make any significant difference to
the performance.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, v
tedd wrote:
At 4:56 PM +0100 9/11/06, Stut wrote:
How bored am I?
This bored: http://dev.stut.net/phpspeed/
Server is running PHP 5.1.2 (really should upgrade that) with no
caches of any sort.
-Stut
Which begs the question, does it make much of a difference? (not you
being bored, but
Jon Anderson wrote:
Stut wrote:
How bored am I?
This bored: http://dev.stut.net/phpspeed/
Server is running PHP 5.1.2 (really should upgrade that) with no
caches of any sort.
Just looking through the source, could you try changing the first
example to put the output all on one line? It
from the start of it, what's left is the affiliate identifier. Process
as you like.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Kenneth Andresen wrote:
> What I would like to know is if there are some lists of all these base
> domains, or maybe some function already doing what I would like to do?
A full list of gTLDs and ccTLDs can be found here:
http://www.iana.org/domain-names.htm
-Stut
--
PHP General Mailin
e to use it.
However, it would almost certainly be quicker to learn C.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
d/create/delete/copy/move folders
-change/modify file/folder perms/privs
-etc..
Google for php file manager - there are lots of them around, but
remember that they are 1) a huge security risk, and 2) limited by the
filesystem permissions of the web server user.
-Stut
--
PHP General Mai
Mário Gamito wrote:
Yes, but what i was looking for is the best solution for the users to
choose their language.
The same principals apply as to how you organise the customised strings.
Whether the language selection is automatic or manual is surely
peripheral to the point.
-Stut
Tony
? If not then a
better solution is to drop the images in a folder that is then
transferred by a script cron'd by the user that has everything required
to do the scp.
To be frank, anything is better than giving the user that Apache runs as
any more permissions than you have to.
-Stut
--
get this for output?
>
>
> Hello World
>
> '; ?>
>
Apache has not been set up correctly to run this file as PHP. Have a
look at the installation section of the PHP manual - odds are you'll
find the answer there: http://php.net/install
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ways to attempt to do this, but bear in mind the
fundamental fact that nothing that comes from the client-side is
reliable. Anything you store there can be comprimised and should not be
used to bypass security checks if security is at all important in your
application.
-Stut
--
PHP General Ma
Bradley,
There are words to describe people like you, but this list tends to be
quite clean so I'll refrain.
Bradley, meet /dev/null, I hope you'll be very happy together!
-Stut
(I'm thinking this fscker has set up an automated response system -
someone at PHP must be able
concern you could generate a
temporary FTP user from a PHP script that will get removed after, say,
24 hours. How you would do this will vary depending on the FTP server
you are using.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
t
(plus I'd have to look it up and you can do that just as well as I can).
Of course that would need you to have root on the server in the first place.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
you get /r/ requests routed to a referral tracker (several options
for that), map "joesblog" to a referrer, log the hit and redirect.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
s on customer data.
You avoid duplication of code. As a result you can ensure data integrity
because there is only one route to read and write it.
If this is not what you think OOP is all about, do please enlighten us
as to the error of our ways.
-Stut
--
PHP General Mailing List (http://www.p
the structure
and protection through the syntax (PHP4 sucked for this, PHP5 is better).
When you actually think about it, OOP is not a methadology - it's a
syntax. OOD is the methadology. Ramble... ramble... ramble... over!
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
that causes you to re-evaluate the way you to things has to be
worthwhile.
Anyways, some of that probably didn't make much sense, so I need to
write some code now.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
cannot
start designing a solution unless you know how the data/entities are
going to be used. OOP in PHP cannot start with basic building blocks, at
least not if you want a system that performs reasonably well.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ed Lazor wrote:
On Oct 12, 2006, at 12:15 PM, Stut wrote:
As such you cannot start designing a solution unless you know how the
data/entities are going to be used.
Doesn't this mean that your design breaks when the behavior or use of
the data/entities changes?
You may end up refact
static instance.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Tony Marston wrote:
"Stut" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
My general approach to designing a system is data-centric. I tend to start
by defining the database schema since getting that clear in my head tends
to lead me to a decent desig
Ed Lazor wrote:
On Oct 12, 2006, at 4:36 PM, Stut wrote:
If I then go on to create an admin interface for the users, I would
create another completely separate class called UserCollection to
handle more than one user. I may at that point choose to expose any
data-massaging methods in User to
K there is no way to know this under windows without
writing an extension to tell you.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
class.
-->--inc.php-->--
--use.php-->--
foo(); // This will not work
print foo(); // But this will
--<---<--
This will not work! foo() is actually defined at the global scope.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Richard Lynch wrote:
On Sat, October 14, 2006 4:09 am, Stut wrote:
Richard: AFAIK there is no way to know this under windows without
writing an extension to tell you.
Sounds like you actually know how to do this... :-)
Would such an extension be cross-platform to all PHP installs, or
Windows
;)
{
include('french.htm');
}
else
{
include('english.htm');
}
However, if you don't care about their preferred language, and want to
serve french.htm if they specify french at all in their language
preferences then what you've got will do that.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
then it's almost certainly permission-related.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
;s very difficult to get the right solution to a problem when all you
provide is examples. If you want accurate help please provide an
accurate description of the problem you're trying to solve rather than a
few before and afters.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
nology such as ActiveX and the ability to
bypass any active content security or convince your visitors to give you
permission to spy on them.
So, as I said previously, no.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
locations. Do someting with
ip to location databases put into sql, generate a web page from that data
then convert to pdf.
Somebody needs weeding off their PDF habit. I mean, seriously, why the
obsession?
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
Rob Kritzer wrote:
Is it possible to FTP a folder and all it's content? I can do a file at a
time, but not a folder.
Also there is times when I will not know the folder name, so I would
like it
to just upload everything it finds in the folder I set.
Is this possilbe?
Yes[1][2].
-Stu
.htaccess file would look like?
For exmaple, would I need to put register_globals = on in .htaccess to
make it work for a given directory?
STFWNN!!
http://www.google.co.uk/search?q=change+php+configuration+htaccess
Many thanks for your advice!
No problem.
Warm regards,
Same to you.
-Stut
Zbigniew Szalbot wrote:
STFWNN!!
Ok, don't know what it means but will google, lesson learnt ;)
You could Google that too, but I don't believe the NN is very common.
Stands for Search the Effing Web Numb Nuts.
Glad I could help.
-Stut
--
PHP General Mailing List (http://www.ph
levels. If you really want to do it put in the
research - everything you need can be found with your favourite search
engine, you just need to put the effort in to pull it all together.
-Stut
- Original Message ----- From: "Stut" <[EMAIL PROTECTED]>
To: "Mark McWh
tedd wrote:
Interesting.
So a php server-side php script can establish a two-way communication
with a client-side php script -- do you have an example?
http://php.net/sockets
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
uuu - < test.php 2>&1",$out,$bin);
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
get stdout and stderr messages ?
The 2>&1 syntax redirects stderr to stdout, it does not do anything with
stdout. So yes, you will still also get stdout messages.
This no longer has anything to do with PHP. I suggest you Google for
info on Linux pipes.
-Stut
--
PHP General Mailing List
== "2" ) }
2
} ELSE {
2
}
?>
etc.
Dang that's painful!! Try this...
'.$day.'';
}
?>
I added a value to the options (you knew that was missing right?).
Obviously you need to output the and outside this
loop.
-Stut
--
PHP General Mailing List
each file, find assignments to the $arrHede array and pull
out the values. Have you even tried to do that yet? We're not here to
write scripts for you. Try it and come back if/when you have problems.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
but a different host
header for each domain. Requests for each domain will then be directed
to that same site.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
span a chunk of text within a block. Divs are intended to describe the
block.
Not really relevant to the discussion, but worth pointing out.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
t doesn't matter.
Small suggestion though... rather than falling back to the evils of
mod_rewrite, enable multiviews and you can have URLs such as...
staff/engineering/data.json
Or whatever filename you want.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
eed to set the socket non-blocking after
the connect. You cannot do a non-blocking connect.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ikely to find a better source of help
than the 'official' PHP lists, but I really don't care enough about
where you go for help.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
you need - full details on
the preg_replace manual page.
Hope that made sense.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
doing a lot with each element of the
array it's easier to do it without using array_walk.
foreach ($arr as $key => $val)
$arr[$key] = "\\b".$val."\\b";
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
of code rather than fixing
it according to several other previous posts...
"^".$noiseArray."$"
Happy happy joy joy, oh look, the spring's broken. Doing!!
-Stut (slightly drunk, but feeling generally good about the world)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lace the words rather than just the strings then you
need to look at preg_replace (http://php.net/preg_replace) and you'll
need to decorate the strings in $noiseArray with the appropriate
characters to make them the search pattern you need - full details on
the preg_replace manual page.
-Stut
morally abhorent, rather better as in more money - although
if
you can achieve both all the better for you :-)
Plus, being forced to use Windows is not a reason not to use Apache!!
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
tatus response. Try swapping your two header calls.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
e the
server datetime not the client.
-Stut
On 11/3/06, Dotan Cohen <[EMAIL PROTECTED]> wrote:
How does php decide what timezone a user is in? Although I am in
Haifa, Israel (GMT+2), when I go to a page with date("e") I get
"America/New_York" displayed.
To confirm, could
tion
bypasses that setting and gets the timezone as set on the machine.
Example: http://dev.stut.net/php/date.php
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
f the think-tank that is this
list?
There is no way to get the client date/time/timezone on the server-side
unless you have something on the client to give it to you, Javascript
being the obvious example.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://
only at the FIRST comma.
explode(',', $line, 2);
http://php.net/explode
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
eaning the outer
loop will never end since it gets reset in the inner loop.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ing
like this in the internet, but can't remember where :(
XML is not a protocol, but that's really not the point.
Have a look at the CURL functions: http://php.net/curl
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
one of nearly 100 that get included in a script has taught me that there
is no greater feature in PHP!! I never use a closing ?> if PHP script is
the last thing in a file - less headaches all around.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://
erver) would have contained a virus.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Stut wrote:
This is a question of design, not a question of whether to use OOP.
For example, in several of the sites I maintain I have classes that
inherit from a base class called Table. The base class provides a lot
of the basic methods for working on a table (think ActiveRecord). It
also
\)?
$dir = dirname(__FILE__);
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
moron (and probably have little morons for kids), and live
like a moron and spam like a moron you still have enough brains to figure out how to use
present day software
I seem to deal with a lot of customers who could provide a lot of
evidence for the opposition to that assertion!
-St
y the
time it fails they've already replaced your index.php and potentially
installed a rootkit, backdoors and whatever else (depending, of course,
on how locked down the web server is and your file permissions).
Hope that makes sense now.
-Stut
--
PHP General Mailing List (http://www.p
nternal
private vars differently and have __get() translate the external name to
the internal name.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
rt time
* go back in the array from that point to find your 5
* if you hit the start of the array, go down a day, repeat the glob and
start from the end of the new array
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
!== works , why does === not?
I think you need to re-read the docs for ===.
0 !== false
0 == false
1 == true
1 !== true
only...
false === false
and
true === true
The === and !== check both value and type, so 0 and false are different.
Hope that helped.
-Stut
--
PHP
g this behavior PLEASE let me know, I
am no PHP "Guru" and I have no ego, and will humbly retract this post if I am
wrong. I would just like to know WHY and WHERE I am wrong :)=
You're not doing anything wrong, you're just not quite getting the
meaning of === and !== as op
ct that the value
you are comparing has come from strpos, it is a basic language feature.
And it's not my opinion, it's a fact.
If that doesn't make it clear then I really don't know what will.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
2 and
true, 3 and true, etc.
3) to get feedback from the community and deepen my understanding of PHP.
I'm trying ;)
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
displayed as
expected...
http://dev.stut.net/php/pitcher.php
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
#x27;m not sure what you mean by "in my display price". Please elaborate?
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
of any other reason that would work
remotely but not locally.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
o undo the formatting?
As another test, I did settype($fee2, "float")then the gettype($fee2) and
got 'float' on the standalone page and NULL on my Smarty page.
Sounds like a question for the Smarty mailing list.
-Stut
--
PHP General Mailing List (http://www.php.net
start();
// If needed you can set up vars used by player.php here
include('player.php');
$code = ob_get_contents();
ob_end_clean();
That will capture any output from player.php and stuff it into $code.
Much nicer than anything else suggested so far.
-Stut
--
PHP General Mailing List (htt
Ok, just to shut you all up, I managed to convince the OP earlier today,
but it never made it to the list...
Michael wrote:
At 02:58 AM 11/17/2006 , Stut wrote:
Michael wrote:
This will be my last post on this thread of discussion.
Thanks to all who replied, I have it figured out
??
And just in case you do find some mug willing to work for you for
nothing, if you're going to be releasing the source you need to do that
before asking them to find holes. Having the source code makes it a lot
easier.
-Stut
--
PHP General Mailing List (http://www.php.net/)
T
how you intend to use these arrays to give a definite answer.
As far as scope goes, if you want to create these variables in the
global scope, create them as elements of the $GLOBALS array
[http://php.net/manual/en/reserved.variables.php#reserved.variables.globals].
-Stut
--
PHP General Mai
class Foo
{
public __construct($param = null)
{
if (!is_null($param))
{
// Parameter passed, do something with it
}
}
}
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
27;foo' once.
seems like whatever Dave's problem was it's actually down to
missing ctor args.
Indeed, my bad. When I think about it it actually doesn't make sense for
it to be called. Seems to me like the OP needs to be using the __wakeup
magic method to re-initialise his object
Jochem Maas wrote:
heck it's monday what you expect ;-) (I have the same excuse for fridays)
I use the same excuse Tuesday to Thursday, I find that, on balance, it
works better for me.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.ph
it does not
exist but is there a way of wrapping in in a switch statement or funtion so
the variable is only used when $_REQUEST['text_size']; actually exists.
http://php.net/isset
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
nt to stderr instead of stdout.
You need to redirect stderr output to stdout in the command...
exec('apache2ctl graceful 2>&1', $output, $exit);
Also, in my experience it's better to provide the full path to anything
you shell out to from PHP, especially if it's go
You can't do this. The pipe gets overridden by the stdin redirect (at
least it does on FreeBSD 5.4).
Jochem: You need to read this...
http://dev.mysql.com/doc/refman/5.0/en/password-security.html
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
and that takes input
through stdin (usually the keyboard on a standard console).
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
sure something similar is possible in most web servers.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> 0 and (time() - $started) < 300)
{
pcntl_wait($status, WNOHANG);
$workers--;
sleep(1);
}
That sits waiting for up to 5 minutes for all processes to end.
-Stut
**
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
r initiate this process as I am a bit
weary of using cron
Can anyone suggest how I can automate this using PHP ?
Face your fear use cron. You know it's the right thing to do.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Børge Holen wrote:
No, I LEARN from this list.
you?
I smoke this list. Keeps me happy, out of trouble, and best of all it's
free!
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jochem Maas wrote:
and say what *you* mean.
I LIKE MARMITE!!
Damn, that does feel better.
-Stut
(fairly bored today)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
t from your site. Ergo, it redirects before it displays what
you have output. I suggest you Google for examples of the settimeout
Javscript function - that's what you need to delay the redirect.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
bruce wrote:
hey stut...
Please don't reply to me directly, always include the mailing list.
thanks for the reply... i did get some output...
i also have a question as to why i couldn't get it to work when i used
'header (foo.php)'
1) The correct way to redirect using
speak
for other MTAs but I do know that with Postfix you can apply a limit to
the number of simultaneous processes that are started if you implement
it in the transport map.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ine is GMT -2. Is there a way to change the
default
timezone for all scripts within a folder? And what about changing just one?
http://php.net/date_default_timezone_set
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ript block as though it were not in an HTML comment
because that's what a browser does. What they actually do with that
content - execute it, or just analyze it, or whatever - we don't know.
You can't make sweeping statements like that unless you can back it up
with at least one r
ser a new
page which is then what will be retrieved if the user refreshes it,
rather than refreshing the POSTed request.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Robert Cummings wrote:
On Wed, 2006-12-20 at 15:14 +0100, Bernhard Zwischenbrugger wrote:
"AJAX" Webapplications are not possible in PHP4.
Bullshit.
Indeed, what with PHP being server-side and AJAX being client-side.
Where AJAX is concerned the server-side technology is irreleva
nd we'll be able to
give you a better answer.
-Stut
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
r($handle);
}
shuffle($files);
return($files);
now ... why does files not get shuffled?
Is that not the purpose of that function ?
1) Nowhere in that while loop do you add elements to the $files array.
2) Yes, that is what the shuffle function does, but it will have no
effect o
901 - 1000 of 1370 matches
Mail list logo