Re: [PHP] ezmlm bounced email warnings - [was RE: [PHP] suspicious - maybe spam]

2005-03-09 Thread Mat Harris
On Wed, Mar 09, 2005 at 07:30:57AM -0800, Rob Tanner wrote:
 Every ezmlm mailing list I'm on does that periodically.  Lists that I'm
 on that use MailMan never seem to have that problem.  What then does
 that tell us about ezmlm...

i get the same thing toobut as i run my own mail server i know when mail
should've been bouncing and this wasn't it.

I am recieving other mail perfectly at the times these msgs should have 
bounced

aah MailMan is wy better...even if its python ;)

 
 --On Wednesday, March 09, 2005 09:53:35 AM -0500
 [EMAIL PROTECTED] wrote:
 
  Yeah, same here.  I thought it was my hosting service, but if other
  people are having the same issue then what's the deal?   Usually it's
  only a message or two, but sometimes it says there are like 8 or 9
  messages that bounced.   Has anyone looked into this or have any
  information regarding this?
  
  I was wondering of other emails were bouncing trying to get to me and
  just hadn't taken the time to follow up with my hosting company about
  it.
  
  -TG
  
  = = = Original message = = =
  
  Same here 
  
  
  Christo van Rooyen 
  
  
  -Original Message-
  From: Chris W. Parker [mailto:[EMAIL PROTECTED] 
  Sent: 08 March 2005 19:58
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Cc: Kevin; PHP General Mail List
  Subject: RE: [PHP] suspicious - maybe spam
  
  Richard Lynch mailto:[EMAIL PROTECTED]
  on Tuesday, March 08, 2005 9:54 AM said:
  
  Don't feel too bad.
  
  Every few weeks, I get an automated email from ezmlm warning me that 
  php-general messages have bounced, and I might be removed from the 
  list if it keeps up.
  
  Same here.
  
  
  ___
  Sent by ePrompter, the premier email notification software.
  Free download at http://www.ePrompter.com.
 
 
 
 -- 
 Rob Tanner
 UNIX Services Manager
 Linfield College, McMinnville OR
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

-- 
Before making criticism, try to walk a mile in their shoesthat way when
you do criticise them, you will be a mile away and wearing their shoes :)

Never knock on Death's door : ring the doorbell and run (he hates that). 


pgpjXLKhOyndC.pgp
Description: PGP signature


Re: [PHP] IDE recommendation-- (Free?)

2004-12-17 Thread Mat Harris
On Fri, Dec 17, 2004 at 08:20:36 -0500, GH wrote:
 Hi...
 
  I am looking for a FREE PHP IDE that uses syntax highlighting and
 code completion amongst other features...
 
 Do any of you have any recommendations... again I am looking for FREE
 (not much budget for me)?
 
 I use BOTH Linux and Windows

I can heartily recommend SciTE (http://www.scintilla.org/SciTE.html)
i believe it has the features you desire, plus, there is a version customised
for php, available here http://amip.tools-for.net/SciTE-CVS.exe

btw, there is a GTK+ version so you can use it on linux as well.

 Thanks
 Gary

hope this helps

mat

-- 
Cats land on their feet. 
Toast lands jellyside down.
A cat glued to some jelly toast will hover in quantum indecision 

perl -e'$_=q#: 13_2: 12/o{: 8_4) (_4: 6/2^-2; 3;-2^\2: 5/7\_/\7:\
1   m m::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'

Yes, of course it's the right cabl [le0: NO CARRIER]


pgpcUcPrglOn2.pgp
Description: PGP signature


Re: [PHP] Web Development Overnight!!!

2004-12-13 Thread Mat Harris
sorry, I know we shouldn't reply to this sorta crap, but:



On Mon, Dec 13, 2004 at 03:21:01PM +0100, info wrote:
 Dear php-general#64;lists.php.net,
 --
 
Act now and we'll even give you your own domain name 
(www.yourdomain.com) for FREE!!!  That's a $70 value 
at no extra charge!

$70!???!?

do they have a huge surcharge for .coms in the states? here in
the uk i can register one for literally 10% of that.

just my 2p

-- 
Cats land on their feet. 
Toast lands jellyside down.
A cat glued to some jelly toast will hover in quantum indecision 

perl -e'$_=q#: 13_2: 12/o{: 8_4) (_4: 6/2^-2; 3;-2^\2: 5/7\_/\7:\
1   m m::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'

Yes, of course it's the right cabl [le0: NO CARRIER]


pgp6mcjGhZGkJ.pgp
Description: PGP signature


Re: [PHP] Googlebot

2004-01-28 Thread Mat Harris
On Wed, Jan 28, 2004 at 11:51:06 -0500, Michael Mulligan wrote:
 Googlebot visits my site occasionally and follows a lot of my PHP links 
 with long query strings...

same here, google has been indexing my php site for over 3 years now :)

-- 
A Pope has a Water Cannon.   It is a Water Cannon.
He fires Holy-Water from it.It is a Holy-Water Cannon.
He Blesses it. It is a Holy Holy-Water Cannon.
He Blesses the Hell out of it.  It is a Wholly Holy Holy-Water Cannon.
He has it pierced.It is a Holey Wholly Holy Holy-Water Cannon.
He makes it official.   It is a Canon Holey Wholly Holy Holy-Water Cannon.

Yes, of course it's the right cabl [le0: NO CARRIER]


pgp0.pgp
Description: PGP signature


[PHP] hacking sf

2004-01-07 Thread Mat Harris
I have just downloaded the sourceforge source from sf.net and I am trying to
hack it witohut much luck.

The login mechanism just doesn't seem to work. It uses manually set cookies
instead of inbuild session stuff and I never got it to work like that. I don't
know exatcly why but the cookie just never gets set even tho the function is called
and there are no complaints.

I have put a tarball of the code on my site:
http://dev.genestate.com/projects/sf.tar.gz
Relevant code is in:
include/session.php
account/login.php
include/user.php

The login file calls session_login_valid() which
calls various functions including the set_cookie.

Please can someone give me a hint?

cheers


pgp0.pgp
Description: PGP signature


Re: [PHP] Re: hacking sf

2004-01-07 Thread Mat Harris
i noticed 'tpurdue' on the rcs tags above some very nice php code.

if he's still something to do with it, i'll give it a go.

everyone says sourceforge is hard to install, makes you wonder why such a slick
organisation would release such an unpolished source. suppose that they've got
to release it somehow.

i'll have a look at gforge now.

cheers

On Wed, Jan 07, 2004 at 12:25:18 -0200, Manuel Lemos wrote:
 Hello,
 
 On 01/07/2004 11:08 AM, Mat Harris wrote:
  I have just downloaded the sourceforge source from sf.net and I am trying to
  hack it witohut much luck.
  
  The login mechanism just doesn't seem to work. It uses manually set cookies
  instead of inbuild session stuff and I never got it to work like that. I don't
  know exatcly why but the cookie just never gets set even tho the function is called
  and there are no complaints.
  
  I have put a tarball of the code on my site:
  http://dev.genestate.com/projects/sf.tar.gz
  Relevant code is in:
  include/session.php
  account/login.php
  include/user.php
  
  The login file calls session_login_valid() which
  calls various functions including the set_cookie.
  
  Please can someone give me a hint?
 
 Sourceforge has always been an headache to install.
 
 You may want to try GForge instead, which is the continuation of the 
 project as Open Source carried by Tim Purdue, one of the lead developers 
   that left VA when they decided to close the source of further 
 Sourceforge development.
 
 http://gforge.org/
 
 -- 
 
 Regards,
 Manuel Lemos
 
 Free ready to use OOP components written in PHP
 http://www.phpclasses.org/
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


pgp0.pgp
Description: PGP signature


Re: [PHP] Re: hacking sf

2004-01-07 Thread Mat Harris
i have just had a look and although it looks very nice, it is restricted to PgSQL
which I do not use (MySQL only).

thanks for the suggestion tho Manuel, I am sure I will find a use for that
peticular project some other time :)

cheers

mat

On Wed, Jan 07, 2004 at 02:39:56 +, Mat Harris wrote:
 i noticed 'tpurdue' on the rcs tags above some very nice php code.
 
 if he's still something to do with it, i'll give it a go.
 
 everyone says sourceforge is hard to install, makes you wonder why such a slick
 organisation would release such an unpolished source. suppose that they've got
 to release it somehow.
 
 i'll have a look at gforge now.
 
 cheers
 
 On Wed, Jan 07, 2004 at 12:25:18 -0200, Manuel Lemos wrote:
  Hello,
  
  On 01/07/2004 11:08 AM, Mat Harris wrote:
   I have just downloaded the sourceforge source from sf.net and I am trying to
   hack it witohut much luck.
   
   The login mechanism just doesn't seem to work. It uses manually set cookies
   instead of inbuild session stuff and I never got it to work like that. I don't
   know exatcly why but the cookie just never gets set even tho the function is 
   called
   and there are no complaints.
   
   I have put a tarball of the code on my site:
   http://dev.genestate.com/projects/sf.tar.gz
   Relevant code is in:
 include/session.php
 account/login.php
 include/user.php
   
   The login file calls session_login_valid() which
   calls various functions including the set_cookie.
   
   Please can someone give me a hint?
  
  Sourceforge has always been an headache to install.
  
  You may want to try GForge instead, which is the continuation of the 
  project as Open Source carried by Tim Purdue, one of the lead developers 
that left VA when they decided to close the source of further 
  Sourceforge development.
  
  http://gforge.org/
  
  -- 
  
  Regards,
  Manuel Lemos
  
  Free ready to use OOP components written in PHP
  http://www.phpclasses.org/
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php




pgp0.pgp
Description: PGP signature


[PHP] php special permissions

2003-12-18 Thread Mat Harris
Hi,
 I am building a web interface to the vacation autoresponder program on linux.

 I let users login, edit their message and enable the autoresponder.

 The last step (enabling) is where the fun begins because php is run as apache on
 my box, and each users' .vacation.msg and .forward are not owned by apache.

 So you say, ok lets make apache run as group 'vacation' and also change the ownership
 on .vacation.msg and .forward.

 Well this makes sendmail cry out because it doesn't like having group-writable 
.forward
 files.


 How would you guys suggest i did this?

 I can post code if required.

-- 
Mat Harris
Network/Systems Administrator
Genestate


pgp0.pgp
Description: PGP signature


Re: [PHP] Re: php special permissions

2003-12-18 Thread Mat Harris
yes i've looked at sudo but for some reason, when I use sudo in a php
script, the messages file shows the sudo command failing, I believe it
was because sudo only works on a std term.

If this is not the case, I would be delighted.

On Thu, Dec 18, 2003 at 12:31:23 +, pete M wrote:
 Have u looked at sudo and sudoers
 
 http://www.courtesan.com/sudo/
 http://www.courtesan.com/sudo/man/sudoers.html
 
 regards
 pete
 
 
 
 Mat Harris wrote:
  Hi,
   I am building a web interface to the vacation autoresponder program on linux.
  
   I let users login, edit their message and enable the autoresponder.
  
   The last step (enabling) is where the fun begins because php is run as apache on
   my box, and each users' .vacation.msg and .forward are not owned by apache.
  
   So you say, ok lets make apache run as group 'vacation' and also change the 
  ownership
   on .vacation.msg and .forward.
  
   Well this makes sendmail cry out because it doesn't like having group-writable 
  .forward
   files.
  
  
   How would you guys suggest i did this?
  
   I can post code if required.
  
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Mat Harris
Network/Systems Administrator
Genestate


pgp0.pgp
Description: PGP signature


Re: [PHP] php special permissions

2003-12-18 Thread Mat Harris
Thanks for the reply but I have already tried the DontBlameSendmail options.

Either the flags are ignored or I am using the wrong combination (there are
several flags I believe). If there is a good sequence for those options
then I would love to know.

thanks

On Thu, Dec 18, 2003 at 06:42:37 -0600, Eugene Lee wrote:
 On Thu, Dec 18, 2003 at 12:24:21PM +, Mat Harris wrote:
 : 
 :  I am building a web interface to the vacation autoresponder program
 :  on linux.
 : 
 :  I let users login, edit their message and enable the autoresponder.
 : 
 :  The last step (enabling) is where the fun begins because php is run
 :  as apache on my box, and each users' .vacation.msg and .forward are
 :  not owned by apache.
 : 
 :  So you say, ok lets make apache run as group 'vacation' and also
 :  change the ownership on .vacation.msg and .forward.
 : 
 :  Well this makes sendmail cry out because it doesn't like having
 :  group-writable .forward files.
 
 DontBlameSendmail
 
   http://www.sendmail.org/tips/DontBlameSendmail.html
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Mat Harris
Network/Systems Administrator
Genestate


pgp0.pgp
Description: PGP signature


Re: [PHP] Re: php special permissions

2003-12-18 Thread Mat Harris
On Thu, Dec 18, 2003 at 08:30:32 -0500, David T-G wrote:
 Mat --
 
 [BTW, my gnupg could not find your public key.]

hmm, i'll look into it.

 ...and then Mat Harris said...
 % 
 % yes i've looked at sudo but for some reason, when I use sudo in a php
 % script, the messages file shows the sudo command failing, I believe it
 % was because sudo only works on a std term.
 
 Nope; it works anywhere.  It's much more likely that you need to create
 the proper sudoers file entry.  No, I'm not going to tell you how to do
 it because you should DEFINITELY understand the security ramifications of
 what you're proposing before you just drop something into place :-)
 

Don't worry, I do have experience with the sudo command/config, I will
investigate when I have a minute.

 
 % 
 % If this is not the case, I would be delighted.
 
 Here's hoping I've made your day :-)


me too :)


 
 HTH  HAND  Happy Holidays


and you, cheers

 :-D
 -- 
 David T-G  * There is too much animal courage in 
 (play) [EMAIL PROTECTED] * society and not sufficient moral courage.
 (work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
 http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
 



-- 
Mat Harris
Network/Systems Administrator
Genestate


pgp0.pgp
Description: PGP signature


Re: [PHP] chill out

2003-04-03 Thread Mat Harris
On Thu, Apr 03, 2003 at 01:20:01 +0800, Jason Wong wrote:
 On Thursday 03 April 2003 11:14, [EMAIL PROTECTED] wrote:
 
  We subscribe to a few email lists on various languages.
 
  This list would have to be the worst for anyone learning
  - the amount of sarcasm and flaming that goes on is huge.
 
 Try subscribing to the qmail list for a day or two.

better than that, try the openbsd-misc mailing list :)

-- 
Mat Harris  OpenGPG Public Key ID: C37D57D9
[EMAIL PROTECTED]   www.genestate.com   


pgp0.pgp
Description: PGP signature


[PHP] referer

2003-03-28 Thread Mat Harris
am i going mad or something?

i want to use the referer string from the server vars, but the
$_SERVER[REFERER] and $HTTP_SERVER_VARS[REFERER] vars are empty
and the phpinfo doesn't show the referer at all.

what's going on?

cheers

-- 
Mat Harris  OpenGPG Public Key ID: C37D57D9
[EMAIL PROTECTED]   www.genestate.com   


pgp0.pgp
Description: PGP signature


Re: [PHP] referer

2003-03-28 Thread Mat Harris
On Fri, Mar 28, 2003 at 04:19:25 -0500, Sebastian wrote:
 try: $_SERVER['HTTP_REFERER'];
 
 cheers,
 - Sebastian
 
 From: Mat Harris [EMAIL PROTECTED]
 
 | am i going mad or something?
 | i want to use the referer string from the server vars, but the
 | $_SERVER[REFERER] and $HTTP_SERVER_VARS[REFERER] vars are empty
 | and the phpinfo doesn't show the referer at all.
 | what's going on?
 | cheers
 

DOH!, I knew i was going mad. That's worked a treat!

cheers :)

-- 
Mat Harris  OpenGPG Public Key ID: C37D57D9
[EMAIL PROTECTED]   www.genestate.com   


pgp0.pgp
Description: PGP signature


Re: [PHP] imagejpeg and downloading images

2003-03-11 Thread Mat Harris
try using (i think) a content-disposition:attachement header

i am not in front of my machine so that will just have to be a rough guide,
sorry

On Tue, Mar 11, 2003 at 10:40:33 -0600, Doug Coning wrote:
 Hi All,
 
 I'm using the following code to try to download images automatically from a
 directory:
 
 header('Content-Type: image/jpeg');
 $im = imagecreatefromjpeg(001_SM77GR.jpg);
 imagejpeg($im,'',85);
 imagedestroy($im);
 
 I copied this code from PHP.net.  However, when I run the above code, it
 doesn't download the image, it just shows the image in the browser.  I'm
 using IE 6 for my browser.
 
 How I get PHP to download this image?
 
 Thanks!
 
 Doug Coning
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Mat Harris  OpenGPG Public Key ID: C37D57D9
[EMAIL PROTECTED]   www.genestate.com   

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] fopen

2003-03-05 Thread Mat Harris
that example code is trying to print out data which refers to the 
integer filehandle of the fopen. To get data out of the file that you 
have opened, you will need to read() it in.

John Taylor-Johnston wrote:
#http://www.php.net/manual/en/function.fopen.php

$contents = fopen (/home/pathto/file.txt, r);

if ($contents){echotextarea$contents/textarea;}
else{echo no contents there;}
Questions:
What is the use of @fopen?
Does anyone see a better way?



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: problem with ftp browsing

2003-02-26 Thread Mat Harris
i hae found many times that there can be significant differences between
commands of windows ftp server and grown up ftp servers.

It would be advisable to trap every piece of output you can as i took us
days last time to find the glich. no more windows for us

On Wed, Feb 26, 2003 at 01:50:24 +0100, Sascha Ende [GetContent] wrote:
 I have the same problem, too. But I didnt found out why...
 
 -- 
 MFG
 Sascha Ende
 Matt [EMAIL PROTECTED] schrieb im Newsbeitrag
 news:[EMAIL PROTECTED]
  I have a php script that is like and ftp client, only is just browsers the
  server and displays file names and folders.  If you click on the name of a
  folder that it displays, it will then display the files and folders inside
  that directory, and so on for all directories.  It works perfectly when I
  connect to my internet hosting company through ftp to browse, but it
 doesn't
  work right when I connect to my personal ftp server.  I have tried using
  both Serv-U and Bulletproof ftp servers to host my ftp site.  The script
  won't display my server correctly with either of these.  Can anyone give
 me
  some advice?  I would really appreciate it.  Thanks.
 
  Matt
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Mat Harris  OpenGPG Public Key ID: C37D57D9
[EMAIL PROTECTED]   www.genestate.com   


pgp0.pgp
Description: PGP signature


Re: [PHP] PHP Compile question ....

2003-02-17 Thread Mat Harris
i like to use to following with php 4.3.0. Note the $APACHE_PREFIX should be
changed:

./configure --prefix=/usr --with-apxs=$APACHE_PREFIX/bin/apxs --enable-debug=no 
--enable-safe-mode --with-mysql=/usr --with-regex=system --with-xml --with-imap 
--with-snmp --with-kerberos --with-imap-ssl --with-openssl --with-bz2 --with-db3 
--with-curl --with-png-dir=/usr --with-gd --with-gdbm --with-gettext --with-ncurses 
--with-jpeg-dir=/usr --with-mm --with-png --with-pspell --with-zlib --enable-ftp 
--enable-sockets --enable-track-vars --enable-trans-sid --enable-yp 
--enable-memory-limit --enable-calendar --enable-dbx

On Mon, Feb 17, 2003 at 05:02:00 +0100, James Hatridge wrote:
 
 Hi all...
 
 I just compiled PHP from source for the first time. It works, but not like I 
 want it to. I need it to work with Mysql, do graphs, and let me run programs 
 (ie safe-mode is off). Also the odd thing is that before I compiled my own 
 PHP I could access all my mysql databases. Now I can only access in a read 
 only mode. When I try to do any type of update I get either a blank screen or 
 PHP says that the DB is not there. I am able to access all my DBs at the 
 mysql command line without problem. 
 
 I think that my problems are with the options when I compile PHP. Can someone 
 give me an example of the options I need to make this work? 
 
 Thanks
 
 JIM
 -- 
 Jim Hatridge
 Linux User #88484
 --
  BayerWulf
Linux System # 129656
  The Recycled Beowulf Project
   Looking for throw-away or obsolete computers and parts
to recycle into a Linux super computer
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Mat Harris  OpenGPG Public Key ID: C37D57D9
[EMAIL PROTECTED]www.genestate.com   



msg97218/pgp0.pgp
Description: PGP signature


Re: [PHP] PHP Compile question ....

2003-02-17 Thread Mat Harris
no problem. the only thing i forgot to say is that this is on a redhat 7.3
machine and the libraries that are used by some of those options are from
redhat rpms. If you aren't using a similar version of redhat then you may
get messages about certain options missing headers etc.

up to you whether you fix them or forget them :)

On Mon, Feb 17, 2003 at 08:43:20 +0100, James Hatridge wrote:
 Thanks! I'll give it a shot in the morning!
 
 JIM
 
 On Monday 17 February 2003 18:19, Mat Harris wrote:
  i like to use to following with php 4.3.0. Note the $APACHE_PREFIX should
  be changed:
 
  ./configure --prefix=/usr --with-apxs=$APACHE_PREFIX/bin/apxs
  --enable-debug=no --enable-safe-mode --with-mysql=/usr --with-regex=system
  --with-xml --with-imap --with-snmp --with-kerberos --with-imap-ssl
  --with-openssl --with-bz2 --with-db3 --with-curl --with-png-dir=/usr
  --with-gd --with-gdbm --with-gettext --with-ncurses --with-jpeg-dir=/usr
  --with-mm --with-png --with-pspell --with-zlib --enable-ftp
  --enable-sockets --enable-track-vars --enable-trans-sid --enable-yp
  --enable-memory-limit --enable-calendar --enable-dbx
 
  On Mon, Feb 17, 2003 at 05:02:00 +0100, James Hatridge wrote:
   Hi all...
  
   I just compiled PHP from source for the first time. It works, but not
   like I want it to. I need it to work with Mysql, do graphs, and let me
   run programs (ie safe-mode is off). Also the odd thing is that before I
   compiled my own PHP I could access all my mysql databases. Now I can only
   access in a read only mode. When I try to do any type of update I get
   either a blank screen or PHP says that the DB is not there. I am able to
   access all my DBs at the mysql command line without problem.
  
   I think that my problems are with the options when I compile PHP. Can
   someone give me an example of the options I need to make this work?
  
   Thanks
  
   JIM
   --
   Jim Hatridge
   Linux User #88484
   --
BayerWulf
  Linux System # 129656
The Recycled Beowulf Project
 Looking for throw-away or obsolete computers and parts
  to recycle into a Linux super computer
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- 
 Jim Hatridge
 Linux User #88484
 --
  BayerWulf
Linux System # 129656
  The Recycled Beowulf Project
   Looking for throw-away or obsolete computers and parts
to recycle into a Linux super computer

-- 
Mat Harris  OpenGPG Public Key ID: C37D57D9
[EMAIL PROTECTED]www.genestate.com   



msg97253/pgp0.pgp
Description: PGP signature


[PHP] session storage

2003-01-13 Thread Mat Harris
i am writing a shopping site for training (just out of interest).

When a user clicks add to basket i want to check whether an item with 
that id is already in my session ($ALCOHOLE[items]), if so, redirect 
them the the view_cart page, if not then append it to the 
$ALCOHOLE[items] array as $key = $value pairs.

I have played around with all sorts of loops and sorts all day but still 
cannot get it sorted. Can anyone suggest where I am going wrong or has 
anyone got a better method they would care to suggest?

cheers.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] fopen with nasty pathnames

2003-01-12 Thread Mat Harris
Gerald Timothy Quimpo wrote:

On Sunday 12 January 2003 07:08 am, Mat Harris wrote:


Patti\ Smith/Horses\ \[1975\]/01-Gloria.mp3

but fopen will still refuse saying file not found. I have tried escaped
and unescaped amnd yes, I am very sure the file is there.

How can I get fopen to accept a path like this?



$in=fopen(a filename with spaces in it.mp3,r);

works for me.  how are you getting filenames?  it might be that it's
the directory reading functions that are giving you bad filenames.
(although, i just tried (not copy-pasted, so close but not exactly
what i tested):

   $dir=opendir(.);
   while(($dd=readdir($dir))!=false)
  print($dd\n);
   closedir($dir);

and that works for a directory that has files with spaces in them.
all filenames are printed, including the names that have spaces.

another possibility, are those backslashes just for displaying?  or
are they actually there in the filename on disk?  if the backslashes
are actual parts of the filename (they shouldn't be, but the world
is weird) then you'll need to escape them.  \\.

tiger



not escaping the filename worked. weird. i spend a good hour writing a 
function to make sure they were properly escaped. i thought i tried it 
this way before, but never mind.

thanks

--
Mat Harrison			Network Systems Administrator
[EMAIL PROTECTED]	www.genestate.com


msg92657/pgp0.pgp
Description: PGP signature


[PHP] fopen with nasty pathnames

2003-01-11 Thread Mat Harris
i have a database with unix path names of mp3s like:

Patti Smith/Horses [1975]/01-Gloria.mp3

which have to keep the spaces for part of another application. If i let 
the shell escape them from an ls command, i can get:

Patti\ Smith/Horses\ \[1975\]/01-Gloria.mp3

but fopen will still refuse saying file not found. I have tried escaped 
and unescaped amnd yes, I am very sure the file is there.

How can I get fopen to accept a path like this?

cheers.

--
Mat Harrison			Network Systems Administrator
[EMAIL PROTECTED]	www.genestate.com


msg92622/pgp0.pgp
Description: PGP signature


Re: [PHP] php.ini - changes aren't taking?

2003-01-06 Thread Mat Harris
have you restarted apache?

On Mon, Jan 06, 2003 at 10:26:13 -0600, Rad Craig wrote:
 I have been trying to get my email working.  I have made some changes in the
 php.ini file in the Windoze directory, but when I run phpinfo() the changes
 I make aren't changing on what it prints out.
 
 I have logging turned on in my php.ini file, but phpinfo() says it's turned
 off.
 
 Any ideas?
 
 Rad Craig
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Mat Harris  OpenGPG Public Key ID: C37D57D9
[EMAIL PROTECTED]www.genestate.com   



msg91771/pgp0.pgp
Description: PGP signature


Re: [PHP] Windows XP

2003-01-01 Thread Mat Harris
Stephen wrote:

Ok, this is very off topic but this is strange. I woke up this morning 
and turned on my computer like always, only today to find my normal 
Windows XP theme to be changed to the classic style and the normal style 
is gone, I can't change it back. Any ideas why and how to fix it maybe?
 
Oh, and happy new years from Indiana! ^_^

Thanks,
Stephen Craton
http://www.melchior.us
 
What's the point in appearance if your true love, doesn't care about 
it? -- http://www.melchior.us


off topic isn't the word, and please don't send mails is 'fancy mode'

--
--
Mat Harrison			Network Systems Administrator
[EMAIL PROTECTED]	www.genestate.com



msg91188/pgp0.pgp
Description: PGP signature


Re: [PHP] object vs functions

2002-12-28 Thread Mat Harris
thanks it does help a lot, and I wrote mine at 4:30ish too :).

does anyone know of any tutorials or example projects I can look at to find
out about classes?

thanks for the help

On Sat, Dec 28, 2002 at 04:17:02 -0500, Paul Reed wrote:
 Objects are not simply a 'grouping' of functions, it's a fundamentally
 different approach to programming where variable and functions are
 grouped into objects. (OOP, or Object Oriented Programming)
 
 Objects contain all the necessary variables to hold the information on
 an item, and all the functions that work on that particular item.
 
 A class is simply a 'blue-print' for an object. (each object is made
 from that blueprint.)
 
 Say for instance you were doing a used auto site, and this site had many
 cars of different makes and models, and you wanted to assign a different
 markup to each car.
 
 Class c_Car
 {
   var $make;
   var $model;
   var $color;
   var $cost;
   var $markup;
 
   function price()
   {
 // '$this-cost' means the $cost variable in the current object.
 $price=$this-cost+($this-cost*$this-markup);
 return $price;
   }
 }
 
 // so I have 2 cars
 
 $car1=new c_Car; 
 $car1-cost=1;// what the car cost you.
 $car1-markup=0.05;   // 5% markup from cost for this car.
 
 $car2=new c_Car;
 $car2-cost=7500; // what the car cost you.
 $car2-markup=0.10;   // 10% markup from cost for this car.
 
 echo $car1-price();  // output the price of car1, (10500).
 echo $car2-price();  // output the price of car2, (8250).
 
 As you can see, the function works internally to the object.
 
 To learn more, you should really read up on OOP. Overall it's an easier
 way to do most sites, but sometimes a simple collection of functions in
 an include file may be more practical (usually for sites with very
 little PHP).
 
 In the last few months, I have shifted my own programming techniques to
 use classes and I have found it tends to work better for almost every
 situation. Personally, I wish I had found out about them sooner!
 
 Hope this helps, (And I hope it makes sense, as I'm writing at 4:05am!)
 
 Paul Reed.
 
 
 
 
 
 
 -Original Message-
 From: Mat Harris [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, December 27, 2002 21:18
 To: [EMAIL PROTECTED]
 Subject: [PHP] object vs functions
 
 if i have a php script containing some functions, then all i have to do
 is
 include() the file and then call the functions.
 
 if i had an object (taking the example from php.net):
 
 ?php
 class foo
 {
   function do_foo()
   {
   echo Doing foo.; 
   }
 }
 
 $bar = new foo;
 $bar-do_foo();
 ?

 what is the point of having the object, when i could just call the
 functions?
 
 what are the uses of objects over functions/groups of functions?
 
 sorry if this is an innane or frequently asked question.
 
 -- 
 Mat HarrisOpenGPG Public Key ID: C37D57D9
 [EMAIL PROTECTED]  www.genestate.com   
 

-- 
Mat Harris  OpenGPG Public Key ID: C37D57D9
[EMAIL PROTECTED]www.genestate.com   



msg90840/pgp0.pgp
Description: PGP signature


[PHP] object vs functions

2002-12-27 Thread Mat Harris
if i have a php script containing some functions, then all i have to do is
include() the file and then call the functions.

if i had an object (taking the example from php.net):

?php
class foo
{
function do_foo()
{
echo Doing foo.; 
}
}

$bar = new foo;
$bar-do_foo();
?
 
what is the point of having the object, when i could just call the
functions?

what are the uses of objects over functions/groups of functions?

sorry if this is an innane or frequently asked question.

-- 
Mat Harris  OpenGPG Public Key ID: C37D57D9
[EMAIL PROTECTED]www.genestate.com   



msg90819/pgp0.pgp
Description: PGP signature


[PHP] strange echo() effect

2002-10-31 Thread Mat Harris
I have a small piece of code which does the following:

1) call a function to print an html header,
2) query a database to list the users in the db,
3) print an html footer.

problem is it print out the footer before the table, even though it is
called after. looking at the html source of the page in a browser, show that
the table is first, why is this happening? here is the code:

html_header();
echo table border=\1\ width=\80%\ cellpadding=\0\ cellspacing=\0\\n;
echo tr\n;
echo tdbuid/b/td\n;
echo tdbusername/b/td\n;
echo tdbpassword/b/td\n;
echo tdbsession id/b/td\n;
echo tdbemail address/b/td\n;
echo /tr\n;
$query = SELECT * FROM users LIMIT 0,30;
$result = mysql_query($query);
while ($query_data = mysql_fetch_row($result))
{
echo tr\n;
foreach ($query_data As $column)
{
echo \ttd$column/td\n;
}
echo /tr\n;
}
echo brbr\n;
html_footer();

-- 
Mat Harris  OpenGPG Public Key ID: C37D57D9
[EMAIL PROTECTED]matthewh.genestate.com  



msg83643/pgp0.pgp
Description: PGP signature


Re: [PHP] Re: strange echo() effect

2002-10-31 Thread Mat Harris
DOH! 

tail-betweek-legs

think i'll keep myself to myself from now on

/tail-betweek-legs

On Thu, Oct 31, 2002 at 09:32:41PM +0100, BAROILLER Pierre-Emmanuel wrote:
 You've forgotten the /table in your echo...
 html_header() and html_footer() put html in the right place in your page
 but, like you haven't close your table tag,
 the footer dans be everywhere in your page (depends on the web browser
 you're using)..
 
 Regards,
 P.E. Baroiller
 
 I have a small piece of code which does the following:
 
 1) call a function to print an html header,
 2) query a database to list the users in the db,
 3) print an html footer.
 
 problem is it print out the footer before the table, even though it is
 called after. looking at the html source of the page in a browser, show that
 the table is first, why is this happening? here is the code:
 
 html_header();
 echo table border=\1\ width=\80%\ cellpadding=\0\
 cellspacing=\0\\n;
 echo tr\n;
 echo tdbuid/b/td\n;
 echo tdbusername/b/td\n;
 echo tdbpassword/b/td\n;
 echo tdbsession id/b/td\n;
 echo tdbemail address/b/td\n;
 echo /tr\n;
 $query = SELECT * FROM users LIMIT 0,30;
 $result = mysql_query($query);
 while ($query_data = mysql_fetch_row($result))
  {
  echo tr\n;
  foreach ($query_data As $column)
   {
   echo \ttd$column/td\n;
   }
  echo /tr\n;
  }
 echo brbr\n;
 html_footer();
 
 -- 
 Mat Harris   OpenGPG Public Key ID: C37D57D9
 [EMAIL PROTECTED] matthewh.genestate.com
 
 Mat Harris [EMAIL PROTECTED] a écrit dans le message de news:
 [EMAIL PROTECTED]
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Mat Harris  OpenGPG Public Key ID: C37D57D9
[EMAIL PROTECTED]matthewh.genestate.com  



msg83657/pgp0.pgp
Description: PGP signature


[PHP] database stuff and conditions

2002-10-30 Thread Mat Harris
hi, i am a competant perl programmer of nearly a year and a half and I have
just this week started looking at php.

I am trying to write a couple of webpages that will allow me to update a
mysql database which is powering a dns server, for a dynamic dns service.

every time i have tried to grab some stuff from the database and check the
login or domain permissions, I get stuck in a mess of ifs and whiles.

can anyone give me an idead on the best method/starting place.

my database looks like this:

users -- pairs of usernames/user_ids
domains -- matches domainnames/domain_ids/passkeys to user_ids
records -- all the dns records. not got to this point yet.

the keys also have to be digetst::md5 encrypted to compare with those in the
database. I think i may need cookies for this so any help would be greatly
appreciated.

-- 
Mat Harris  OpenGPG Public Key ID: C37D57D9
[EMAIL PROTECTED]matthewh.genestate.com  



msg83347/pgp0.pgp
Description: PGP signature


Re: [PHP] database stuff and conditions

2002-10-30 Thread Mat Harris
attached is a dump of the mysql database. The passkeys are not on a per user
basis, but rather per domain. this can change if that is not good.



On Wed, Oct 30, 2002 at 03:36:58 +0100, Martin Hudec wrote:
 Hello Mat,
 
 MH hi, i am a competant perl programmer of nearly a year and a half and I have
 MH just this week started looking at php.
 
 I am the same but reversed ;)...just started perl :)
 
 MH I am trying to write a couple of webpages that will allow me to update a
 MH mysql database which is powering a dns server, for a dynamic dns service.
 
 sounds pretty easy for me
 
 MH every time i have tried to grab some stuff from the database and check the
 MH login or domain permissions, I get stuck in a mess of ifs and whiles.
 
 what kind of ifs and whiles? well when i am looking below to see
 tables in db i think user will log in...then he will see only his
 domains (identified by user_id) and he need to be able to modify them,
 delete them etc...am I right? Hmmm what kind of keys?...i cant see any
 password or something like that in users table, only user_ids
 (probably auto_incrementing PK) and usernames...hmmm
 
 MH can anyone give me an idead on the best method/starting place.
 
 MH my database looks like this:
 
 MH users -- pairs of usernames/user_ids
 MH domains -- matches domainnames/domain_ids/passkeys to user_ids
 MH records -- all the dns records. not got to this point yet.
 
 
 
 -- 
 Best regards,
  Martinmailto:corwin;corwin.sk

-- 
Mat Harris  OpenGPG Public Key ID: C37D57D9
[EMAIL PROTECTED]matthewh.genestate.com  



pdnstest.gz
Description: application/gunzip


msg83355/pgp0.pgp
Description: PGP signature


Re: [PHP] database stuff and conditions

2002-10-30 Thread Mat Harris
there is no real hurry on the app but obviously I can't afford the lay down
on the job. i would appreciate the help and especciallu the comments, but
only if you are sure you have the time.

this is the sort of options the user would have:

sign up user
login
create domain
delete domain
administer domain
update one A, one CNAME and one MX record

they shouldn't have control to add unlimited records, but maybe a way to
allow certain users to have certain limits. I hope I am not askin too much,
just say the word and we'll drop it.

thanks for all your help

mat

On Wed, Oct 30, 2002 at 04:08:05 +0100, Martin Hudec wrote:
 Hello Mat,
 
 I would recommend to not use passkeys in domains...rather in per user
 basis...it is better...one user can administer various domains i
 think..he will have to remember many passwordsor even if they are
 the same...you make passs key for each record in domain
 tableso more data storedhmmm...okay i am going home
 now,...will wait for while for your new mail...how fast you need this
 app to be done?
 
 I can make you whole app if you want...also ill include comments for
 you to see on things...just how fast you need it...and ..when user
 logs in he only needs to create, update and delete records right?
 
 anyway thanks for sql dump, itll help a lot :)
 
 -- 
 Best regards,
  Martinmailto:corwin;corwin.sk
 
 Wednesday, October 30, 2002, 3:55:28 PM, you wrote:
 
 MH attached is a dump of the mysql database. The passkeys are not on a per user
 MH basis, but rather per domain. this can change if that is not good.

-- 
Mat Harris  OpenGPG Public Key ID: C37D57D9
[EMAIL PROTECTED]matthewh.genestate.com  



msg83358/pgp0.pgp
Description: PGP signature