Re: [PHP] dynamicly generating a transparent truecolor image

2004-01-16 Thread Peter Vertes
If you want to create a transparent image don't forget it must be a GIF. At least that's what my graphics guys have been telling me all these years :) -Pete On Jan 16, 2004, at 04:41, Michel van der Breggen wrote: hi, i have a problem, i would like to dynamicly generete a transparent truecol

Re: [PHP] simple mod_rewrite question

2004-01-16 Thread Justin French
On Saturday, January 17, 2004, at 10:04 AM, Scott Taylor wrote: What is the simplist way to do change http://username:[EMAIL PROTECTED]/protected/archive/$file to http://miningstocks.com/protected/archive/$file where $file is a variable (indicating any file in that directory or any subdirecto

[PHP] spelling without aspell/pspell?

2004-01-16 Thread Justin French
Hi, I just found a really nice set of javascripts for spell-checking a textarea before submitting, which is really nice, BUT is shell_exec()'s to aspell, which neither my host or my staging server has installed. It works with both PHP and Perl too. There's a demo here: http://www.netjs.com/sp

Re: [PHP] [GD] Circlediagram

2004-01-16 Thread John W. Holmes
Simon Fredriksson wrote: Does anyone out there have any idea on how to create circlediagrams, using GD? Preferably something to set that x% of the circle is filled with one color and the rest with some other. Thinking about it, doesn't sound like an easy task with the current functions. :-\ Tak

Re: [PHP] Image Header Issues

2004-01-16 Thread Bob Eldred
Grr.that's *not* the problem. IE saves JPGs just fine, so long as they are not passed through this particular script. Which is why I think it has something to do with the headers. Bob - Original Message - From: "Arthur Pelkey" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PR

[PHP] [GD] Circlediagram

2004-01-16 Thread Simon Fredriksson
Does anyone out there have any idea on how to create circlediagrams, using GD? Preferably something to set that x% of the circle is filled with one color and the rest with some other. Thinking about it, doesn't sound like an easy task with the current functions. :-\ //Simon -- PHP General Mail

[PHP] Trying again: Random(?) blank pages when using sessions

2004-01-16 Thread Matt Grimm
Can anyone think of ways I can troubleshoot this problem? I still haven't found a solution. > I'm using non-cookie-based sessions for authentication on a page. The > session is set like so, which works (these values, along with the SID, are > always retrievable): > > $_SESSION['user'] = $_POST['

RE: [PHP] Returning Newbie (Disoriented)

2004-01-16 Thread Chris W. Parker
Freedomware on Monday, January 12, 2004 5:47 PM said: > Now I just have to get it hooked up to Dreamweaver. But I'll take your > advice and find out what programs my host is running. I don't think you "hook up" Dreamweaver to anything in the way that Frontpage "hook

[PHP] Documentation on features not in current release (SimpleXML PHP5 Beta 3)

2004-01-16 Thread Jonathan
Where would I be able to find a function reference or documentation on new features that are not documented in the official manual? Preferably in a format that can be read/browsed offline. Thanks, Jonathan P.S. Sorry if this is a repeat, I thought this went through but just got a bounce back. -- P

RE: [PHP] Can you recommend a good PHP includes tutorial?

2004-01-16 Thread Chris W. Parker
Freedomware on Wednesday, January 14, 2004 5:17 AM said: > Wow, that is a lot simpler than I imagined. Thanks for the tip! Imagined? What did the book tell you to do? Chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.

RE: [PHP] pass output of php scripts through command line programor cgi

2004-01-16 Thread Roger B.A. Klorese
Sorry, but what command line are you talking about? He didn't say he'd like to execute his PHP scripts from a shell prompt. He said that he'd like the output of his PHP scripts to be filtered before httpd outputs them. > on the commandline you need to have the php executable on your > path...the

Re: [PHP] pass output of php scripts through command line program or cgi

2004-01-16 Thread Ray Hunter
on the commandline you need to have the php executable on your path...then run php -f [filename] so php -f index.php that will do it for you. -- Ray On Sat, 2004-01-17 at 05:44, Paul William wrote: > Hi, > > I want to run the output of all the php scripts running on my apache > server thro

[PHP] pass output of php scripts through command line program or cgi

2004-01-16 Thread Paul William
Hi, I want to run the output of all the php scripts running on my apache server through a command line or CGI program. I do not want to modify any of the php scripts.Has anyone done this? Is this possible? For example (this is a stupid example and I am not using it for this): The output of "inde

[PHP] simple mod_rewrite question

2004-01-16 Thread Scott Taylor
What is the simplist way to do change http://username:[EMAIL PROTECTED]/protected/archive/$file to http://miningstocks.com/protected/archive/$file where $file is a variable (indicating any file in that directory or any subdirectory)? Best Regards and thank you for all the help, Scott Taylor

[PHP] Ip Tracking Utilities

2004-01-16 Thread Rolf Brusletto
Hey all - I've heard mention of Ip database/tracking utilities in the lists before, but I can't seem to find any mention when googling... does anybody know of a good app to track multiple Class C spaces or larger? Thanks, Rolf Brusletto -- http://www.phpExamples.net http://www.emailf

Re: [PHP] SOLVED - LOAD_FILE and PHP

2004-01-16 Thread Jough P
Thank you everyone for you fabulous help!!! btw, the FILE privilege is a global privilege, and as such needs to be in the *.* context. It does not work on a db-level. On Jan 16, 2004, at 4:08 PM, Jough P wrote: OMG I'm sure that's why I'm having problems. Do you know the syntax for granting t

RE: [PHP] Can I do this? If so why wont it work

2004-01-16 Thread Alex Hogan
Thanks.. > -Original Message- > From: John W. Holmes [mailto:[EMAIL PROTECTED] > Sent: Friday, January 16, 2004 4:29 PM > To: Alex Hogan > Cc: PHP General list > Subject: Re: [PHP] Can I do this? If so why wont it work > > Alex Hogan wrote: > > I am wanting to read in several session

Re: [PHP] Please help me retrieving data from a PHP file!!???

2004-01-16 Thread John W. Holmes
SASSINC Internet Solutions - Arabic Department wrote: How to retrieve data from a PHP file? (The value that will be retrieved of course it is echoed in the PHP file, and it will be shown in a TextBox in my VB program.. so I want to retrieve it to my EXE VB program that will put it inside a Te

Re: [PHP] Can I do this? If so why wont it work

2004-01-16 Thread John W. Holmes
Alex Hogan wrote: I am wanting to read in several session values at once. This is what I have so far; $_SESSION['obj[1]'] = $_REQUEST['txtObj1']; $_SESSION['obj[2]'] = $_REQUEST['txtObj2']; $_SESSION['obj[3]'] = $_REQUEST['txtObj3']; $_SESSION['obj[4]'] = $_REQUEST['txtObj4']; $_SESSION

[PHP] Re: Please help me retrieving data from a PHP file!!???

2004-01-16 Thread Ben Ramsey
> How to retrieve data from a PHP file? (The value that will > be retrieved of course it is echoed in the PHP file, and it > will be shown in a TextBox in my VB program.. so I want to > retrieve it to my EXE VB program that will put it inside a > TextBox or something like that..) From within a PHP

Re: [PHP] mysql question

2004-01-16 Thread Christian Calloway
Hey Mike, That is almost exactly what I am doing. I have a table, lets say "product_fields" which describes each characteristic/field of a product (with N possible fields). A definition of a field includes, its name (as the customer see's it), its type, a named-reference to the field in the data t

Re: [PHP] LOAD_FILE and PHP

2004-01-16 Thread Jough P
OMG I'm sure that's why I'm having problems. Do you know the syntax for granting the file_priv? The following doesn't seem to work: mysql> GRANT file ON bs.table1 TO [EMAIL PROTECTED] IDENTIFIED BY 'password123'; On Jan 16, 2004, at 3:15 PM, Jason Wong wrote: On Saturday 17 January 2004 03:4

[PHP] readfile() and 401 pages

2004-01-16 Thread Vince LaMonica
Hi all, I'm attempting to use readfile() to redirect the user to a .htaccess protected page: https://www.foo.edu/cgi-bin/stats/awstats?config=more.foo.here";); ?> The stats/ directory is .htaccess'ed. [and the URL is even longer, with a lot of other options tagged onto the awstats call]. I would

[PHP] Please help me retrieving data from a PHP file!!???

2004-01-16 Thread SASSINC Internet Solutions - Arabic Department
Hi all.. I hope you can help me.. How to retrieve data from a PHP file? (The value that will be retrieved of course it is echoed in the PHP file, and it will be shown in a TextBox in my VB program.. so I want to retrieve it to my EXE VB program that will put it inside a TextBox or something li

Re: [PHP] odd and even numbers

2004-01-16 Thread Jake McHenry
- Original Message - From: "joel boonstra" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 16, 2004 4:54 PM Subject: Re: [PHP] odd and even numbers > Jake, > > > This worked.. somewhat.. here is what I want to do though. > > > > I have two people checking the same email

Re: [PHP] odd and even numbers

2004-01-16 Thread Jake McHenry
- Original Message - From: "Katie Dewees" <[EMAIL PROTECTED]> To: "Jake McHenry" <[EMAIL PROTECTED]> Sent: Friday, January 16, 2004 4:44 PM Subject: RE: [PHP] odd and even numbers > Can you just set a value somewhere (in a flat file, or a database) to 1 or > 2. 1 can represent person num

Re: [PHP] odd and even numbers

2004-01-16 Thread joel boonstra
Jake, > This worked.. somewhat.. here is what I want to do though. > > I have two people checking the same email address. I want to break up the > emails 50/50 to each person. What values can I put into the random number > generator so that I can get closer to 50/50. I just set up a test page wit

RE: [PHP] Can I do this? If so why wont it work

2004-01-16 Thread Alex Hogan
Tried it now I get; Parse error: parse error, unexpected T_VARIABLE in mypage.php on line 22 Line 22 is $i++; > Try this: > > while ($i <= 5) { > $obj_ar[$i] = $_SESSION['obj[$i]']; > $i++; > } ** The con

RE: [PHP] Can I do this? If so why wont it work

2004-01-16 Thread Alex Hogan
Line 24 is: $obj_ar[$i] = $_SESSION['obj[$i]']$i++; Alex > -Original Message- > From: Jake McHenry [mailto:[EMAIL PROTECTED] > Sent: Friday, January 16, 2004 3:31 PM > To: Alex Hogan > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Can I do this? If so why wont it work > > > - Origina

Re: [PHP] odd and even numbers

2004-01-16 Thread Jake McHenry
- Original Message - From: "joel boonstra" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 16, 2004 3:35 PM Subject: Re: [PHP] odd and even numbers > On Fri, Jan 16, 2004 at 02:30:59PM -0600, Jeremy wrote: > > function isOdd ($value) { > > return (int)$value % 2 ? true

Re: [PHP] Can I do this? If so why wont it work

2004-01-16 Thread Jake McHenry
- Original Message - From: "Alex Hogan" <[EMAIL PROTECTED]> To: "PHP General list" <[EMAIL PROTECTED]> Sent: Friday, January 16, 2004 4:20 PM Subject: [PHP] Can I do this? If so why wont it work > I am wanting to read in several session values at once. > > > > This is what I have so

Re: [PHP] odd and even numbers

2004-01-16 Thread Brian V Bonini
On Fri, 2004-01-16 at 15:17, Jake McHenry wrote: > I have a random number being generated from 1 to 501, is there an easy way for me to > tell if the result is an odd or even number? (1 & number) ? odd : even; E.g. '; while($i < 10) { (1 & $i) ? print($i . ' is odd') : print($i . ' is

[PHP] Can I do this? If so why wont it work

2004-01-16 Thread Alex Hogan
I am wanting to read in several session values at once. This is what I have so far; $_SESSION['obj[1]'] = $_REQUEST['txtObj1']; $_SESSION['obj[2]'] = $_REQUEST['txtObj2']; $_SESSION['obj[3]'] = $_REQUEST['txtObj3']; $_SESSION['obj[4]'] = $_REQUEST['txtObj4']; $_SESSION['obj[5]'] = $_REQ

Re: [PHP] LOAD_FILE and PHP

2004-01-16 Thread Jason Wong
On Saturday 17 January 2004 03:44, Jough P wrote: > On Jan 16, 2004, at 9:12 AM, Jough P wrote: > > Greetings all, I can't get LOAD_FILE to work in an INSERT statement > > from PHP. The generated sql works when you're in mysql but won't work > > from PHP. Are you using the same user in both cases

Re: [PHP] Re: alternative to protecting files through http auth.

2004-01-16 Thread Jason Wong
On Saturday 17 January 2004 04:03, Scott Taylor wrote: > >Alternately, if you aren't able to create directories or access files > >outside the DocumentRoot for your site, you can create an unbrowsable > >storage directory protected with a .htaccess file. If the filesystem > >permissions are corre

Re: [PHP] Syntax Error -> This is WEIRD!

2004-01-16 Thread Dagfinn Reiersøl
Donald Tyler wrote: Yes that is true. But I would strongly recommend against doing that. You should never include anything over HTTP. Its extremely messy, 100% insecure and just a very very bad idea. My spontaneous reaction is to agree with you. On the other hand, are SOAP or XML-RPC over HTT

Re: [PHP] odd and even numbers SOLVED

2004-01-16 Thread Jake McHenry
- Original Message - From: "joel boonstra" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 16, 2004 3:35 PM Subject: Re: [PHP] odd and even numbers > On Fri, Jan 16, 2004 at 02:30:59PM -0600, Jeremy wrote: > > function isOdd ($value) { > > return (int)$value % 2 ? true

Re: [PHP] Syntax Error -> This is WEIRD!

2004-01-16 Thread Dagfinn Reiers?l
Jason Wong wrote: >On Saturday 17 January 2004 01:50, Dagfinn Reiersøl wrote: > > > >>Yes. I read the manual which provides no clear explanation (I suspect >>that whoever wrote it didn't actually know how it works). So I decided >>to test it. It does exactly what you say it does. I made an inclu

Re: [PHP] odd and even numbers

2004-01-16 Thread joel boonstra
On Fri, Jan 16, 2004 at 02:30:59PM -0600, Jeremy wrote: > function isOdd ($value) { > return (int)$value % 2 ? true : false; > } > > Returns true/false if the value is odd. Also rounds down floating point numbers > given as the test value. No need to explicitly state "true" and "false". J

RE: [PHP] odd and even numbers

2004-01-16 Thread Jeremy
function isOdd ($value) { return (int)$value % 2 ? true : false; } Returns true/false if the value is odd. Also rounds down floating point numbers given as the test value. -Jeremy -Original Message- From: Jake McHenry [mailto:[EMAIL PROTECTED] Sent: Friday, January 16, 2004 2:18

Re: [PHP] odd and even numbers

2004-01-16 Thread Brad Pauly
On Fri, 2004-01-16 at 13:17, Jake McHenry wrote: > I have a random number being generated from 1 to 501, is there an easy way for me to > tell if the result is an odd or even number? Yep. The modulus operator (%). Your number mod 2 will be 1 if it is odd and 0 if it is even. http://us4.php.net/m

[PHP] odd and even numbers

2004-01-16 Thread Jake McHenry
I have a random number being generated from 1 to 501, is there an easy way for me to tell if the result is an odd or even number? Thanks, Jake

[PHP] Re: alternative to protecting files through http auth.

2004-01-16 Thread Scott Taylor
Paul Chvostek wrote: On Wed, Jan 14, 2004 at 04:17:06PM -0500, Scott Taylor wrote: Is there no other way to protect your (non PHP) files than through authentication? I've been trying to set up a system that will protect files. Those trying to access the files would only be able to do so af

Re: [PHP] Sessions: strange behaviour in 4.3.3 ?

2004-01-16 Thread Chris Shiflett
--- Dino Tsoumakis <[EMAIL PROTECTED]> wrote: > If you hve a close look at the code > http://www.serv-int.de/class.session.txt you will find the > session_start() in the constructor of the class prior to any output. This is apparently not the case, else this error message would not appear. > The

Re: [PHP] LOAD_FILE and PHP

2004-01-16 Thread Jough P
Greetings all, I'm still having problems with LOAD_FILE. If anyone is using it and could post some examples that would be fabulous. Thanks tons!!! On Jan 16, 2004, at 9:12 AM, Jough P wrote: Greetings all, I can't get LOAD_FILE to work in an INSERT statement from PHP. The generated sql works

RE: [PHP] Syntax Error -> This is WEIRD!

2004-01-16 Thread Donald Tyler
Yes that is true. But I would strongly recommend against doing that. You should never include anything over HTTP. Its extremely messy, 100% insecure and just a very very bad idea. You should have all the files you need to include located on your web server. -Original Message- From: Dagfi

Re: [PHP] Re: server hanging on php site

2004-01-16 Thread Ben Ramsey
BK> PHP page causes the whole httpd to stop responding momentarily; BK> no sites will load, those that are loading stop in the middle. BK> But after say 30-45 seconds it continues just fine > BR> First of all, make sure that display_errors in your php.ini > BR> file is set to On. I believe that th

Re: [PHP] mysql question

2004-01-16 Thread Miles Thompson
Christian, I did a bit of digging in the MySQL docs to try and find the limits on number of fields in a table, etc. Didn't have much luck. I would not worry about thousands, or even hundreds of thousands of rows in a table for two reasons. First MySQL is becoming a heavier-duty database, and se

Re: [PHP] Re: server hanging on php site

2004-01-16 Thread Bryan Koschmann - GKT
On Thu, 15 Jan 2004, Ben Ramsey wrote: > First of all, make sure that display_errors in your php.ini file is set > to On. I believe that the distribution file that comes with PHP has it > set to Off by default. Once it's set to On, see if you can get it to > generate an error and post it. Ben,

Re: [PHP] a clean way to upload

2004-01-16 Thread David T-G
Matt -- ...and then Matt Hedges said... % % Hello all, % After playing around with the options, I've found that the following method % for uploading something with constraints is the easiest... I don't get it... You have to upload in order to get to the server, so all you're doing is returning

Re: [PHP] PHP Apache Build Problem (Correction to original question)

2004-01-16 Thread pw
> /apache/source/path/src/modules/php4/ > /apache/source/path/src/include/ap_config.h:77:28: ap_config_auto.h: No such > file or directory This goes away if I run 'configure' once for apache. Then I carry on as in the previous post. Sorry about my editing. Peter -- PHP General Mailing List (

Re: [PHP] a clean way to upload

2004-01-16 Thread David T-G
Matt -- ...and then Matt Hedges said... % % ? He's telling you to search the list archives. This is not new ground you're breaking here. Just call getimagesize() on the temp file and see what type it reports back. HTH & HAND :-D -- David T-G * There is too much animal

[PHP] PHP Apache Build Problem

2004-01-16 Thread pw
Hello, I am trying to build php-4.3.3 into apache_1.3.28 as a module. I configure php --with-apache=/apache/source/path and the php make process puts the source for mod_php4 into /apache/source/path/src/modules/php4/ /apache/source/path/src/include/ap_config.h:77:28: ap_config_auto.h: No such f

Re: [PHP] Syntax Error -> This is WEIRD!

2004-01-16 Thread Jason Wong
On Saturday 17 January 2004 01:50, Dagfinn Reiersøl wrote: > Yes. I read the manual which provides no clear explanation (I suspect > that whoever wrote it didn't actually know how it works). So I decided > to test it. It does exactly what you say it does. I made an include file > like this: In de

Re: [PHP] Regular Expression for Search/Replace

2004-01-16 Thread Tobias Engelhardt
Thanks, that solved the problem... Mike Migurski wrote: i hope someone can help me out... i have to replace with any ideas? thank you! PCRE style: '//' replaced by ''. - michal migurski- contact info and pgp key: sf/ca

Re: [PHP] sorting multi-dimensional arrays

2004-01-16 Thread Mike Migurski
>I've read the manual several times on sorting multi-dimensional arrays, >but I can't seem to wrap my mind around what I need to do to accomplish >my goal. > >//this is what I'm doing: (stepping through a result set, and putting it >into a multi-dimensional array. > >while ($row = mysql_fetch_array

[PHP] Re: sorting multi-dimensional arrays

2004-01-16 Thread Ben Ramsey
> //now, I want that array sorted by the clinic_name, and then > doc_name. > > Can someone who has more currently active brain cells than me > figure out what the array_multisort function call should look like? In the documentation, I've found plenty of examples to do a multi-dimensional sort on o

Re: [PHP] mysql question

2004-01-16 Thread Christian Calloway
Well let me try and describe a simplified version of what I am doing. I work for a group of analysts, and they analyse technical products. Each products has about 300+ fields associated with it, and each product is vastly different from the other. Let's say the product "foo" has a table "fields" as

Re: [PHP] Sessions: strange behaviour in 4.3.3 ?

2004-01-16 Thread Dino Tsoumakis
"Chris Shiflett" <[EMAIL PROTECTED]> wrote news:[EMAIL PROTECTED] > --- Dino Tsoumakis <[EMAIL PROTECTED]> wrote: > > Warning: session_start(): Cannot send session cache limiter - headers > > already sent (output started at XX/class.session.php:61) in > > XX/class.session.php on line 38 >

Re: [PHP] Syntax Error -> This is WEIRD!

2004-01-16 Thread Dagfinn Reiersøl
Donald Tyler wrote: Yes your right, that’s exactly the problem. I didn’t even realize he was doing that. By including the PHP file via HTTP, you are including the OUTPUT of the PHP file, not the actual PHP file itself. e.g. by including a file with the following code: print 'Hello'; ?> you

[PHP] sorting multi-dimensional arrays

2004-01-16 Thread Katie Dewees
Hi All, I've read the manual several times on sorting multi-dimensional arrays, but I can't seem to wrap my mind around what I need to do to accomplish my goal. //this is what I'm doing: (stepping through a result set, and putting it into a multi-dimensional array. while ($row = mysql_fetch_arra

Re: [PHP] Regular Expression for Search/Replace

2004-01-16 Thread Brad Pauly
On Fri, 2004-01-16 at 10:21, Brad Pauly wrote: > On Fri, 2004-01-16 at 10:07, Tobias Engelhardt wrote: > > That is not possible because the id's are hard-coded in thousands of > > html-pages. Not a very good idea, i know. It wasn't mine... I *have* to > > use search/replace. (A script processes e

RE: [PHP] Syntax Error -> This is WEIRD!

2004-01-16 Thread Donald Tyler
Yes your right, that’s exactly the problem. I didn’t even realize he was doing that. By including the PHP file via HTTP, you are including the OUTPUT of the PHP file, not the actual PHP file itself. e.g. by including a file with the following code: you would be including the word "Hello" as P

Re: [PHP] Regular Expression for Search/Replace

2004-01-16 Thread Brad Pauly
On Fri, 2004-01-16 at 10:07, Tobias Engelhardt wrote: > That is not possible because the id's are hard-coded in thousands of > html-pages. Not a very good idea, i know. It wasn't mine... I *have* to > use search/replace. (A script processes each file in the directory) Ah, I see. I think you coul

Re: [PHP] Regular Expression for Search/Replace

2004-01-16 Thread Mike Migurski
>i hope someone can help me out... i have to replace > > >with > > >any ideas? thank you! PCRE style: '//' replaced by ''. - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP

Re: [PHP] Regular Expression for Search/Replace

2004-01-16 Thread Tobias Engelhardt
That is not possible because the id's are hard-coded in thousands of html-pages. Not a very good idea, i know. It wasn't mine... I *have* to use search/replace. (A script processes each file in the directory) Brad Pauly wrote: What about just using the variable to build the name? $file_name =

Re: [PHP] Regular Expression for Search/Replace

2004-01-16 Thread Brad Pauly
On Fri, 2004-01-16 at 09:49, Tobias Engelhardt wrote: > Hi list, > i hope someone can help me out... i have to replace > > > with > > > any ideas? thank you! What about just using the variable to build the name? $file_name = 'order_'.$_GET['order_id'].'.html'; - Brad -- PHP General Mailing

[PHP] Regular Expression for Search/Replace

2004-01-16 Thread Tobias Engelhardt
Hi list, i hope someone can help me out... i have to replace with any ideas? thank you! Tobias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] getimagesize() to find type?

2004-01-16 Thread Matt Matijevich
[snip] (1) How would I do that (use getimagesize() instead to find type)? [/snip] http://php.net/getimagesize [snip] (2) Stupid question: how do I say if ($_FILES['imagefile']['type'] != "image/pjpeg") and add "image/jpeg" to that constraint? [/snip] there are many ways, I will show you an

Re: [PHP] Sessions: strange behaviour in 4.3.3 ?

2004-01-16 Thread Chris Shiflett
--- Dino Tsoumakis <[EMAIL PROTECTED]> wrote: > Warning: session_start(): Cannot send session cache limiter - headers > already sent (output started at XX/class.session.php:61) in > XX/class.session.php on line 38 You need to either put session_start() prior to any output (my preference) o

Re: [PHP] a clean way to upload

2004-01-16 Thread Matt Hedges
? "Jason Wong" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Friday 16 January 2004 23:55, Matt Hedges wrote: > > > How would I do that? I mean, what would I put instead of > > > > > > if ($_FILES['imagefile']['type'] != "image/pjpeg") > > > > the browser sets, it is more reli

Re: [PHP] LOAD_FILE and PHP

2004-01-16 Thread Jough P
I've tried a couple different paths and double checked them. Permissions are 755. Like I said that exact same SQL statement inserts the correct record from the mysql command line. mysql> INSERT INTO photo VALUES('', LOAD_FILE("/Library/WebServer/Documents/var/tmp/default_smiley.png")); does

Re: [PHP] Syntax Error -> This is WEIRD!

2004-01-16 Thread Dagfinn Reiersøl
Nick Wilson wrote: if a script calls antohter like 'include('http://site.com/index.php'); Why would I get a syntax error on line 1 of index.php when it looks like this: What's the deal there? Many thanks for any insight ;-) I've never tried to do an include via HTTP, so maybe I'm clueless, b

Re: [PHP] a clean way to upload

2004-01-16 Thread Jason Wong
On Friday 16 January 2004 23:55, Matt Hedges wrote: > How would I do that? I mean, what would I put instead of > > > > if ($_FILES['imagefile']['type'] != "image/pjpeg") > > the browser sets, it is more reliable to get the image type from > > getimagesize(). -- Jason Wong -> Gremlins Associate

[PHP] getimagesize() to find type?

2004-01-16 Thread Matt Hedges
>On Friday 16 January 2004 10:32, Matt Hedges wrote: > >>> if ($_FILES['imagefile']['type'] != "image/pjpeg") > >The 'type' in $_FILES is provided by the browser. IIRC only IE uses >"image/pjpeg" whilst other browsers use "image/jpeg". But regardless of what >the browser sets, it is more reliable

Re: [PHP] dynamic array creation from form elements

2004-01-16 Thread Jon Bennett
nice one, solves my next problem as well if any elements are empty! Cheers, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0AD t: +44 (0) 1225 341039 w: h

Re: [PHP] dynamic array creation from form elements

2004-01-16 Thread John W. Holmes
Jon Bennett wrote: Hi, I've got a dynamically generated form and once it's submitted I need to _push the data from my form elements into an array so I can ad them to the db. My form elements are created like so: $i = 1; while ($i <= $iListItems){ ?> List Item : Why don't you just skip th

Re: [PHP] Combining results - is there better way?

2004-01-16 Thread Miles Thompson
John, Perfect. Don't know where my head was. Miles At 10:29 AM 1/16/2004 -0500, John W. Holmes wrote: Miles Thompson wrote: } // foreach My question is if there is a faster, cleaner way to do this? I did try array_search, but as it looks for any matching value anywhere in the target array the

Re: [PHP] a clean way to upload

2004-01-16 Thread Matt Hedges
Thanks Jason. How would I do that? I mean, what would I put instead of > > if ($_FILES['imagefile']['type'] != "image/pjpeg") thanks "Jason Wong" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Friday 16 January 2004 10:32, Matt Hedges wrote: > > > if ($_FILES['imagefile']['t

Re: [PHP] LOAD_FILE and PHP

2004-01-16 Thread John W. Holmes
Jough P wrote: Greetings all, I can't get LOAD_FILE to work in an INSERT statement from PHP. The generated sql works when you're in mysql but won't work from PHP. BSDB is my database object. sql_query basically just does a mysql_query and some error outputting stuff. There error is: Column 'p

[PHP] SOLVED => is ' or " different in MS-Word then ascII?

2004-01-16 Thread Roger Spears
Here is a real code solution instead of my original posted client solution My original problem involved text submitted via the good old fashion in a web form. If a visitor created their text in MS-Word and then cut and paste their text over to the web form and submitted, any place within

Re: [PHP] Re: dynamic array creation from form elements

2004-01-16 Thread Jon Bennett
Hi Ben, Sorry, it does work - so I can safely say you can concat the name of a associ array :-) Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts, BA14 0

[PHP] Re: dynamic array creation from form elements

2004-01-16 Thread Ben Ramsey
I don't think you can do any evaluation within the brackets. Thus, you couldn't use the concatenating dot. Nevermind... I am wrong on this. But, I also completely missed that the code you have posted doesn't set $iListItems as Richard suggested. So, go with his suggestion. :) -Ben -- PHP Ge

Re: [PHP] dynamic array creation from form elements

2004-01-16 Thread Jon Bennett
Hi Rich, $iListItems is set when a user chooses how many list elements they require (this is for the example pages I was asking about) and is always greater than 0 (we don't get this far in the script if it's not!). Anyway, it was my silly fault, I had changed the name of my form elements whi

[PHP] Re: dynamic array creation from form elements

2004-01-16 Thread Ben Ramsey
Try using $_POST["listItem$i"] instead of $_POST["listItem" . $i] or do something like this: $post_var_name = 'listItem' . $i; this do $_POST[$post_var_name]; I don't think you can do any evaluation within the brackets. Thus, you couldn't use the concatenating dot. -Ben -- PHP General Mailing

Re: [PHP] dynamic array creation from form elements

2004-01-16 Thread Richard Davey
Hello Jon, Friday, January 16, 2004, 3:29:07 PM, you wrote: JB> And after the form is submitted I assumed I could do this... JB> $aListItems = array(); JB> $i = 1; JB> while ($i <= $iListItems) { JB> $tempItem = $_POST["listItem" . $i]; JB> array_push($aListItems, $tempItem); JB>

Re: [PHP] Combining results - is there better way?

2004-01-16 Thread John W. Holmes
Miles Thompson wrote: This code works, but are there alternate, more efficient ways of doing it. A count of subscribers, by classification, has to be provided, where the classification definitions are in one table (class) with this structure: nClassKey - unique, numeric, autoincrement Cla

Re: [PHP] dynamic array creation from form elements

2004-01-16 Thread Jon Bennett
Hi, Sorry for the double post, meant to say 'but nothing appears to be added to the array' not the db! Thanks, Jon jon bennett | [EMAIL PROTECTED] new media creative _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ J b e n . n e t 91 Gloucester Rd, Trowbridge, Wilts,

Re: [PHP] Schedule an Event with PHP

2004-01-16 Thread Jason Wong
On Friday 16 January 2004 23:25, Alex Pilson wrote: > BTW. I didn't get what Stuart said about replying to an existing > thread, did something screw up when I sent to the list? He means: You have started a new thread by taking an existing posting and replying to it while you changed the subject.

[PHP] dynamic array creation from form elements

2004-01-16 Thread Jon Bennett
Hi, I've got a dynamically generated form and once it's submitted I need to _push the data from my form elements into an array so I can ad them to the db. My form elements are created like so: $i = 1; while ($i <= $iListItems){ ?> List Item : ++$i; ?> And after the form is submit

RE: [PHP] /VAR is driving me crazy - SOLVED

2004-01-16 Thread Boaz Yahav
Actually i just found the problem. My sysadmin recently added MOD Security and one of the lines that my conf file had was : SecFilter /var Security people can drive me crazy :) Sincerely berber Visit http://www.weberdev.com/ & http://www.weberblog.com/ Today!!! To see where PHP might take

RE: [PHP] Syntax Error -> This is WEIRD!

2004-01-16 Thread Jeremy
Did the script accidently get saved in MS-DOS text format? -Original Message- From: Donald Tyler [mailto:[EMAIL PROTECTED] Sent: Friday, January 16, 2004 8:53 AM To: [EMAIL PROTECTED] Subject: [PHP] Syntax Error -> This is WEIRD! There could be something you're not seeing and assuming it

Re: [PHP] Schedule an Event with PHP

2004-01-16 Thread Alex Pilson
At 9:44 AM -0500 1/16/04, John W. Holmes wrote: Alex Pilson wrote: Say I want a MySQL database to have a table that holds certain events, the Event table. And in the event table, one of the records is an event that has a startdate of today, I want to check against that date, if it equals now, th

RE: [PHP] Re: PHP Includes and Echoes (From the top...)

2004-01-16 Thread Ford, Mike [LSS]
On 16 January 2004 13:54, Freedomware wrote: > Thanks for all the tips. It's getting generally getting > clearer, but I'm > a little confused somewhere. [SNIP] > I inserted one of the functions you suggested - $includea1 = TRUE; - > after the include, but I'm sure I did it wrong. Just like bef

[PHP] LOAD_FILE and PHP

2004-01-16 Thread Jough P
Greetings all, I can't get LOAD_FILE to work in an INSERT statement from PHP. The generated sql works when you're in mysql but won't work from PHP. BSDB is my database object. sql_query basically just does a mysql_query and some error outputting stuff. There error is: Column 'photo' cannot be

Re: [PHP] /VAR is driving me crazy

2004-01-16 Thread John W. Holmes
Boaz Yahav wrote: Hi Does anyone have an idea what is so special about the string "/VAR" ? If i create a form that submits to a php file and in the form i put the string /VAR anywhere in the text or just /VAR I get an 404 error from apache on an existing file. If i take the same form and remove th

Re: [PHP] Non American strtotime

2004-01-16 Thread Bogdan Stancescu
John W. Holmes wrote: Tom wrote: The end user gets to chose their date format, and so if I cannot reverse their arbitrary date format into a timestamp then I have no chance of ensuring that dates are correct. This seems like a really fundamentally bad thing about PHP :( Seems like a fundamen

Re: [PHP] R: [PHP][PEAR] PEAR::DB_Common::nextId()

2004-01-16 Thread John W. Holmes
[EMAIL PROTECTED] wrote: Hello Not sure if you thought of it or if it even applies to you but when you use PEAR::DB::getOnce("SELECT LAST_INSERT_ID()"); to retrieve the id do consider concurrent access to the database when using it for inserting stuff. Been there and its a hassle to resolve th

Re: [PHP] Non American strtotime

2004-01-16 Thread John W. Holmes
Tom wrote: Is there a way I can force PHP's time functions not to read date strings in the American MM-DD- format? If you read the strtotime() manual page, there is a link to this page: http://www.gnu.org/software/tar/manual/html_chapter/tar_7.html which gives you all of the formats that are

[PHP] aggregate, parent::

2004-01-16 Thread Veres Lajos
Hello, When I use an aggregated variable, how parent:: is defined? (in perl: SUPER:: or NEXT::) parent of the current classes, or parent of the original class? (PS: I'm not in list, please CC: me) Veres Lajos [EMAIL PROTECTED] +36 20 438 5909 -- PHP General Mailing List (http://www.php.net/) T

  1   2   >