php-general Digest 23 Sep 2005 11:58:02 -0000 Issue 3698
Topics (messages 223035 through 223064):
Re: basic user/input form questions... more validation!
223035 by: Jasper Bryant-Greene
223038 by: bruce
223039 by: Jasper Bryant-Greene
223041 by: Murray . PlanetThoughtful
223046 by: Chris Shiflett
223047 by: bruce
223050 by: Chris Shiflett
Re: Suggestions for class design
223036 by: Manuel Lemos
Re: Opensource webshop
223037 by: Chris Martin
223052 by: Gustav Wiberg
223053 by: Gustav Wiberg
223054 by: Gustav Wiberg
223055 by: Jasper Bryant-Greene
223056 by: Gustav Wiberg
223057 by: Vince LaMonica
223062 by: Mark Evans
223063 by: Gustav Wiberg
Posting variables from one php script to another
223040 by: Graham Anderson
223043 by: Jasper Bryant-Greene
223044 by: Graham Anderson
223045 by: Jasper Bryant-Greene
223051 by: Graham Anderson
ftp_site problem
223042 by: Al
223049 by: cron.odi.com.br
223064 by: Al
Re: File complete check (FTP)
223048 by: cron.odi.com.br
223060 by: Johannes Tyra
223061 by: Jasper Bryant-Greene
session clustering
223058 by: Jad Madi
problem with php and mail()
223059 by: Marco Strullato
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:
php-general@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
bruce wrote:
not sure i agree with this one.. if i put "foo \' cat" in a db tbl...
i expect that i'll get the same out... which is what some of the articles
i've seen have stated.. are you telling me, and are you sure, that i'd get
"foo ' cat" out instead!!????
the articles i've seen imply that if you addslashes, you also need to
stripslashes on the backend...
With all due respect, you are demonstrating a fundamental lack of
understanding of the principle of escaping anything...
The point of escaping the quote mark is so that it looks *exactly like a
quote mark* to MySQL, rather than like the delimiter for a string value.
MySQL treats the character sequence \' as ' when inside a string value.
When you SELECT the data at the other end, MySQL will not give you the
slashes, because the slashes are not stored in the database table.
If you do run stripslashes() on the output, you will lose data in some
situations. So don't.
Hope that made sense and helped...
--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/
--- End Message ---
--- Begin Message ---
one more question/issue...
the mysql_real_escape function escapes with a'\' which works for mysql, but
isn't standard ansi... is there another function that does the same thing, but
uses the ansi standard "'". also, if there is another function, does it also
work with mysql??
thanks
-bruce
-----Original Message-----
From: Jasper Bryant-Greene [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 22, 2005 4:39 PM
To: php-general@lists.php.net
Subject: Re: [PHP] basic user/input form questions... more validation!
bruce wrote:
> not sure i agree with this one.. if i put "foo \' cat" in a db tbl...
> i expect that i'll get the same out... which is what some of the articles
> i've seen have stated.. are you telling me, and are you sure, that i'd get
> "foo ' cat" out instead!!????
>
> the articles i've seen imply that if you addslashes, you also need to
> stripslashes on the backend...
With all due respect, you are demonstrating a fundamental lack of
understanding of the principle of escaping anything...
The point of escaping the quote mark is so that it looks *exactly like a
quote mark* to MySQL, rather than like the delimiter for a string value.
MySQL treats the character sequence \' as ' when inside a string value.
When you SELECT the data at the other end, MySQL will not give you the
slashes, because the slashes are not stored in the database table.
If you do run stripslashes() on the output, you will lose data in some
situations. So don't.
Hope that made sense and helped...
--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
bruce wrote:
the mysql_real_escape function escapes with a'\' which works for
mysql, but isn't standard ansi... is there another function that does
the same thing, but uses the ansi standard "'". also, if there is
another function, does it also work with mysql??
Well, you could just use str_replace. But what's the point? A whole lot
of MySQL deviates from the standards, often for good reason, and often
in ways that makes it easier to use or simply better.
There's no functional difference that I know of (correct me if I'm
wrong, please), so why bother?
--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: bruce [mailto:[EMAIL PROTECTED]
> Sent: Friday, 23 September 2005 10:23 AM
> To: 'Jasper Bryant-Greene'; php-general@lists.php.net
> Subject: RE: [PHP] basic user/input form questions... more validation!
>
> one more question/issue...
>
> the mysql_real_escape function escapes with a'\' which works for mysql,
> but isn't standard ansi... is there another function that does the same
> thing, but uses the ansi standard "'". also, if there is another function,
> does it also work with mysql??
The important thing here is that escaping with a \ is MySQL's standard for
escaping, so should be used when using MySQL as your storage backend.
Much warmth,
Murray
---
"Lost in thought..."
http://www.planetthoughtful.org
--- End Message ---
--- Begin Message ---
bruce wrote:
not sure i agree with this one.. if i put "foo \' cat" in a db tbl...
i expect that i'll get the same out... which is what some of the
articles i've seen have stated.. are you telling me, and are you sure,
that i'd get "foo ' cat" out instead!!????
the articles i've seen imply that if you addslashes, you also need to
stripslashes on the backend...
You're reading the wrong articles. :-)
Escaping is something you do to preserve data, period. If you have data
that is going to enter a context where it can be considered anything
other than data, it needs to be escaped. I often simplify this by
suggesting that you always escape output.
I did a podcast about this topic a few weeks ago:
http://pro-php.com/index.php?post_id=10
I also wrote a small followup blog entry:
http://shiflett.org/archive/133
Hope that helps.
Chris
--
Chris Shiflett
Brain Bulb, The PHP Consultancy
http://brainbulb.com/
--- End Message ---
--- Begin Message ---
hey chris...
thanks!!
but what do you mean by "...escape output!!"
is that output of the query, which is input to the db?
as i understand it, you escape the query vars, after filtering/validation,
that you're going to touch the db with... (insert/update/select)
am i on your same wavelength??
-bruce
-----Original Message-----
From: Chris Shiflett [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 22, 2005 7:15 PM
To: [EMAIL PROTECTED]
Cc: 'Chris W. Parker'; php-general@lists.php.net
Subject: Re: [PHP] basic user/input form questions... more validation!
bruce wrote:
> not sure i agree with this one.. if i put "foo \' cat" in a db tbl...
> i expect that i'll get the same out... which is what some of the
> articles i've seen have stated.. are you telling me, and are you sure,
> that i'd get "foo ' cat" out instead!!????
>
> the articles i've seen imply that if you addslashes, you also need to
> stripslashes on the backend...
You're reading the wrong articles. :-)
Escaping is something you do to preserve data, period. If you have data
that is going to enter a context where it can be considered anything
other than data, it needs to be escaped. I often simplify this by
suggesting that you always escape output.
I did a podcast about this topic a few weeks ago:
http://pro-php.com/index.php?post_id=10
I also wrote a small followup blog entry:
http://shiflett.org/archive/133
Hope that helps.
Chris
--
Chris Shiflett
Brain Bulb, The PHP Consultancy
http://brainbulb.com/
--- End Message ---
--- Begin Message ---
bruce wrote:
but what do you mean by "...escape output!!"
Output is data that you send somewhere else. In other words, if it
leaves your application, it is output.
This is explained a bit further (with some code) near the start of this
talk:
http://brainbulb.com/talks/php-security-audit-howto.pdf
Hope that helps.
Chris
--
Chris Shiflett
Brain Bulb, The PHP Consultancy
http://brainbulb.com/
--- End Message ---
--- Begin Message ---
Hello,
on 09/20/2005 01:51 PM Murray @ PlanetThoughtful said the following:
I do not understand why this could bother you or anybody else. If you
have a better solution, nothing stops you to make your recommendations.
Hi Manuel,
I did make my recommendation. To you. It went something like (and I'm
paraphrasing), "Your proposed solution doesn't solve the original poster's
conceptual problem with abstracting classes that deal with collections of
objects in conjunction with classes that abstract single objects."
In other words, and I realize I'm stretching out on a limb with this
metaphor, I saw in your post an attempt to treat the symptoms without
offering a cure for the disease.
That is your impression because you really do not know how Metastorage
generated code works.
It provides several types of functions that retrieve and manipulate
collection. Retrieval is done by storing all collection objects in an
array that is returned by those functions. There is no need for a
separate class to abstract collections.
And your perception of bias may or may not be accurate. I don't recall
delivering wrath-of-god denunciation of your suggestion to use a project you
developed, just acknowledged a desire to promote a project you're probably
(and perhaps justifiably) proud of. You say that wasn't a component of your
recommendation. I'm willing to accept that, not that I expect you to be
losing any sleep over whether or not I believe you.
The problem is that I am not promoting Metastorage because I am proud of
it. Actually I do not promote any of my projects because of pride or any
other ego related reasons. I wish some people did not guess that wrong,
but I admit that sometimes it is hard to make certain intentions clear.
I let others know about my projects because that helps maximizing the
chance of getting valuable feedback from potential users like bug
reports and feature suggestions. This is good for me because ultimately
I also benefit from any improvements done on my projects due to user
feedback.
Anyway, it would be pointless for me to let other people know about
projects of mine that do not address their needs, as that would not
raise their interest.
What I am trying to tell you is that while I may not be clear enough, I
was trying to tell the original poster how Metastorage solves the
problem he wants to solve. That does not mean he will be interested to
use Metastorage, but at least it may raise his interest in studying how
Metastorage solve his problem. If he will become interested in
Metastorage later, I am not concerned. If he will, fine, if he doesn't,
no problem either.
Thank you for the extra explanation. I still don't understand the comment's
relevancy to the actual question being asked by the original poster, but I
will explain, in case it's of interest, why that comment caused me some
confusion:
- The original poster outlined that he had created a class that represented
a customer.
- He told the list he was having difficulties with the concept of
abstracting a collection of customers
- He received some helpful suggestions from the list about how to approach
that task
- None of which would have meant he was 'trying to retrieve objects into
memory before they exist.' I don't know about anyone else, but what that
comment implied to me was that the original poster was attempting to
instantiate a class as an object before including the file that contained
the class definition.
No, that was not my point. My point is that if you want to get a
collection of customers, you want a list of objects that may contain
more than one. Therefore what represents better a list of objects of
some class, is not an object of a class, but rather an array eventually
created by a factory object.
I do not think it does not make much sense that the factory object be of
the same class of the list of objects that you want to retrieve. So,
first you create the factory class object and then it will retrieve the
customer objects into an array. What he was doing is to make the
customer class a factory for a collection of its own objects.
I am not sure if my comment is clearer now.
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--- End Message ---
--- Begin Message ---
On 9/22/05, Greg Donald <[EMAIL PROTECTED]> wrote:
> Not to mention the ones written in Perl.
I think you just did ;)
--
Chris Martin
Web Developer
Open Source & Web Standards Advocate
http://www.chriscodes.com/
--- End Message ---
--- Begin Message ---
----- Original Message -----
From: "Chris W. Parker" <[EMAIL PROTECTED]>
To: "PHP General" <php-general@lists.php.net>
Sent: Thursday, September 22, 2005 10:28 PM
Subject: RE: [PHP] Opensource webshop
Gustav Wiberg <mailto:[EMAIL PROTECTED]>
on Thursday, September 22, 2005 1:21 PM said:
Hi there!
Hi.
I'm just beginning to test if there is some interest in an
opensource-webshop...
Do you mean a shopping cart?
Yes.
The admin-part is not opensource..
Hmm... why not? And do I have to pay for it? Is it web based? If so, is
it encoded or something?
Now it's mainly because of we don't want to show prices which we use to buy
products, but if there is an interest of this, we'll have to reconsider. No
it shouldn't cost anything! It's webbased
Interested?
http://www.varupiraten.se/doc.php
The site doesn't seem to work. It's just not loading.
I think it's to much information on the site, so it doesn't seem to be
loading. I'll reconsider the layout to... :-)
/G
http://www.varupiraten.se/
Chris.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.4/109 - Release Date: 2005-09-21
--- End Message ---
--- Begin Message ---
----- Original Message -----
From: "Mark Evans" <[EMAIL PROTECTED]>
To: <php-general@lists.php.net>
Sent: Thursday, September 22, 2005 10:47 PM
Subject: [PHP] Re: Opensource webshop
I'm just beginning to test if there is some interest in an
opensource-webshop... The admin-part is not opensource..
Surely if the admin isnt opensource then its not an opensource solution?
Of course, there is opensource-solutions where not ALL the code is
opensource.
You cant run a store without the admin part ;-)
Yes, you can but it's harder... ;-) We're reconsidering if admin should be a
part of opensource to. Thanx for feedback!
/G
http://www.varupiraten.se/
Regards
Mark
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.4/109 - Release Date: 2005-09-21
--- End Message ---
--- Begin Message ---
----- Original Message -----
From: "Greg Donald" <[EMAIL PROTECTED]>
To: <php-general@lists.php.net>
Sent: Thursday, September 22, 2005 11:03 PM
Subject: Re: [PHP] Opensource webshop
On 9/22/05, Gustav Wiberg <[EMAIL PROTECTED]> wrote:
I'm just beginning to test if there is some interest in an
opensource-webshop... The admin-part is not opensource..
Interested?
http://www.varupiraten.se/doc.php
There are probably dozens of free open source PHP carts already out
there. Not to mention the ones written in Perl.
Are there many in just PHP to?
/G
http://www.varupiraten.se/
--
Greg Donald
Zend Certified Engineer
MySQL Core Certification
http://destiney.com/
--------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.4/109 - Release Date: 2005-09-21
--- End Message ---
--- Begin Message ---
There are probably dozens of free open source PHP carts already out
there. Not to mention the ones written in Perl.
Are there many in just PHP to?
As he said, there are probably dozens. Four of the PHP-based ones are
listed under "e-Commerce" on this website:
http://www.opensourcecms.com/
--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/
--- End Message ---
--- Begin Message ---
----- Original Message -----
From: "Jasper Bryant-Greene" <[EMAIL PROTECTED]>
To: <php-general@lists.php.net>
Sent: Friday, September 23, 2005 6:41 AM
Subject: Re: [PHP] Opensource webshop
There are probably dozens of free open source PHP carts already out
there. Not to mention the ones written in Perl.
Are there many in just PHP to?
As he said, there are probably dozens. Four of the PHP-based ones are
listed under "e-Commerce" on this website:
http://www.opensourcecms.com/
Ok, thanx!
Is there opensource PHP webshop out there for the swedish market?
/G
http://www.varupiraten.se/
--- End Message ---
--- Begin Message ---
On Fri, 23 Sep 2005, Jasper Bryant-Greene wrote:
} > > There are probably dozens of free open source PHP carts already out
} > > there. Not to mention the ones written in Perl.
} > >
} > Are there many in just PHP to?
}
} As he said, there are probably dozens. Four of the PHP-based ones are listed
} under "e-Commerce" on this website:
}
} http://www.opensourcecms.com/
A few more PHP ones [including the 4 at the above URL]:
http://www.shop-script.com/php-shopping-cart-software-1.html
http://www.zen-cart.com/
http://www.oscommerce.com/
http://www.x-cart.com/articles/x-cart_open_source.html
http://creloaded.com/index.php
http://www.osc2nuke.com/
http://cpcommerce.org/
http://www.cubecart.com/site/home/ [not OSS, but free if (c) is not
modified]
http://siliconsys.com/content/applications/phpcatalog/
http://www.terraserver.de/terraserver.php3
http://www.ecommerceshoppingcartsoftware.org/
http://open.appideas.com/MyCart/
http://cosmicphp.com/freescripts_cosmicshoppingcart.php
http://www.affcommerce.com/
http://developer.berlios.de/projects/oos/
http://www.soft4e.com/loadshop.html
https://sourceforge.net/project/showfiles.php?group_id=83355&release_id=166221
http://scripts.justwilliams.com/amazon/index.htm
And more can be found via google and php.resourceindex.com
/vjl/
--- End Message ---
--- Begin Message ---
Are there many in just PHP to?
I can name at least 7 or 8 that I know of :-)
Most are multi-lingual so can work with any language and come with a
full administration tool.
Regards
Mark
--- End Message ---
--- Begin Message ---
----- Original Message -----
From: "Vince LaMonica" <[EMAIL PROTECTED]>
To: "Jasper Bryant-Greene" <[EMAIL PROTECTED]>
Cc: <php-general@lists.php.net>
Sent: Friday, September 23, 2005 7:17 AM
Subject: Re: [PHP] Opensource webshop
On Fri, 23 Sep 2005, Jasper Bryant-Greene wrote:
} > > There are probably dozens of free open source PHP carts already out
} > > there. Not to mention the ones written in Perl.
} > >
} > Are there many in just PHP to?
}
} As he said, there are probably dozens. Four of the PHP-based ones are
listed
} under "e-Commerce" on this website:
}
} http://www.opensourcecms.com/
A few more PHP ones [including the 4 at the above URL]:
http://www.shop-script.com/php-shopping-cart-software-1.html
http://www.zen-cart.com/
http://www.oscommerce.com/
http://www.x-cart.com/articles/x-cart_open_source.html
http://creloaded.com/index.php
http://www.osc2nuke.com/
http://cpcommerce.org/
http://www.cubecart.com/site/home/ [not OSS, but free if (c) is not
modified]
http://siliconsys.com/content/applications/phpcatalog/
http://www.terraserver.de/terraserver.php3
http://www.ecommerceshoppingcartsoftware.org/
http://open.appideas.com/MyCart/
http://cosmicphp.com/freescripts_cosmicshoppingcart.php
http://www.affcommerce.com/
http://developer.berlios.de/projects/oos/
http://www.soft4e.com/loadshop.html
https://sourceforge.net/project/showfiles.php?group_id=83355&release_id=166221
http://scripts.justwilliams.com/amazon/index.htm
And more can be found via google and php.resourceindex.com
/vjl/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.5/110 - Release Date: 2005-09-22
Hi there!
Thanx for the response about opensource-> e-commerce solutions.
Now I think I have a better "picture" of the situation about opensource
e-commerce... :-)
/G
http://www.varupiraten.se/
--- End Message ---
--- Begin Message ---
I am using GET to send variables from one php script to another php
script
How would I POST the same variables ?
This is the php script I am sending GET variables to...
$movieBuilder =
"./movieBuilder.php?mask=mask.gif&drag=drag.gif&movie=fonovisa.mov";
I am placing $movieBuilder in the "src = " attribute
Is it possible to POST these same variables to movieBuilder.php ?
The below generates a Quicktime movie:
$xml = <<<EOB
<?xml version="1.0"?>
<?quicktime type="application/x-quicktime-media-link"?>
<embed
autoplay="$autoplay"
cache="$cache"
kioskmode="$kioskmode"
quitwhendone="$quitwhendone"
movieid="$movieid"
moviename="$moviename"
src="$movieBuilder"/>
EOB;
many thanks
--- End Message ---
--- Begin Message ---
Graham Anderson wrote:
I am using GET to send variables from one php script to another php script
How would I POST the same variables ?
http://php.net/curl
You can use the CURL functions to send a POST request.
--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/
--- End Message ---
--- Begin Message ---
so is it like this? ? CURL is not quite working yet....
In a GET request:
$movieBuilder would be:
$movieBuilder =
"./movieBuilder.php?mask=mask.gif&drag=drag.gif&movie=fonovisa.mov";
putting $movieBuilder in the src attribute does work.
In a POST request:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "./movieBuilder.php");
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS,
'mask=mask.gif&drag=drag.gif&movie=fonovisa.mov');
$movieBuilder = curl_exec ($ch);
And, now put $movieBuilder in the 'src' attribute in the embed tag:
//Generate the Quicktime movie
$xml = <<<EOB
<?xml version="1.0"?>
<?quicktime type="application/x-quicktime-media-link"?>
<embed
src="$movieBuilder"/>
EOB;
many thanks :)
g
On Sep 22, 2005, at 5:31 PM, Jasper Bryant-Greene wrote:
Graham Anderson wrote:
I am using GET to send variables from one php script to another php
script
How would I POST the same variables ?
http://php.net/curl
You can use the CURL functions to send a POST request.
--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Graham Anderson wrote:
In a POST request:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "./movieBuilder.php");
I think you may need to put the full URL here. I don't do a lot with
CURL, though, so someone else may be able to help you more here.
--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/
--- End Message ---
--- Begin Message ---
I tried this test:
//CURL
$ch = curl_init ("$myURL/movieBuilder.php");
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt ($ch, CURLOPT_POSTFIELDS,
"mask=mask.gif&drag=drag.gif&movie=fonovisa.mov");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$buffer = curl_exec($ch); // execute the post
echo $buffer;
curl_close ($ch);
for some reason it is not sending the posted variables
the script is curling the other php script as it is echoing.
Unfortunately, it is not passing along the Posted variables
anyone know ?
On Sep 22, 2005, at 6:52 PM, Jasper Bryant-Greene wrote:
Graham Anderson wrote:
In a POST request:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "./movieBuilder.php");
I think you may need to put the full URL here. I don't do a lot with
CURL, though, so someone else may be able to help you more here.
--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I can't get ftp_site() to chmod a file.
WS_FTP utility changes them OK.
I can connect and log-in via ftp OK
Then I send
if(ftp_site($conn_id, "chmod 0777 /public_html/EditPage/cd_ef_W.txt")) echo
'successful';
else 'failed';
And get "successful" OK
But, the file's permissions don't change. Have tried "777" as well as "0777".
Any suggestions?
--- End Message ---
--- Begin Message ---
try:
if(ftp_site($conn_id, "SITE chmod 0777
/public_html/EditPage/cd_ef_W.txt")) echo 'successful';
else 'failed';
it works for me
Crom
----- Original Message -----
From: "Al" <[EMAIL PROTECTED]>
To: <php-general@lists.php.net>
Sent: Thursday, September 22, 2005 9:34 PM
Subject: [PHP] ftp_site problem
I can't get ftp_site() to chmod a file.
WS_FTP utility changes them OK.
I can connect and log-in via ftp OK
Then I send
if(ftp_site($conn_id, "chmod 0777 /public_html/EditPage/cd_ef_W.txt"))
echo 'successful';
else 'failed';
And get "successful" OK
But, the file's permissions don't change. Have tried "777" as well as
"0777".
Any suggestions?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] wrote:
try:
if(ftp_site($conn_id, "SITE chmod 0777
/public_html/EditPage/cd_ef_W.txt")) echo 'successful';
else 'failed';
it works for me
Crom
----- Original Message ----- From: "Al" <[EMAIL PROTECTED]>
To: <php-general@lists.php.net>
Sent: Thursday, September 22, 2005 9:34 PM
Subject: [PHP] ftp_site problem
I can't get ftp_site() to chmod a file.
WS_FTP utility changes them OK.
I can connect and log-in via ftp OK
Then I send
if(ftp_site($conn_id, "chmod 0777 /public_html/EditPage/cd_ef_W.txt"))
echo 'successful';
else 'failed';
And get "successful" OK
But, the file's permissions don't change. Have tried "777" as well as
"0777".
Any suggestions?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thanks for the conformation Crom.
It looks a virtual server problem. I've got my host's tech support working on
it.
--- End Message ---
--- Begin Message ---
How about check file size?
Crom
----- Original Message -----
From: "Johannes Tyra" <[EMAIL PROTECTED]>
To: <php-general@lists.php.net>
Sent: Thursday, September 22, 2005 5:04 PM
Subject: [PHP] File complete check (FTP)
Hello,
i want to check if a file (jpg image) is completely uploaded on a server.
If checked für the to last bytes (ffd9), but these method is not save.
Anybody know how it works??
--
Mit freundlichem Gruß,
| Johannes Tyra
| ---------------------------------------
| BrainData - InterNet Services
| ---------------------------------------
| Tel: +49.209.8181788
| Fax: +49.209.8181789
| ---------------------------------------
| www.BrainData.de
| mailto:[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I don't know the local filezize.
I have only the remote ftp file, uploaded on the server...
PHP runs on the server, so the uploaded file remote ftp file (from the ftp
user) is the file to check...
> -----Original Message-----
> From: Jake Gardner [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 23, 2005 1:05 AM
> To: Johannes Tyra
> Subject: Re: [PHP] File complete check (FTP)
>
> The simplest (albeit a dirtier) method is to just compare the filesize
> of the remote file to the local file.
>
> http://us2.php.net/filesize
>
>
> On 9/22/05, Johannes Tyra <[EMAIL PROTECTED]> wrote:
> > Hello,
> > i want to check if a file (jpg image) is completely
> uploaded on a server.
> > If checked für the to last bytes (ffd9), but these method
> is not save.
> >
> > Anybody know how it works??
> >
> >
> > --
> > Mit freundlichem Gruß,
> >
> > | Johannes Tyra
> > | ---------------------------------------
> > | BrainData - InterNet Services
> > | ---------------------------------------
> > | Tel: +49.209.8181788
> > | Fax: +49.209.8181789
> > | ---------------------------------------
> > | www.BrainData.de
> > | mailto:[EMAIL PROTECTED]
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
--- End Message ---
--- Begin Message ---
Johannes Tyra wrote:
I don't know the local filezize.
I have only the remote ftp file, uploaded on the server...
PHP runs on the server, so the uploaded file remote ftp file (from the ftp
user) is the file to check...
But you can run filesize() on the file before you upload it to the FTP
server, and then filesize() on it afterwards... both from the server...
if the two are equal then the file is complete.
--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/
--- End Message ---
--- Begin Message ---
guys, do you recommend session clustering within php application
itself or going with higher level, maybe database sessions and then
database clustering?
--
Regards
Jad madi
Blog
http://EasyHTTP.com/jad/
Web standards Planet
http://W3planet.net/
--- End Message ---
--- Begin Message ---
hi all,
I have a problem sending mails with mail():
when this code runs:
mail("[EMAIL PROTECTED]","ciao","ciao<[EMAIL PROTECTED],%22ciao%22,%22ciao>",
"From: marco <marco@ <[EMAIL PROTECTED]>
anotherexample.com<http://anotherexample.com/>
>");
any email arrives:
qmail tells
@400000004332b7d900edffbc delivery 548: deferral:
193.70.193.96_does_not_like_recipient./Remote_host_said:_450_<[EMAIL
PROTECTED]>:_Sender_address_rejected:_Domain_not_found/Giving_up_on_193.70.193.96./<[EMAIL
PROTECTED]:_Sender_address_rejected:_Domain_not_found/Giving_up_on_193.70.193.96./>
It is a misconfiguration of php.ini or qmail and I don't know what to look
for:
in php.ini I wrote
[mail function]
SMTP = localhost
sendmail_from = [EMAIL PROTECTED]
sendmail_path = /usr/sbin/sendmail
(I've tryed to set a cmd line option for sendmail as sendmail -f
[EMAIL PROTECTED] but it does not work...)
and qmail is configured to accept only mails from localdomains.
I think I have to set default address somewhere.
tnks!!
marco
ps I've sent this message also in php-install ml but it is not arrived, so I
crosspost it here
--- End Message ---