php-general Digest 6 Jan 2009 15:21:02 -0000 Issue 5886
Topics (messages 285494 through 285507):
Re: php beautify downloaded...great how does one run the program???
285494 by: Chris
Re: IE Problem Detecting Post Variables
285495 by: tedd
Re: setting up FTP account names via PHP
285496 by: Ashley Sheridan
285503 by: Nathan Rixham
Re: Because you guys/gals/girls/women/insert pc term here are a smart lot
285497 by: Richard Heyes
285499 by: Chris
285500 by: Richard Heyes
285502 by: Nathan Rixham
285504 by: Nathan Rixham
285507 by: Frank Stanovcak
Re: Import files from directory
285498 by: Nathan Rixham
285506 by: clive
Re: RSS Feed on my PHP site
285501 by: Nathan Rixham
285505 by: Kevin Waterson
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
Fred Silsbee wrote:
I looked at all the downloaded docs
Ask in a more appropriate place for one thing. It has a forum:
http://sourceforge.net/forum/?group_id=65412
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
At 1:19 AM +0000 1/5/09, Ashley Sheridan wrote:
On Sun, 2009-01-04 at 10:04 -0500, tedd wrote:
>
I'd disagree that the W3C is more indicative of the overall browser
usage statistics, as by their own admission, their visitors tend to be
those more technically minded, ergo, more knowledgeable about other
browsers. I'm surprised that Google pulled the plug on their
announcement that they were going to release usage stats (browser, OS,
etc) of their visitors, as this would have given a very good demographic
being it the most popular website in the world.
OK, I said those are the stats I like.
But I also said that it depends upon what is being viewed. As the
example I provided, I have one web site where all IE's are virtually
non-existent -- so stats vary as the user's interest varies.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
On Mon, 2009-01-05 at 16:16 +0100, Merlin Morgenstern wrote:
> Is there a good FTP Daemon that can be recommended for this purpose?
> pure-ftpd seams out of development since 2006.
>
>
>
> Jason Pruim wrote:
> >
> > On Jan 5, 2009, at 9:55 AM, Merlin Morgenstern wrote:
> >
> >> Yes, it would be great if he could use the already existing username
> >> and password. It should not be a one time password.
> >>
> >> I am just now looking into mysql support for pure ftpd. One solution I
> >> have in mind is to write the password into the pureftp DB upon signup.
> >> That would be the easiest. The other solution to write to a conf file
> >> would be OK, too. What do you think?
> >
> > I would look real seriously at making sure both the FTP software, and
> > your website use the same authentication database. Even if it means
> > having to go with a different FTP server, or write your own. That way,
> > if they change their password on the web site, it will update it for the
> > FTP automatically as well.
> >
> > Other then that, No real info to include to help... Sorry for that.
> >
> > --
> > Jason Pruim
> > japr...@raoset.com
> > 616.399.2355
> >
> >
> >
> >
>
I did this with vsftp and with local user account access turned on.
Basically, I had php exec out and create a user, set their password,
etc, which would then allow them to ftp in. It was a bit of a nightmare
getting the access levels right (as the client wanted them to not only
be able to access their own home share but other areas as well, which
would all change) but it seems to be working out nicely.
Ash
www.ashleysheridan.co.uk
--- End Message ---
--- Begin Message ---
Ashley Sheridan wrote:
On Mon, 2009-01-05 at 16:16 +0100, Merlin Morgenstern wrote:
Is there a good FTP Daemon that can be recommended for this purpose?
pure-ftpd seams out of development since 2006.
Jason Pruim wrote:
On Jan 5, 2009, at 9:55 AM, Merlin Morgenstern wrote:
Yes, it would be great if he could use the already existing username
and password. It should not be a one time password.
I am just now looking into mysql support for pure ftpd. One solution I
have in mind is to write the password into the pureftp DB upon signup.
That would be the easiest. The other solution to write to a conf file
would be OK, too. What do you think?
I would look real seriously at making sure both the FTP software, and
your website use the same authentication database. Even if it means
having to go with a different FTP server, or write your own. That way,
if they change their password on the web site, it will update it for the
FTP automatically as well.
Other then that, No real info to include to help... Sorry for that.
--
Jason Pruim
japr...@raoset.com
616.399.2355
I did this with vsftp and with local user account access turned on.
Basically, I had php exec out and create a user, set their password,
etc, which would then allow them to ftp in. It was a bit of a nightmare
getting the access levels right (as the client wanted them to not only
be able to access their own home share but other areas as well, which
would all change) but it seems to be working out nicely.
Ash
www.ashleysheridan.co.uk
I've done similar however opted to make proper shell users with there
own home directory; made a couple of nice code snippets that helped
things greatly (for a ubuntu box)
// creates a new 8 char random password and returns
// both the plain text and encrypted pass
$pass_parts = explode(" ", $pass = shell_exec('makepasswd --crypt-md5
--minchars=8 --maxchars=8'));
$settings['pass_plain'] = trim($pass_parts[0]);
$settings['pass_enc'] = trim($pass_parts[1]);
// creates a new user ($settings['user']) on the box with password
// from above, using SKEL_DIR
shell_exec("echo 'pass' | sudo useradd -g GROUP -m -k ".SKEL_DIR."
-p".escapeshellcmd(trim($settings['pass_enc']))." ".$settings['user'].'');
note: makepasswd is an optional package
--- End Message ---
--- Begin Message ---
> ...
It may be worth mentioning that, IIRC, CHAR is faster due to the fixed
length. If you can make your table use a fixed length row size (ie no
variable length columns), it'll be faster. Also I could be missing
something, but I can't see the advantage in VARCHAR since space is not
really a concern these days.
--
Richard Heyes
HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org (Updated January 4th)
--- End Message ---
--- Begin Message ---
> It may be worth mentioning that, IIRC, CHAR is faster due to the fixed
> length. If you can make your table use a fixed length row size (ie no
> variable length columns), it'll be faster.
I'd be interested in seeing tests about this.. I doubt there's any difference.
> Also I could be missing
> something, but I can't see the advantage in VARCHAR since space is not
> really a concern these days.
char is fixed length and padded. If you don't fill up the space, the
db does it for you (even though it seems it's internal only).
http://dev.mysql.com/doc/refman/5.0/en/char.html
When CHAR values are stored, they are right-padded with spaces to the
specified length. When CHAR values are retrieved, trailing spaces are
removed.
--
Postgresql & php tutorials
http://www.designmagick.com/
--- End Message ---
--- Begin Message ---
>> Also I could be missing
>> something, but I can't see the advantage in VARCHAR since space is not
>> really a concern these days.
>
> char is fixed length and padded. If you don't fill up the space, the
> db does it for you (even though it seems it's internal only).
>
> http://dev.mysql.com/doc/refman/5.0/en/char.html
>
> When CHAR values are stored, they are right-padded with spaces to the
> specified length. When CHAR values are retrieved, trailing spaces are
> removed.
So where's the advantage of VARCHAR ?
--
Richard Heyes
HTML5 Graphing for FF, Chrome, Opera and Safari:
http://www.rgraph.org (Updated January 4th)
--- End Message ---
--- Begin Message ---
Richard Heyes wrote:
Also I could be missing
something, but I can't see the advantage in VARCHAR since space is not
really a concern these days.
char is fixed length and padded. If you don't fill up the space, the
db does it for you (even though it seems it's internal only).
http://dev.mysql.com/doc/refman/5.0/en/char.html
When CHAR values are stored, they are right-padded with spaces to the
specified length. When CHAR values are retrieved, trailing spaces are
removed.
So where's the advantage of VARCHAR ?
storage size richard, as if you use char(100) then a string(4) will
still use the space of string(100); whereas with varchar(100) it's only
take up it's real space of string(4).
it' may seem like a small amount of space but when you have 8 char(255)
columns in a table with 10 million rows you'd noticed the difference
considerably.
--- End Message ---
--- Begin Message ---
chris smith wrote:
It may be worth mentioning that, IIRC, CHAR is faster due to the fixed
length. If you can make your table use a fixed length row size (ie no
variable length columns), it'll be faster.
I'd be interested in seeing tests about this.. I doubt there's any difference.
quote: http://dev.mysql.com/doc/refman/5.1/en/data-size.html
For MyISAM tables, if you do not have any variable-length columns
(VARCHAR, TEXT, or BLOB columns), a fixed-size row format is used. *This
is faster but unfortunately may waste some space.* See Section 13.4.3,
“MyISAM Table Storage Formats”. You can hint that you want to have fixed
length rows even if you have VARCHAR columns with the CREATE TABLE
option ROW_FORMAT=FIXED.
--- End Message ---
--- Begin Message ---
So what I'm taking away from this is that I can index a text column, but
that is relatively new. Based on experience with technology I'm going to
guess it's not a very efficient index or search function yet. CHAR seems to
be well entrenched, and the favorite for any column I may need to search
against. I just need to be warry of the size limits and account for them in
my program and data entry.
Does that seem to be the consensus?
"Nathan Rixham" <nrix...@gmail.com> wrote in message
news:4963388f.5080...@gmail.com...
> chris smith wrote:
>>> It may be worth mentioning that, IIRC, CHAR is faster due to the fixed
>>> length. If you can make your table use a fixed length row size (ie no
>>> variable length columns), it'll be faster.
>>
>> I'd be interested in seeing tests about this.. I doubt there's any
>> difference.
>
> quote: http://dev.mysql.com/doc/refman/5.1/en/data-size.html
> For MyISAM tables, if you do not have any variable-length columns
> (VARCHAR, TEXT, or BLOB columns), a fixed-size row format is used. *This
> is faster but unfortunately may waste some space.* See Section 13.4.3,
> MyISAM Table Storage Formats. You can hint that you want to have fixed
> length rows even if you have VARCHAR columns with the CREATE TABLE option
> ROW_FORMAT=FIXED.
--- End Message ---
--- Begin Message ---
Merlin Morgenstern wrote:
Hi everybody,
I am running a real estate portal and would like to allow users to
upload their listing from their existing software. They do this with a
XML file which they will upload on a ftp server that places this xml
file into a seperate directory on the file system.
My basic idea was to run a php scipt triggered by cron every 5 minutes
that checks if there is a new upload and then reads the file and removes
it. Now here is where the problem starts. Imagine if there are 1000
users, I would need to go through 1000 folders to check for new content.
There must be a better solution to identify the directory that has a
new finished upload.
Has anybody an idea on how to do this? Thank you for any hint.
Best regards,
Merlin
have everything uploaded in to a single incoming folder and swiftly
moved on to somewhere less visible; you should be able to detect who
uploaded the file by checking the owner.
--- End Message ---
--- Begin Message ---
Merlin Morgenstern wrote:
Has anybody an idea on how to do this? Thank you for any hint.
I searched for this in google "linux watch for new files"
and found this: http://www.linux.com/feature/150200
Clive
--- End Message ---
--- Begin Message ---
Richard Heyes wrote:
i'm new to RSS Feeds, but how would it be possible to have a BBC News Feed
added to my website?
You can read and parse an RSS feed just like any other webpage. Magpie
RSS will probably make life easier though.
and http://rssphp.net will make it ultra simple :)
--- End Message ---
--- Begin Message ---
This one time, at band camp, DanBarker85 <danbarke...@hotmail.co.uk> wrote:
>
> Hi
>
> i'm new to RSS Feeds, but how would it be possible to have a BBC News Feed
> added to my website?
>
> I've searched for some kind of tutorial but haven't found anything.
http://www.phpro.org/classes/Rss-Class.html
enjoy
Kevin
--- End Message ---