Re: [PHP] Serving an image

2012-10-17 Thread Wouter van Vliet / Interpotential
> > What is the diference between using imagecreatefrompng() and readfile()? > Any performance improvement? > > If you don't do any image minipulation, I would recommend readfile indeed. The differences being that imagecreatefrompng load the image into memory, ready to change it (overlay, rotate, c

Re: [PHP] Class not functioning

2009-12-16 Thread Wouter van Vliet / Interpotential
Allen, Before you go with my static-approach, please do consider Shawn's registry pattern suggestion. That's pretty sweet too ;-). A little response to your long text, before I help you fix the bug. A static property is basically the same as a regular property on an object. Only difference is tha

Re: [PHP] Class not functioning

2009-12-15 Thread Wouter van Vliet / Interpotential
Allen, The short answer (but don't follow this): addToQ( .. ); } } ?> The long(er) answer: I assume your Notifier object functions as singleton? Ie; accross your entire application, there is only one instance of that class? Why not go-static? That is, to my experience, the sweetest way to make

Re: [PHP] Parsing JSON; back-slash problem

2009-12-15 Thread Wouter van Vliet / Interpotential
> > > If you don't have access to do this, look at stripslashes() > And if you absolutely want to be on the safe side - check* if the magic_quotes option is enabled - if so; do stripslashes. If not - then obviously don't. * http://www.php.net/manual/en/function.get-magic-quotes-gpc.php > > > --

Re: [PHP] strip tags but preserve title attributes

2009-12-15 Thread Wouter van Vliet / Interpotential
I've had quite some luck using the html2text class by Jon Abernathy http://www.chuggnutt.com/html2text.php It's targetted to php 4, and rather old code - but it does the job for me. Where the 'job for me' is converting html to text for when I'm sending out emails in HTML format and want to off

[PHP] Debian Lenny: Which 5.3 package should I use?

2009-12-15 Thread Wouter van Vliet / Interpotential
Hi Guys & Gals, I've been playing around with PHP 5.3 for a while now on development servers and servers solely used for start-ups and lower-profile apps. But now I'm about to upgrade the servers for a high profile/high traffic website and with this upgrade I'd also like to make the switch from 5.

Re: [PHP] Security Issue

2007-09-04 Thread Wouter van Vliet / Interpotential
Karl, Some simple checks on $contpath could solve your problem. Make sure that: - it doesn't start with a / - doesn't contain /../ - it doesn't contain a double slash //, or make sure the URL Fopen wrapper is disabled: http://nl3.php.net/manual/en/ref.filesystem.php#ini.allow-url-fopen Usuall

Re: [PHP] Reload page after form submit

2007-08-30 Thread Wouter van Vliet / Interpotential
On 30/08/2007, Per Jessen <[EMAIL PROTECTED]> wrote: > > Wagner Garcia Campagner wrote: > > > Hello, > > > > I'm building a web page just like a blog... > > > > Where the user input some information... (name, website and comment) > > > > This information is stored in a file... > > > > And then the

Re: [PHP] Database includes

2007-08-27 Thread Wouter van Vliet / Interpotential
On 27/08/07, Stut <[EMAIL PROTECTED]> wrote: > I use a slightly different approach to prevent the need to mess about > with files when moving to production. At the end on config.php I have > this... > > if (file_exists('config_dev.php')) > require 'config_dev.php'; I've got my own variation

Re: [PHP] help with session

2007-08-26 Thread Wouter van Vliet / Interpotential
I would go for: if (isset($_REQUEST['gender'])) $_SESSION['registrationGender'] = $_REQUEST['gender']; print isset($_SESSION['registrationGender']) ? "You are registered as gender: ".$_SESSION['registrationGender'] : "Your gender is unknown"; And make no assumptions about a gender when yo

Re: [PHP] Out of Memory error

2007-08-23 Thread Wouter van Vliet / Interpotential
I've got a followup question to this. Whenever you're doing something that takes too much memory, having a file uploaded that's bigger than max upload size (actually, not sure if that applies but I think it does) or when your script is taking too long to execute it just dies with a very unfriendly

Re: [PHP] Creating a table with merged cells

2007-08-23 Thread Wouter van Vliet / Interpotential
You may want to look into the rowspan and colspan attributes of G'luck! On 23/08/07, Phpmanni <[EMAIL PROTECTED]> wrote: > > Hi > I need to represent a sort of map. The map is a rectangular > table of size X in widht and Y in height, so that I have X*Y > square cells. I need to record in a datab

Re: [PHP] Re: Table shows even when if () is false

2007-08-22 Thread Wouter van Vliet / Interpotential
On 22/08/07, M. Sokolewicz <[EMAIL PROTECTED]> wrote: > > I'm pretty sure > if(!empty($result_deferred_comments)) { > > does something else than you think it does. > $result_deferred_comments = mssql_query($deferred_comments) or > die(mssql_error()); > > if it fetches any rows it will return a RESO

Re: [PHP] Override parent class constants

2007-08-22 Thread Wouter van Vliet / Interpotential
I hate to disappoint you, but there's no real alternative. Same annoyance with get_class() and __CLASS__ always giving you the "class in which the call is defined" instead of the class which is actually being called when dealing with static methods. What you could do is define a protected static m

Re: [PHP] Redirection with header (was Re: [PHP] Cookies and sent headers)

2007-08-20 Thread Wouter van Vliet / Interpotential
On 20/08/07, tedd <[EMAIL PROTECTED]> wrote: > > At 10:40 PM +0200 8/19/07, Wouter van Vliet / Interpotential wrote: > >What you're proposing, is to actually display some content on another > page > >then were the content is originally intended? I'm sor

Re: [PHP] Redirection with header (was Re: [PHP] Cookies and sent headers)

2007-08-19 Thread Wouter van Vliet / Interpotential
What you're proposing, is to actually display some content on another page then were the content is originally intended? I'm sorry, but I would consider that 'bad practice'. To me, it makes perfect sense that you don't want to leave the user on the page where login was originally handled. For vario

Re: [PHP] Photo upload framework/library for PHP

2007-08-18 Thread Wouter van Vliet / Interpotential
I often use MCImageManager, by moxiecode: http://tinymce.moxiecode.com/paypal/item_imagemanager.php. Integrates well into tinyMCE, but can be used without that as well. I'm not entirely sure it's what you are looking for, but I think it very well may be. And if it doesn't help you now, it may do s

Re: [PHP] Capturing shell command output.

2007-08-18 Thread Wouter van Vliet / Interpotential
You may want to look into shell_exec, which executes a command and returns the output. If you're accepting arguments from user input, don't forget proper use of escapeshellcmd and escapeshellarg ;-). Something else that might cause your commands from failing, is that the utilities are not inside a

Re: [PHP] Cookies and sent headers

2007-08-18 Thread Wouter van Vliet / Interpotential
You best option would be to go through all of your include'd or require'd files and make sure there is no whitespace before and after you open your php tags. Those are often the cause for such problems. The easy way would indeed be to use output buffering. In that case, put the call to ob_start();

Re: [PHP] cant get if logic correct..

2007-08-17 Thread Wouter van Vliet / Interpotential
is_integer probably wouldn't work, since you're dealing with strings here. Your best friend here would probably be 'is_numeric' which would return true on both the string '1' as the integer 1 true. As well as 1.1 and '1.1'. The only one solution I could think if would be: preg_match('/^\d+$/',

Re: [PHP] HTML attribute / url safe wordwrap function

2005-01-04 Thread Wouter van Vliet
On Tue, 4 Jan 2005 16:41:16 -0500, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I don't know if I understand exactly what you're trying to do, but you might > try the HTML tag to get the HTML not to wrap the line. See if > that helps at all. > > Good luck! > > -TG > > = = = Original messag

Re: [PHP] Apache Server with php

2005-01-04 Thread Wouter van Vliet
On Tue, 4 Jan 2005 08:37:26 -0800, Ramiro Trevino <[EMAIL PROTECTED]> wrote: > Hi, > > I am having issues with the installation and configuration of my Apache > server 2.0.52(win32). All is well when I restart the server with the > exception of, when I load the following lines. > > I opened up th

Re: [PHP] Re: Calculate No Of Days

2005-01-04 Thread Wouter van Vliet
On Mon, 03 Jan 2005 22:58:49 -0500, Jerry Kita <[EMAIL PROTECTED]> wrote: > Khuram Noman wrote: > > Hi > > > > Is there any function avialable in PHP to calculate > > the no of days by passing 2 dates like 1 argument is > > 1/1/2005 and the second one is 1/2/2005 then it > > returns the no of days

[PHP] HTML attribute / url safe wordwrap function

2005-01-04 Thread Wouter van Vliet
Howdy, Yes, I've googled - and yes, I've searched the archives - but didn't find a solution for my problem. Here's the deal: On a website ppl can react on articles and post messages. The content of a message is given to a function which parses it all, taking care of long "words" which could mess

Re: [PHP] Fork PHP script X at a time.

2004-09-20 Thread Wouter van Vliet
> Hi, I have a bit of a cold today so I probably would have figured this > out for myself eventually but hey ;-) > > Right I have a script that I need to run around 90 times thru a cron job > but passing a different i.d. to it each time. > > I have experimented with running all 90 at once and its

Re: [PHP] Weird characters output

2004-09-20 Thread Wouter van Vliet
> I have recently moved a site over to a new server. Now certain > characters are being replaced by weird characters. EG: the ' single > quote is being replaced by a question mark and other characters are also > affected. the information that contains these characters is inside a > mysql database.

Re: [PHP] Problem creating a date before 1970 on Fedora

2004-09-14 Thread Wouter van Vliet
On Tue, 14 Sep 2004 11:45:51 +0200, Christophe Chisogne <[EMAIL PROTECTED]> wrote: > Wouter van Vliet a écrit : > >>Note: The valid range of a timestamp is typically from Fri, 13 Dec > >>1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the > >>

Re: [PHP] small query prob in Mysql

2004-09-14 Thread Wouter van Vliet
On Tue, 14 Sep 2004 05:37:30 +, Curt Zirzow <[EMAIL PROTECTED]> wrote: > * Thus wrote Sagar C Nannapaneni: > > > > Hi everybody, > > > > I'm having a database named "items", inthat > > one field name is "itemname" and the contents of > > that field is as follows > > > > Monitor 15" - LG >

Re: [PHP] Re: prob parsing Url

2004-09-14 Thread Wouter van Vliet
On Tue, 14 Sep 2004 13:21:09 +0300, Niklas Lampén <[EMAIL PROTECTED]> wrote: > Urlencode() and urldecode() should help you out. > > Niklas > > > > > Sagar C Nannapaneni wrote: > > Hi folks.. > > > > I'm using a form to send data from one page to another. > > > > one of the input fields in the

Re: [PHP] Re: Simple Problem about forms and sending info to db

2004-09-14 Thread Wouter van Vliet
On Tue, 14 Sep 2004 18:32:50 +0800, Jason Wong <[EMAIL PROTECTED]> wrote: > On Tuesday 14 September 2004 18:06, Logan Moore wrote: > > Ok I think I figured out my own problem. The speechmarks in the Form break > > up the speech marks in the echo statement so I originally changed the echo > > statem

Re: [PHP] PHP: Supported OS

2004-09-14 Thread Wouter van Vliet
On Tue, 14 Sep 2004 12:12:16 +0200, FireSnake <[EMAIL PROTECTED]> wrote: > Thanks for ur reply. > > I was looking for ports for these OS. > server-side OS, not client-side. > > But i guess Php doesnt support severs with these OS then, > at least i could not find any downloads like i did for Perl.

Re: [PHP] Problem creating a date before 1970 on Fedora

2004-09-14 Thread Wouter van Vliet
On Mon, 13 Sep 2004 12:39:26 -0500, Greg Donald <[EMAIL PROTECTED]> wrote: > > > On Mon, 13 Sep 2004 19:03:09 +0200, Wouter van Vliet > <[EMAIL PROTECTED]> wrote: > > Howdy, > > > > I would assume this to be a common problem, but as I wrote to this >

Re: [PHP] perl regex in php and multiple escape rules

2004-09-14 Thread Wouter van Vliet
On Tue, 14 Sep 2004 11:18:33 +0200, Christophe Chisogne <[EMAIL PROTECTED]> wrote: > > In a word: > > I'm looking for more detailed information about preg_replace > (and other perl regex functions) than in the php manual, > specifically about different escape rules interaction. > > In more words

[PHP] Problem creating a date before 1970 on Fedora

2004-09-13 Thread Wouter van Vliet
Howdy, I would assume this to be a common problem, but as I wrote to this list myself a couple of days ago I was only aware of it's existence on windows systems. Here's some sample code 1 And this is it's output: -1: Thu, 1 Jan 1970 00:59:59 +0100 -3662: Wed, 31 Dec 1969 23:58:58 +0100

Re: [PHP] Perplexing problem, suggestions or answer needed

2004-09-11 Thread Wouter van Vliet
On Sat, 11 Sep 2004 03:11:08 -0700 (PDT), Mag <[EMAIL PROTECTED]> wrote: > > --- John Holmes <[EMAIL PROTECTED]> wrote: > > > Mag wrote: > > > > > Hi, > > > I will be getting input from a textarea and then I > > am > > > using "explode" to break the text into an array > > when > > > it encounters

Re: [PHP] image size?

2004-09-10 Thread Wouter van Vliet
You probably need this to set the Content-length: header, don't you? I'd go into: ob_start() imagegif($imageResource); // or whatever type of image you're writing $blob = ob_get_clean(); unset($imageResource); // free the memory once you're not using the image // size in bytes = strlen()+1, due

Re: [PHP] Array inside Class

2004-09-10 Thread Wouter van Vliet
On Fri, 10 Sep 2004 14:26:22 -0400, John Holmes <[EMAIL PROTECTED]> wrote: > From: "dirk" <[EMAIL PROTECTED]> > > can anyone explain to me, why I can't resize an array inside a class? > > Sample Code: > > > > > class Liste { > > var $input = array (1,2,3); > > var $input2 = array_pad ($input,1

Re: [PHP] problems setting up php5 on apache2 (WinXP Pro)

2004-09-10 Thread Wouter van Vliet
On Fri, 10 Sep 2004 10:16:28 -0400, John Holmes <[EMAIL PROTECTED]> wrote: > From: "Wouter van Vliet" <[EMAIL PROTECTED]> > > Ok, first of all: really, do use linux. It's not THAT bad for a home > > machine ;) > > > > Now, the solution is qu

Re: [PHP] Ouput buffer and vertual()

2004-09-10 Thread Wouter van Vliet
On Fri, 10 Sep 2004 09:24:06 -0400, John Holmes <[EMAIL PROTECTED]> wrote: > From: "Ivik Injerd" <[EMAIL PROTECTED]> > > > --- test.php: > > ob_start(); > > virtual("blah.pl"); > > $tmp = ob_get_contents(); > > echo "\n[ TMP: $tmp ]"; > > ob_end_clean(); > > > > --- test.php (output): > > blah > >

Re: [PHP] find quoted string within a string (more of a regex question, though ..)

2004-09-10 Thread Wouter van Vliet
On Fri, 10 Sep 2004 16:41:56 +0300, Robin Vickery <[EMAIL PROTECTED]> wrote: > On Fri, 10 Sep 2004 11:43:54 +0200, Wouter van Vliet > <[EMAIL PROTECTED]> wrote: > > > > For my own reasons (can explain, would take long, won't till sbody > > asks) I want

Re: [PHP] problems setting up php5 on apache2 (WinXP Pro)

2004-09-10 Thread Wouter van Vliet
Ok, first of all: really, do use linux. It's not THAT bad for a home machine ;) Now, the solution is quite simple as it is documented. Just copy the file 'libmysql.dll' to your %WINDIR% folder and all should work. If it doesn't, take libmysqli.dll as well. While you're at it, you might as well cop

Re: [PHP] Re: foreach()

2004-09-10 Thread Wouter van Vliet
On Wed, 08 Sep 2004 16:41:38 +0200, Daniel Kullik <[EMAIL PROTECTED]> wrote: > Anthony Ritter wrote: > > I get a: > > > > Warning: Invalid argument supplied for foreach() in > > c:\apache\htdocs\or_6.4.php on line 15 > > > > after submitting the form. > > > > Hello Anthony! > > As long as you don

Re: [PHP] Users of RDBMS

2004-09-10 Thread Wouter van Vliet
On Fri, 10 Sep 2004 03:07:35 +0530, Mulley, Nikhil <[EMAIL PROTECTED]> wrote: > You can create user from mysql prompt by connecting it through first > cmd>mysql -h host -u userid -p instance > password : ** > then type > GRANT ALL PRIVILGES ON *.* TO 'newuser'@'host' > IDENTIFIED BY 'password'

[PHP] find quoted string within a string (more of a regex question, though ..)

2004-09-10 Thread Wouter van Vliet
Howdy, Thanks for the answers on my previous question, though it hasn't resulted in a quicker dirparsing.. Anyway, here's a next one. For my own reasons (can explain, would take long, won't till sbody asks) I want to match a quoted string within a string. That is somehow kind of easy, I know ...

Re: [PHP] Timing on an internal email

2004-09-09 Thread Wouter van Vliet
> > Not necessarily outside of php, but outside of webserver. You need to > > setup a cron job that will execute the phpmailer script. > > Gotcha.., > > My webserver is a windows box, so I can just run a task schedule and give it; > php.exe myfile.php > and that should do it? > > Would it be mor

[PHP] A somewhat faster alternative to is_dir and is_file?

2004-09-09 Thread Wouter van Vliet
Howdy, I've written some, kinda coolish, class that reads directories recursively with some simple calls. Yihaaa, .. (but I'm not the only one who has done that, I guess :P). Anyway, during the process of traversing a directory it checks to see if the "something" that was found is either a directo

Re: [PHP] Multi-User Text-Editing

2004-09-07 Thread Wouter van Vliet
> > $str1 = << Once there was a Bar > It was red > It had some Foo > Underneath its Foobar > NEWTXT; > > $str2 = << Once there was a Bar > It had some Foo > Underneath its Foobar > OLDTXT; > >

Re: [PHP] ERROR

2004-09-07 Thread Wouter van Vliet
> session_start(); > //echo session_id(); > > if (!isset($_SESSION['Id'])){ > > echo("top.location.href='../portada.php';"); > } > ?> > > Can somebody helps me ? the error is that login don' t access and I don't found the > error. Jorge, can y

Re: [PHP] Dynamic Class Methods

2004-09-07 Thread Wouter van Vliet
On Tue, 7 Sep 2004 09:37:44 -0400, Mathieu Dumoulin <[EMAIL PROTECTED]> wrote: > I'm trying to setup a function from user code inside a defined object or a > class definition but it doesnt seem to work. Am i doing it right? Is there > something i need to know... is it even possible? > > I know cre

Re: [PHP] Regex for Validating URL

2004-09-07 Thread Wouter van Vliet
On Tue, 7 Sep 2004 10:58:48 +0300, Burhan Khalid <[EMAIL PROTECTED]> wrote: > -Original Message- > From: Nick Wilson [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 02, 2004 11:59 AM > > Hi all, > > yeah, i know, i did do quite a bit of searching but I just cant find it... > > Does an

Re: [PHP] converting seconds since unix epoc to date array

2004-09-07 Thread Wouter van Vliet
> beware of dates before 1969. That problem mostly occurs on windows systems, and in fact it's dates before 1 jan 1970 0:00 - php on windows will issue a warning if you try to use dates like that > > > Can anyone tell me how to convert a date stored in the format > > > "-MM-DD" to an integer

Re: [PHP] Re: Instantiating class, classname in constant

2004-08-31 Thread Wouter van Vliet
Quoting Catalin Trifu <[EMAIL PROTECTED]>: > > > class Foo { > > const Bar = 'Foo_Bar'; > > const Chocolate = 'Foo_Chocolate'; > > const Target= 'Foo Target'; > > } > > > > $bar = new Foo::Bar(); > > ?> > > Foo::Bar() is taken by php as a function call and then it tries to > insta

RE: [PHP] Re: Problems with very special characters

2004-05-10 Thread Wouter van Vliet
, and use characters from charset B, you will get the problem observed. The charset can be sent from Apache, PHP and the actual charset is set in the document. It's a pain in the arse to fix, I've had the same problem, it took a lot of experimenting Good luck, "Wouter Van Vlie

[PHP] Problems with very special characters

2004-05-08 Thread Wouter van Vliet
I'm stuck here with my hands in my hair, and would very much appriciate any clue to a solution, Wouter van Vliet (ps. since I'm not sure of the solution will be found in php, mysql or any other place I have posted this message also to the mysql-general list)

RE: [PHP] Request form duplicate names

2003-12-19 Thread Wouter van Vliet
:P On vrijdag 19 december 2003 11:10 Frédéric HARDY told the butterflies: > Try > > So in your script : > > $ids = $POST['name']; > $first_id = $POST['name'][0]; > > Best regards, Fred > === > Frederic HARDY

RE: [PHP] $GLOBALS containing itself!!!

2003-12-15 Thread Wouter van Vliet
On maandag 15 december 2003 10:24 Gerard Samuel told the butterflies: > Just curious about something I came across. > I was looking at the $GLOBAL array, to see what my script was leaving > behind. $GLOBALS contains a reference to itself. > Even though its a reference, whats the sense with that?? >

RE: [PHP] PHP IDE?

2003-12-15 Thread Wouter van Vliet
Yeah .. vim is my god too. You can do so many things with so little keystrokes. And it basically has the best syntax highlighting I've ever seen. With some easy tricks you can even let it highlight your own functions. I haven't doen so, but I know it's possible :P... Also, it exists on most servers

RE: [PHP] Leechers...

2003-12-09 Thread Wouter van Vliet
On dinsdag 9 december 2003 14:30 Wouter van Vliet told the butterflies: > On dinsdag 9 december 2003 13:50 > [EMAIL PROTECTED] told the butterflies: > > I've just installed and am happily using Galery HP > > (http://www.galleryhp.org/) > > A great photo gallery pack

RE: [PHP] Leechers...

2003-12-09 Thread Wouter van Vliet
On dinsdag 9 december 2003 13:50 [EMAIL PROTECTED] told the butterflies: > I've just installed and am happily using Galery HP > (http://www.galleryhp.org/) > A great photo gallery package... > Anyhoo, > > I want to now be able to stop people from linking to the > images directly, and only be able

RE: [PHP] Re: post an array into another site

2003-12-09 Thread Wouter van Vliet
On dinsdag 9 december 2003 13:11 Jay Blanchard told the butterflies: > [snip] > ...wow... > [/snip] > > All of this an no one mentioned cURL? ;) http://www.php.net/curl Yes .. ehmm, especially considering this wasn't the guy's actual question. If I read it correctly, it was this: On 12/08/2003 1

RE: [PHP] converting string into array with regex

2003-12-05 Thread Wouter van Vliet
On vrijdag 5 december 2003 12:23 Burhan Khalid told the butterflies: > Adam i Agnieszka Gasiorowski FNORD wrote: > > > How would you specify a regex to > > convert string into array using preg_split? > > Is there some symbol specyfying a place between letters ? > > > > s t r i n g => a

RE: [PHP] SID problem

2003-12-04 Thread Wouter van Vliet
On donderdag 4 december 2003 10:53 Binay told the butterflies: > Yes AllowOverride is set to None > > But then i can not change it as i don have access .. wht > other method/solution i can look except ini_set then ?? > > - Original Message ----- > From: "

RE: [PHP] SID problem

2003-12-04 Thread Wouter van Vliet
On donderdag 4 december 2003 10:36 Binay told the butterflies: > Hi everybody, > > I m trying to disable/off "session.use_trans_sid". > I don have access to php.ini file... hence trying to unset in > the php scripts and .htaccess file . > > While this works in php script i.e > ini_set("session.u

RE: [PHP] Picture Width and Height in $_FILES

2003-12-02 Thread Wouter van Vliet
On dinsdag 2 december 2003 3:40 Dimitri Marshall told the butterflies: > Hi there, > I've seen the code somewhere but can't remember what it is exactly. > Basically I need to know what the PHP is to get the picture > width and height. > > I tried: > > $pic = $_FILES[$objectNumber]; > $w

RE: [PHP] Error message trying to include a file

2003-12-02 Thread Wouter van Vliet
On maandag 1 december 2003 23:17 Curt Zirzow told the butterflies: > * Thus wrote Matthias Wulkow ([EMAIL PROTECTED]): > > > > I have an array filled with urls of javascript files and then I > > include them one by one in a loop. > > > > for( $i = 0 ; $i < sizeof($this->page->javascript) ; $i++ )

RE: [PHP] date() function doesn't seem to work right...

2003-12-02 Thread Wouter van Vliet
On maandag 1 december 2003 21:04 Curt Zirzow told the butterflies: > * Thus wrote Scott Fletcher ([EMAIL PROTECTED]): > > When I do this script, I didn't get a ":" and numbers in > > second. --snip-- date("Y-m-d H:i:s"); > > --snip-- > > > > works fine with phpversion() 4.2.2 > > Curt > -- >

RE: [PHP] include-problem

2003-12-02 Thread Wouter van Vliet
On maandag 1 december 2003 15:23 Rasmus Lerdorf told the butterflies: > On Mon, 1 Dec 2003, Wouter van Vliet wrote: > > > print "!!!"; > > ob_start(); > > include 'http://server.com/test/echo.php'; > > $XML = ob_get_clean(); // or use ob_get_cont

RE: [PHP] String construction help required please

2003-12-01 Thread Wouter van Vliet
Jay Blanchard wrote: > [snip] >> I need to display : "$_POST[$var]," >> >> Including the "" and the , . >> >> I have tried : \"\"$_POST[\".$var.\"]," but that is very wrong. >> >> Could one of you kind list members show me what it should be please ? > > > You have a couple of options... just p

RE: [PHP] include-problem

2003-12-01 Thread Wouter van Vliet
Rasmus Lerdorf wrote: > On Mon, 1 Dec 2003, Sophie Mattoug wrote: >> Victor Spång Arthursson wrote: >> >>> Hi! >>> >>> I'm having a problem with including files. What I want to achieve is >>> to execute a PHP-script on another server, and then to include the >>> result (which will be XML-output)

RE: [PHP] regular expression, image, name, alt, title, preg_match_all

2003-12-01 Thread Wouter van Vliet
Sophie Mattoug wrote: > Adam i Agnieszka Gasiorowski FNORD wrote: > >> I'm trying to develop a regex for matching with preg_match_all, I >> want to match such things like image name, image alt text, image >> title in construct like this: >> >> html... >> >>> style="style"> tex

RE: [PHP] Capturing $_POST variables

2003-11-28 Thread Wouter van Vliet
Thorsten Körner wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi Shaun > Am Freitag, 28. November 2003 14:41 schrieb Shaun: >> Thanks for your reply, >> >> I don't really need to do anything with them, just make sure they all >> retain their original values... > > If you are using

RE: [PHP] Capturing $_POST variables

2003-11-28 Thread Wouter van Vliet
Shaun wrote: > Hi, > > is it possible to capture $_POST variables sent from a > previous page so i can send them on to the next page? > > Thanks for your help. might wanna try (before any output, including spaces): $Value) $_SESSION[$Key] = $Value; But consider some checks to test if no value

[PHP] RE: "Bless"ing an object

2003-11-28 Thread Wouter van Vliet
Greg Beaver wrote: > Wouter, > > you could try this adding this method to each object you need > blessings from: > > function &bless($classname) > { > if ($classname == get_class($this)) { > return $this; > } > $vars = get_object_vars($this); > $ret = new $classname;

RE: [PHP] .htaccess authentification problem

2003-11-28 Thread Wouter van Vliet
Michael Hübner wrote: > Hallo, > > Hope somebody can help me. > > I'm working on Linux, Apache. > > On my start-site the user can log in via inserting Username > and Password into normal formfields, which are compared with a DB. > > After this login, he can change to his own user-directory > wh

RE: [PHP] Receiving a warning... no clue how to resolve it and need help badly :(

2003-11-28 Thread Wouter van Vliet
| \./ . Aaron Wolski wrote: > *** Sorry if this is a duplicate for some on another list** > > Hi Guys, > > I need help with this code I am about to paste. It works on a > testing server running PHP 4.2.2 but not 4.3.2 > > Here is the error: > > Warning: array_merge_recursive(): recursion det

RE: [PHP] how can I capture/ or make a history file?

2003-11-27 Thread Wouter van Vliet
[EMAIL PROTECTED] wrote: > Hello all, > > I want to make a history file while > runing a script in a shell. > > Does anyone know how to store all > the history and the result to a file I want? > > what is the command for it? > > thank you in advance > > Joshua Though way off topic, ... Linux

RE: [PHP] Re: "Bless"ing an object

2003-11-27 Thread Wouter van Vliet
[EMAIL PROTECTED] wrote: > Hello > > Just out of curiosity why do you need such a function? I'm no > perl programmer and have very little knowledge of the > language ... yet ; ) but the way you describe it it seems to > me that you have a fundamentle design flaw in your script if > you need to ch

RE: [PHP] "Bless"ing an object

2003-11-26 Thread Wouter van Vliet
Raditha Dissanayake wrote: > Hi Wouter, > > Wouter van Vliet wrote: > >> Hi Folks >> >> I was wondering (mostly because I came across some situations where >> I need it) if PHP supplies any methods to "bless" an array or object >> t

[PHP] "Bless"ing an object

2003-11-25 Thread Wouter van Vliet
Hi Folks I was wondering (mostly because I came across some situations where I need it) if PHP supplies any methods to "bless" an array or object to become some other object. In perl, I can simply do: my $SomeInstance = bless { item => 'value', 'Item2' => 'value2' }, 'SomeObject'; And th

RE: [PHP] Locking mysql tables with PHP

2003-11-25 Thread Wouter van Vliet
Marek Kilimajer wrote: > Tony Crockford wrote: >> Hi >> >> bit confused! >> >> here's what I want to do: >> >> get a numeric value from a MySQL table, do a calculation, then on >> another PHPpage update the numeric value in the table. >> >> what I don't want is anyone else getting the same numb

RE: [PHP] Time

2003-11-25 Thread Wouter van Vliet
Fernando Melo wrote: > Hi there, > > I have a RH Linux Web server running apache and PHP. > > I recently changed the system clock, the time zone and hardware clock. > The time and date are showing up correctly in Webmin and in > the O/S itself. > But when I call a php function to display the dat

RE: [PHP] echo or print

2003-11-21 Thread Wouter van Vliet
Kelly Hallman wrote: > On Fri, 21 Nov 2003, Wouter van Vliet wrote: >> Point is, which of the inline printing style is preferred by you >> guyes. I tend to use a lot, since it reads easier but get >> into struggles with myself when I do that multiple times in a row. > &g

RE: [PHP] tar and ownership

2003-11-21 Thread Wouter van Vliet
Nigel Jones wrote: > I think if you are using the Unix Tar Version you can do tar > -C /scripts/ -zxv -f ./scripts/mailfiles.tar.gz > --owner=REPLACEME --group=REPLACEME > I sure hope this is NOT possible, since it would be a major security problem. Think for example in terms of the php safe_mod

RE: [PHP] echo or print

2003-11-21 Thread Wouter van Vliet
Chris W. Parker wrote: > Wouter van Vliet <mailto:[EMAIL PROTECTED]> > on Friday, November 21, 2003 10:55 AM said: > >> Point is, which of the inline printing style is preferred by you >> guyes. I tend to use a lot, since it reads easier but get >> into str

[PHP] FW: [ERR] RE: [PHP] tar and ownership

2003-11-21 Thread Wouter van Vliet
[EMAIL PROTECTED] wrote: > Transmit Report: > > To: [EMAIL PROTECTED], 402 Local User Inbox Full ([EMAIL PROTECTED]) Is someone able to unsubscribe [EMAIL PROTECTED] .. I'm getting annoyed by all those "User inbox full" replies. --- Begin Message --- Rodney Green wrote: > Marek Kilimajer wrote:

RE: [PHP] echo or print

2003-11-21 Thread Wouter van Vliet
David T-G wrote: > Eugene, et al -- > > ...and then Eugene Lee said... > % > % > % > % Also, the letter 'e' is smaller than 'p', so ASCII-based > function % lookups will be faster as well. > > Most of these speed increases can't be noticed in a small > script, where the end is within a few lines

RE: [PHP] tar and ownership

2003-11-21 Thread Wouter van Vliet
Rodney Green wrote: > Marek Kilimajer wrote: > >> Rodney Green wrote: >> >>> Greetings! >>> >>> I'm writing a script that downloads a tarball from an FTP server and >>> unpacks it into a directory. Here's the line of code that does this. >>> >>> exec("tar -C /scripts/ -zxv --preserve-permission

RE: [PHP] Removing security-problematic chars from strings

2003-11-21 Thread Wouter van Vliet
Chris Shiflett wrote: > --- "CPT John W. Holmes" <[EMAIL PROTECTED]> wrote: >> Heh... my turn to disagree again. You can do a simple str_replace() >> to convert "" back into "", but you're going to have to >> do it for each case. Also by doing that blindly, you can end up with >> orphaned tags a

RE: [PHP] Removing security-problematic chars from strings

CPT John W. Holmes wrote: > From: "Wouter van Vliet" <[EMAIL PROTECTED]> > >> Let's make this personal: what would be your answer if I would advice >> the friendly person to do this: > > Heh.. I hope you're just kidding about "making it >

RE: [PHP] Removing security-problematic chars from strings

> -Oorspronkelijk bericht- > Van: John W. Holmes [mailto:[EMAIL PROTECTED] > Verzonden: vrijdag 21 november 2003 14:38 > > Wouter van Vliet wrote: > >John W. Holmes > >>Troy S wrote: > >>>What is the best way to remove the characters from str

RE: [PHP] xslt_create error

In your configure command, you have enabled xml support, but not xslt support. Read http://nl3.php.net/manual/en/ref.xslt.php " Installation On UNIX, run configure with the --enable-xslt --with-xslt-sablot options. The Sablotron library should be installed somewhere your compiler can find it. Mak

RE: [PHP] Removing security-problematic chars from strings

> -Oorspronkelijk bericht- > Van: John W. Holmes [mailto:[EMAIL PROTECTED] > > Troy S wrote: > > > What is the best way to remove the characters from strings that may > > cause security problems? Namely, `, ', ", <, >, \ and all non-printing > > strings. Did I miss any? Thanks. > > Why d

RE: [PHP] Why is the php loop, 'for()', so slow????

As a substitute for substr, you might want to give a regex a chance.. have no clue if it's faster, but it might just be. /^.{2}(.{0,8})/ would be your regex if you want to start at offset THREE and take out a MAX EIGHT char string (remove the 0 and get ONLY EIGHT char strings). Not sure i

RE: [PHP] RE: Prefilled forms (solved)

> -Oorspronkelijk bericht- > Van: Eugene Lee [mailto:[EMAIL PROTECTED] > > On Thu, Nov 20, 2003 at 11:22:02AM +0200, Veress Berci wrote: > : > : Scuse me, if I write some totally dumb thing. > : I am quite new to PHP and programming, and maybe I'm not understanding > : the question, but: >

RE: [PHP] I need answers for the questions

> -Oorspronkelijk bericht- > Van: John Nichel [mailto:[EMAIL PROTECTED] > > Arivazhagi Govindarajan wrote: > >PHP Questions > > > > 1. Explain about session management and cookies ? In PHP how we can > > maintain a session While writing PHP code you put your body in risk of getting "wo

RE: [PHP] How to get the key of a specific index of array?

> -Oorspronkelijk bericht- > Van: PhiSYS [mailto:[EMAIL PROTECTED] > > How to get the key of a specific index of array? > > It seems that key($_POST[$i]) is a wrong syntax. > > I've worked around like this: > > $allkeys = array_keys($_POST); > $allvalues = array_values($_POST); > > fo

RE: [PHP] sorting an array of regexes

> -Oorspronkelijk bericht- > Van: Eugene Lee [mailto:[EMAIL PROTECTED] > On Tue, Nov 18, 2003 at 01:15:32PM +0100, Adam i Agnieszka > Gasiorowski FNORD wrote: > : > : There is an array of regexes, for example > : > : $array = array('moon', '[wh]ood', '[^as]eed' ... > : (about 300 entr

RE: [PHP] .html extension PHP page be interpret

> -Oorspronkelijk bericht- > That's simple, just modify your Apache httpd.conf on the line > where it says something along the lines of: > > AddType application/x-httpd-php .php4 .php .php3 .inc > > change it to: > > AddType application/x-httpd-php .php4 .php .html .php3 .inc And please,

RE: [PHP] Microsoft .NET arguement

Jay Blanchard wrote: > [snip] > I have someone here at my desk arguing that Microsoft's .NET > is better than PHP - faster to process, easier and quicker to > program, etc. > > They also (claim) that Microsoft's SQL is much faster and such vs. > MySQL. > > Any comments to help me defend PHP or

RE: [PHP] Explode a string

Jay Blanchard wrote: > [snip] > Considering Jay's answer for this question, do I always do things the > hard way or what?? [/snip] > > Young Grasshopper...there is more than one way to do things, > a lot of them are "right"some are just harder than others. Isn't that the diplomatic equivalent

  1   2   >