Re: [PHP] Parsing a stdClass Object created with mimeDecode

2006-05-15 Thread Stut
Graham Anderson wrote: I am trying to get the body text from a number of different emails using mimeDecode [Pear] Unfortunately, it appears that the body text could be in any number of locations in the stdClass Object depending on which email is processed. At this point, I can only access the no

Re: [PHP] Trouble sending data via TCP socket

2006-05-15 Thread Rabin Vincent
On 5/16/06, J. King <[EMAIL PROTECTED]> wrote: To further my understanding of how Jabber works I have decided I should try and write my own XMPP implementation in PHP. However, I've run into trouble rather quickly. To connect to a Jabber server, one must open a TCP socket to the server (typical

Re: [PHP] Wierd ass code...

2006-05-15 Thread Chris
Richard Lynch wrote: On Sat, May 13, 2006 6:37 pm, Rory Browne wrote: There are some cases where the Error Suppression operator may be useful in good code. Last I checked, you pretty much HAD to use it for pg_fetch_row() since it does an E_NOTICE when you try to fetch a row beyind the number

Re: [PHP] Help w/ 'headers already sent' and file download

2006-05-15 Thread Rabin Vincent
On 5/16/06, Mike Walsh <[EMAIL PROTECTED]> wrote: I have an application which I am working on which takes a file supplied by the user via a File Upload, peforms some processing on it, then prompts the user to download a generated CSV file. What I would like to do is report some processing statis

[PHP] Help w/ 'headers already sent' and file download

2006-05-15 Thread Mike Walsh
I have an application which I am working on which takes a file supplied by the user via a File Upload, peforms some processing on it, then prompts the user to download a generated CSV file. What I would like to do is report some processing statistics prior to the user prior to sending the CSV s

[PHP] Trouble sending data via TCP socket

2006-05-15 Thread J. King
To further my understanding of how Jabber works I have decided I should try and write my own XMPP implementation in PHP. However, I've run into trouble rather quickly. To connect to a Jabber server, one must open a TCP socket to the server (typically through port 5269) send an XML-based st

Re: [PHP] Does PECL install modify my php.ini? or even look at it?

2006-05-15 Thread Richard Lynch
On Thu, May 11, 2006 6:02 pm, D. Dante Lorenso wrote: > > pecl install memcache Wild Guess Alert!!! Is it possible that pecl has an --extension-dir flag to tell it WHERE to install stuff, or perhaps an optional command line arg or ... Cuz, really, the odds on it being where you want it to be

Re: [PHP] Parsing images

2006-05-15 Thread Richard Lynch
On Fri, May 12, 2006 8:47 am, David Tulloh wrote: > My favorite story was > a > small free porn site that required you to enter a captcha to get in. > They were taking the captcha's they needed to break and getting horny > teenagers to do the recognition phase for them. According to the 'net, this

Re: [PHP] Parsing a stdClass Object created with mimeDecode

2006-05-15 Thread Richard Lynch
On Fri, May 12, 2006 6:12 am, Jochem Maas wrote: > Graham Anderson wrote: >> I am trying to get the body text from a number of different emails >> using mimeDecode [Pear] >> Unfortunately, it appears that the body text could be in any number >> of >> locations in the stdClass Object depending on wh

Re: [PHP] Re: include_path and absolute paths in include functions

2006-05-15 Thread Richard Lynch
On Thu, May 11, 2006 8:10 pm, Steven Stromer wrote: > relative versus 'include_path'-based paths? I know that putting a > variable into the path is a no-no, but any other considerations? I suspect that the advice to use absolute paths is somebody NOT understanding the include_path system, and jus

Re: [PHP] displaying result problem

2006-05-15 Thread Richard Lynch
On Fri, May 12, 2006 6:33 am, adi zebic wrote: > I have little problem while displaying a result from one simple > querry. > If i insert values into mysql DB in following order (12, 3, 14, 4 ) > I allways have ( 12, 14, 3, 4 ) displaying when query the DB. (same > with > letters - dcba -> abcd etc

Re: [PHP] Re: Re: Upload File (binary files?)

2006-05-15 Thread Richard Lynch
On Mon, May 15, 2006 10:18 am, tedd wrote: > crash It DOES make a difference as to how fast you can restore the DB and the images, and more importantly, the PERCEIVED time for your site to be "back up" If you can get your DB up fast, but the images aren't available, MOST sites, other than, like,

Re: [PHP] Going nuts with this, cant figure out whats the prob

2006-05-15 Thread Ryan A
Hey, > On Mon, May 15, 2006 7:30 am, Ryan A wrote: > > The thing is, I thought this was bundled with the > > standard package of PHP, if yes, why would anybody > > want to turn this off? > > PCRE got added after POSIX Regex had been in awhile. > > There was some resistance to having two Regexes

Re: [PHP] Wierd ass code...

2006-05-15 Thread Ryan A
Hey Rich, > > // Add to the running totals > > @$hits["$username|$subnet"]++; > > @$bytes["$username|$subnet"]+=$byte; > > @$baps["$username|$subnet|$this_second"]++; > > @$bapm["$username|$subnet|$this_minute"]++; > > @ is suppressing the E_NOTICE error message that the > variables are not > pre

Re: [PHP] Class/function scope general question

2006-05-15 Thread Richard Lynch
You can't do that. The whold class has to be in a single contiguous file. Last I checked. On the plus side, it's incredibly unlikely that having the functions in separate files was a Good Idea... On Fri, May 12, 2006 12:34 pm, Edward Vermillion wrote: > I'm doing some re-writing of a huge class

Re: [PHP] Uploading large files

2006-05-15 Thread Richard Lynch
On Sat, May 13, 2006 9:23 am, php @ net mines wrote: > is there a way to upload large files (e.g. 15mb) without changing the > default settings in php.ini***? Probably not. This particular setting is "weird" in that the setting is the SMALLEST of: php.ini .htaccess The HTML INPUT thingie (MAX_UPL

Re: [PHP] METHOD=POST not worikng

2006-05-15 Thread IraqiGeek
On Tuesday, May 16, 2006 1:20 AM GMT, Richard Lynch <[EMAIL PROTECTED]> wrote: On Sat, May 13, 2006 9:16 am, IraqiGeek wrote: I'm learning PHP on a Debian Etch with Apache 2.0.54 and PHP 4.3.10, and using Firefox 1.5.3 on a Windows XP box to browse the sample site. I wrote a small form to get

Re: [PHP] Wierd ass code...

2006-05-15 Thread Richard Lynch
On Sat, May 13, 2006 6:37 pm, Rory Browne wrote: > There are some cases where the Error Suppression operator may be > useful in > good code. Last I checked, you pretty much HAD to use it for pg_fetch_row() since it does an E_NOTICE when you try to fetch a row beyind the number available... You co

Re: [PHP] Copy of image -> smaller

2006-05-15 Thread Richard Lynch
On Mon, May 15, 2006 7:09 pm, Alberto Ferrer wrote: > For that i recomend detect the MIME, my 2 cents: > > function image_get_info($image) { > $details = array(); > $data = @getimagesize($image); > if (is_array($data)){ > $types = array( > '1' => 'GIF', > '2' => 'JPEG', > '3'

Re: [PHP] METHOD=POST not worikng

2006-05-15 Thread Richard Lynch
GET <===> $_GET POST <===> $_POST You have to change them in parallel. Or, use $_REQUEST which has GET + POST + COOKIES in it. On Sat, May 13, 2006 11:11 am, IraqiGeek wrote: > On Saturday, May 13, 2006 4:59 PM GMT, > [EMAIL PROTECTED] <[EMAIL PROTECTED]> > wrote: > >> AFAIK it should be workin

Re: [PHP] touch()ing it....advise needed.

2006-05-15 Thread Richard Lynch
You could just do a touch() on all the files with no test for existence, if there will be a LOT of files... That will save a little bit of work, and might be worthwhile info to track, or at least not mess things up to have the filemtime altered all the time. Of course, you also need to be VERY ca

Re: [PHP] METHOD=POST not worikng

2006-05-15 Thread Richard Lynch
On Sat, May 13, 2006 9:16 am, IraqiGeek wrote: > I'm learning PHP on a Debian Etch with Apache 2.0.54 and PHP 4.3.10, > and > using Firefox 1.5.3 on a Windows XP box to browse the sample site. I > wrote a > small form to get user input. If I use METHOD=GET, then the form works > fine, > without an

Re: [PHP] Wierd ass code...

2006-05-15 Thread Richard Lynch
On Sat, May 13, 2006 2:20 pm, Ryan A wrote: > Been reading some other code that I got from the net, > and have come across some wierd looking code, would > appreciate it if someone could explain it to me: > > $hits = array(); > $bytes = array(); > $blocked = array(); > $baps = array(); > $bapm = a

Re: [PHP] Copy of image -> smaller

2006-05-15 Thread Alberto Ferrer
For that i recomend detect the MIME, my 2 cents: function image_get_info($image) { $details = array(); $data = @getimagesize($image); if (is_array($data)){ $types = array( '1' => 'GIF', '2' => 'JPEG', '3' => 'PNG', '4' => 'SWF', '5' => 'PSD', '6' => 'BMP', '7' => 'TIFF'

Re: [PHP] php-cli and daemon

2006-05-15 Thread Richard Lynch
On Sat, May 13, 2006 5:40 pm, Michelle Konzack wrote: > I run a webserver which is a frontend for a huge PostgreSQL database. > Now I like to code some stand-alone Apps, which can connect to a > daemon uploading files and geting infos from the database > > (NO, the have no right to connect directly

Re: [PHP] Going nuts with this, cant figure out whats the prob

2006-05-15 Thread Richard Lynch
On Mon, May 15, 2006 7:30 am, Ryan A wrote: > The thing is, I thought this was bundled with the > standard package of PHP, if yes, why would anybody > want to turn this off? PCRE got added after POSIX Regex had been in awhile. There was some resistance to having two Regexes in PHP. I think the d

[PHP] Re: DOMElement->setAttribute() loops forever (node_list_unlink bug?)

2006-05-15 Thread Rob Richards
Riku Palomäki wrote: Hello, I'm having problems with DOMElement->setAttribute() -method with my php script. I stripped down the code to this: -- $doc = new DOMDocument(); $doc->resolveExternals = true; $doc->loadXml('http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>'); $

Re: [PHP] Security Concerns with Uploaded Images:

2006-05-15 Thread Richard Lynch
On Mon, May 15, 2006 1:58 am, Jason Wong wrote: > 2) the uploaded file is a "script" (perl/php/python/etc) > In the case of (2), if the script relies on its shebang line to > execute Not necessarily -- What if I upload an "image" file named "badscript.php" and then I surf to it, after it's in you

Re: [PHP] Copy of image -> smaller

2006-05-15 Thread Richard Lynch
I'd make a wild guess that the FTP stuff isn't working... Your biggest mistake is a total lack of error-handling... On Mon, May 15, 2006 2:03 am, Gustav Wiberg wrote: > Hi there! > > When I upload a picture from a form, then I want to create a copy with > a > smaller image. > For example: I u

Re: [PHP] Development Environments/Automation

2006-05-15 Thread Miles Thompson
At 02:01 PM 5/15/2006, Brian Anderson wrote: Hello, I am being asked to find some sort of development environment for PHP/MySQL, if is exists, in which it has some sort of automation/wizzardry. What is being done is a mass of MSAccess interfaces, forms, reports, etc. are needing to be re-wri

Re: [PHP] Perl & PHP output format mismatching

2006-05-15 Thread Richard Lynch
On Mon, May 15, 2006 4:21 am, [EMAIL PROTECTED] wrote: > I'm currently writing a PHP page, which uses a small Perl script. But > I > encounter an annoying problem with endline character. > > A small example : > > $perl = new Perl(); > $perl->eval('print "toto\ntata"'); Your apostrophes in PHP don'

Re: [PHP] Views on e-commerce download tracking

2006-05-15 Thread Richard Lynch
On Mon, May 15, 2006 6:38 am, Chris Grigor wrote: > Was just wondering what others have used on there e-commerce sites to > manage digital downloads, for instance how to track if a user > succesfully downloaded a complete file from you (what happens if there > connection drops halfway through a dow

Re: [PHP] Create database with pdo_mysql

2006-05-15 Thread Richard Lynch
On Mon, May 15, 2006 7:18 am, Kevin Waterson wrote: > Is it possible to create a database with pdo_mysql? > $dbh = new PDO("mysql:host=$hostname;dbname=my_db", $username, > $password); > is sort of what it requires... is there some way to omit the dbname? If you can't elminate it, 'mysql' as a dbn

Re: [PHP] Sessions - session_start()

2006-05-15 Thread Richard Lynch
On Mon, May 15, 2006 8:53 am, Jonas Rosling wrote: > Warning: session_start(): Cannot send session cookie - headers already > sent > by (output started at /var/www/html/index.php:9) in > /var/www/html/index.php > on line 82 > > But I found out that if I put the tag in the absolute top of every > pa

Re: [PHP] Re: PHP output stream

2006-05-15 Thread Richard Lynch
On Mon, May 15, 2006 8:53 am, nicolas figaro wrote: > [EMAIL PROTECTED] a écrit : >> Thanks for your answer. I already have thought about your solution. >> The problem >> is I have to use the Perl module for PHP. An example : >> >> $perl = new Perl(); >> $perl->require('mct.pl'); >> $perl->MCT_poll

Re: [PHP] cURLing sites for images

2006-05-15 Thread Richard Lynch
On Mon, May 15, 2006 5:36 pm, Wolf wrote: > OK, I give up (for now at least). I've been trying to figure out a > way > to run a single script and download my favorite comics. The problem > is > that: > > 1. The URLs include numerous websites (and the image is hosted on > another server from the

Re: [PHP] imagefrompng() question

2006-05-15 Thread Richard Lynch
On Mon, May 15, 2006 9:16 am, D A GERM wrote: > I'm having difficulty displaying text after imagefrompng(). I'm using > PEARS's Image_Barcode to displa a barcode and trying to wrap > imagefrompng() around it. I am able to display the barcode properly > but > not the rest of my document (a mix a t

[PHP] cURLing sites for images

2006-05-15 Thread Wolf
OK, I give up (for now at least). I've been trying to figure out a way to run a single script and download my favorite comics. The problem is that: 1. The URLs include numerous websites (and the image is hosted on another server from the original) 2. The filename can change but has the same ba

Re: [PHP] Check before uploading

2006-05-15 Thread Gustav Wiberg
- Original Message - From: "Stut" <[EMAIL PROTECTED]> To: "Gustav Wiberg" <[EMAIL PROTECTED]> Cc: "PHP General" Sent: Monday, May 15, 2006 10:32 PM Subject: Re: [PHP] Check before uploading Gustav Wiberg wrote: From: "Stut" <[EMAIL PROTECTED]> Gustav Wiberg wrote: Just a thought.

[PHP] DOMElement->setAttribute() loops forever (node_list_unlink bug?)

2006-05-15 Thread Riku Palomäki
Hello, I'm having problems with DOMElement->setAttribute() -method with my php script. I stripped down the code to this: -- $doc = new DOMDocument(); $doc->resolveExternals = true; $doc->loadXml('http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>'); $root = $doc->getElement

Re: [PHP] Sessions - session_start()

2006-05-15 Thread tg-php
session_start() doesn't need to be the first line of your PHP code, it just needs to be called before any other output is performed. Including any blank spaces or anything else. If you have: --- 1: 2: --- It's not going to work because you have a blank line being output to the browser for i

Re: [PHP] Check before uploading

2006-05-15 Thread Stut
Gustav Wiberg wrote: From: "Stut" <[EMAIL PROTECTED]> Gustav Wiberg wrote: Just a thought. Someone posted a question if you could check filesize before uploading some days ago. Maybe this is possible with Javascript? Javascript wouldn't be the best solution, cause of it's incompability betwee

Re: [PHP] Re: PHP output stream

2006-05-15 Thread Stut
[EMAIL PROTECTED] wrote: Thanks for your answer. I already have thought about your solution. The problem is I have to use the Perl module for PHP. An example : $perl = new Perl(); $perl->require('mct.pl'); $perl->MCT_polling(); where MCT_polling() is a function of my script mct.pl. I would find

Re: [PHP] Sessions - session_start()

2006-05-15 Thread tedd
At 4:33 PM +0200 5/15/06, Jonas Rosling wrote: Den 06-05-15 16.00, skrev "Thomas Munz" <[EMAIL PROTECTED]>: put ob_start(); on the first line of your page on Monday 15 May 2006 15:53, Jonas Rosling wrote: Hi, I've been building a site with PHP 5 on my develop machine. I've been woring al

RE: [PHP] Paged Results Set in MySQL DB with one result

2006-05-15 Thread Chris W. Parker
tedd on Friday, May 12, 2006 12:23 PM said: > That's as it should be -- and technically, "Next" did appear so the > page wasn't blank. Splitting hairs aside, a user, "civilian" or not, would not expect they need to click "Next" from a "blank page" to get to the cont

Re: [PHP] Failing FastCGI PHP

2006-05-15 Thread Mike Milano
chris smith wrote: On 5/14/06, Frank de Bot <[EMAIL PROTECTED]> wrote: I'll start by compiling php with --enable-debug At the moment I get backtrace results like this: #0 0x48c7d95b in memcpy () from /usr/lib/libc_r.so.4 #1 0x8977280 in ?? () #2 0x10 in ?? () #3 0x894e500 in ?? () #4 0x89

Re: [PHP] Copy of image -> smaller

2006-05-15 Thread Gustav Wiberg
- Original Message - From: "Rabin Vincent" <[EMAIL PROTECTED]> To: "Gustav Wiberg" <[EMAIL PROTECTED]> Cc: "PHP General" Sent: Monday, May 15, 2006 1:35 PM Subject: Re: [PHP] Copy of image -> smaller On 5/15/06, Gustav Wiberg <[EMAIL PROTECTED]> wrote: [snip] //What should/could I d

Re: [PHP] Check before uploading

2006-05-15 Thread Gustav Wiberg
- Original Message - From: "Stut" <[EMAIL PROTECTED]> To: "Gustav Wiberg" <[EMAIL PROTECTED]> Cc: "PHP General" Sent: Monday, May 15, 2006 12:50 PM Subject: Re: [PHP] Check before uploading Gustav Wiberg wrote: Just a thought. Someone posted a question if you could check filesize

Re: [PHP] Copy of image -> smaller

2006-05-15 Thread Gustav Wiberg
- Original Message - From: "Chris" <[EMAIL PROTECTED]> To: "Gustav Wiberg" <[EMAIL PROTECTED]> Cc: "PHP General" Sent: Monday, May 15, 2006 9:42 AM Subject: Re: [PHP] Copy of image -> smaller Gustav Wiberg wrote: Hi there! When I upload a picture from a form, then I want to create

[PHP] Development Environments/Automation

2006-05-15 Thread Brian Anderson
Hello, I am being asked to find some sort of development environment for PHP/MySQL, if is exists, in which it has some sort of automation/wizzardry. What is being done is a mass of MSAccess interfaces, forms, reports, etc. are needing to be re-written in php and connected to a MySQL database

Re: [PHP] Views on e-commerce download tracking

2006-05-15 Thread tedd
At 1:38 PM +0200 5/15/06, Chris Grigor wrote: Hey all Was just wondering what others have used on there e-commerce sites to manage digital downloads, for instance how to track if a user succesfully downloaded a complete file from you (what happens if there connection drops halfway through a d

Re: [PHP] Re: Re: Upload File (binary files?)

2006-05-15 Thread tedd
Plus, a dB has search capabilities that a file system doesn't -- that's probably the reason why dB's came into existence, right? Last time I checked we had tools to search the filesystem. locate, find and awk spring to mind. So, you are claiming that those file-system tools match all the func

Re: [PHP] Re: Re: Upload File (binary files?)

2006-05-15 Thread Rory Browne
On 5/15/06, tedd <[EMAIL PROTECTED]> wrote: At 12:18 AM +0200 5/14/06, Michelle Konzack wrote: >Am 2006-05-12 09:28:36, schrieb tedd: > >> But, at some point (and I forgot to mention this in my previous post) >> all programmers start thinking in collections of data and a dB >> becomes a well

Re: [PHP] Re: Upload File (binary files?)

2006-05-15 Thread Rory Browne
How is it not suited? I stopped using mySQL to store images because of browser refresh problems, but other than that -- I didn't find any major problems with using it. Plus, moving images from one system to another was much easier because you just moved the dB and you don't have to worry about

Re: [PHP] Re: Upload File (binary files?)

2006-05-15 Thread Rory Browne
How is it not suited? I stopped using mySQL to store images because of browser refresh problems, but other than that -- I didn't find any major problems with using it. Plus, moving images from one system to another was much easier because you just moved the dB and you don't have to worry about

Re: [PHP] $ENV['SCRIPT_FILENAME']

2006-05-15 Thread John Wells
On 5/14/06, Ryan A <[EMAIL PROTECTED]> wrote: Anyone have an idea of a variable (eg: $_SERVER['REQUEST_METHOD'] ) that will be set only if called via the web and ignored if called via cli? I have no experience with CLI, and haven't tested this, but I believe that any time a request comes throug

[PHP] Re: Re: Upload File (binary files?)

2006-05-15 Thread tedd
At 12:18 AM +0200 5/14/06, Michelle Konzack wrote: Am 2006-05-12 09:28:36, schrieb tedd: But, at some point (and I forgot to mention this in my previous post) all programmers start thinking in collections of data and a dB becomes a well suited solution (record holder and organizer) for that

[PHP] Re: Re: Upload File (binary files?)

2006-05-15 Thread tedd
At 12:18 AM +0200 5/14/06, Michelle Konzack wrote: Am 2006-05-12 09:28:36, schrieb tedd: But, at some point (and I forgot to mention this in my previous post) all programmers start thinking in collections of data and a dB becomes a well suited solution (record holder and organizer) for that

Re: [PHP] Sessions - session_start()

2006-05-15 Thread Eric Butera
On 5/15/06, Jonas Rosling <[EMAIL PROTECTED]> wrote: Hi, I've been building a site with PHP 5 on my develop machine. I've been woring alot with session handling. For example I've been using session_start() now and then depending on where the user/vistor are or are doing. But now I've moved the si

Re: [PHP] Sessions - session_start()

2006-05-15 Thread Jonas Rosling
Den 06-05-15 16.00, skrev "Thomas Munz" <[EMAIL PROTECTED]>: > put ob_start(); on the first line of your page > > on Monday 15 May 2006 15:53, Jonas Rosling wrote: >> Hi, >> I've been building a site with PHP 5 on my develop machine. I've been >> woring alot with session handling. For example I'v

Re: [PHP] Sessions - session_start()

2006-05-15 Thread Jonas Rosling
Den 06-05-15 15.56, skrev "nicolas figaro" <[EMAIL PROTECTED]>: > Jonas Rosling a écrit : >> Hi, >> I've been building a site with PHP 5 on my develop machine. I've been woring >> alot with session handling. For example I've been using session_start() now >> and then depending on where the user/vi

Re: [PHP] Security Concerns with Uploaded Images:

2006-05-15 Thread tedd
To summarise: the uploading of an executable masquerading as an image file can be protected against via coding at the application level > My thought is that it wouldnt be too hard to have some kind of script > masquerade as a gif file, and perhaps cause damage. More worrying and much harder

[PHP] imagefrompng() question

2006-05-15 Thread D A GERM
I'm having difficulty displaying text after imagefrompng(). I'm using PEARS's Image_Barcode to displa a barcode and trying to wrap imagefrompng() around it. I am able to display the barcode properly but not the rest of my document (a mix a text and other images). Is there a proper heading I

Re: [PHP] Sessions - session_start()

2006-05-15 Thread Thomas Munz
put ob_start(); on the first line of your page on Monday 15 May 2006 15:53, Jonas Rosling wrote: > Hi, > I've been building a site with PHP 5 on my develop machine. I've been > woring alot with session handling. For example I've been using > session_start() now and then depending on where the use

[PHP] Re: PHP output stream

2006-05-15 Thread mickb
[EMAIL PROTECTED] a �crit : > Thanks for your answer. I already have thought about your solution. The problem > is I have to use the Perl module for PHP. An example : > > $perl = new Perl(); > $perl->require('mct.pl'); > $perl->MCT_polling(); > > where MCT_polling() is a function of my script mct.p

Re: [PHP] Sessions - session_start()

2006-05-15 Thread nicolas figaro
Jonas Rosling a écrit : Hi, I've been building a site with PHP 5 on my develop machine. I've been woring alot with session handling. For example I've been using session_start() now and then depending on where the user/vistor are or are doing. But now I've moved the site to a host server with PHP

Re: [PHP] Re: PHP output stream

2006-05-15 Thread nicolas figaro
[EMAIL PROTECTED] a écrit : Thanks for your answer. I already have thought about your solution. The problem is I have to use the Perl module for PHP. An example : $perl = new Perl(); $perl->require('mct.pl'); $perl->MCT_polling(); where MCT_polling() is a function of my script mct.pl. I would f

[PHP] Sessions - session_start()

2006-05-15 Thread Jonas Rosling
Hi, I've been building a site with PHP 5 on my develop machine. I've been woring alot with session handling. For example I've been using session_start() now and then depending on where the user/vistor are or are doing. But now I've moved the site to a host server with PHP 4.3.8 and now I keep getti

[PHP] Re: PHP output stream

2006-05-15 Thread mickb
Thanks for your answer. I already have thought about your solution. The problem is I have to use the Perl module for PHP. An example : $perl = new Perl(); $perl->require('mct.pl'); $perl->MCT_polling(); where MCT_polling() is a function of my script mct.pl. I would find very strange the fact it's

Re: [PHP] php-cli and daemon

2006-05-15 Thread chris smith
On 5/14/06, Michelle Konzack <[EMAIL PROTECTED]> wrote: Hello, I run a webserver which is a frontend for a huge PostgreSQL database. Now I like to code some stand-alone Apps, which can connect to a daemon uploading files and geting infos from the database (NO, the have no right to connect direc

Re: [PHP] PHP stdout stream

2006-05-15 Thread nicolas figaro
[EMAIL PROTECTED] a écrit : Hello, I've a quite simple question : one of my PHP script executes a Perl script which outputs a lot of text. My wish is to redirect PHP stdout stream to NULL, executing the perl script, and after this make the stdout stream back to normal. I've not found a solution

[PHP] Re: Re: Upload File

2006-05-15 Thread Michelle Konzack
Hi Rory Am 2006-05-10 23:05:07, schrieb Rory Browne: > you can say newbie as well. As a newbie I thought myself that storing images > in a DB would be a nice clean solution. Voices of experience said otherwise. > Over the years as I grew more experienced I began to understand myself, why > puttin

Re: [PHP] Wierd ass code...

2006-05-15 Thread Gonzalo Monzón
Robin Vickery escribió: On 14/05/06, Gonzalo Monzón <[EMAIL PROTECTED]> wrote: Satyam escribió: > Of course, another possibility is that the author does not know how to > handle multidimensional arrays (just to say it before anyone else > points an obvious alternative) > I don't think the aut

[PHP] php-cli and daemon

2006-05-15 Thread Michelle Konzack
Hello, I run a webserver which is a frontend for a huge PostgreSQL database. Now I like to code some stand-alone Apps, which can connect to a daemon uploading files and geting infos from the database (NO, the have no right to connect directly to the database) Questions for now: 1) How to c

[PHP] Re: Re: Upload File (binary files?)

2006-05-15 Thread Michelle Konzack
Am 2006-05-12 09:28:36, schrieb tedd: > But, at some point (and I forgot to mention this in my previous post) > all programmers start thinking in collections of data and a dB > becomes a well suited solution (record holder and organizer) for > that. As such, all data connected to a record, incl

[PHP] Re: Re: Upload File (binary files?)

2006-05-15 Thread Michelle Konzack
Am 2006-05-11 13:40:34, schrieb tedd: > Plus, moving images from one system to another > was much easier because you just moved the dB and > you don't have to worry about the file system and > breaking links. This can be done from a script to... > In addition, if you are using multiple hosts,

[PHP] PHP stdout stream

2006-05-15 Thread mickb
Hello, I've a quite simple question : one of my PHP script executes a Perl script which outputs a lot of text. My wish is to redirect PHP stdout stream to NULL, executing the perl script, and after this make the stdout stream back to normal. I've not found a solution in online documentation. Anyon

Re: [PHP] Going nuts with this, cant figure out whats the prob

2006-05-15 Thread Ryan A
Hey Chris / Richard, > I was wondering if the different line endings > (dos/unix) might play a > factor but I doubt it. Chris: Ok, that really helped, I was testing the test.txt file on my Win2k machine and was testing the whole script on a FreeBSD machine... so I took the small test and upped

[PHP] Re: Views on e-commerce download tracking

2006-05-15 Thread Barry
Chris Grigor schrieb: Hey all Was just wondering what others have used on there e-commerce sites to manage digital downloads, for instance how to track if a user succesfully downloaded a complete file from you (what happens if there connection drops halfway through a download) Is there

[PHP] Create database with pdo_mysql

2006-05-15 Thread Kevin Waterson
Is it possible to create a database with pdo_mysql? $dbh = new PDO("mysql:host=$hostname;dbname=my_db", $username, $password); is sort of what it requires... is there some way to omit the dbname? Kind regards Kevin -- "Democracy is two wolves and a lamb voting on what to have for lunch. Libert

[PHP] Views on e-commerce download tracking

2006-05-15 Thread Chris Grigor
Hey all Was just wondering what others have used on there e-commerce sites to manage digital downloads, for instance how to track if a user succesfully downloaded a complete file from you (what happens if there connection drops halfway through a download) Is there something in php / java

Re: [PHP] Copy of image -> smaller

2006-05-15 Thread Rabin Vincent
On 5/15/06, Gustav Wiberg <[EMAIL PROTECTED]> wrote: [snip] //What should/could I do here? // //Set new width and height // $new_width = 100; $new_height = 200; $tmp_image=imagecreatefromjpeg($toPath . $mfileAdd); $width = image

Re: [PHP] Wierd ass code...

2006-05-15 Thread Robin Vickery
On 14/05/06, Gonzalo Monzón <[EMAIL PROTECTED]> wrote: Satyam escribió: > Of course, another possibility is that the author does not know how to > handle multidimensional arrays (just to say it before anyone else > points an obvious alternative) > I don't think the author does not know how to ha

Re: [PHP] Check before uploading

2006-05-15 Thread Stut
Gustav Wiberg wrote: Just a thought. Someone posted a question if you could check filesize before uploading some days ago. Maybe this is possible with Javascript? Javascript wouldn't be the best solution, cause of it's incompability between browsers, that users can inactivate it. But it's might

[PHP] Check before uploading

2006-05-15 Thread Gustav Wiberg
Hi there! Just a thought. Someone posted a question if you could check filesize before uploading some days ago. Maybe this is possible with Javascript? Javascript wouldn't be the best solution, cause of it's incompability between browsers, that users can inactivate it. But it's might be better

Re: [PHP] Exceptions in PHP

2006-05-15 Thread Kevin Waterson
This one time, at band camp, John Meyer <[EMAIL PROTECTED]> wrote: > I have the following script: > > try { > $conn = mysql_connect("localhost","webuser","testme") or die("Could not > connect"); -- snipped for sake of sanity -- I think if you wish to push down this path you may wish to l

Re: [PHP] Perl & PHP output format mismatching

2006-05-15 Thread chris smith
On 5/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hello, I'm currently writing a PHP page, which uses a small Perl script. But I encounter an annoying problem with endline character. A small example : $perl = new Perl(); $perl->eval('print "toto\ntata"'); In this configuration, the HTM

[PHP] Perl & PHP output format mismatching

2006-05-15 Thread mickb
Hello, I'm currently writing a PHP page, which uses a small Perl script. But I encounter an annoying problem with endline character. A small example : $perl = new Perl(); $perl->eval('print "toto\ntata"'); In this configuration, the HTML page generated sends me : toto tata Of course and you sh

Re: [PHP] Wierd ass code...

2006-05-15 Thread Gonzalo Monzón
Gonzalo Monzón escribió: Attached results and code. (tested on PHP 4.3.4) -- Testing bidimensional and single dimension array manipulation Fill style A, bidimensional array: 2,1603 Iteration style A, bidimensional array: 9,9071 Total

Re: [PHP] Copy of image -> smaller

2006-05-15 Thread Chris
Gustav Wiberg wrote: Hi there! When I upload a picture from a form, then I want to create a copy with a smaller image. For example: I upload a picture with dimensions 200x150 name 4.jpg. I also want a copy of this image but with the dimensions 100x75 pixels. I've tried this below, but I'm mis

Re: [PHP] Copy of image -> smaller

2006-05-15 Thread Gustav Wiberg
Hi there! If I understand this right, I must have adminstration rights for installing Magic Wand... The problem is that my host doesn't have any support for this application. (It's not MY server) Is there any workaround? Best regards /Gustav Wiberg - Original Message - From: "Sasch

Re: [PHP] Security Concerns with Uploaded Images:

2006-05-15 Thread Chris
Jason Wong wrote: On Monday 15 May 2006 10:53, Richard Lynch wrote: On Sat, May 13, 2006 5:11 pm, Nick Wilson wrote: are there any security concerns with uploaded images? YES!!! Just what are the security concerns exactly? Assuming we're only focusing on attacks to the webserver[1] then

[PHP] Copy of image -> smaller

2006-05-15 Thread Gustav Wiberg
Hi there! When I upload a picture from a form, then I want to create a copy with a smaller image. For example: I upload a picture with dimensions 200x150 name 4.jpg. I also want a copy of this image but with the dimensions 100x75 pixels. I've tried this below, but I'm missing something I think