php-general Digest 7 Mar 2004 14:15:48 -0000 Issue 2632

Topics (messages 179676 through 179696):

Need Help in shoppin cart
        179676 by: New Session
        179677 by: Ryan A
        179681 by: John Nichel

Re: UK Bank Holidays 2
        179678 by: Raditha Dissanayake

Re: PHP and Apache Using up all memory
        179679 by: Raditha Dissanayake
        179685 by: Juan E Suris
        179696 by: Raditha Dissanayake

Re: domain.org/?page=pageName method
        179680 by: Raditha Dissanayake

Re: Mail fifth parameter
        179682 by: Raditha Dissanayake
        179683 by: Jason Davidson
        179684 by: joel boonstra
        179695 by: Raditha Dissanayake

Re: preg_split - spliting string
        179686 by: Burhan Khalid
        179692 by: Bambero

Re: extra breaks in sent out emails
        179687 by: Scott Taylor

Whom to report a serious bug in Zend Encoder
        179688 by: Erdener Gonenc
        179689 by: Jason Davidson
        179690 by: Erdener Gonenc

Re: remote stop/start the applications
        179691 by: CurlyBraces Technologies \( Pvt \) Ltd
        179693 by: Jason Wong
        179694 by: CurlyBraces Technologies \( Pvt \) Ltd

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:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Sir,
I am a web developer, I had made many sites like shooping cart, mangement
leads etc.
 Iam comfortable in PHP as well as in ASP & iam ready to make sites in just
$500.Sites made by me are running successfully and doing great job .I can
make site having following facilities.

 Admin Panel:

 Nice & easy Admin Panel able to make Superuser or subusers.
 Able to log the subusers activites.
 Order management.
 Newsletter management.
 Products management.
 Categories management
 Auto mail generation in case of stock out of order.
 Shipping management.
 Multiples photos for each products.
 CMT management(To dynamically add page later on, or for dynamic contents).
 Bulk Upload(CSV).
 FedEx, Freight, or UPS Shipping
 Sales Tax Integration.
 etc as per client request.

 Front End:

 Nice user friendly Front end with search facility .
 Secure Socket Layer enabled.
 Online linkpoint integration(Credit Card processing).
 Authorization  enabled.
 Drop Down Floating dynamic menus
 Ability to register for fast checkout processing.
 Subscribe for newsletter.
 Product Purchase & Total Shopping cost on every page.
 Ability to track order status
 Auto mail generation on change in order status.
 etc as per client request.

Below are the description of the applications I had made:-

1. The site selling vehicles. It would involve a comprehensive zip search on
dealers within the locality from which a visitor submits   a request. The
concerned dealers would get the request on their corresponding  dash boards
to pursue the leads.The site has a simple backend for adding / modifying /
deleting vehicle categories and descriptions.

2.  The site can help you fulfill your goal of buying or selling your dream
property.

3.  The site is integrated with our online content management tool, thereby
giving the site owner complete control over the content  management.

4.  Site features SSL eCommerce and an interactive JavaScript quote form.

5.  The site has a front end of one page and further access is only
available to their retailers. It consists of a very complex admin panel in
the backend which is capable of Creating accounts for new retailers and fix
a profit % for each retailer. which would  mean that when a retailer logs in
he'd see a price list with the profit % added to the base price. This list
would appear different to  each retailer, as pertaining to his
profile.Administrator can set a different product list for different
retailers. This means that a retailer interested in a particular category/s
of product would only see that category/s and not others. This facilitates
quick order  placement.Administrator has a facility of being notified by
email after each order placement. He can also have generated, various
summary and detailed reports.

6.  The site offers it's wholesale dealers a facility to register with it
and place orders. There is a full fledged backend administration panel
associated with the site, for managing the orders.

7.  The site is a totally back-end driven site. The site admin can create
new links and pages on the fly and populate them from the DB. The admin
panel features an DB import and export tool which is useful to import-export
a large huge amount of data at one go.

8.  The site administrator can send regular preformtted HTML news letters to
the registered clients through the site. The news letters can be fully
customized through a web admin panel.

9.  An online store for great educational products for children. The site
offers a complete online shopping cart capable of accepting payments online.

10.  A shopping cart of artwork. It provides an easy way for art-dealers to
contact various customers.
    The site contains variety of categories under which the artworks are
displayed. All payments are via SSL under Linkpoint.


Thanks

--- End Message ---
--- Begin Message ---
This is sooo low down I think he has to look up to see the snakes belly.

--- End Message ---
--- Begin Message --- New Session wrote:
Sir,
I am a web developer, I had made many sites like shooping cart, mangement
leads etc.
<major snip>

Perhaps you can design me an application that will eliminate stupid email?

--
By-Tor.com
It's all about the Rush
http://www.by-tor.com

--- End Message ---
--- Begin Message --- Hi my mail was intended as a joke :-) to defuse the tension that was building up.


Ryan A wrote:


On 3/6/2004 5:36:01 PM, Raditha Dissanayake ([EMAIL PROTECTED]) wrote:


And for the record, I didnt "single you out" the post was just
irritating...the rest of you
who dont agree..thats your opinion..and the rest of you who got pissed


at


me...bite me.

Cheers,


Hey Raditha,
I think you misunderstood what I meant by:



...the rest of you who dont agree..thats your opinion..the rest of you who


got pissed at me...bite me

No matter, have a nice day.
Cheers,
-Ryan





--
Raditha Dissanayake.
-----------------------------------------------------------------------
http://www.radinks.net/ftp/applet/
An applet that breaks all the rules. Reads, Writes and deletes files on your hard disk. Uploads what's left to a third party server.

--- End Message ---
--- Begin Message --- Hi Juan,

What you can do is to switch off output buffering. If it is a really large file you might want to generate the file offline and deliver it using the more conventional hyperlink.

all the best

Juan E Suris wrote:

Hi!

I have a problem with PHP and Apache, where Apache uses up a huge amount of memory. What happens is that I have a PHP script that creates a file on the fly and sends it directly to the broswer (as an attachment, so that the user can save it). The problem is that when the file is big and the client download speed is slow, the Apache process uses up as much memory as the file size. My guess here is that PHP keeps writing data as fast as it can, and Apache caches it in memory until the user can download it all.

Is there any way to avoid this?

My apologies if this is an obvious question.

Thanks,
Juan




--
Raditha Dissanayake.
-----------------------------------------------------------------------
http://www.radinks.net/ftp/applet/
An applet that breaks all the rules. Reads, Writes and deletes files on your hard disk. Uploads what's left to a third party server.

--- End Message ---
--- Begin Message ---
Right now I am genereating the file offline and using a hyperlink, but that
creates double the disk I/O. It reads some files (which the big file is
based on), writes the big file, and reads the big file (to deliver it when
the user clicks the hyperlink). If I could just create the file and deliver
it as I create it, I would save the write/read to/from disk of the big file.

Output buffering is off in php.ini:
output_buffering = Off

So that does not seem to be it. Maybe the problem should be address on
Apache instead of PHP?
Thanks,
Juan

----- Original Message ----- 
From: "Raditha Dissanayake" <[EMAIL PROTECTED]>
To: "Juan E Suris" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, March 06, 2004 11:44 PM
Subject: Re: [PHP] PHP and Apache Using up all memory


> Hi Juan,
>
> What you can do is to switch off output buffering. If it is a really
> large file you might want to generate the file offline and deliver it
> using the more conventional hyperlink.
>
> all the best
>
> Juan E Suris wrote:
>
> >Hi!
> >
> >I have a problem with PHP and Apache, where Apache uses up a huge amount
of memory. What happens is that I have a PHP script that creates a file on
the fly and sends it directly to the broswer (as an attachment, so that the
user can save it). The problem is that when the file is big and the client
download speed is slow, the Apache process uses up as much memory as the
file size. My guess here is that PHP keeps writing data as fast as it can,
and Apache caches it in memory until the user can download it all.
> >
> >Is there any way to avoid this?
> >
> >My apologies if this is an obvious question.
> >
> >Thanks,
> >Juan
> >
> >
>
>
> -- 
> Raditha Dissanayake.
> -----------------------------------------------------------------------
> http://www.radinks.net/ftp/applet/
> An applet that breaks all the rules. Reads, Writes and deletes files on
> your hard disk. Uploads what's left to a third party server.
>
>

--- End Message ---
--- Begin Message ---
The RLimit* set of directive can define resource limitations in apache. There is also aSendBufferSize directive but haven't used that so can't comment. According to the situation that you describe perhaps saving the file first isn't the solution either.


Juan E Suris wrote:

Right now I am genereating the file offline and using a hyperlink, but that
creates double the disk I/O. It reads some files (which the big file is
based on), writes the big file, and reads the big file (to deliver it when
the user clicks the hyperlink). If I could just create the file and deliver
it as I create it, I would save the write/read to/from disk of the big file.

Output buffering is off in php.ini:
output_buffering = Off

So that does not seem to be it. Maybe the problem should be address on
Apache instead of PHP?
Thanks,
Juan

----- Original Message ----- From: "Raditha Dissanayake" <[EMAIL PROTECTED]>
To: "Juan E Suris" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, March 06, 2004 11:44 PM
Subject: Re: [PHP] PHP and Apache Using up all memory





Hi Juan,

What you can do is to switch off output buffering. If it is a really
large file you might want to generate the file offline and deliver it
using the more conventional hyperlink.

all the best

Juan E Suris wrote:



Hi!









--
Raditha Dissanayake.
-----------------------------------------------------------------------
http://www.radinks.net/ftp/applet/
An applet that breaks all the rules. Reads, Writes and Deletes files on your hard disk. Uploads what's left to a third party server.

--- End Message ---
--- Begin Message --- Hi,
I think this is largely a matter of personal opinion. However even though you have taken every precaution against illegal content there is always a chance of someone getting throughwtih the


domain.org/?page=pageName approach. So perhaps it's a little bit more risky.


Barýþ Mert wrote:


A general thing to do while coding a site is to
include header.php at the top of the file (and
footer.php at the end of file). Another method is to
put these header and footer files together in
index.php and including the desired page between them.
We get the desired page from the query string:
domain.org/?page=pageName
$page = $_GET['pagename'];
include $page.'.php';
Is there any important difference between these two
methods? What can you say about the advanteges or
disadvanteges of one to the other?
Assume that including undesired pages is prohibited. I
mean don't write about page=../../secretpage

Thanks...

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com





--
Raditha Dissanayake.
-----------------------------------------------------------------------
http://www.radinks.net/ftp/applet/
An applet that breaks all the rules. Reads, Writes and Deletes files on your hard disk. Uploads what's left to a third party server.

--- End Message ---
--- Begin Message --- It's an often overlooked fact that you can pass additional headers in the fourth parameter. I do belive you should use \n and not \r\n
then your code will look like


mail("[EMAIL PROTECTED]", "object", $message,
        "From: [EMAIL PROTECTED] ".
        "Reply-To:[EMAIL PROTECTED]".
        "Return-Path: [EMAIL PROTECTED]);






Enrico Comini wrote:


I have to send a email to a server where is very important the
"Return-Path" to match the identity.

If I use mail("[EMAIL PROTECTED]", "object", $message,"From:
[EMAIL PROTECTED]".
"Reply-To:[EMAIL PROTECTED]"
."Return-Path: [EMAIL PROTECTED]);

I see in the received message that return-path Is not that I want.

I try to use the fifth parameter ( "[EMAIL PROTECTED])  but I am in
safe mode then I see the warning : the fifth parameter is disabled in safe
mode.
There is a workaround for this problem ? safe_mode = on is impossible for
this server !





--
Raditha Dissanayake.
-----------------------------------------------------------------------
http://www.radinks.net/ftp/applet/
An applet that breaks all the rules. Reads, Writes and Deletes files on your hard disk. Uploads what's left to a third party server.

--- End Message ---
--- Begin Message ---
\r\n is good :)
J

Raditha Dissanayake <[EMAIL PROTECTED]> wrote:
> 
> It's an often overlooked fact that you can pass additional headers in 
> the fourth parameter. I do belive you should use \n and not \r\n
> then your code will look like
> 
> mail("[EMAIL PROTECTED]", "object", $message,
>       "From: [EMAIL PROTECTED] ".
>       "Reply-To:[EMAIL PROTECTED]".
>       "Return-Path: [EMAIL PROTECTED]);
> 
> 
> 
> 
> 
> 
> Enrico Comini wrote:
> 
> > I have to send a email to a server where is very important the
> >"Return-Path" to match the identity.
> >
> >If I use mail("[EMAIL PROTECTED]", "object", $message,"From:
> >[EMAIL PROTECTED]".
> >"Reply-To:[EMAIL PROTECTED]"
> >."Return-Path: [EMAIL PROTECTED]);
> >
> >I see in the received message that return-path Is not that I want.
> >
> >I try to use the fifth parameter ( "[EMAIL PROTECTED])  but I am in
> >safe mode then I see the warning : the fifth parameter is disabled in safe
> >mode.
> >There is a workaround for this problem ? safe_mode = on is impossible for
> >this server !
> >
> >  
> >
> 
> 
> -- 
> Raditha Dissanayake.
> -----------------------------------------------------------------------
> http://www.radinks.net/ftp/applet/
> An applet that breaks all the rules. Reads, Writes and Deletes files on 
> your hard disk. Uploads what's left to a third party server.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--- End Message ---
--- Begin Message ---
On Sun, Mar 07, 2004 at 09:51:28AM +0600, Raditha Dissanayake wrote:
> It's an often overlooked fact that you can pass additional headers in 
> the fourth parameter. I do belive you should use \n and not \r\n
> then your code will look like
> 
> mail("[EMAIL PROTECTED]", "object", $message,
>       "From: [EMAIL PROTECTED] ".
>       "Reply-To:[EMAIL PROTECTED]".
>       "Return-Path: [EMAIL PROTECTED]);

As mentioned in another post, the Return-Path header can and usually is
overwritten by sendmail when it does the actual sending.  

In addition to a previous suggestion, one way to reliably set that
header is to use phpmailer (http://phpmailer.sourceforge.net/) which has
the option of using an smtp server rather than sendmail directly.

joel

-- 
[ joel boonstra | gospelcom.net ]

--- End Message ---
--- Begin Message --- Hi,
I am no expert on sendmail configuration but my little knowledge tells me sendmail shouldn't change any headers that are passed to it if it is configured properly.



joel boonstra wrote:


On Sun, Mar 07, 2004 at 09:51:28AM +0600, Raditha Dissanayake wrote:


It's an often overlooked fact that you can pass additional headers in the fourth parameter. I do belive you should use \n and not \r\n
then your code will look like


mail("[EMAIL PROTECTED]", "object", $message,
"From: [EMAIL PROTECTED] ".
"Reply-To:[EMAIL PROTECTED]".
"Return-Path: [EMAIL PROTECTED]);



As mentioned in another post, the Return-Path header can and usually is
overwritten by sendmail when it does the actual sending.


In addition to a previous suggestion, one way to reliably set that
header is to use phpmailer (http://phpmailer.sourceforge.net/) which has
the option of using an smtp server rather than sendmail directly.

joel





--
Raditha Dissanayake.
-----------------------------------------------------------------------
http://www.radinks.net/ftp/applet/
An applet that breaks all the rules. Reads, Writes and Deletes files on your hard disk. Uploads what's left to a third party server.

--- End Message ---
--- Begin Message --- Bambero wrote:
Hi
I need to split a string by the: , (comma) separator, but when the comma is beetwen ""
it should be skipped.


Ex:
test ts sasa, assas "sasa,asaas" dasdas, da

=> test ts sasa
=> assas "sasa,asaas" dasdas
=> da


If this is a CSV file, you can try fgetcsv.


From http://www.php.net/fgetcsv

"Similar to fgets() except that fgetcsv() parses the line it reads for fields in CSV format and returns an array containing the fields read. The optional third delimiter parameter defaults as a comma, and the optional enclosure defaults as a double quotation mark. Both delimiter and enclosure are limited to one character. If either is more than one character, only the first character is used.

Note: The enclosure parameter was added in PHP 4.3.0."
--- End Message ---
--- Begin Message ---

Burhan Khalid wrote:
Bambero wrote:

Hi
I need to split a string by the: , (comma) separator, but when the comma is beetwen ""
it should be skipped.


Ex:
test ts sasa, assas "sasa,asaas" dasdas, da

=> test ts sasa
=> assas "sasa,asaas" dasdas
=> da


If this is a CSV file, you can try fgetcsv.


From http://www.php.net/fgetcsv

"Similar to fgets() except that fgetcsv() parses the line it reads for fields in CSV format and returns an array containing the fields read. The optional third delimiter parameter defaults as a comma, and the optional enclosure defaults as a double quotation mark. Both delimiter and enclosure are limited to one character. If either is more than one character, only the first character is used.

Note: The enclosure parameter was added in PHP 4.3.0."





Hmmm is it the best solution ? Is there any way to do that with preg_split ?
--- End Message ---
--- Begin Message --- on Page One

   <form action="pagetwo.php" method="post">
       <textarea cols="100" rows="40" name="email_body">
       a
       b
       </textarea><br><br>
   </form>


On Page Two:



$to = $row['email_address'];
$body = stripslashes(trim($_POST['email_body']));
mail($to, $subject, $body, $headers);




What I really don't understand is why there are any line breaks at all, because the trim is supposed to take out all \r & \n 's. Is there another type of line break?

Best Regards,

Scott Taylor
--- End Message ---
--- Begin Message ---
Do anyone know who should I contact to report that bug?

I've already dropped a note to forums at Zend...

Thanks

--- End Message ---
--- Begin Message ---
you can post to the internals list.. they will respond fast.  they are
good that way. :)
Jason

"Erdener Gonenc" <[EMAIL PROTECTED]> wrote:
> 
> Do anyone know who should I contact to report that bug?
> 
> I've already dropped a note to forums at Zend...
> 
> Thanks
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--- End Message ---
--- Begin Message ---
I just did, Thank you..

>
>you can post to the internals list.. they will respond fast.  they are
>good that way. :)
>Jason
>
>"Erdener Gonenc" <[EMAIL PROTECTED]> wrote:
>
> Do anyone know who should I contact to report that bug?
>
> I've already dropped a note to forums at Zend...
>
> Thanks
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Tell me even , is it possible to do so ??????
 
plz reply asap
 
----- Original Message -----
To: PHP
Sent: Friday, March 05, 2004 6:40 PM
Subject: Fw: remote stop/start the applications

 
----- Original Message -----
To: PHP
Sent: Friday, March 05, 2004 3:30 PM
Subject: remote stop/start the applications

hi ,
 
My OS = Red Hat Linux 8
webserver = apache
In that machine , there is some perl , and php scrpts r running.
This perl script is the application that i have to run over the web. This will effect for the whole process.
Some times i want to stop/run that perl script from the other machine over the web.
So can i do that over the web , because it is running on the intranet.
can somebody help me to do this php scripting .......plz
 
thanx
curlys

--- End Message ---
--- Begin Message ---
On Sunday 07 March 2004 20:50, CurlyBraces Technologies \( Pvt \) Ltd wrote:
> Tell me even , is it possible to do so ??????

Yes.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
The very remembrance of my former misfortune proves a new one to me.
                -- Miguel de Cervantes
*/

--- End Message ---
--- Begin Message ---
By using php web page of a certain webserver can i go into the some other
local plase in the same web server ?
Because for the special request i want kill some prosess which are runs in
the webserver.
All Telent and other remote login restricted from the firewall .

thanx

----- Original Message ----- 
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 07, 2004 7:16 PM
Subject: Re: [PHP] Fw: remote stop/start the applications


> On Sunday 07 March 2004 20:50, CurlyBraces Technologies \( Pvt \) Ltd
wrote:
> > Tell me even , is it possible to do so ??????
>
> Yes.
>
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> ------------------------------------------
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> ------------------------------------------
> /*
> The very remembrance of my former misfortune proves a new one to me.
> -- Miguel de Cervantes
> */
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---

Reply via email to