Re: [PHP] Security question

2005-12-07 Thread Andy Pieters
On Wednesday 07 December 2005 08:57, Łukasz Hejnak wrote: > The best way to know is to try and keep up with places like > the bugtraq@securityfocus.com list, or other security websites/mailing > lists and such. > It isn't a forum, it is software I write myself. -- Now listening to Top! Radio Live

Re: [PHP] Why don't webhosts upgrade to PHP5 ?

2005-12-07 Thread Andy Pieters
On Wednesday 07 December 2005 08:37, Pugi! wrote: > My webhost doesn't want to upgrade to PHP5 because of security reasons and > some scripts that will mallfunction. I find it hard to believe. Current > conf of webhost is PHP 4.3.11, Apache 1.3.33 and MySQL 3.23.49. > What real reasons could there

[PHP] Security question

2005-12-07 Thread Andy Pieters
Hi list I've got a concern for a user add/edit form. Right now when the user is logged in, I put its id in the session. Then when the user edits his details I put the id in the form and when it comes back I verify if the id matches the one in the session. Is it possible for someone who does no

Re: [PHP] Assigns True but not false?

2005-12-06 Thread Andy Pieters
On Tuesday 06 December 2005 17:38, Gabe wrote: > $this->m_arrQuesInfo[$this->m_itemID]['blnVacPromo'] = ( ( > !empty($_POST['vac_promo']) ) && ( $_POST['vac_promo'] == 'on' ) ) ? > TRUE : FALSE; I have a habit of casting true or false to boolean so that I'm sure they're not interpreted as 1 or 0.

Re: [PHP] Forum

2005-12-06 Thread Andy Pieters
On Tuesday 06 December 2005 16:16, John Nichel wrote: > Andy Pieters wrote: > > Hi list > > > > Does anyone of you know of a good forum that is easy to customize and > > supports sticky notes, user registration, bb code and stuff like that? > > I'm sure Google

[PHP] Forum

2005-12-06 Thread Andy Pieters
Hi list Does anyone of you know of a good forum that is easy to customize and supports sticky notes, user registration, bb code and stuff like that? With kind regards Andy -- Now listening to Top! Radio Live www.topradio.be/stream on amaroK Geek code: www.vlaamse-kern.com/geek Registered Li

Re: [PHP] Wanna Join me for an open source PHP Project?

2005-11-26 Thread Andy Pieters
Hmmm.. Outlook is notorious for blatantly violating the standards and being a security nightmare. Instead I suggest you make an application that has the same look & feel as outlook but has a core that is much smarter, safer, and better. Also, work from the ground up to generate standards compl

Re: [PHP] Is there an alternative for $_FILES['guildimage']['type'] == "image/jpeg"

2005-11-26 Thread Andy Pieters
On Wednesday 23 November 2005 03:15, twistednetadmin wrote: > I use this line in a script for uploading pictures to a website: > > $_FILES['guildimage']['type'] == "image/jpeg" > [snip] Please understand that the type is set by the browser and is never to be trusted. Especially with file uploads

Re: [PHP] Re: $_GET and $_POST arrays not working

2005-11-26 Thread Andy Pieters
On Saturday 26 November 2005 02:45, John Nichel wrote: > If you have a form like this one one page... > > > > > > [snip] Dear John Please go all the way when providing an example. To prevent errors and unpredictable behaviour, ALWAYS add encoding to the form tag. Systematically adding na

Re: [PHP] Passing objects between pages

2005-11-26 Thread Andy Pieters
On Friday 25 November 2005 20:44, Matt Monaco wrote: > What is the best way to pass an object between pages? Currently I am > first > serializing, then doing a base64_encode, this doesn't seem entirely > efficient. (Especially the encode). > > I am however using the encode because I have the seri

[PHP] Ubiquitous quoted printable encode

2005-11-26 Thread Andy Pieters
Hi list I know of the imap_8bit function that *can* be compiled into php. However I would like an encoder written in php that only uses standard extensions and functions and that therefore can work on all php 4+ installations. Does anyone know of such a beast? With kind regards Andy -- Now

Re: [PHP] Regexp trouble

2005-11-24 Thread Andy Pieters
Thanks all for your contributions. Seems like the missing link was the delimiter. On Thursday 24 November 2005 18:23, Frank Armitage wrote: > > And why do you use all those character > classes? > Err.. why NOT use character classes? What is easier [0-9] or \d or maybe [a-zA-Z] or [\w], ... ?

[PHP] Regexp trouble

2005-11-24 Thread Andy Pieters
Hi list I still fail to understand why regular expressions are causing me such a hard time. I used and tested my regexp in kregexpeditor (comes with Quanta [kdewebdev]) but when I put it in the php script it fails. ereg('^([\w]{3,3})[\s]([\d]{2,2})[\s]([\d]{2,2})[:]([\d]{2,2})[:]([\d]{2,2})'

[PHP] Deployment and maintenance of php software

2005-11-20 Thread Andy Pieters
Hi all I am a php developer and develop huge packages. Those packages are then installed by my clients or clients of my resellers on a score of webservers. As with all applications, bugfixes, and updates are issued on an almost weekly bases. I developed an application that runs on the php c

Re: [PHP] imagecopyresized just copies

2005-11-20 Thread Andy Pieters
On Sunday 20 November 2005 17:14, Andy Pieters wrote: > {case 1: > imagegif($main,$thumbname); > >

[PHP] imagecopyresized just copies

2005-11-20 Thread Andy Pieters
Hi all I wanted to make a simple script to make a resized image from an uploaded one. I used the example found on the php.net website list($width,$height,$type)=getimagesize($newfile);

Re: [PHP] preg for unicode strings?

2005-11-05 Thread Andy Pieters
Hi Thank you for your reply. My regexp was /^([a-zA-Z]{3,}|[\W])/ Meaning match any string that is either 3 letters or 1 word character I'd like to change this to 3 letters or 1 currency character So I changed the regexp accordingly /^([a-zA-Z]{3,}|[\p{Sc}])/u And I tested with £ but it f

[PHP] preg for unicode strings?

2005-11-05 Thread Andy Pieters
Hi List I am doing some data validation and the following regexp fails [\W] When using characters like £ or € Obviously because they are technically more then one character, even though they are only displayed as one. The script is encoded in UTF-8 Anybody know a fix for this? With kind reg

[PHP] Simple CopyOf XSLT translation

2005-11-02 Thread Andy Pieters
Hi list I made an entire site in xhtml for a client but now complaints are comming from the m$ explorer front. Broken layouts, long loading times etc. Would it be possible for php to do the xslt translation? All that is currently in my xslt is And serve those pages as html 4.01 instea

Re: [PHP] Login is not working. Please help....

2005-10-22 Thread Andy Pieters
You do know your code is open for sql injection attacks. php.net search for sql injection and session spoofing HTH Andy On Friday 14 October 2005 09:25, Jochem Maas wrote: > try some code indentation to make it more readable. > > someone else pointed you to the 'user' 'name' mismatch already I

Re: [PHP] Re: OOP Newbie - why does this not work?

2005-10-21 Thread Andy Pieters
While the use of () or not doesn't impede the function of his code, I consider it good programming habit to always add () to the class creator. Since it is considered a function, you wouldn't call a function like x=function but rather x=function(). It is more consistent that way. On Friday 21

[PHP] Designing a complicated multipage form with sessions

2005-10-21 Thread Andy Pieters
Hi List I am quite experienced in PHP. I have been asked to design a complicated form in php that spans multiple pages and has many subitems. For instance if they select one checkbox, more details are required in the form of a dropdown list or radio buttons. It would allow browsing the diffe

Re: [PHP] How can I count the usage of mail function in scripts?

2005-10-21 Thread Andy Pieters
Hi While it *is* possible to do what you ask for, it would be worthless. I can write from scratch a php script that * looks up the mx record for a given email address * connects to the mail server looked up * send the message. Since the SMTP protocol is fairly simple, I am sure many others can

Re: [PHP] PHP and files Upload

2005-10-21 Thread Andy Pieters
Hi As a security precaution, all uploaded files are automatically deleted when the script goes out of scope. Use the move_uploaded_file function to move the file somewhere else before your script ends. There are various other security precautions you have to consider. And by all means don't

Re: [PHP] Functions Returning large strings

2005-09-29 Thread Andy Pieters
Hi > I have a series of nested functions which return a large string (as apposed > to working on global string) , is this inefficient? Or is PHP clever enough > to just pass a pointer? > $large_string=fn_one(fn_two(fn_three(; PHP is by no means cleaver enough to read your mind as to what you

Re: [PHP] Error with DOMDocument->saveXML()

2005-09-29 Thread Andy Pieters
Hi > Fatal error: Method Document::__toString() must return a string > value in /srv/www/localhost/htdocs/db/index.php on line > 140 That's just what it says, check your program flow. You overrided the tostring function and somewhere in that new function you jump out of it because of a flag

Re: [PHP]PHP Syntax Notation

2005-09-27 Thread Andy Pieters
Hi As a complement to the answers you have had here I wish to ammend the following. The Run in the example is a function, and because this function is inside a Class object, it is called a method. A class is a set of variables (properties) and functions (methods) that you can create instances

Re: [PHP] Two MySQL connections in one script not working as expected

2005-09-27 Thread Andy Pieters
Hi Without you actually showing us these class files we can only guess but a common mistake is this: mysql_open(connection details) mysql_query(query) In those cases the last opened handle is used. To prevent this, use this syntax $db1=mysql_open(connection for db1); $db2=mysql_open(connecti

[PHP] Binary file upload with ftp

2005-09-27 Thread Andy Pieters
Hi all Is there someone with expierence on how to upload a binary file in php? I am using php 5 cli engine and the scripts keeps trowing errors, but only if the file is a binary. Text files upload without problem. It keeps telling me 'STOR' not understood. I tried putting in passiv mode and I

[PHP] New ocurrance of old problem. (FTP_PUT: 'STOR' not understood)

2005-09-25 Thread Andy Pieters
Hi all Having looked at the archives, they mention that the cause for this problem might be that the FTP_BINARY constant isn't transmitted to the the FTP module. I therefore adjusted my code to this: return ftp_put($this->ftphandle, $localfile, $remotefile,FTP_BINARY); Seeing as this fails al

[PHP] Bytecode

2005-09-21 Thread Andy Pieters
Hi all I came across some text that sais PHP compiles the script to bytecode prior to running it. Is this true, and is it possible to instead of .php source files, use those bytecodes files in distribution? With kind regards Andy -- Registered Linux User Number 379093 Now listening to Ra

Re: [PHP]

2005-08-29 Thread Andy Pieters
On Sunday 28 August 2005 19:26, Jan Broermann wrote: > _ > Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle > Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179 Lauffen sie scheissen!

Re: [PHP] Issue with generating asx playlist with php

2005-08-29 Thread Andy Pieters
On Monday 29 August 2005 16:09, Dan Rossi wrote: > ? I logged two different sess id's being created. Hi I have seen this behaviour as well, although in another context. The solution was to have the session_start instruction be one of the very first. In fact, in my software, the session_start i

[PHP] execution time of ';'

2005-07-30 Thread Andy Pieters
Hi all We develop our software with built-in debug handlers that are very talkative. Each class registers itself to a central debug handler. When a conditional define NODEBUG is set, that debughandler just does a return null but obviously it takes time to perform that call. We are thinking of

[PHP] snapshot

2005-07-27 Thread Andy Pieters
Hi all We just bought ourselfs a very basic windows station so that we can test our php and html applications on windows as well. For the html applications, a simple screen shot of how it looks in internet explorer is sufficient. I know how to handle http authentication, file uploads, streami

Re: [PHP] Ok, why is this happening...

2005-07-19 Thread Andy Pieters
Hi I admit not gone trough all of your code, but mostly this happens when mixing the string concatenation operator (.) with the addition (+) or substraction (-) operator. HTH With kind regards Andy On Tuesday 19 July 2005 19:26, John Nichel wrote: > Chris Boget wrote: > >>Chris Boget wrote:

Re: [PHP] Re: Tracking a mobile phone

2005-07-18 Thread Andy Pieters
Hi I did hear of a gps feature that's been tested here. Basically you subscribe to a service by your provider and then you choose where to forward the data. I've seen it in use in some company that tracks it's least selling representatives (with their approval, off course). With kind regards

Re: [PHP] Session has new id on 'some' pages.

2005-07-18 Thread Andy Pieters
Ok found the solution, seems like one page is on http://server.org.uk and the other on www.server.org.uk even though its the same server it generates a different session id! -- Registered Linux User Number 379093 -- --BEGIN GEEK CODE BLOCK- Version: 3.1 GAT/O/>E$ d-(---)>+ s:(+)>: a--(-)>?

[PHP] Session has new id on 'some' pages.

2005-07-18 Thread Andy Pieters
Hi all We have a extensive software that uses php session to store some very basic session information. ALL, and I do mean ALL files (except for globals.php) start like this: And the file globals.php starts with E$ d-(---)>+ s:(+)>: a--(-)>? C$(+++) UL>$ P-(+)>++ L+++>$ E---(-

[PHP] msdos date/time encoding in php?

2005-07-07 Thread Andy Pieters
Hi all I am trying to set the last modified date/time of individual files in a zip file. According to the specification (http://www.pkware.com/appnote.txt), date/time are two bytes each, and use standard msdos date/time encoding. Does anybody have a clue to this? With kind regards Andy -

Re: [PHP] mail:: very weird behaviour!

2005-07-03 Thread Andy Pieters
Ok, found out what was happening. It seems that if the message contains MIME syntax errors, actual behaviour of sendmail (or its php wrapper) is unspecified. Anyway, I forgot a semicolomn here and a linebreak there and whoosh! almost all of my hair pulled out! Thanks Andy -- Registered Lin

[PHP] mail:: very weird behaviour!

2005-07-03 Thread Andy Pieters
Hi all So I constructed the mail message with attachements and all, and when I echo the contents to the screen, I get the entire message as intended. But when the message is actually sent, it is NOT received the same! In one test, the base64 part contains different text from what I actually put

[PHP] mail()===false but msg is sent!

2005-07-02 Thread Andy Pieters
Hi all I have this situation where mail() returns a false status but the message is actually accepted AND reaches destination! The PHP Version is 4.3.10, the OS Linux So what I do is ( $header="header for multipart mime message"; $body="body with multipart mime message"; $result=mail("Name Fir

Re: [PHP] Question about HTTP 301 permanent redirects

2005-06-28 Thread Andy Pieters
On Wednesday 29 June 2005 00:31, Andy Pieters wrote: > Hi > > Actually you can get away with this: > > header("Location: $url",301); Well it looks like we all make typos Header("Location: $url",true,301); is more like it > This will let php generate the prop

Re: [PHP] Question about HTTP 301 permanent redirects

2005-06-28 Thread Andy Pieters
Hi Actually you can get away with this: header("Location: $url",301); This will let php generate the proper headers Also, and I stress this point (again and again), the http specification clearly states that location headers need to have a *fully qualified url* not a site-specific one. Failu

[PHP] Permission argh!

2005-06-19 Thread Andy Pieters
Hi all I am in the process of creating an installer for my php application. During the test proces, it does this: isdir(root)?>create dir root ok?>chmod 0777 isdir(root/child)?>create dir root/child ok?>chmod 0777 isdir(root/child/grandchild)?>create dir root/child/grandchild ok?>chmod 0777

[PHP] Complinging 4.2.0 on FC4 Test 3

2005-06-16 Thread Andy Pieters
Hi All I am trying to compile php 4.2 on Fedora Core 4 Test 3 The compilation throws this: make[1]: Entering directory `/home/kdedev/php-4.2.0' /bin/sh /home/kdedev/php-4.2.0/libtool --silent --mode=link gcc -I. -I/home/kdedev/php-4.2.0/ -I/home/kdedev/php-4.2.0/main -I/home/kdedev/php-4.2.0

[PHP] Howto implement atomical actions

2005-06-11 Thread Andy Pieters
Hi all I am developing a web interface to patch a program. The user uploads the patch and after uncompressing and verification of signature, the update should take place. However I do not want users to be able to start an update and then abort the process by stopping to load the page. I im

Re: [PHP] linux php editor... Quanta +... The best!

2005-06-06 Thread Andy Pieters
On Monday 06 June 2005 23:05, Rory Browne wrote: > Is there a particular reason why you changed the subject? It screws up > threads on some clients - including mine. Well I wanted it to stand out. Didn't realize it would break the threads though. I thought K-Mail put in additional headers to n

Re: [PHP] linux php editor... Quanta +... The best!

2005-06-06 Thread Andy Pieters
On Monday 06 June 2005 21:41, Clive Zagno wrote: > what php GUI editors do you recommend. Ive used bluefish before, any > other recommendations, thanks Hi I have been using Quanta + ever since I discovered it. Try it you'll like it too. Features include (but not limited to) code completion,

[PHP] What is faster?

2005-06-05 Thread Andy Pieters
Hi all Of these two expressions, which one is faster? if(!(is_null($customMenu)) && (is_array($customMenu))) $menu=$customMenu; else $menu=array('Documentation','Settings'); OR $menu=(!(is_null($customMenu)) && (is_array($customMenu))?$customMenu:$menu); Anybody have any documentation on

Re: [PHP] str_replace weird output

2005-06-02 Thread Andy Pieters
On Thursday 02 June 2005 09:52, [EMAIL PROTECTED] wrote: > But if I do that : > > $texte = 'cd' ; > $original = array('a', 'b', 'c', 'd', 'e', 'f', 'g'); > $modif = array ('c', 'd', 'e', 'f', 'g', 'h', 'i'); > $texte = str_replace($original, $modif, $texte) ; > echo $texte, ' ' ; > ?> > > The resu

Re: [PHP] Security check

2005-06-01 Thread Andy Pieters
On Wednesday 01 June 2005 22:33, you wrote: > > >elseif(count($_POST)>0) > > foreach($_POST as $key=>$value) > > if( ($key!=='login') && ($key!=='name') && ($key!=='pass') ) > > $hiddens.=<<<_hid_ > > \n\t > > _hid_; > > But what happened here? Why do you assume POST data is saf

Re: [PHP] Copy to network share

2005-06-01 Thread Andy Pieters
On Wednesday 01 June 2005 14:42, Jeff McKeon wrote: > > $dirhandle = opendir(server\\share); > Readdir($dirhandle); > > Chdir(server//share); > > Chdir(server\\share); > > Warning: chdir(): No such file or directory (errno 2) > > Is what I'm trying to do possible and if so, how? You s

[PHP] Security check

2005-06-01 Thread Andy Pieters
Hi all I just got the ok from the client pertaining the disclosure of parts of the code. Basically I made admin and a user must be loged in in order to access any file in that directory. (except index.php) Here is the file index.php LogedIn()) {$dest=PAGE_LOGIN_SUCCESS; $dest=getShopDest

[PHP] Free penetration test: my 2¢

2005-05-29 Thread Andy Pieters
nd that someone will take any and all oportunity to make an extra buck, but doing it this way is not very honest. Show your professionalism, add that disclaimer, people will respect you more for it. Thank you all for your help and thank you PHP! Keep up the good work With kind regards A

[PHP] CLI: unable to exec shell commands

2005-05-28 Thread Andy Pieters
Hi all I have several scripts that stoped working. All those scripts have in common that they call shell commands. To find out what was going on, I did a little test cat << "?>" | php exec test sh: /usr/local/php/bin/dir: No such file or directory As you can see it is trying to call sh with

Re: [PHP] Re: Free penetration test

2005-05-27 Thread Andy Pieters
On Saturday 28 May 2005 01:05, Chris W. Parker wrote: > Rasmus Lerdorf > > on Friday, May 27, 2005 11:58 AM said: > >>> You have all sorts of problems at that URL. To start with, here is > >>> a cross-site scripting hack: > > http://www.vlaamse-kern.com/yourstore-0.0

Re: [PHP] Re: Free penetration test

2005-05-27 Thread Andy Pieters
On Friday 27 May 2005 19:11, Rasmus Lerdorf wrote: > You have all sorts of problems at that URL. To start with, here is a > cross-site scripting hack: > > http://www.vlaamse-kern.com/yourstore-0.0.2-beta1/admin/?%22%3E%3Cscript%09 >src%3D%22http://3423329163/v Hi Thank you! I just saw the potent

[PHP] xml

2005-05-27 Thread Andy Pieters
Hi all I recently decided to switch to xml for the configuration of our programs. I am now looking for a good way to handle that xml data. Basically, what I am looking for is a functionality where I say Get tag x with attribute1=y, attribute2=z,..., read its contents and put it in an associati

[PHP] Very long delay posting to php-general (might be OT)

2005-05-24 Thread Andy Pieters
Hi all I was wondering if it is normal that when posting to the php-general list there is always a very long delay before messages are shown. It's not like with snail mail. Sending mail messages is instant so where is the delay? With kind regards Andy -- Registered Linux User Number 379

Re: [PHP] Can I prevent Server variables from being spoofed ?

2005-05-23 Thread Andy Pieters
On Friday 20 May 2005 20:46, Graham Anderson wrote: > Can the server variable 'user agent' be modified/spoofed by the user? I whish people would stop implementing these kinds of things! Question: do you deny access to your home because the person ringing the bell is African? Or maybe because

[PHP] Free penetration test

2005-05-23 Thread Andy Pieters
Hi all I am looking at where I can get my system tested for penetration. In case someone here would like to have a go This is the url http://www.vlaamse-kern.com/yourstore-0.0.2-beta1/admin/ It is actually a kind of CMS system so if someone gets in, create a page with the cms as proof. Kind

Re: [PHP] PHP and PayPal

2005-05-18 Thread Andy Pieters
PayPal alows you to check your system by the use of a Sandbox. They also have a forum where you can ask specific questions. With kind regards Andy Pieters Straight-A-Software -- Registered Linux User Number 379093 -- --BEGIN GEEK CODE BLOCK- Version: 3.1 GAT/O/>E$ d-(---)>+ s:(+)

Re: [PHP] debugger for CLI PHP scripts...?

2005-05-12 Thread Andy Pieters
On Thursday 12 May 2005 17:35, Christopher J. Bottaro wrote: > Is there such a thing? Hi Christopher Spoken as someone who actively uses PHP both in webpages, and for scripts on CLI, the only debugger I am aware of is Gubed (but that's only for PHP & Webbpages) Personally, I use the followin

Re: [PHP] Password encryption and password retrieval

2005-05-10 Thread Andy Pieters
Hi You are doing the right thing storing passwords encrypted! You may use any of the one way digest like secure hash 1 (sha1) or md5 or a combination to generate a hash. In case your user forgets his password, there is no way to reconstruct it. You need to provide an interface where the user

Re: [PHP] text with $

2005-05-09 Thread Andy Pieters
On Monday 09 May 2005 14:23, Martín Marqués wrote: > I have a text variable that contains "$" symbols, that when I pass it out > PHP thinks that the "$" mean that a variable name comes right after. > To include the string symbol in a variable, use the single quotes. $myvar='this is $$$ test'; And

Re: [PHP] Sending htm as it's being generated

2005-05-08 Thread Andy Pieters
On Sunday 08 May 2005 22:17, Kirsten wrote: I think you need to use ob_start first, then ob_flush on each update Haven't tested it, but I think it's like this: Note: I recommend using instead of <% %> (this is because not every php server will recognize the asp style tags. XXX " . $i++ . "

Re: [PHP] select statement

2005-05-08 Thread Andy Pieters
On Thursday 05 May 2005 10:10, Anasta wrote: > Why doesnt this work, it shows the username but not the balance of the > users money.here is the mysql table: > > include("connect.php"); > $uname=$_SESSION['username']; > $user_balance=mysql_query($sql); > $sql = "Select FROM users ,user_balance WHE

Re: [PHP] Re: Bug, erreurs ou non =?iso-8859-1?q?document=E9?=

2005-05-08 Thread Andy Pieters
On Wednesday 04 May 2005 22:47, Amir Mohammad Saied wrote: Bonjour Amir C'est liste est en Anglais. Cependant, la réponse: Il est necessaire de 'eschapper' le character '\' Au lieux d'ecrire '\', il faut ecrire '\\' Donc si le chemin est \\srvdfs00\partages\0-50\M7\05_APValidation\Forfa

Re: [PHP] Reducing size of htm output

2005-05-08 Thread Andy Pieters
On Friday 06 May 2005 19:59, Kirsten wrote: > I need to reduce the size of the HTM generated by a PHP script for faster > transmission. I'm actually using ob_start("ob_gzhandler") but I also need > some function to reduce the size of javascript blocks, deletion of > unnecesary blanks, etc. Hi Kir

Re: [PHP] I'm having a blond moment with a while loop???

2005-05-08 Thread Andy Pieters
On Sunday 08 May 2005 12:55, George Pitcher wrote: > Hi guys, > > I'm doing something dumb but I can't see it. > Actually you are doing many dumb things ;-) Please post your real code instead of pseudo. Then we'll have a look. And if possible append a "describe table" so we can see how your tab

Re: [PHP] Between Query (0T)

2005-05-08 Thread Andy Pieters
On Sunday 08 May 2005 15:20, Ryan A wrote: > Hi, > Sorry I know this is OT but I'm hoping someone will still help...it should > be quite simple :-) > I have a field in the database called "age" which is a DATE field. > > I also have a webform where the user can select between which ages he wants >

Re: [PHP] PEAR Packages

2005-04-21 Thread Andy Pieters
On Thursday 21 April 2005 17:04, [EMAIL PROTECTED] wrote: > Hmm... another project to add to my list of > projects that I'll never finish. haha Glad to know I'm not the only one. ;-) Andy -- Registered Linux User Number 379093 -- --BEGIN GEEK CODE BLOCK- Version: 3.1 GAT/O/>E$ d-(---)>+ s

Re: [PHP] formatting logic

2005-04-21 Thread Andy Pieters
Hi First, execute your query unset($fail); $res=mysql_query($sql,$dbhandle) or $fail=true; if( (isset($fail)) || (!(is_resource($res)) ) echo "There was a problem with the execution of the query"; if(mysql_num_rows($res)==0) echo "The query resulted in ZERO records"; #now that's out of the way

Re: [PHP] converting word document to plain text file

2005-04-20 Thread Andy Pieters
On Wednesday 20 April 2005 23:14, Cima wrote: > them. is there a way to these types of files in php or some other way? The easiest way is to tell your users you expect file format to be text only. You can test for mime type by using built-in php functions (and should do so!). The hard way me

Re: [PHP] Re: Abstract Legacy question [SOLVED]

2005-04-20 Thread Andy Pieters
On Wednesday 20 April 2005 23:36, Matthew Weier O'Phinney wrote: > > Since Class B overrides method guid, function x will call the method > from Class B. Thank you. Andy -- Registered Linux User Number 379093 -- --BEGIN GEEK CODE BLOCK- Version: 3.1 GAT/O/>E$ d-(---)>+ s:(+)>: a--(-)>? C+++

[PHP] Abstract Legacy question

2005-04-20 Thread Andy Pieters
Hi group This is kinda hard to say in words, so I'll give a little example Class A function x calls function guid function y function z function guid Class B extends A function y calls function x function guid So what I'm wondering is when class B calls its function Y, it will i

Re: [PHP] php and linux shell script

2005-04-15 Thread Andy Pieters
On Friday 15 April 2005 08:52, Balwant Singh wrote: > 2) i am also exploring possibilities of using linux dialog boxes (used in > shell scripting) with PHP. has anybody tried it, may please advise me how > to call dialog boxes through PHP in CLI. also please share with me if u > have information on

Re: [PHP] Mysql insert problems

2005-04-15 Thread Andy Pieters
Hi Whilst you are searching the net, you might also want to search for 'sql injection'. This is no joke! Please use the mysql_escape_string on each variable you get from the user side. In your example $Email = mysql_escape_string($_POST['Email']); $Phonenumber = mysql_escape_string($_POST['P

Re: [PHP] Installation problem of PhP5.0.4 on Fedora 2

2005-04-12 Thread Andy Pieters
On Tuesday 12 April 2005 00:28, Richard Lynch wrote: > If your httpd.conf has a line loading PHP4 in it, comment that out. > Actually it might be inside a conf file in the conf.d subdirectory cd /etc/httpd/conf.d for a in *.conf; do echo "File $a"; grep "php" $a; done Will point you in the right

[PHP] Bulletproof POST remove

2005-04-11 Thread Andy Pieters
Hi all I noticed some sites are able to remove POST data 100% of the time. Even if the user presses the back button there is no more POST data pressent. I would like to achieve the same thing and currently I use a location header to transfer the user to the same page. Like check post do act

Re: [PHP] sessions not being stored : DAY 2

2005-04-10 Thread Andy Pieters
On Saturday 09 April 2005 13:13, Burhan Khalid wrote: > Yuri Huitrón Alvarado wrote: > > running whoami in php returns : " root " You know you are crazy as hell running php as root don't you. I guess you use your root account all the time. It kinda defeats its purpose. You should add a user acco

Re: [PHP] Installation Warning?

2005-04-09 Thread Andy Pieters
On Friday 08 April 2005 20:27, [EMAIL PROTECTED] wrote: > > Anyone have any ideas on why it is suggesting NOT to use php and Apache > 2.0.x in a production environment? I'm planning on developing several large > apps for my company and expect 300-400 people to be hitting it throughout > the busines

Re: [PHP] Storing password in cookie

2005-04-08 Thread Andy Pieters
On Saturday 09 April 2005 02:18, Computer Programmer wrote: > What is a better way to store password in a cookie? > > md5()? > base64_encode()? > mhash()? > mcrypt_generic()? > crypt()? It doesn't matter how you encrypt it. DO NOT STORE PASSWORDS ON USERS COMPUTER I hope that's clear enough. Wh

Re: [PHP] Installation Warning?

2005-04-08 Thread Andy Pieters
Here is that faq url http://www.php.net/manual/en/faq.installation.php#faq.installation.apache2 Cheers Andy -- Registered Linux User Number 379093 -- Feel free to check out these few php utilities that I released under the GPL2 and that are meant for use with a php cli binary: http://www.vla

Re: [PHP] Extern Executions (Perl)

2005-04-08 Thread Andy Pieters
HI Suggestion 1: configure apache to parse files with php extension thru php binary Suggestion 2: place a shebang on the start of the php file like #! /usr/bin/php Suggestion 3: rewrite your script and have the php script call the perl ;-) Tada Andy On Friday 08 April 2005 07:

Re: [PHP] Command-line php in debian/woody

2005-04-06 Thread Andy Pieters
Hi You might want to download the php source and compile the cli binary yourself (Command Line Interface) It takes only little time compared to compiling it as an apache module Once you got thing setup, you can drop the php extension and just put a shebang like this #! /usr/bin/php At the s

Re: [PHP] To session or not to session [SOLVED]

2005-04-06 Thread Andy Pieters
Thank you all for your input. Andy -- Registered Linux User Number 379093 -- Feel free to check out these few php utilities that I released under the GPL2 and that are meant for use with a php cli binary: http://www.vlaamse-kern.com/sas/ -- -- PHP General Mailing List (http://www.php.net/) T

Re: [PHP] if question

2005-04-06 Thread Andy Pieters
On Wednesday 06 April 2005 10:47, William Stokes wrote: > Hello, > > I need to test if a variable value is 3 or 6 or 9 or 12 or 15 or 18 ... > goes on like this. > > How this can be done? > > Thanks > -Will switch($yourvar) {case 3: somestuff; break; case 6: somestuff;

[PHP] Anybody getting these also?

2005-04-05 Thread Andy Pieters
-- Forwarded Message -- Subject: Date: Wednesday 06 April 2005 07:30 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Thank you for contacting ActiveWire Inc! This is an automated response. Due to the enormous amount of SPAM (200+) emails per day, we have blocked this email add

Re: [PHP] To session or not to session

2005-04-05 Thread Andy Pieters
I forgot to mention some context related stuff. 1. This is for distribution, so wether or not session will actually be avaiable is something I cannot know. > Right now I am giving a trust factor of 80% to POST and 0% on GET. What > trust factor should I apply to SESSION 2. These trust factors

Re: [PHP] PHP 4.3/MySQL phpinfo()

2005-04-05 Thread Andy Pieters
On Tuesday 05 April 2005 23:35, Todd Cary wrote: > Does something have to be specially done with the FC 3 install? I kindly redirect you to google for LAMP which is short for Linux Apache MySQL PHP I have also learned to setup this kind of system on Fedora Core 3. While you CAN rely on the rpm

Re: [PHP] dynamic image will not print properly

2005-04-05 Thread Andy Pieters
To test, cstl.php?dk=somethinghere and try to print that? Maybe your browser is configured to NOT print images (or bakckground) ? Maybe your printer is textonly (just kidding) Tada Andy On Tuesday 05 April 2005 23:26, DuSTiN KRySaK wrote: > Hi there - I had my first crack at creating a dyn

Re: [PHP] MySQL empty row

2005-04-04 Thread Andy Pieters
On Monday 04 April 2005 18:45, Andy Pieters wrote: > After the ?> must be NO character, not even a CR or LF > Best way to check this is to put your cursor right next to the > and press > the left key.  If you r cursor moves then press left followed by del.  Keep > pressing the

Re: [PHP] MySQL empty row

2005-04-04 Thread Andy Pieters
charcters after the > are gone. With kind regards Andy Pieters Straight-A-Software On Monday 04 April 2005 16:57, Neo Theone wrote: > Until some time I could make a new empty line in mysql with this query: > INSERT INTO `".$_SESSION['type']."`() VALUES () > where

[PHP] Broken connection

2005-04-02 Thread Andy Pieters
s about in this context proved unsuccessfull I thank you for your time and bid you good day With kind regards Andy Pieters Straight-A-Software A young idealistic programmer -- Registered Linux User Number 379093 -- Feel free to check out these few php utilities that I released under the GP