php-general Digest 14 Jul 2009 15:36:02 -0000 Issue 6229

2009-07-14 Thread php-general-digest-help
php-general Digest 14 Jul 2009 15:36:02 - Issue 6229 Topics (messages 295344 through 295368): Launch Windows Program from PHP 295344 by: Matt Neimeyer Re: mod primary key field - newbie question 295345 by: Marc Christopher Hall Re: MySql Injection advice 295346 by:

php-general Digest 15 Jul 2009 04:16:48 -0000 Issue 6230

2009-07-14 Thread php-general-digest-help
php-general Digest 15 Jul 2009 04:16:48 - Issue 6230 Topics (messages 295369 through 295391): Re: MySQL Queries in PHP 295369 by: Jan G.B. How to set find pathes for PHP CLI? 295370 by: Tir 295373 by: Ashley Sheridan [GD] Image errors 295371 by: Il pinguino

Re: [PHP] MySql Injection advice

2009-07-14 Thread Eddie Drapkin
Things I have used prepared statements for: 1. SELECT 2. UPDATE 3. INSERT 4. DELETE 5. Stored procedures Things I am aware of that prepared statements are not capable of doing: What have you read that prepared statements can't do? I've not heard of anything, nor have I encountered anything,

[PHP] MySQL Queries in PHP

2009-07-14 Thread Tom Chubb
Hi List, Just wanted to pick your brains please? I'm trying to standardise on the way I query databases and move away from the Dreamweaver built-in functions (which I know you all hate!) ;) I've been on this list for about 5 years now and I don't think I've ever heard anyone mention the Pear

Re: [PHP] MySQL Queries in PHP

2009-07-14 Thread Eddie Drapkin
On Tue, Jul 14, 2009 at 2:29 AM, Tom Chubbtomch...@gmail.com wrote: Hi List, Just wanted to pick your brains please? I'm trying to standardise on the way I query databases and move away from the Dreamweaver built-in functions (which I know you all hate!) ;) I've been on this list for about 5

Re: [PHP] MySql Injection advice

2009-07-14 Thread Ashley Sheridan
On Tue, 2009-07-14 at 01:52 -0400, Andrew Ballard wrote: On Mon, Jul 13, 2009 at 4:18 PM, Haig Dedeyanhdede...@videotron.ca wrote: for the phone #'s, I'm using int as the data type storing each part of the phone # in its own cell, When it gets displayed, I add a dash in between each part

[PHP] Need Help.

2009-07-14 Thread Girish Padia
Dear Sir, I am facing two problem while developing my site in php. 1) I want to delete browser history whenever i migrate from one page to another. so that user can never press Back button. 2) I have 20 users who have access to my site. Right now I am checking this using cookies. I want to know

Re: [PHP] Need Help.

2009-07-14 Thread Ashley Sheridan
On Tue, 2009-07-14 at 11:59 +0530, Girish Padia wrote: Dear Sir, I am facing two problem while developing my site in php. 1) I want to delete browser history whenever i migrate from one page to another. so that user can never press Back button. 2) I have 20 users who have access to my site.

Re: [PHP] Need Help.

2009-07-14 Thread Carlos Medina
Hi Girish, You can save the SEssion id in a Cookie to make it available over requests and over days too. If you use Sessions stored on DB, you can get more security, when the SEssion Cookie is stored Encrypted. Other Option is to send the Session id, most know as PHPSESSIONID, as GET

Re: [PHP] MySQL Queries in PHP

2009-07-14 Thread Tom Chubb
2009/7/14 Eddie Drapkin oorza...@gmail.com On Tue, Jul 14, 2009 at 2:29 AM, Tom Chubbtomch...@gmail.com wrote: Hi List, Just wanted to pick your brains please? I'm trying to standardise on the way I query databases and move away from the Dreamweaver built-in functions (which I know you

Re: [PHP] MySql Injection advice

2009-07-14 Thread Michael A. Peters
Eddie Drapkin wrote: Things I have used prepared statements for: 1. SELECT 2. UPDATE 3. INSERT 4. DELETE 5. Stored procedures Things I am aware of that prepared statements are not capable of doing: What have you read that prepared statements can't do? I've not heard of anything, nor have I

Re: [PHP] Need Help.

2009-07-14 Thread kranthi
Hi Girish, 1. You cannot modify the browser Back button (any thing on the client's computer for that matter). 2. I strongly oppose the use of Cookies for tracking the user login, due to security reasons. Cookies are saved on the client's computer and he/she can easily modify the information

Re: [PHP] phpscriptor.com

2009-07-14 Thread LinuxManMikeC
On Mon, Jul 13, 2009 at 2:39 AM, Reesehowel...@inkworkswell.com wrote: Paul M Foster wrote: On Sat, Jul 11, 2009 at 08:14:35AM -0700, PHPScriptor wrote: Ok this may look like spam but what the hell... I'm the owner of phpscriptor.com, I had bigg plans with this domainname but... well yes,

[PHP] Scope of Variables and use of global and this-var

2009-07-14 Thread Anton Heuschen
This is just a general question, I am not 100% on when to use global $var , and $this-var and how/what about the GLOBAL vars Lets say I have one file I call config.php here I connect to the db, to ldap etc the connection var I can then use in a file on its own ... obviously after

[PHP] Email security

2009-07-14 Thread Tiji varghese
Hello, I've implemented a contact form on my website that would email me the contents of the form and also add it to the database. Its working perfectly but I'm not too sure about the security part. I don't know much about the security issues concerned with email forms and the measures to

Re: [PHP] Scope of Variables and use of global and this-var

2009-07-14 Thread Eric Butera
On Tue, Jul 14, 2009 at 6:21 AM, Anton Heuschenanto...@gmail.com wrote: This is just a general question, I am not 100% on when to use global $var , and $this-var  and how/what about the GLOBAL vars Lets say I have one file I  call config.php here I connect to the db, to ldap etc

Re: [PHP] Email security

2009-07-14 Thread Eric Butera
On Tue, Jul 14, 2009 at 7:46 AM, Tiji varghesetij...@yahoo.co.in wrote: Hello, I've implemented a contact form on my website that would email me the contents of the form and also add it to the database. Its working perfectly but I'm not too sure about the security part. I don't know much

Re: [PHP] Need Help.

2009-07-14 Thread Martin Scotta
hahahahahaha How are you to delete my history? The fact that you develop a website does not allow you to take the control of my browser. But you can avoid the history to be populated by using javascript a href=lalalal.html onclick=document.location.replace(this.href) Click to lalalal /a

RE: [PHP] Need Help.

2009-07-14 Thread Bob McConnell
From: Martin Scotta hahahahahaha How are you to delete my history? The fact that you develop a website does not allow you to take the control of my browser. But you can avoid the history to be populated by using javascript a href=lalalal.html

Re: [PHP] Scope of Variables and use of global and this-var

2009-07-14 Thread Martin Scotta
do you need to use global? IMO you should use just 1 global variable, thats is what I call entry point My scripts looks like... require_once 'loader.php'; Loader::registerAutoload(); $foo = new Foo(); $foo-doStuff(); This way you can develop faster and do maintenance better avoiding problems

Re: [PHP] Need Help.

2009-07-14 Thread Martin Scotta
I know... this is not for a php thread... but... If you look at the HTML the a tag is made completely unobtrusive. The link will still working without javascript. This is the original tag (with javascript) a href=lalalal.html onclick=document.location.replace(this.href) Click to lalalal

[PHP] Weird domain seting in setcookie()

2009-07-14 Thread Michelle Konzack
Hello, on two websites I have encountered that cookies are not working properly and are accesibel from other subdomains which I do not want. The line is: setcookie('AdminOnCrack', $drug, $timeout, '/', $_SERVER['HTTP_HOST']); but the domain is always prefixed with a .. OK, now I have tested

Re: [PHP] MySQL Queries in PHP

2009-07-14 Thread Jan G.B.
2009/7/14 Tom Chubb tomch...@gmail.com 2009/7/14 Eddie Drapkin oorza...@gmail.com On Tue, Jul 14, 2009 at 2:29 AM, Tom Chubbtomch...@gmail.com wrote: Hi List, Just wanted to pick your brains please? I'm trying to standardise on the way I query databases and move away from the

[PHP] How to set find pathes for PHP CLI?

2009-07-14 Thread Tir
I have many scripts that I need execute with PHP CLI. They are located in a few directories. I don't want to write full path to script every time when I start it. Therefore I've added this paths to the PATH environment variable. But PHP don't find my scripts. How could i set paths on which PHP

[PHP] [GD] Image errors

2009-07-14 Thread Il pinguino volante
Hi to all I get a problem processing an image with GD libraries. This is my function public function showPicture($id) { header('Content-type: image/jpeg'); $mime = mime_content_type($this-updir.$id.'.png'); $type = explode('/',$mime); $type =

RE: [PHP] Weird domain seting in setcookie()

2009-07-14 Thread Bob McConnell
From: Michelle Konzack on two websites I have encountered that cookies are not working properly and are accesibel from other subdomains which I do not want. The line is: setcookie('AdminOnCrack', $drug, $timeout, '/', $_SERVER['HTTP_HOST']); but the domain is always prefixed with a ..

Re: [PHP] How to set find pathes for PHP CLI?

2009-07-14 Thread Ashley Sheridan
On Tue, 2009-07-14 at 20:46 +0400, Tir wrote: I have many scripts that I need execute with PHP CLI. They are located in a few directories. I don't want to write full path to script every time when I start it. Therefore I've added this paths to the PATH environment variable. But PHP don't

Re: [PHP] [GD] Image errors

2009-07-14 Thread Martin Scotta
$immagine = $tipo($this-updir.$id.'.png'); $tipo is undefined On Tue, Jul 14, 2009 at 12:48 PM, Il pinguino volantetuxs...@codeinside.it wrote: Hi to all I get a problem processing an image with GD libraries. This is my function   public function showPicture($id) {      

Re: [PHP] [GD] Image errors

2009-07-14 Thread Ashley Sheridan
On Tue, 2009-07-14 at 13:27 -0300, Martin Scotta wrote: $immagine = $tipo($this-updir.$id.'.png'); $tipo is undefined On Tue, Jul 14, 2009 at 12:48 PM, Il pinguino volantetuxs...@codeinside.it wrote: Hi to all I get a problem processing an image with GD libraries. This is my

Re: [PHP] [GD] Image errors

2009-07-14 Thread Martin Scotta
He is calling the function by variable something like this $func = 'var_dump'; $func( new Foo ); On Tue, Jul 14, 2009 at 1:30 PM, Ashley Sheridana...@ashleysheridan.co.uk wrote: On Tue, 2009-07-14 at 13:27 -0300, Martin Scotta wrote: $immagine = $tipo($this-updir.$id.'.png'); $tipo is

Re: [PHP] Weird domain seting in setcookie()

2009-07-14 Thread Michelle Konzack
Hi Bob, Am 2009-07-14 11:46:16, schrieb Bob McConnell: In Firefox 3.0 under Tools-Options-Privacy, uncheck Accept third-party cookies. What has this to do with the Webbrowser? In the PHP manual it is written: [ url 'http://de.php.net/manual/en/function.setcookie.php' ] snip

Re: [PHP] [GD] Image errors

2009-07-14 Thread Ashley Sheridan
On Tue, 2009-07-14 at 13:41 -0300, Martin Scotta wrote: He is calling the function by variable something like this $func = 'var_dump'; $func( new Foo ); On Tue, Jul 14, 2009 at 1:30 PM, Ashley Sheridana...@ashleysheridan.co.uk wrote: On Tue, 2009-07-14 at 13:27 -0300, Martin Scotta

Re: [PHP] Weird domain seting in setcookie()

2009-07-14 Thread Lists
Michelle Konzack wrote: [snip] so, I have set the the domain explicit to myspace.tdwave.net which should register the cookie as it is according to the PHP manual or not? Thanks, Greetings and nice Day/Evening Michelle Konzack the above will still make the cookie available to:

Re: [PHP] [GD] Image errors

2009-07-14 Thread Martin Scotta
On Tue, Jul 14, 2009 at 1:48 PM, Ashley Sheridana...@ashleysheridan.co.uk wrote: On Tue, 2009-07-14 at 13:41 -0300, Martin Scotta wrote: He is calling the function by variable something like this $func = 'var_dump'; $func( new Foo ); On Tue, Jul 14, 2009 at 1:30 PM, Ashley

RE: [PHP] Doubts concerning a general Insert method

2009-07-14 Thread MEM
Ok... according to the above posts, I've started to create my generic CRUD class however, I'm wondering: Any of you have already used a DAO design pattern in conjunction with a CRUD generic class? Know that I'm trying to create a generic CRUD class on a DAO Design pattern, it seems that it

Re: [PHP] [GD] Image errors

2009-07-14 Thread Ashley Sheridan
On Tue, 2009-07-14 at 14:16 -0300, Martin Scotta wrote: On Tue, Jul 14, 2009 at 1:48 PM, Ashley Sheridana...@ashleysheridan.co.uk wrote: On Tue, 2009-07-14 at 13:41 -0300, Martin Scotta wrote: He is calling the function by variable something like this $func = 'var_dump'; $func(

Re: [PHP] [GD] Image errors

2009-07-14 Thread Martin Scotta
Why are you ussing GD? All you need is output the image to the browser? try this... I didn't test/run this code, but it may work... public function showPicture( $id ) { header('Content-type:' . mime_content_type( $this-updir . $id . '.png' ) ); readfile( $this-updir . $id . '.png' );

[PHP] Alphabetical pagination

2009-07-14 Thread Miller, Terion
I am trying to make a page that displays a-z like a b c d e etc as links then when you click open one it reloads itself and shows only the query results that go with that letter...i'm not getting itI get a page that says ARRAY over and over... What I have so far:

[PHP] Pattern Matching

2009-07-14 Thread VamVan
Hello Guys, I have a question related to pattern matching and wildcards. This is the scenario. I have friendly urls on my website. So retrive their path as arguments for every page. so for example if I have www.xx.com/contact/me my args array will be args( 0 = contact, 1 = me ) My

Re: [PHP] Alphabetical pagination

2009-07-14 Thread Dan Shirah
I am trying to make a page that displays a-z like a b c d e etc as links then when you click open one it reloads itself and shows only the query results that go with that letter...i'm not getting itI get a page that says ARRAY over and over... What I have so far:

[PHP] Mac OS X Server

2009-07-14 Thread The Doctor
ALl right, I just install MySQL 5.1.36 on a Mac OS X Server but the PHP is looking at the Mysql 5.0.67 ? How do I tell the php.ini to look at the 5.1 instead of the 5.0? -- Member - Liberal International This is doc...@nl2k.ab.ca Ici doc...@nl2k.ab.ca God, Queen and country! Beware

Re: [PHP] Alphabetical pagination

2009-07-14 Thread Andrew Ballard
On Tue, Jul 14, 2009 at 3:38 PM, Miller, Teriontmil...@springfi.gannett.com wrote: I am trying to make a page that displays a-z like a b c d e etc as links then when you click open one it reloads itself and shows only the query results that go with that letter...i'm not getting itI get a

RE: [PHP] Email security

2009-07-14 Thread Dewey Williams
-Original Message- From: Tiji varghese [mailto:tij...@yahoo.co.in] Sent: Tuesday, July 14, 2009 7:47 AM To: PHP General Subject: [PHP] Email security Hello, I've implemented a contact form on my website that would email me the contents of the form and also add it to the

[PHP] General good practice question about functions directory location

2009-07-14 Thread Al
Most of my scripts are written for use on shared hosts. I've generally put my function and config files in a web-space directory. However, I been thinking it would be less bother to make stuff more secure if the functions, et al, were above the root directory. I realize, some hosts still

[PHP] Thanx

2009-07-14 Thread Girish Padia
Dear All, Thanx for the responce shown by you all. Your responce helped me to clear my doubts. Well, I am very much new to PHP developements. You can visit me at http://www.girishphpmysql.blogspot.com. I am willing to know about sessions to track the user login and logout. Your same responce will

[PHP] I have an idea

2009-07-14 Thread Martin Scotta
Hi Do you noted that all the discussion here are about problems, bugs, or just urgent pleaaase help me I have an idea. It is not really THE idea... but it is. What happen if tell this idea to the community? I don't know, so, let's take a look. PHP is a great language. You can do a lot of things

[PHP] Scrapping email content

2009-07-14 Thread Areba Collins
Hello guys, i have a quick one: Im working on an app that reads email and converts it into a post on a forum, everything works fine except the threaded comments at the bottom. I would like to delete everything that is from a previous email (which usually begins with on this ate, so and so wrote :

Re: [PHP] How to set find pathes for PHP CLI?

2009-07-14 Thread Tir
Linux (RHEL). PHP 5.2. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Alphabetical pagination

2009-07-14 Thread Jim Lucas
Andrew Ballard wrote: On Tue, Jul 14, 2009 at 3:38 PM, Miller, Teriontmil...@springfi.gannett.com wrote: I am trying to make a page that displays a-z like a b c d e etc as links then when you click open one it reloads itself and shows only the query results that go with that letter...i'm not

Re: [PHP] A prepared statements question

2009-07-14 Thread Jim Lucas
Jason Carson wrote: Hello everyone, I am having a problem getting my prepared statements working. Here is my setup... index.php - authenticate.php - admin.php 1)index.php has a login form on it so when someone enters their username the form redirects to another page I call