Re: [PHP] best way to store images

2004-11-06 Thread raditha dissanayake
[EMAIL PROTECTED] wrote: I'm trying to plan out the best way to develop an image hosting script for my client. You will find the answer in last week's archive. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] image uploads - part 2

2004-11-06 Thread Jaskirat Singh
Thanks Robby Russell, Jason Wong , Greg Donald, raditha dissanayak and every one else who answered part 1 of my email concerning image uploads. It was about where to store images uploaded by website users and question was database vs filesystem and dedicated vs shared hosting and the conclusion

[PHP] image uploads - part 2

2004-11-06 Thread Jaskirat Singh
Thanks Robby Russell, Jason Wong , Greg Donald, raditha dissanayak and every one else who answered part 1 of my email concerning image uploads. It was about where to store images uploaded by website users and question was database vs filesystem and dedicated vs shared hosting and the conclusion

[PHP] Questions about mysql_real_escape_string and addslashes

2004-11-06 Thread Stuart Felenstein
First I'm a bit unsure , because in the manual it states that you must use mysql_real_escape_string on binary data. So first question, what constitutues binary data, a file or just an integer? Second question - Since magic_quote_gpc is enabled on my server (and I have no choice) - I gather I

[PHP] Re: Questions about mysql_real_escape_string and addslashes

2004-11-06 Thread M. Sokolewicz
Stuart Felenstein wrote: First I'm a bit unsure , because in the manual it states that you must use mysql_real_escape_string on binary data. So first question, what constitutues binary data, a file or just an integer? any data that might contain a null-byte (\0) is usually seen as the definition

[PHP] Re: image uploads - part 2

2004-11-06 Thread M. Sokolewicz
Jaskirat Singh wrote: Thanks Robby Russell, Jason Wong , Greg Donald, raditha dissanayak and every one else who answered part 1 of my email concerning image uploads. It was about where to store images uploaded by website users and question was database vs filesystem and dedicated vs shared

Re: [PHP] Problem with fopen(...) - No error??

2004-11-06 Thread Jason Wong
On Friday 05 November 2004 22:04, Pankaj Kafley wrote: Can you be more specific ? I actually had the same sort of problem once but maybe it is not the same. But anyways I was getting null everytime until I change $_FILES variable to $HTTP_POST_FILES. As by suggested by someone else here. A

Re: [PHP] Passing values from a new window

2004-11-06 Thread M Saleh EG
Javascript. Simply just update ur fields at the parent window. On onUnload even of the popup do this self.opener.formName.fieldName.value=document.popupformName.popupfieldName.value; Your keywords to check in Javascript papers are parent_window, window_opener and Javascript DOM. If you're

Re: [PHP] Big table dump stopping in between

2004-11-06 Thread Jason Wong
On Saturday 06 November 2004 05:43, Ritesh Nadhani wrote: In the script I connect to one our tables having more then 80K rows and dump the data using echo command. When I run this page from my browser, the process always stops half way thru and only half the data is dumped. I can reproduce

Re: Re: [PHP] Big table dump stopping in between

2004-11-06 Thread Ritesh Nadhani
Hello, From: Jason Wong [EMAIL PROTECTED] Date: 2004/11/06 Sat PM 06:01:28 EST To: [EMAIL PROTECTED] Subject: Re: [PHP] Big table dump stopping in between On Saturday 06 November 2004 05:43, Ritesh Nadhani wrote: In the script I connect to one our tables having more then 80K rows and

Re: [PHP] Re: Questions about mysql_real_escape_string and addslashes

2004-11-06 Thread Stuart Felenstein
--- M. Sokolewicz [EMAIL PROTECTED] wrote: (http://www.php.net/manual/en/function.mysql-real-escape-string.php) I have my eye on example 3: The Quote_Smart function. Do I have to list all the variables out though or is there a way to have it check everything passing through ? What would nice

[PHP] Question: Passing error messages

2004-11-06 Thread Stuart Felenstein
I've started getting into the habit of passing error messages through session variables, particularly on redirects. From some peoples reaction on this list I gather it's not the best practice. What is an alternative way ? I believe it's through a URL. not sure how to go about that method Stuart

[PHP] Re: Question: Passing error messages

2004-11-06 Thread Daniel Schierbeck
Stuart Felenstein wrote: I've started getting into the habit of passing error messages through session variables, particularly on redirects. From some peoples reaction on this list I gather it's not the best practice. What is an alternative way ? I believe it's through a URL. not sure how to go

Re: [PHP] image uploads - part 2

2004-11-06 Thread Robby Russell
On Sat, 2004-11-06 at 03:58 -0800, Jaskirat Singh wrote: 4) database + dedicated = err.. stupid? ;) I should have clarified this more as to why I prefer the DB storage method. I don't expect that my web application will be the only interface to the data that I am storing the database. For some

Re: [PHP] Re: Question: Passing error messages

2004-11-06 Thread Stuart Felenstein
--- Daniel Schierbeck [EMAIL PROTECTED] wrote: I'm not quite getting what you're saying - are you sending the error messages on to a new page?! The usual and simple way of doing this is the good 'ol OR operator: I'm saying, currently if there is an error and the script needs to exit,

Re: [PHP] Re: Question: Passing error messages

2004-11-06 Thread Daniel Schierbeck
Stuart Felenstein wrote: I'm saying, currently if there is an error and the script needs to exit, I'm doing this : if ..error { $_SESSION['ErMsg'] = Submit Failure; header (location: ) exit; } I want to know what alternatives there are to error messages aside from using a session variable.

Re: Re: [PHP] Problem with fopen(...) -

2004-11-06 Thread P M
Well, since I'm using the latest version of the PHP plugin, it can't be that I'm using the $_FILES variable ($HTTP_POST_FILES is for older versions of php as far as I know). Nevertheless, I tried it.. and it didn't work. To clarify my problem.. I'm using a form to get a file name and some

Re: [PHP] images doesn't seem to cache

2004-11-06 Thread anders thoresson
Your eyes are fine. You need to check for If-Modified-Since header, if the time is older than file modification time (filemtime()) send Last-Modified header and the image, else send 304 Not Modified response. This code seems to work. Have I got it right? // Get the time the cache file was last

Re: [PHP] images doesn't seem to cache

2004-11-06 Thread anders thoresson
This code seems to work. Have I got it right? No. I have not. Sometimes the images are viewed from the cache, just to get downloaded from the server again next time, just a minute later, when I try again. My local development server is running IIS, my production server is running Apache.

Re: [PHP] Re: Question: Passing error messages

2004-11-06 Thread Stuart Felenstein
--- Daniel Schierbeck [EMAIL PROTECTED] wrote: Where are you redirecting the client to? An error page? Either an error page or back out to a main page. Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re: [PHP] Big table dump stopping in between

2004-11-06 Thread James Kaufman
On Sat, Nov 06, 2004 at 10:10:56AM -0500, Ritesh Nadhani wrote: I even tried an HTTP utility but it is also stopping half way thru. I think its a problem with ISPs server. Looks like some server option has to be configured. What database is this again? I had a similar problem with an

Re: [PHP] images doesn't seem to cache

2004-11-06 Thread M. Sokolewicz
Anders Thoresson wrote: This code seems to work. Have I got it right? No. I have not. Sometimes the images are viewed from the cache, just to get downloaded from the server again next time, just a minute later, when I try again. My local development server is running IIS, my production

Re: [PHP] Problem with fopen(...) -

2004-11-06 Thread Jason Wong
On Saturday 06 November 2004 19:33, P M wrote: Please do not top post. Well, since I'm using the latest version of the PHP plugin, it can't be that I'm using the $_FILES variable ($HTTP_POST_FILES is for older versions of php as far as I know). Nevertheless, I tried it.. and it didn't work.

[PHP] Recover POST form

2004-11-06 Thread Christian Ista
Hello, In a PHP page I use a form with POST method. I'd like in the action page recover all the variable posted. Could you tell me how to do that ? Thanks, Christian, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Recover POST form

2004-11-06 Thread Greg Donald
On Sat, 6 Nov 2004 23:32:23 +0100, Christian Ista [EMAIL PROTECTED] wrote: In a PHP page I use a form with POST method. I'd like in the action page recover all the variable posted. Could you tell me how to do that ? They are available in the $_POST array. echo 'pre'; print_r($_POST); echo

Re: [PHP] Recover POST form

2004-11-06 Thread Christian Ista
echo 'pre'; print_r($_POST); echo '/pre'; I have something like that : Array ( [5980915] = on [ToDo5980915] = N [5941846] = on [ToDo5941846] = N [5916500] = on [ToDo5916500] = N [5907115] = on [ToDo5907115] = N [5900019] = on [ToDo5900019] = N

Re: [PHP] Recover POST form

2004-11-06 Thread Christian Ista
I tried $_POST[2] but not work with arrays_keys :) Thanks, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Recover POST form

2004-11-06 Thread M. Sokolewicz
Christian Ista wrote: echo 'pre'; print_r($_POST); echo '/pre'; I have something like that : Array ( [5980915] = on [ToDo5980915] = N [5941846] = on [ToDo5941846] = N [5916500] = on [ToDo5916500] = N [5907115] = on [ToDo5907115] = N [5900019] = on

[PHP] PHP Accelerator

2004-11-06 Thread David
I need a PHP accelerator but am not sure which one to use. I would highly prefer to not use a commercial accelerator and need one that works with PHP 5. Does anyone recommend one out of the ones that exist? Here are the ones I am aware of..but have no idea which ones are better than others. -

Re: [PHP] PHP Accelerator

2004-11-06 Thread raditha dissanayake
David wrote: I need a PHP accelerator but am not sure which one to use. I would highly prefer to not use a commercial accelerator and need one that works with PHP 5. Does anyone recommend one out of the ones that exist? this one: - Turck MMCache for PHP -- Raditha Dissanayake.

[PHP] Object oriented??

2004-11-06 Thread Aalee
Hi there, Is PHP an object oriented language. If not is it gonna be? Cheers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Object oriented??

2004-11-06 Thread Robert Cummings
On Sat, 2004-11-06 at 21:44, Aalee wrote: Hi there, Is PHP an object oriented language. If not is it gonna be? Did you spend 10 seconds looking? Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com |

[PHP] Using fonts in TrueType suitcases on a Mac?

2004-11-06 Thread Ken Tozier
I'm trying to use some of the truetype fonts on my mac with PHP's imagettfbbox() routine but since all my fonts are contained within suitcases, I don't know how to get them to work. I found one non-suitcase TrueType font that loads fine so I know the basic mechanism works and the script has

Re: [PHP] Object oriented??

2004-11-06 Thread Aalee
Yes of course...but was confused since some says it is so and some says it is not...So thought of asking the pros.. Robert Cummings [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Sat, 2004-11-06 at 21:44, Aalee wrote: Hi there, Is PHP an object oriented language. If not is it

[PHP] loking for a item in string?

2004-11-06 Thread Dustin Wish with INDCO Networks
I am opening a file and then have to look for a value inside the string. Is there an easy way to do this? I need the value in this string for the var djLast = '45.11'; script Language=javascript src=/DJCom/Includes/JavaScript/PortalStyle/bDetection.js/script SCRIPT Language=JavaScript

Re: [PHP] Object oriented??

2004-11-06 Thread Robert Cummings
On Sat, 2004-11-06 at 22:53, Aalee wrote: Yes of course...but was confused since some says it is so and some says it is not...So thought of asking the pros.. It is. PHP4 had limited support for OOP, though it was quite usable. PHP5 goes further and provides pretty much everything else. See the

Re: [PHP] Object oriented??

2004-11-06 Thread Larry E . Ullman
Is PHP an object oriented language. If not is it gonna be? PHP is not an object oriented language (like Java). Although PHP supports the creation of objects, you can still do pretty much everything without ever using OOP. I can't imagine PHP ever being turned into a true OO language, but I

[PHP] NMax

2004-11-06 Thread John Taylor-Johnston
How can I calculate how many records I have in a table? John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: NMax

2004-11-06 Thread John Taylor-Johnston
I might add, I do this, think there must be a better way? $mycounter = 0; while ($mydata = mysql_fetch_object($news)) { $mycounter++; } John Taylor-Johnston wrote: How can I calculate how many records I have in a table? John -- PHP General Mailing List (http://www.php.net/) To

[PHP] Syntax problem - dynamic static member access

2004-11-06 Thread Jake Press
Hello All, I am having an interesting syntax problem. :( I have been battling this little bugger for the last week and a half, I have exhausted google and numerous php channels in that time. I am starting to beleive it could be a syntax that is sofar un-documented or an unclear syntax

[PHP] Re: NMax

2004-11-06 Thread David Schlotfeldt
You could do it in a SQL statement SELECT COUNT(*) FROM table_name; This is less system intensive. David John Taylor-Johnston wrote: I might add, I do this, think there must be a better way? $mycounter = 0; while ($mydata = mysql_fetch_object($news)) { $mycounter++; } John Taylor-Johnston

[PHP] Re: Using fonts in TrueType suitcases on a Mac?

2004-11-06 Thread David Schlotfeldt
I don't know if this will help you but you could try converting them. Its hard to explain how to do .. but here is a start.. 1) Burn the fonts to a Mac cd (burn the Cd for a mac.. not a PC.. if you do you will loose information) 2) Bring the cd to a windows machine and use MacDisk to read the cd.

Re: [PHP] PHP Accelerator

2004-11-06 Thread Jyry Kuukkanen
On Sun, 7 Nov 2004, raditha dissanayake wrote: David wrote: I need a PHP accelerator but am not sure which one to use. I would highly prefer to not use a commercial accelerator and need one that works with PHP 5. Does anyone recommend one out of the ones that exist? this one: -

RE: [PHP] Re: NMax

2004-11-06 Thread nate
Yeah definitely use COUNT(*) or mysql_num_rows() function. Nate -Original Message- From: David Schlotfeldt [mailto:[EMAIL PROTECTED] Sent: Saturday, November 06, 2004 9:19 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: NMax You could do it in a SQL statement SELECT COUNT(*) FROM

Re: [PHP] Object oriented??

2004-11-06 Thread Larry E . Ullman
Yes of course...but was confused since some says it is so and some says it is not...So thought of asking the pros.. It is. PHP4 had limited support for OOP, though it was quite usable. PHP5 goes further and provides pretty much everything else. See the documentation on php.net for the complete

Re: [PHP] Re: Using fonts in TrueType suitcases on a Mac?

2004-11-06 Thread Ken Tozier
On Nov 7, 2004, at 12:32 AM, David Schlotfeldt wrote: I don't know if this will help you but you could try converting them. Its hard to explain how to do .. but here is a start.. 1) Burn the fonts to a Mac cd (burn the Cd for a mac.. not a PC.. if you do you will loose information) 2) Bring the

[PHP] Adding to a Date

2004-11-06 Thread Matt Cassarino
Hi, I am trying to add x days to the current date for a calendar program that I am writing. x represents any integer from 1 to 7. So, for x=4, the program will get the current date 2004-11-06 and add 4 days to it: 2004-11-10 I need it to account for the next month if I want to add 4 days

[PHP] Re: Syntax problem - dynamic static member access

2004-11-06 Thread Jason Barnett
Jake, as you probably already know you usually have to give the class name when attempting to get a static variable, i.e. YourClassName::$bob; You *can* dynamically refer to a static class variable from within an object without knowing the name of the class; this is what self is for. i.e.

[PHP] Re: Adding to a Date

2004-11-06 Thread Jason Barnett
There are probably a lot of ways to solve this problem, but the way I would do it: create a timestamp out of whatever date you have, then add x * 24 * 60 * 60 to it and convert from the timestamp back into whatever string format date you want. -- PHP General Mailing List (http://www.php.net/)