php-general Digest 14 Feb 2005 14:27:49 - Issue 3285
Topics (messages 208625 through 208630):
Re: Server Uptime
208625 by: Leif Gregory
Re: Ensure a number is three digits long
208626 by: Burhan Khalid
Re: need help parsing named.conf file
208627 by: Burhan Khalid
Important informations!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello!
I'm checking user chosen passwords for validity and have created 7
tests. It's not 100% bulletproof but it will do for now. My problem
is with the last check have 6 unique characters. I'm at a loss at
how to check for this in a neat one-liner.
My brain is starting to go off on some
Hello,
How can I delete ALL files within a specified directory every 20 days?
Does anyone know of any code-snippets that are around at the moment that
are able to do this? (And where I can find them?)
Thanks
Tim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hello,
How can I delete ALL files within a specified directory every 20 days?
Does anyone know of any code-snippets that are around at the moment that
are able to do this? (And where I can find them?)
Thanks
Tim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
C.F. Scheidecker Antunes wrote:
Hello all,
Does anyone upgraded from MySQL 4.0 to MySQL 4.1 using PHP 4 code?
If so, what are the changes that were required on the code?
PHP website says that it is required to install a new MySQL extension.
http://www.php.net/mysqli
^---
Leif Gregory wrote:
Hello Brad,
Monday, February 7, 2005, 3:21:26 PM, you wrote:
BC What is the function, or how do you make a script that displays
BC the server's uptime?
If you're on Windows you could do this:
**
snippity snip snip
If you're not on a Windows server, *nix might have a
Alp wrote:
Thanks Burhan,
That's almost what I exactly want to do. The question is how do I start
doing that which methodlogy, which structure, etc,,,
The first step would be to store the weight value in your database (or
wherever) and link it to your modules (or content) that you want ordered.
I am needing to have access the PostgreSQL I saw SSL I am using php-gtk for
that I saw pg_connect I do not give support for requiressl and ModSSL with that
I make to connect using SSL?
php-4.3.4
On Sun, 13 Feb 2005 21:43:31 -0700, Leif Gregory [EMAIL PROTECTED] wrote:
If you're not on a Windows server, *nix might have a file other than
pagefile.sys that you could do the same thing with.
Or you can just use uptime.
php -r 'system(uptime);'
07:35:21 up 7 days, 23:10, 5 users, load
[snip]
How can I delete ALL files within a specified directory every 20 days?
Does anyone know of any code-snippets that are around at the moment that
are able to do this? (And where I can find them?)
[/snip]
Create a script that deletes files in the directory and then CRON it.
Rgl wrote:
Question:
Has anybody else noticed session-only cookies not disappearing when using
Firefox? Is this a Firefox bug (should they be notified/ or I get latest
Firefox) ?
grinThey finally released 1.0, and yet you still use 0.8?/grin I
use Firefox quite regularly, but I don't experience
I'm looking for an easy to read PHP book that will help me learn a solid
foundation in PHP.
I'm already familiar with the language but want to make sure I'm coding in
the most efficient manner.
What's a few of the better books out there?
HTC Disclaimer: The information contained in this
I have to check the phone number. I use some regular expression for
this. The phone number can contain only numbers and characters like
+,-,),( and space. The problem is when I use a Perl-style all works as
intended but when I use a Posix-style I've got the Warning: ereg():
REG_ERANGE and the
How can I delete ALL files within a specified directory every 20 days?
Does anyone know of any code-snippets that are around at the
moment that are able to do this? (And where I can find them?)
Thanks
Tim
Sounds more like a job for cron than for PHP - man crontab should set you
up...
Darren Kirby wrote:
Hello all,
On the main page of my website I have written a very simple comments feature
that allows people to leave a message under my posts, much like a blog. I
have purposely kept this very simple...
On the main page I have simple text links that someone can click on if they
[EMAIL PROTECTED] wrote:
Can anyone show me how to call a function when submit is pressed or a form
is submitted.
When submit is pressed... as in instantly / on the web browser's side?
You need Javascript for that; PHP simply won't do that.
Or did you mean when a form gets posted to the server?
From: Alex Gemmell [mailto:[EMAIL PROTECTED]
Hello!
I'm checking user chosen passwords for validity and have created 7
tests. It's not 100% bulletproof but it will do for now. My problem
is with the last check have 6 unique characters. I'm at a loss at
how to check for this in a neat
On Tue, 15 Feb 2005 01:22:42 +1030, Tim Burgan [EMAIL PROTECTED] wrote:
How can I delete ALL files within a specified directory every 20 days?
Does anyone know of any code-snippets that are around at the moment that
are able to do this? (And where I can find them?)
You can put a tmp file in
On Tue, 2005-02-15 at 02:12 +1030, Tim Burgan wrote:
Hello,
How can I delete ALL files within a specified directory every 20 days?
Does anyone know of any code-snippets that are around at the moment that
are able to do this? (And where I can find them?)
Thanks
Tim
What operating
Tim Burgan wrote:
Hello,
How can I delete ALL files within a specified directory every 20 days?
Does anyone know of any code-snippets that are around at the moment that
are able to do this? (And where I can find them?)
Thanks
Tim
Please give the list longer than an hour to respond to your request
Jacques wrote:
I would like to indicate the particulars (from a MySQL database) of all
those users that are currently on-line (those whom have successfully signed
in). How should I go about achieving this? Does it have something to do with
Sessions?
Jacques: the best solutions that I have seen
Dave Bosky wrote:
I'm looking for an easy to read PHP book that will help me learn a solid
foundation in PHP.
I'm already familiar with the language but want to make sure I'm coding in
the most efficient manner.
What's a few of the better books out there?
HTC Disclaimer: The information
Tim Burgan wrote:
Hello,
How can I delete ALL files within a specified directory every 20 days?
Does anyone know of any code-snippets that are around at the moment that
are able to do this? (And where I can find them?)
Thanks
Tim
Write a script that will delete them, and set the script to run on
[snip]
I'm looking for an easy to read PHP book that will help me learn a solid
foundation in PHP.
I'm already familiar with the language but want to make sure I'm coding
in
the most efficient manner.
What's a few of the better books out there?
[/snip]
I personally like the O'Reilly books on
Hello
take a look a the Pear File_Find class
require_once 'File/Find.php';
$fs = new File_Find;
$data = $fs-maptree('my_dir');
$data[0] contains all directorys
$data[1] all files
$ok = 0;
$err = 0;
foreach ($data[1] as $key)
{
if
Can anyone show me how to call a function when submit is pressed or a form
is submitted.
I am for an alternative to $php_self which refreshes the whole page. I want
to run the function which displays the errors on a form and only do a
$php_self when the form is filled out correctly.
thanks
I am looking for interesting approaches to form submissions and error
checking in the forms.
Thanks,
Ross
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I am needing to have access the PostgreSQL I saw SSL I am using php-gtk for
that I saw pg_connect I do not give support for requiressl and ModSSL with that
I make to connect using SSL?
php-4.3.4
I would like to indicate the particulars (from a MySQL database) of all
those users that are currently on-line (those whom have successfully signed
in). How should I go about achieving this? Does it have something to do with
Sessions?
I am developing in PHP.
Regards
Jacques
--
PHP General
Kostyantyn Shakhov wrote:
I have to check the phone number. I use some regular expression for
this. The phone number can contain only numbers and characters like
+,-,),( and space. The problem is when I use a Perl-style all works as
intended but when I use a Posix-style I've got the Warning:
Is there a way to take an already existing DomDocument object
and appending it as a child node within a seperate DomDocument
object? Or would I have to pull it apart first and generate new
DomNode/DomElement objects using the data then append those
DomNode/DomElement objects to the seperate
Alex Gemmell wrote:
I'm checking user chosen passwords for validity and have created 7
tests. It's not 100% bulletproof but it will do for now. My problem
is with the last check have 6 unique characters. I'm at a loss at
how to check for this in a neat one-liner.
if
darren kirby wrote:
On the main page of my website I have written a very simple comments
feature
that allows people to leave a message under my posts, much like a blog. I
have purposely kept this very simple...
On the main page I have simple text links that someone can click on if
they
[snip]
I'm looking for an easy to read PHP book that will help me learn a solid
foundation in PHP.
I'm already familiar with the language but want to make sure I'm coding
in the most efficient manner.
What's a few of the better books out there?
[/snip]
[snip jblanchard:]
I personally like the
Wow - good job! That nailed it and in one neat line too!
Thanks very much Richard and thanks also to Mike for his help too.
I'm really liking these php lists!
On Mon, 14 Feb 2005 09:41:00 -0800 (PST), Richard Lynch [EMAIL PROTECTED]
wrote:
Alex Gemmell wrote:
I'm checking user chosen
Eduard Grigoryan wrote:
Hi,
I'm new to PHP and I'd appreciate your advice a lot.
I'm trying to use dynamic PHP links instead of plain HTML and I'm gonna
use something like
this:
File index.php:
?
a href=index.php?content=story.htmstory/abr
a href=index.php?content=about.htmabout/abr
?
Jason Barnett wrote:
Dave Bosky wrote:
I'm looking for an easy to read PHP book that will help me learn a solid
foundation in PHP.
I'm already familiar with the language but want to make sure I'm
coding in
the most efficient manner.
What's a few of the better books out there?
Advanced PHP
Alp wrote:
I would like to be able to alter the lining-up of several sections on a
php
generated webpage. What would be the best/optimal approach in achieving
that?
As an example sections referred to are mostly tables generated via code
on
data obtained from a DB. Should I name them
RGL wrote:
Question:
Has anybody else noticed session-only cookies not disappearing when using
Firefox? Is this a Firefox bug (should they be notified/ or I get latest
Firefox) ?
Using IE6 I can:
setcookie('sesvar', 'this session only', 0, ,
www.mypersonaldomain.net);
This can be read and
[EMAIL PROTECTED] wrote:
Can anyone show me how to call a function when submit is pressed or a form
is submitted.
I am for an alternative to $php_self which refreshes the whole page. I want
to run the function which displays the errors on a form and only do a
$php_self when the form is filled
[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
on Monday, February 14, 2005 6:29 AM said:
I am looking for interesting approaches to form submissions and error
checking in the forms.
One time, at PHP Summer Camp, I made this one form that, when submitted,
would open the CD tray on my server
[EMAIL PROTECTED] wrote:
One more thing marketing person use Windows and he will probably use
Winzip.
Is this still ok, or it's better to use some other application?
Winzip is fine -- At least I've never hit a valid Winzip-ed file I
couldn't un-zip in Linux.
You'll need 'unzip' on the server
Al wrote:
I have a script that needs to read the output, not the file itself, from a
local
php file using its absolute address.
Normally I'd simply use $handle= fopen(http://www.whatever.com, 'rb')
However, the webhost [Powweb] just changed their system to use load
balancing
servers.
Jason Barnett wrote:
Richard Lynch wrote:
Steve Kaufman wrote:
Why does
quotemeta(pat:1$WRW)
return
pat:1
instead of
pat:1\$WRW
What am I misunderstanding about quotemeta function?
You usually would use quotemeta on data coming from the database, or the
user,
[EMAIL PROTECTED] wrote:
On 11 Feb 2005 Richard Lynch wrote:
BAD: http://example.com/dynamic_pdf.php?record_id=1
GOOD: http://example.com/dynamic_pdf.php/record_id=1/fool_ie.pdf
Just curious, how does IE screw up the first one?
I can describe the behaviour, pretty simply.
In some versions
C.F. Scheidecker Antunes wrote:
Hello all,
Does anyone upgraded from MySQL 4.0 to MySQL 4.1 using PHP 4 code?
If so, what are the changes that were required on the code?
PHP website says that it is required to install a new MySQL extension.
I am doing PHP4 programming under Linux.
What do you
I got trigger happy and deleted the post requesting info on interesting
ideas for form checking.
To stop the automated link farms from trying to insert their stupid crap
into your guestbook/blog/whatever, you may want to experiment with
something like:
if (strlen($message) /
That should be true in general except I believe that WinZip 8(?) introduced a
new compression scheme that unzip or infozip or whatever on un*x systems might
not handle yet. It's not backward compatible with older Zip algorithms so even
if you're running and older copy of WinZip it won't
We've had a lot of discussion on what not to do -- not storing credit
cards in one's own database -- so, I'd like to pose the question: what
are the best practices for a *small* site to accept credit cards? I
have a couple of clients with small sites that would like to accept
credit cards.
Alex Gemmell mailto:[EMAIL PROTECTED]
on Monday, February 14, 2005 7:24 AM said:
Hello!
Hi!
# Code:
beingfunnynotmean!Do you also have a label on your computer that says
Computer?/beingfunnynotmean!
Some questions (because I'm curious):
1. Why would you *not* allow
Chris W. Parker wrote:
Alex Gemmell mailto:[EMAIL PROTECTED]
on Monday, February 14, 2005 7:24 AM said:
Hello!
Hi!
Bonjour!
# Code:
beingfunnynotmean!Do you also have a label on your computer that says
Computer?/beingfunnynotmean!
No, but I do have a label that says My
quoth the Jason Barnett:
Darren Kirby wrote:
The problem is that after playing around with this a bit, it is clear
that someone can craft a url with an arbitrary $postid that is not in the
database yet. Now naively, it would seem that the worst someone could do
is just create arbitrary
I am trying to write a php script that can read a dir which I have
linked into my public_html dir. But I get permission errors, what do I
need to change? Is this an Apache problem, gentoo, or php?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
I found it! The current ports.tar.gz file is hosed for the three things I
can auto load. We had an older OpenBSD box that had a previous version of
ports, so I copied that over and it installed with no headaches. Thanks to
Jeff for making me stick to ports.. I just had to get a version that
Richard Miller wrote:
what
are the best practices for a *small* site to accept credit cards? I
have a couple of clients with small sites that would like to accept
credit cards. Supposing PayPal is out of question (because it doesn't
quite look as professional), what sort of payment
Jason Barnett wrote:
Please give the list longer than an hour to respond to your request ;)
Thanks for the suggestion.. I've just given the list 6 hours at the moment.
Why do you say this?
Tim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello,
on 02/14/2005 12:29 PM [EMAIL PROTECTED] said the following:
I am looking for interesting approaches to form submissions and error
checking in the forms.
You may want to try this popular class for generating and validating forms.
It provides means to perform common types of validation, but
I have a multi-page form which I build up and store in session
variables. The data saved includes all an internal list of items on
the form (derived from a database table), all the form field specs
(derived from the internal item list), the data for the fields (from
another table), default
Hello,
changing the system password requires root privileges, because it needs to
modify the /etc/shadow file. Thus either I would put the password change
requests into a mysql table or text file and run a cronjob as root which
checks e.g. every 15 minutes if there are new pw change requests. If
Tim Burgan wrote:
Jason Barnett wrote:
Please give the list longer than an hour to respond to your request ;)
Thanks for the suggestion.. I've just given the list 6 hours at the moment.
Why do you say this?
Tim
Only because I saw your message listed twice... and there was only 50
minutes in
[EMAIL PROTECTED] wrote:
I have a multi-page form which I build up and store in session
variables. The data saved includes all an internal list of items on
the form (derived from a database table), all the form field specs
(derived from the internal item list), the data for the fields (from
On Mon, 14 Feb 2005 10:17:53 -0800, Chris W. Parker
[EMAIL PROTECTED] wrote:
Alex Gemmell mailto:[EMAIL PROTECTED]
on Monday, February 14, 2005 7:24 AM said:
Hello!
Hi!
# Code:
beingfunnynotmean!Do you also have a label on your computer that says
Alex Gemmell wrote:
Hello!
I'm checking user chosen passwords for validity and have created 7
tests. It's not 100% bulletproof but it will do for now. My problem
is with the last check have 6 unique characters. I'm at a loss at
how to check for this in a neat one-liner.
My brain is starting to
timothy johnson wrote:
I am trying to write a php script that can read a dir which I have
linked into my public_html dir. But I get permission errors, what do I
need to change? Is this an Apache problem, gentoo, or php?
its a file permission problem.
for some reason apache is not allowed to read
* Daniel Purdy [EMAIL PROTECTED]:
[snip]
I'm looking for an easy to read PHP book that will help me learn a solid
foundation in PHP.
I'm already familiar with the language but want to make sure I'm coding
in the most efficient manner.
What's a few of the better books out there?
[/snip]
I have a multi-page form which I build up and store in session
variables. The data saved includes all an internal list of items on
the form (derived from a database table), all the form field specs
(derived from the internal item list), the data for the fields (from
another table), default
timothy johnson wrote:
I am trying to write a php script that can read a dir which I have
linked into my public_html dir. But I get permission errors, what do I
need to change? Is this an Apache problem, gentoo, or php?
It's not a PHP problem.
Apache has a directive that allows it to either
On Mon, 14 Feb 2005 16:03:10 -0500, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
I have a multi-page form which I build up and store in session
variables. The data saved includes all an internal list of items on
the form (derived from a database table), all the form field specs
(derived from
Alex Gemmell wrote:
On Mon, 14 Feb 2005 22:51:42 +0100, Jochem Maas [EMAIL PROTECTED] wrote:
Alex Gemmell wrote:
...
#Contain at least one number
if ( !preg_match ('/\\d/', $password) ) return false;
Im pretty sure the double backslash is a typo.
here are some regexps from a php5 class
OK - easy one here, I know. Having troubles removing anything that is not a
number from user input. According to manual, [!] is supposed to mean set of
non-matching optional characters. Tried
$var = ereg_replace([!0-9],,$var);
and it removes the numbers, but so does
$var =
On Mon, 14 Feb 2005 18:54:03 -0700, Ben Miller [EMAIL PROTECTED] wrote:
OK - easy one here, I know. Having troubles removing anything that is not a
number from user input. According to manual, [!] is supposed to mean set of
non-matching optional characters.
$var = preg_replace( '/[^\d]/',
I am currently storing mcrypted data as a base64 encoded string.
I now need to store the mcrypted data as a base32 or base62 string,
because of problems occurring due to the '+', '/', and '=' characters.
It seems that there is only the base64_en/decode default function.
Does anyone know of a
I've enjoyed Schlossnagle as I have it on my personal library.
Also I am finishing to read PHP 5 Power Programming from Prentice Hall
and the creators of PHP.
If you want to learn coding style and coding good practices check out
this book.
A cheap place to get books here in the US is
I'm trying to write a PHPv4 extension and I am needing some assistance. I
wish to have a function exported from my extension return a value which
consists of a set of properties and functions much like so:
// Gets user record from database store.
$MyUser = GetUser();
echo Your name is:
Hello,.
on 02/14/2005 02:37 PM Dave Bosky said the following:
I'm looking for an easy to read PHP book that will help me learn a solid
foundation in PHP.
I'm already familiar with the language but want to make sure I'm coding in
the most efficient manner.
What's a few of the better books out
I know this question probably gets asked a lot, but I'm setting up a Web
Server shortly and am debating going with PHP 5 on Apache 2.0 or 1.3. In
short, is PHP 5, when combined with either Apache 1.3 or 2.0 on Linux or
FreeBSD, ready for a production environment? This is, of course, an
I've been running FreeBSD 5.3, Apache 2.0.53, PHP 5.0.3 with mySQL 4.1.8
without any issues in production. Unless you rely on some spooky extentions,
I wouldnt think you should have any problems running - that you ask this
question here, tells me you aint running any such spooky things.
I'm
I am looking for interesting approaches to form submissions and error
checking in the forms.
http://pear.php.net/package/HTML_QuickForm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi
I want to create a single php file which will be able to display multiple html
forms.
Like this: Form1 - Form2 - Form3.
After the user completes and submits Form1, the script will process it and
display a different form. etc...
I am new to php, I would need some detailed instructions, or
Hi folks
I hardly convince my company to have their PHP products open source,
now the challenge is to protect their products from being stolen and
used illegally so we may Encode only one or two files to keep the use
of our products on Certain domain or IP address. Any idea how to
accomplish this
81 matches
Mail list logo