[PHP] More Apache than PHP

2003-03-01 Thread Timothy Hitchens \(HiTCHO\)
Greetings All...

Usually I am helping others on the list but this time I am asking for
help!!

I was wondering if someone could offer some clarity for me as
my years of using Apache has never seen the following as a possibility.

Background: This server is using PHP along with Apache

If a server (entire box) was I/O bound and wasn't coping with the load
then
would Apache simple close the connection (I think this) or serve a 404
error.

The reason for asking this is not that I have gone Mad but that a
consulting firm is trying to tell us that our server is I/O bound
and serving 404 errors.  I just can't see how.

Thanks to all.


Timothy Hitchens (HiTCHO)
Web Application Consulting
e-mail: [EMAIL PROTECTED]


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



RE: [PHP] Turn off PHP for certain directories?

2003-02-01 Thread Timothy Hitchens \(HiTCHO\)
If you don't use ?php tags in the file it won't make a huge different
if it is on or
off... but if you don't want any parsing see below.

In your .htaccess file do the following for the file types to be turned
off
and remember that this will be from here out in the doc tree:

AddType text/html .html .php



Timothy Hitchens (HiTCHO)
Web Application Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Benjamin Smith [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, 2 February 2003 3:32 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Turn off PHP for certain directories?


 Is it possible (using an apache directive, perhaps?) to turn
 off php parsing
 for certain directories within a site? (but not others?)

 I picture something like (in httpd.conf)

 directory /home/www/somesite.com/codearchive
  AllowOverride All
  Options FollowSymLinks
  NoParsePHP
 /directory

 Can this be done? How? Perhaps as a php_value entry in the
 VirtualHost
 directive?

 Thanks,

 -Ben

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


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




RE: [PHP] php and Mac running 8.6

2003-02-01 Thread Timothy Hitchens \(HiTCHO\)
If you are referring to php etc NO and for Zend NO.


Timothy Hitchens (HiTCHO)
Web Application Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Bobbi-Lea [mailto:[EMAIL PROTECTED]] 
 Sent: Sunday, 2 February 2003 2:30 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] php and Mac running 8.6
 
 
 Howdy ...
 
 I've just installed php, zend developer, mysqladmin, and 
 apache on my pc laptop.
 
 Are there any available for mac 8.6 ?
 
 cheers,
 
 bobbi-lea
 
 
 
 CyberFaerie
 media :: entertainment
 
 m::  0411 543 554
 e::   [EMAIL PROTECTED]
 a::   32 acland dr, strathpine, qld 4500
 
 
 This email and any files transmitted with it are confidential 
 and intended solely for the use of the individual or entity 
 to which they are addressed. If you have received this e-mail 
 in error you are prohibited from disclosing, copying or using 
 the information contained in it. If you have received this 
 email in error, please inform us by email reply and delete 
 the message and attached documents. This footnote also 
 confirms that this email message has been swept for the 
 presence of computer viruses. 
 
 


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




RE: [PHP] Email being blocked

2003-01-30 Thread Timothy Hitchens \(HiTCHO\)
The box does have a default route to get out of your network I trust??


Timothy Hitchens (HiTCHO)
Web Application Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Ben [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 30 January 2003 9:45 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Email being blocked
 
 
 No, its definitely not that. I've set the sendmail_from and 
 it's still not working.
 
 Also, the mail() function actually fails to return a success 
 code for the non-sitedomain addresses, implying that the 
 problem is at the source, not the destination.
 
 Can anyone help?
 
 Thanks
 
 Ben
 
 Lowell Allen [EMAIL PROTECTED] wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  From: Ben [EMAIL PROTECTED]
 
 [snip]
 
  I'm trying to send out emails from a script, using the mail() 
  function.
This
  works, but only for email addresses that are in the same domain as 
  the website !
 
  So, if the website domain that the script is running within  is 
  www.mysite.com, then
 
  [EMAIL PROTECTED] is fine
  [EMAIL PROTECTED] will not go
 
  The script is running on a Cobalt RaQ, Linux machine, with sendmail.
 
  Accessing sendmail from perl CGI presents no such difficulties, so I
assume
  its not a sendmail / firewall / OS problem.
 
  I have also tried talking to sendmail directly, from PHP, rather 
  than
using
  the mail() function, and have found that the same problem occurrs.
 
  Could it be something in PHP.INI ?
 

 The value of sendmail_from can affect the return path header and cause

 receiving systems to block as spam. There's a user contributed note in

 the
 manual: http://www.php.net/manual/en/ref.mail.php

 --
 Lowell Allen




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


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




RE: [PHP] need some guidance

2003-01-30 Thread Timothy Hitchens \(HiTCHO\)
If you are talking about a remote (out of your control) website then you
will need to compare HTML areas but
this could be a very hard process unless it is template/cms driven with
comments in the html source etc.

I would suggest you maybe tell us what website so we can see what the
source looks like.

Are you trying to pull out content bits or just show the areas inside of
your website??



Timothy Hitchens (HiTCHO)
Web Application Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Seth Hopkins [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, 31 January 2003 3:29 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] need some guidance
 
 
 Hey everyone.  I'm wondering if someone could lead me in the 
 right direction on this one.  What could I use to see if a 
 site has been updated and then display what has been added to it?
 
 Any advice is appreciated.
 Thanks.
 
 Seth
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] HELP please quickly

2003-01-22 Thread Timothy Hitchens \(HiTCHO\)
You first file just requires loading into an array and you can use
unique array functions to remove
duplicates etc..

The other files simply load into an array and use preg to strip out what
you want and follow the same
checking and removal of duplicates.

Checkout: preg_match and array functions in the www.php.net manual.



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Didier McGillis [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 22 January 2003 11:22 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] HELP please quickly
 
 
 Here is a brief description of what I want to do.  I want to 
 use PHP to grab 
 a list of numbers in one file.  Check it against a bigger 
 file and strip the 
 ones that match out of the bigger file, into a holding file.
 
 
 so here is what it might look like.
 
 file1.txt
 456789
 456790
 456791
 456792
 456793
 456794
 .
 
 file2.log
 some time stamp code=001;number=456784;name=blahblah;date=012403;
 some time stamp code=001;number=456785;name=blahblah;date=012403;
 some time stamp code=001;number=456786;name=blahblah;date=012303;
 some time stamp code=001;number=456789;name=blahblah;date=012503;
 some time stamp code=001;number=456789;name=blahblah;date=012503;
 some time stamp code=001;number=456789;name=blahblah;date=012503;
 some time stamp code=001;number=456789;name=blahblah;date=012503;
 some time stamp code=001;number=456789;name=blahblah;date=012503;
 some time stamp code=001;number=456790;name=blahblah;date=012603;
 some time stamp code=001;number=456791;name=blahblah;date=012703;
 
 notice there might be more then one of the same number, I 
 only need one so I 
 need to ignore the rest, rip out the time stamp, which is a 
 seperate line.
 
 file3.txt
 code=001;number=456789;name=blahblah;date=012503;
 code=001;number=456790;name=blahblah;date=012603;
 code=001;number=456791;name=blahblah;date=012703;
 
 can anyone help, any suggestions?
 
 
 
 
 
 _
 MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
 http://join.msn.com/?page=features/virus
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] NEED HELP URGENTLY

2003-01-22 Thread Timothy Hitchens \(HiTCHO\)
Global Variables are turned off!!! check php.ini!!



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Dale [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 23 January 2003 10:02 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] NEED HELP URGENTLY
 
 
 I SETUP THE PHP PARSE ENGINE ON ABOUT A YEAR AGO ON ONE OF MY 
 WEB SERVERS AND EVERYTHING WORKED JUST FINE. I, HOWEVER, 
 RECENTLY ACQUIRED A NEW SERVER AND TRIED TO SETUP PHP AGAIN 
 ON IIS 5.0 ON A WIN 2K SERVER PLATFORM. EVERYTHING SEEMS TO 
 BE WORKING CORRECTLY, BUT FOR SOME REASONS WHEN I TRY TO 
 ACCESS ANY VARIABLES PASSED FROM A HTML FORM, I ALWAYS GET AN ERROR.
 
 FOR EXAMPLE IF I HAVE A FORM THAT PASSES THE VARIABLE $ACTION 
 I GET THE FOLLOW ERROR WHEN I TRY TO ACCESS THE SAME VARIABLE 
 IN PHP PAGE:
 
 Notice: Undefined variable: action in 
 C:\...\otelzoo.com\cust_care.php on line 9
 
 I HAVE REINSTALLED THE PHP PARSER THREE TIMES NOW AND I HAVE 
 HAD NO LUCK IN GETTING RID OF THIS PROBLEM. I KNOW MOST 
 PEOPLE WILL JUMP TO THE CONCLUSION THAT THERE IS A SIMPLE 
 ERROR IN THE ACTUAL SOURCE CODE ITSELF, BUT I PROMISE YOU 
 THAT I HAVE BEEN PROGRAMMING IN THIS LANGUAGE FOR AT LEAST 
 TWO YEARS AND I AM 100% SURE THAT I AM PASSING THE VARIABLE CORRECTLY.
 
 PLEASE HELP.
 
 THANK YOU.
 - DALE
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] a simple getenv question....

2003-01-22 Thread Timothy Hitchens \(HiTCHO\)
The simplest way to start looking would be phpinfo() page for starters.


Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Jim Lucas [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 23 January 2003 10:15 AM
 To: Bruce Douglas; [EMAIL PROTECTED]
 Subject: Re: [PHP] a simple getenv question
 
 
 just copied your code and it worked fine for me.
 
 system: Apache 1.3.26
 PHP 4.2.2
 
 I would look into apache 2.0 and the env vars that are 
 available from it.
 
 
 - Original Message -
 From: Bruce Douglas [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, January 22, 2003 3:57 PM
 Subject: [PHP] a simple getenv question
 
 
  Hi...
 
  A simple question... In the following code:
 
  ?
 
  $ip = getenv(REMOTE_ADDR);
 
  echo  ip = .$ip;
 
  echo  ip =  . getenv(REMOTE_ADDR);
 
  echo  ip =  . getenv('REMOTE_ADDR');
 
  echo  ip = . $REMOTE_ADDR; --
 
  ?
 
  I can only seem to get the last line to display the correct value. 
  It's as if I can't seem to get/return any of the SERVER environment 
  variables
 using
  the getenv() function
 
  I'm using Apache 2.0.40, PHP 4.2.2 on Linux RedHat 8.0.
 
  I've checked through the PHP.INI file, but couldn't seem to 
 find why 
  this might be occuring. Any help/assistance would be 
 appreciated.
 
  thanks
 
  bruce
  [EMAIL PROTECTED]
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] a simple getenv question....

2003-01-22 Thread Timothy Hitchens \(HiTCHO\)
Do this:

?php

print_r($_SERVER);

?

If what you want is here this just use: $_SERVER['REMOTE_ADDR'] etc

You will need to have a look at the source of the output as the rendered
view will look a little strange.



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Bruce Douglas [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 23 January 2003 10:33 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] a simple getenv question
 
 
 phpinfo() returns everything as expected.. but not having the 
 code .. i don't know what internal method it uses to access 
 the information...
 
 but thanks...
 
 -bruce
 
 
 -Original Message-
 From: Timothy Hitchens (HiTCHO) [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 22, 2003 4:18 PM
 To: 'Jim Lucas'; 'Bruce Douglas'; [EMAIL PROTECTED]
 Subject: RE: [PHP] a simple getenv question
 
 
 The simplest way to start looking would be phpinfo() page for 
 starters.
 
 
 Timothy Hitchens (HiTCHO)
 Open Source Consulting
 e-mail: [EMAIL PROTECTED]
 
  -Original Message-
  From: Jim Lucas [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, 23 January 2003 10:15 AM
  To: Bruce Douglas; [EMAIL PROTECTED]
  Subject: Re: [PHP] a simple getenv question
 
 
  just copied your code and it worked fine for me.
 
  system: Apache 1.3.26
  PHP 4.2.2
 
  I would look into apache 2.0 and the env vars that are 
 available from 
  it.
 
 
  - Original Message -
  From: Bruce Douglas [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, January 22, 2003 3:57 PM
  Subject: [PHP] a simple getenv question
 
 
   Hi...
  
   A simple question... In the following code:
  
   ?
  
   $ip = getenv(REMOTE_ADDR);
  
   echo  ip = .$ip;
  
   echo  ip =  . getenv(REMOTE_ADDR);
  
   echo  ip =  . getenv('REMOTE_ADDR');
  
   echo  ip = . $REMOTE_ADDR; --
  
   ?
  
   I can only seem to get the last line to display the 
 correct value. 
   It's as if I can't seem to get/return any of the SERVER 
 environment 
   variables
  using
   the getenv() function
  
   I'm using Apache 2.0.40, PHP 4.2.2 on Linux RedHat 8.0.
  
   I've checked through the PHP.INI file, but couldn't seem to
  find why
   this might be occuring. Any help/assistance would be
  appreciated.
  
   thanks
  
   bruce
   [EMAIL PROTECTED]
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] PHP Sessions

2003-01-21 Thread Timothy Hitchens \(HiTCHO\)
What version of PHP are you using and do you have globals turned on?


Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Tim Thorburn [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, 21 January 2003 6:59 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] PHP Sessions
 
 
 Hi,
 
 After a day and a half of pounding my head against the wall I 
 believe I've 
 identified the source of the problem.  When I create and register the 
 session in my login page - it does not carry forward to any other 
 pages.  I've found this by going through several different 
 tutorials for 
 making password protected areas using PHP and Sessions that 
 I've found both 
 online and in books - all produce the same result on the server with 
 attitude - yet all work on all other servers I'm currently 
 using for my 
 hosting.
 
 So, since this is an eCommerce site for my client and they're getting 
 increasingly impatient with the progress made I'm left with 
 little choice 
 in this matter - as moving the site now would be unthinkable, 
 and tech 
 support at the hosting company is less than stellar, and 
 generally not in 
 English.  Are there any obvious PHP settings that I'd need to 
 adjust to 
 ensure that Sessions can be carried forward to additional 
 pages?  My only 
 other option now is to force my client to login to each 
 screen in the admin 
 area (conceivably this could mean the client would need to 
 log in to a 
 minimum of 8 different pages to observe their records and 
 make changes to 
 the site).
 
 I'm at the point of desperation and sleep deprivation ... If 
 there are no 
 obvious PHP settings that need to be altered - what else 
 could be producing 
 this problem?
 
 Thanks
 -Tim
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] DOWNLOAD

2003-01-21 Thread Timothy Hitchens \(HiTCHO\)
Create a script that reads the contents of a file after sending headers
eg:

header(Content-type: text/plain);
header(Content-Disposition: attachment; filename=downloaded.txt);
readfile(downloaded.txt);
exit();

The downloaded.txt can be any file subject to sending the correct
headers and IE
and other browsers will pop up a download (save) window.

See your mime.types file for headers for each file type.


Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Shaun van den Berg [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, 21 January 2003 4:39 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] DOWNLOAD
 
 
 Hi ,
 
 Im not sure if this can be done in PHP , i know PHP has 
 upload features ! Does it have download features , wat i mean 
 is the following : i want a link - click here to download - 
 when you click on it , the download dialog box must appear - 
 how do i do this ?
 
 Thanks
 Shaun van den Berg
 
 --
 Novtel Consulting
 Tel: +27 21 9822373
 Fax: +27 21 9815846
 Please visit our website:
 www.novtel.co.za
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] PHP Sessions

2003-01-21 Thread Timothy Hitchens \(HiTCHO\)
Are globals turned on or off.. I don't see that setting in your copy and
paste.

Are you trying to access the session vars as $name or
$_SESSION['name']??


Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Tim Thorburn [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, 21 January 2003 7:39 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; 
 [EMAIL PROTECTED]
 Subject: RE: [PHP] PHP Sessions
 
 
 Hi,
 
 I'm using PHP 4.1.2 on the server with problems - it's hosted 
 on a shared 
 server and thus I have no direct access to much of anything.  
 I have had 
 this script running on versions 4.0.6 thru 4.2.2 with no 
 problems until now.
 
 Here are the settings attained from phpinfo(); for the server 
 that does not 
 work - 4.1.2 ... and from the server that does work 4.2.2
 
 After the Configure Command of each is a list of settings that differ.
 
 Much thanks for responding so quickly and at such a late hour!!
 
 Thanks
 -Tim
 
 PHP 4.2.2 (works fine)
 
 './configure' '--with-apxs=/usr/local/apache/bin/apxs' 
 '--with-mcrypt' 
 '--enable-bcmath' '--enable-calendar' '--with-xml' 
 '--with-swf=/usr/local/flash' '--with-gd=../gd-1.8.4' 
 '--with-jpeg-dir=/usr/local' 
 '--with-imap=../imap-2001.BETA.SNAP-0107112053' 
 '--with-ming=../ming-0.1.1' 
 '--enable-magic-quotes' '--with-mysql' '--enable-safe-mode' 
 '--enable-track-vars' '--with-ttf' '--enable-versioning' 
 '--with-curl' 
 '--with-zlib'
 
 Settings:
 allow_call_time_pass_reference ON
 extension_dir ./
 magic_quotes_gpc ON
 register_argc_argv ON
 sendmail_from no value
 unserialize_callback_func no value
 variables_order EGPCS
 
 PHP 4.1.2 (doesn't work)
 
 './configure' '--prefix=/usr' '--with-apxs=/usr/sbin/apxs' 
 '--with-gd' 
 '--with-gettext=/usr' '--enable-safe-mode' 
 '--with-config-file-path=/etc/httpd' '--with-exec-dir=/usr/bin' 
 '--with-zlib' '--enable-magic-quotes' '--with-regex=system' 
 '--with-ttf' 
 '--with-db' '--with-gdbm' '--enable-mbstring' 
 '--enable-mbstr-enc-trans' 
 '--enable-track-vars' '--enable-wddx=shared' '--enable-mm=shared' 
 '--enable-xml' '--enable-ftp' '--disable-debug' 
 '--with-libdir=/usr/lib' 
 '--with-db3' '--with-interbase=shared' '--with-pgsql=shared' 
 '--with-ldap' 
 '--with-imap' '--with-curl=shared' '--with-pdflib=shared'
 
 Settings:
 allow_call_time_pass_reference OFF
 extension_dir /usr/lib/apache/php
 magic_quotes_gpc OFF
 register_argc_argv OFF
 sendmail_from [EMAIL PROTECTED]
 variables_order GPCS
 
 
 At 07:11 PM 1/21/2003 +1000, Timothy Hitchens \(HiTCHO\) wrote:
 What version of PHP are you using and do you have 
als turned on?
 
 
 Timothy Hitchens (HiTCHO)
 Open Source Consulting
 e-mail: [EMAIL PROTECTED]
 
   -Original Message-
   From: Tim Thorburn [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, 21 January 2003 6:59 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP] PHP Sessions
  
  
   Hi,
  
   After a day and a half of pounding my head against the wall I 
   believe I've identified the source of the problem.  When I create 
   and register the session in my login page - it does not carry 
   forward to any other pages.  I've found this by going through 
   several different tutorials for
   making password protected areas using PHP and Sessions that
   I've found both
   online and in books - all produce the same result on the 
 server with
   attitude - yet all work on all other servers I'm currently
   using for my
   hosting.
  
   So, since this is an eCommerce site for my client and they're 
   getting increasingly impatient with the progress made I'm 
 left with 
   little choice in this matter - as moving the site now would be 
   unthinkable, and tech
   support at the hosting company is less than stellar, and
   generally not in
   English.  Are there any obvious PHP settings that I'd need to
   adjust to
   ensure that Sessions can be carried forward to additional
   pages?  My only
   other option now is to force my client to login to each
   screen in the admin
   area (conceivably this could mean the client would need to
   log in to a
   minimum of 8 different pages to observe their records and
   make changes to
   the site).
  
   I'm at the point of desperation and sleep deprivation ... 
 If there 
   are no obvious PHP settings that need to be altered - what else
   could be producing
   this problem?
  
   Thanks
   -Tim
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 


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




RE: [PHP] DOWNLOAD

2003-01-21 Thread Timothy Hitchens \(HiTCHO\)
Change the link to form_download.php then create a file called
form_download.php and do this:

?php

header(Content-type: application/msword);
header(Content-Disposition: attachment; filename=form.doc); 
readfile(form.doc);
exit();

?

That will do it for you.

Also you should reply to all and include the list when replying so all
get to see
how to do these things.



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]


 -Original Message-
 From: Shaun van den Berg [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, 21 January 2003 8:19 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] DOWNLOAD
 
 
 Hi Timothy,
 
 I dont understand , im a rookie so go easy on me. I have a 
 form.doc file ! My code looks like this a 
 href=form.docclick to download/a, this was wat somebody 
 else told me to do , but when i click on the link it opens 
 the document in word rather than downloading it ? I dont 
 under stand these headers yet , do i need to configure the 
 ini file , can i do this with doc containing pics ect.
 
 Thanks
 Shaun
 
 - Original Message -
 From: Timothy Hitchens (HiTCHO) [EMAIL PROTECTED]
 To: 'Shaun van den Berg' [EMAIL PROTECTED]; 
 [EMAIL PROTECTED]
 Sent: Tuesday, January 21, 2003 11:44 AM
 Subject: RE: [PHP] DOWNLOAD
 
 
  Create a script that reads the contents of a file after sending 
  headers
  eg:
 
  header(Content-type: text/plain);
  header(Content-Disposition: attachment; filename=downloaded.txt); 
  readfile(downloaded.txt); exit();
 
  The downloaded.txt can be any file subject to sending the correct 
  headers and IE and other browsers will pop up a download (save) 
  window.
 
  See your mime.types file for headers for each file type.
 
 
  Timothy Hitchens (HiTCHO)
  Open Source Consulting
  e-mail: [EMAIL PROTECTED]
 
   -Original Message-
   From: Shaun van den Berg [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, 21 January 2003 4:39 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP] DOWNLOAD
  
  
   Hi ,
  
   Im not sure if this can be done in PHP , i know PHP has upload 
   features ! Does it have download features , wat i mean is the 
   following : i want a link - click here to download - when 
 you click 
   on it , the download dialog box must appear - how do i do this ?
  
   Thanks
   Shaun van den Berg
  
   --
   Novtel Consulting
   Tel: +27 21 9822373
   Fax: +27 21 9815846
   Please visit our website:
   www.novtel.co.za
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 


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




RE: [PHP] download script

2003-01-21 Thread Timothy Hitchens \(HiTCHO\)
I have never done a script that supports resume but this is the logic
you need to follow to work out the protocol behaviour.

- Create a download script as per below start downloading then stop the
web server.
- Change the script to e-mail you the headers from the script request.
- Restart the web server and tell Get Right to resume.

You should now know what it sends and you simply need to read in the
file to that point
in the data and start the stream again.

I hope this helps. (Trial and Error)


Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Martin [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 22 January 2003 12:50 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] download script
 
 
 i need a script that make downloads from files but it must 
 support resuming for getright and download acelerator pro. 
 Thanks... I have this classic download script , but does not 
 support resuming
error_reporting(0);
header(Last-Modified:  . gmdate(D, d M Y H:i:s T, 
 filemtime($filename)));
header(Accept-Ranges: bytes);
header(Content-Length:  . filesize($filename));
header(Content-Disposition: attachment; filename= . 
 $download);
 // header(Content-Type: application/octet-stream);
readfile($filename);
header(Connection: close);
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] str_replace an include

2003-01-21 Thread Timothy Hitchens \(HiTCHO\)
There a few ways of doing this but the following is one of the easier
and quickest off the
top of my head.

If you know the name of the tag and the include this will work if you
don't or want it to
be dynamic you will need to have some reg for the following. (how are
you getting the $string)?

// $string holds your html page you wish to replace

ob_start();

include('links.php');

$links = ob_get_contents();

ob_end_clean();

str_replace('!--linkTag--!', $links, $string);

echo $string;


I hope this gives you a direction.




Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: jesse [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 22 January 2003 1:05 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] str_replace an include
 
 
 Hello all,
 
 I'm trying to replace a tag with an include in a template 
 scenario.  For 
   example:
 
 str_replace(!--linkTag--!, include links.php, $string);
 
 This obviously doesn't work, but I'm wondering if anybody knows of a 
 good way to do this.
 
 Thanks a bunch,
 
 Jesse Lawrence
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Re: str_replace an include

2003-01-21 Thread Timothy Hitchens \(HiTCHO\)
Where are you getting $read from??

That should be $replace = new mainReplace(); // notice the brackets


Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: jesse [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 22 January 2003 1:38 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: str_replace an include
 
 
 Thanks a lot, I think that will be the trick, but I'm still 
 having a bit 
 of a problem.
 
 Here's my scenario:
 
 class mainReplace{
 
 function feedLinks(){
ob_start();
include('links.php');
$file = ob_get_contents();
ob_end_clean();
return $file;
 }
 }
 
 $replace = new mainReplace;
 
 $read = str_replace('!--feedLinks--!', 
 $replace-feedLinks(), $read); print $read;
 
 
 Unfortunately, this is not printing the results of the file include 
 where is should have been replaced.  If, however, I say:
   print $replace-feedLinks()
 it prints out the results.
 
 Any suggestions?
 
 Thanks again,
 
 Jesse Lawrence
 
 
 
 
 J Smith wrote:
  I'd recommend looking at the output buffering functions. Something 
  like this
  would probably work...
  
  ob_start();
  include(links.php);
  $file = ob_get_contents();
  ob_end_clean();
  
  The result of parsing and executing links.php will be in $file. Do 
  with it
  what you will.
  
  J
  
  
  Jesse wrote:
  
  
 Hello all,
 
 I'm trying to replace a tag with an include in a template 
 scenario.  
 For
   example:
 
 str_replace(!--linkTag--!, include links.php, $string);
 
 This obviously doesn't work, but I'm wondering if anybody 
 knows of a 
 good way to do this.
 
 Thanks a bunch,
 
 Jesse Lawrence
  
  
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Re: str_replace an include

2003-01-21 Thread Timothy Hitchens \(HiTCHO\)
I can't see what else to suggest just quickly.

- what about just as a function not a class??



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: jesse [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 22 January 2003 2:12 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Re: str_replace an include
 
 
 
 
 Timothy Hitchens ) wrote:
  Where are you getting $read from??
  
  That should be $replace = new mainReplace(); // notice the brackets
 
 $read is the contents of the file that I'm reading.  I 
 actually do have $replace = new mainReplace(); in my code, I 
 just forgot the brackets in 
 my last message;)
 
 
 
 
 
 
 
 
 

 
 
 
 
  
  
  Timothy Hitchens (HiTCHO)
  Open Source Consulting
  e-mail: [EMAIL PROTECTED]
  
  
 -Original Message-
 From: jesse [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, 22 January 2003 1:38 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: str_replace an include
 
 
 Thanks a lot, I think that will be the trick, but I'm still
 having a bit 
 of a problem.
 
 Here's my scenario:
 
 class mainReplace{
 
 function feedLinks(){
ob_start();
include('links.php');
$file = ob_get_contents();
ob_end_clean();
return $file;
 }
 }
 
 $replace = new mainReplace;
 
 $read = str_replace('!--feedLinks--!',
 $replace-feedLinks(), $read); print $read;
 
 
 Unfortunately, this is not printing the results of the file include
 where is should have been replaced.  If, however, I say:
   print $replace-feedLinks()
 it prints out the results.
 
 Any suggestions?
 
 Thanks again,
 
 Jesse Lawrence
 
 
 
 
 J Smith wrote:
 
 I'd recommend looking at the output buffering functions. Something
 like this
 would probably work...
 
 ob_start();
 include(links.php);
 $file = ob_get_contents();
 ob_end_clean();
 
 The result of parsing and executing links.php will be in $file. Do
 with it
 what you will.
 
 J
 
 
 Jesse wrote:
 
 
 
 Hello all,
 
 I'm trying to replace a tag with an include in a template
 
 scenario.
 
 For
  example:
 
 str_replace(!--linkTag--!, include links.php, $string);
 
 This obviously doesn't work, but I'm wondering if anybody
 
 knows of a
 
 good way to do this.
 
 Thanks a bunch,
 
 Jesse Lawrence
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
  
  
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Blueshoes App Framework

2003-01-21 Thread Timothy Hitchens \(HiTCHO\)
If you are looking for Frameworks make sure you select one that you
understand
the internals of not just because it will reduce your dev time as sooner
rather
than later something in the internals will fail and you will need to
deal with
it or your rapid dev becomes the slowest on the planet.

Also look at the overheads some of these frameworks create as you will
as long
as you continue to use it have those inherited overheads.



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Weston Houghton [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 22 January 2003 10:02 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Blueshoes App Framework
 
 
 
 Does anyone have any experience with or comments on 
 blueshoes? I've not 
 investigated it much, as the license seems a bit odd, but I 
 thought I'd 
 get some info on it if anyone had any, so far I haven't found anyone 
 who has tried it, which seems a tad weird to me.
 
http://www.blueshoes.org/

Cheers,
Wes


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


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




RE: [PHP] working with pop up windows

2003-01-21 Thread Timothy Hitchens \(HiTCHO\)
Post the results to the target being the parent window and have a
JavaScript self.close() call on the window on submit/click.


Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Peter Houchin [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 22 January 2003 11:13 AM
 To: php gen
 Subject: [PHP] working with pop up windows
 
 
 howdy all,
 
 a page with a link to a pop up window..
 when a user clicks on it a window opens with a little form on 
 it, now what i want to happen is when the user hits submit 
 and it does all of it's processing it
 
 1) closes the popup window
 2) updates the original page where the user first started 
 either by just a refresh or what eva.. and I can't just use 
 meta refreash as it's only on this instance that the page 
 needs to be refreashed ..
 
 TIA
 
 Peter
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Which country?

2003-01-20 Thread Timothy Hitchens \(HiTCHO\)
Yes and no... you can use whois information about the IP class or enlist
the services
from a GEO firm that provides database information that includes
information down to
and including Cities etc.

The accuracy of this type of service in some areas of the world is not
exactly accurate
but usable.

Look for PHP whois classes but remember that most registries restrict
the number of requests these
days.



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Martin Thoma [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, 20 January 2003 8:06 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Which country?
 
 
 Hello!
 
 Is there a way to get to know from which country a user is 
 calling the webside with my php-script?
 
 Martin
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Which country?

2003-01-20 Thread Timothy Hitchens \(HiTCHO\)
You could rely somewhat of the time zone codes as you refer to them, the
only issue is in some parts of the world
this would include 10 countries at a time.



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: -[ Rene Brehmer ]- [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, 21 January 2003 5:58 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Which country?
 
 
 Hi Timothy Hitchens (HiTCHO),
 
 Can't you also, atleast in IE, also ask the browser what 
 country the user is in??? I believe IE has a variable that 
 takes from the regional settings, which covers language and 
 format info for numbers ... but not sure you can pull it from 
 the web though  the MSDN library is a bit foggy in that respect...
 
 Rene
 
 On Mon, 20 Jan 2003 20:35:35 +1000, you wrote about RE: 
 [PHP] Which country? something that looked like this:
 
 Yes and no... you can use whois information about the IP class or 
 enlist the services from a GEO firm that provides database 
 information 
 that includes information down to
 and including Cities etc.
 
 The accuracy of this type of service in some areas of the 
 world is not 
 exactly accurate but usable.
 
 Look for PHP whois classes but remember that most registries 
 restrict 
 the number of requests these days.
 
 -- 
 Rene Brehmer
 
 This message was written on 100% recycled spam.
 
 Come see! My brand new site is now online! http://www.metalbunny.net
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




[PHP] Free PHP Hosting - Answered

2003-01-20 Thread Timothy Hitchens \(HiTCHO\)
We seem to get one every week of people asking about free PHP hosting so
I went looking
for all those people and found this off the link section from php.net:

http://www.oinko.net/freephp/



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]


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




RE: [PHP] login script fix help needed

2003-01-20 Thread Timothy Hitchens \(HiTCHO\)
Move this below to after your php logic:

html 
head 
titleAdd a User/title 
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1

/head 

body 



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED] 
-Original Message-
From: Karl James [mailto:[EMAIL PROTECTED]] 
Sent: Monday, 20 January 2003 1:59 PM
To: php
Subject: [PHP] login script fix help needed


hey guys,

I was wondering if you can see why i cant insert the info into a table,

right now its 

Warning: Cannot add header information - headers already sent by (output
started at /home/virtual/site12/fst/var/www/html/Create_Account.php:8)
in /home/virtual/site12/fst/var/www/html/Create_Account.php on line 10


http://www.ultimatefootballleague.com/Create_Account.phps

can anyone help me get this working thanks.
and let me know what i did wrong.

Karl



  IncrediMail - Email has finally evolved - Click Here


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




RE: [PHP] php.ini: how to load different ini file depending on host?

2003-01-19 Thread Timothy Hitchens \(HiTCHO\)
Inside each of the Virtual Host defs you can put most of the php_flag
etc settings just like:

php_admin_value disable_functions 'ob_start'
php_admin_value sendmail_path '/usr/sbin/sendmail -f
[EMAIL PROTECTED] -t -i'



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, 20 January 2003 12:28 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] php.ini: how to load different ini file 
 depending on host?
 
 
 On my web server (Apache) I have two sites and I would like 
 each site to 
 use a different php.ini.
 
 What is the correct way for me to have each site use it's own php.ini 
 file? I figure it's a setting in the apache conf file but I 
 can't figure 
 out which ...
 
 Thanks,
 
 Jc
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Changing order of just one array item?

2003-01-18 Thread Timothy Hitchens \(HiTCHO\)
This would do it:

?php

$first[] = 'hello';
$first[] = 'bye';

function swap($list, $first, $second)
{
$tempOne = $list[$first];
$list[$first] = $list[$second];
$list[$second] = $tempOne;  
}

swap($first, 0, 1);

print_r($first);

?


Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Leif K-Brooks [mailto:[EMAIL PROTECTED]] 
 Sent: Sunday, 19 January 2003 12:36 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Changing order of just one array item?
 
 
 I need to change where one item is ordered in an array.  I 
 know how to 
 sory an array, but I need to move one item up/down in the 
 array.  Example: $array is: 0 = element one 1 = element 
 two 2 = element three 3 = element four I call 
 array_order_up($array[1]) and $array is now: 0 = element 
 one 2 = element three 1 = element two 3 = element four
 
 If there aren't any native functions to do this, can anyone 
 think of a 
 way to make my own function to do this?
 
 -- 
 The above message is encrypted with double rot13 encoding.  
 Any unauthorized attempt to decrypt it will be prosecuted to 
 the full extent of the law.
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Meta Refresh Question (PHP)

2003-01-17 Thread Timothy Hitchens \(HiTCHO\)
It runs when you fix your (removed URL's and line endings) what is it
not doing?



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Edson Waite [mailto:[EMAIL PROTECTED]] 
 Sent: Saturday, 18 January 2003 11:09 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Meta Refresh Question (PHP)
 
 
 Hi All,
 
 Can anyone see a problem with this?
 
 ?php
 $TrialID = $colname_earlytour + 1;
  if ($TrialID = 5)
   {
 $NewID = $TrialID;
 $Page = test
 }
 else
   {
 $NewID = 1;
 $Page = newpage
 }
 ?
 
 html
 head
 titleAviation Hall of Fame/title
 meta http-equiv=Content-Type content=text/html; 
 charset=iso-8859-1 META HTTP-EQUIV=refresh CONTENT=15; 
 URL=?php echo $Page;?.php?ID=?php echo NewID;?
 
 Thanks,
 Edson Waite III
 http://www.airforcemuseum.com
 http://www.sportsvideooutlet.com
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] PHP Review Site

2003-01-17 Thread Timothy Hitchens \(HiTCHO\)
Please send plain text to e-mail lists NOT html:

Hmm now let me think:

http://www.hotscripts.com/



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED] 


-Original Message-
From: Stephen [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, 18 January 2003 11:40 AM
To: PHP List
Subject: [PHP] PHP Review Site


Hello,

I was just wondering if there were any PHP review sites that review free
and paid scripts? If so, where?

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


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




RE: [PHP] fit window to image

2003-01-16 Thread Timothy Hitchens \(HiTCHO\)
This can be achieved by using image features of php to get the size then
rewrite
your html or use JavaScript to do the same.


Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Ezequiel Sapoznik [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, 17 January 2003 11:38 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] fit window to image
 
 
 Hi!
 
 Is there anyway in php to fit the window to the size of an image?
 
 Thanks!
 
 Ezequiel
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] output sql

2003-01-16 Thread Timothy Hitchens \(HiTCHO\)
SELECT first_name AS first FROM clients

As you can see the first_name field will now be accessable as first.



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Paul Marinas [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, 17 January 2003 12:58 PM
 To: Ezequiel Sapoznik
 Cc: [EMAIL PROTECTED]
 Subject: [PHP] output sql
 
 
 
 Dose anyone know how can i do that:
 - select some data form a sql db and put it in a web page. 
 the problem is that i whant to change the value (name) of a 
 column that is selected form the database and then put in a 
 web page with the diferent name.
 
 Thanks, Paul
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] postfix instead of sendmail

2003-01-16 Thread Timothy Hitchens \(HiTCHO\)
I don't use postfix but as far as I know it is a drop in replacement and
you should just change the entry in php.ini

look for:

 ; For Unix only.  You may supply arguments as well (default: sendmail
-t -i).
 ;sendmail_path =


Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: HPS [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, 17 January 2003 11:50 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] postfix instead of sendmail 
 
 
 what should i do if i want to use PostFix in the php, but not 
 SendMail?
 
 thx very much
 HPS
 
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Session wierdness...

2003-01-15 Thread Timothy Hitchens \(HiTCHO\)
Now what is the output if you do this outside of the function after
registering a session var??


Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]


 -Original Message-
 From: Duncan Abbott [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 16 January 2003 4:53 AM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: RE: [PHP] Session wierdness...
 
 
 I did what you suggested and I've attached the output - 
 there's no $_SESSIONS array in there.
 
 But I've managed to register session vars outside of this 
 function I'm having trouble with so what's going on?
 
 Duncan
 
 -Original Message-
 From: Timothy Hitchens (HiTCHO) [mailto:[EMAIL PROTECTED]]
 Sent: 13 January 2003 10:04
 To: 'Duncan Abbott'; [EMAIL PROTECTED]
 Subject: RE: [PHP] Session wierdness...
 
 
 Do this for me:
 
 print_r($GLOBALS);
 
 and see if you have the $_SESSIONS array visible.. you will 
 need to view the output in a text editor as the print_r won't 
 look good rendered in the browser.
 
 
 Timothy Hitchens (HiTCHO)
 Open Platform Consulting
 e-mail: [EMAIL PROTECTED]
 
  -Original Message-
  From: Duncan Abbott [mailto:[EMAIL PROTECTED]]
  Sent: Monday, 13 January 2003 1:05 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Session wierdness...
 
 
  I can't seem to be able to set a session var from within a 
 function in 
  an include file
 
  I have a call to a function at the top of my doc (but after
  session_start()) and if I write the line: $_SESSION['userData'] = 
  test1; in the function body - it does nothing...
 
   but if I put this statement on the line above or below 
 the call 
  to the function, it works
 
  I've tried using session_register() instead but the same thing 
  happens. The block of code is definitely being executed.
 
  Someone please please help me, I'm going insane. Thanks...
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 


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




RE: [PHP] a href question

2003-01-14 Thread Timothy Hitchens \(HiTCHO\)
You are using singles ' then you are doing . and it should be  '.
etc

Try:

printf('trtda href='. $row1[url]
.'Fotografía%snbsp/a/td/tr', $i);


Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Ezequiel Sapoznik [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 15 January 2003 11:10 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] a href question
 
 
 Anyone can tell me what is wrong with the following sentence?
 
   printf('trtda href= . $row1[url] . Fotografía 
 %snbsp/a/td/tr', $i);
 
 if $row1[url] is ../images/anything.jpg
 
 the plain HTML should be:
 
 trtda href=../images/anything.jpg Fotografía/a/td/tr
 
 Thanks!
 
 Ezequiel
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Next and Previous

2003-01-14 Thread Timothy Hitchens \(HiTCHO\)
This is because you are at the beginning and you need to have some logic
to not display the previous if at beginning.



Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Miguel Brás [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 15 January 2003 11:06 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Next and Previous
 
 
 Hi,
 
 it's giving me an error. it assumes the next page as 
 news.php?ID=1 and the previous as news.php?ID=-1 Any hint for that?
 
 Miguel
 
 Chris Shiflett [EMAIL PROTECTED] escreveu na mensagem 
 news:[EMAIL PROTECTED]. yahoo.com...
  
 --- Miguel Brás [EMAIL PROTECTED] wrote:
 
   suppose, the page you're seeing is 
   http://www.x.com/news.php?ID=501 how to add a link 
 for the page 
   to show the ID=502 and the ID=500
 
  a href=news.php?ID=? echo $_GET['ID']+1; ?Next/a
 
  a href=news.php?ID=? echo $_GET['ID']-1;
  ?Previous/a
 
  Chris
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] attach image with the mail command?

2003-01-14 Thread Timothy Hitchens \(HiTCHO\)
You will need to read the file into an array using file() then
join/base64/split and then setup the right headers to attach the mime
encoded attachment.


Timothy Hitchens (HiTCHO)
Open Source Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 15 January 2003 11:10 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] attach image with the mail command?
 
 
 how can i attach an image with the mail command
 how do get the image in a variable when i have chosen it with 
 the input type file?
 
 Harry
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Can I Copy a directory using PHP?

2003-01-13 Thread Timothy Hitchens \(HiTCHO\)
If you are using Unix simply call out the shell using back ticks `mv xxx
xxx` or check out.

http://www.php.net/manual/en/function.exec.php



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Alex Ciurea [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, 13 January 2003 7:53 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Can I Copy a directory using PHP?
 
 
 Hello,
 
 I want to write a script that makes a backup of a database directory.
 
 Actually, to copy all database files to another directory.
 I've figured that I have to use the copy function of the 
 PHP, but the function doesn't works only with files?
 
 
 
 Is it possible to copy the entire directory to another 
 location, using PHP? I presume that is more 
 resource-friendly than to copy the directory file-by-file.
 
 
 Thanks and best regards,
 Alexoiul
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Session wierdness...

2003-01-13 Thread Timothy Hitchens \(HiTCHO\)
Do this for me:

print_r($GLOBALS);

and see if you have the $_SESSIONS array visible.. you will need to view
the output
in a text editor as the print_r won't look good rendered in the browser.


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Duncan Abbott [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, 13 January 2003 1:05 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Session wierdness...
 
 
 I can't seem to be able to set a session var from within a 
 function in an include file
 
 I have a call to a function at the top of my doc (but after 
 session_start()) and if I write the line: 
 $_SESSION['userData'] = test1; in the function body - it does 
 nothing...
 
  but if I put this statement on the line above or below 
 the call to the function, it works
 
 I've tried using session_register() instead but the same 
 thing happens. The block of code is definitely being executed.
 
 Someone please please help me, I'm going insane. Thanks...
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] attachment problem

2003-01-13 Thread Timothy Hitchens \(HiTCHO\)
So you have tried as per the manual:

header(Content-Disposition: attachment; filename=downloaded.pdf);

I use this all the time without issue.. do you have a shell that you can
use to wget -S and see if the correct headers are coming out??



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Lars Olsson [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, 13 January 2003 11:05 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] attachment problem
 
 
 Hi all!
 
 I'm writing a webmail application in PHP and most basic things are 
 working now. However, I've recently run into a problem 
 concerning mail 
 attachments. This is the situation right now:
 
 When the user opens a letter there are links to all attachments. The 
 links looks like this: 
 http://www.lassoweb.nu/webmail/attachment.php/mailbox=INBOXms
guid=218part=2

Mailbox is the mailbox name, msguid is the message number and part 
corresponds to the part of the letter that is an attachment. When the 
user clicks the link the attachment data is extracted from the message 
and displayed in the browser (if possible). This works nice, but here 
comes the problem. Since the document is named 'attachment.php', that's 
the name that comes up in the save box whenever the user tries to save 
the file. Iv'e tried setting the Content-Disposition header to tell the 
browser what to call the attachment, but to no avail. The browser still 
insists on calling all attachments 'attachment.php'!

I've been trying to figure this out for a couple of days now, but no 
luck yet. Perhaps someone out there have had the same problem (and 
solved it)?

I'm thankful for any hints


/Lars 'lasso' Olsson ([EMAIL PROTECTED])


PS. One solution might be to 'trick' the browser by creating a fake URL 
(like http://www.lassoweb.nu/webmail/void/bob.gif), but in order for 
this to work I need to tell Apache to send all requests to the 'void' 
directory to a single PHP file. Anyone knows how to set this up? DS.


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


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




RE: [PHP] attachment problem

2003-01-13 Thread Timothy Hitchens \(HiTCHO\)
What happens when you change the inline to attachment??

Also does this page have any errors in it... eg parsing ones that are
causing PHP to take over the headers and error out??



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Lars Olsson [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, 14 January 2003 7:15 AM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] attachment problem
 
 
 Yes, I've tried using the Content-Disposition header. It 
 doesn't seem to 
 work...here are the relevant parts of my code:
 
 snip
 // Change Content-Type so that it matches the MIME-type of the part
 header('Content-Type: ' . $type . '/' . $subtype);
   
 // Check if there is a name for the part
 if (isset($name)) {
   header('Content-Disposition: inline; filename=' . $name);
 }
 else {
   header('Content-Disposition: inline');
 }
 /snip
 
 I've tried printing $type, $subtype and $name and they all contain 
 correct values...still no luck.
 
 
 As per your suggestion I tried using wget -S to check the 
 headers. Here 
 are the results:
 
 C:\WINDOWS\Profiles\Lasso\Skrivbordetwget -S --spider 
 http://localhost/webmail/ 
 attachment.php?mailbox=INBOXmsguid=279part=2
 --21:59:30-- 
 http://localhost/webmail/attachment.php?mailbox=INBOXmsguid=279p
 art=2
 = `attachment.php@mailbox=INBOXmsguid=279part=2'
 Resolving localhost... done.
 Connecting to localhost[127.0.0.1]:80... connected.
 HTTP request sent, awaiting response...
   1 HTTP/1.1 200 OK
   2 Date: Mon, 13 Jan 2003 20:59:39 GMT
   3 Server: Apache/1.3.27 (Win32) PHP/4.2.3
   4 X-Powered-By: PHP/4.2.3
   5 Set-Cookie: PHPSESSID=12ab68cb5cd7355b2a63b9007bda0221; path=/
   6 Expires: Thu, 19 Nov 1981 08:52:00 GMT
   7 Cache-Control: no-store, no-cache, must-revalidate, post-check=0, 
 pre-check=0
 
   8 Pragma: no-cache
   9 Keep-Alive: timeout=15, max=100
 10 Connection: Keep-Alive
 11 Content-Type: text/html
 200 OK
 
 
 I'm VERY confused about line 11! The type (for this 
 particular request) 
 should be image/bmp (Mozillas Page Info tab confirms this). 
 Still, wget 
 claims it is text/html...hm...strange...now what?
 
 
 /Lars Olsson ([EMAIL PROTECTED])
 
 
 
 Timothy Hitchens ) wrote:
  So you have tried as per the manual:
  
  header(Content-Disposition: attachment; filename=downloaded.pdf);
  
  I use this all the time without issue.. do you have a shell 
 that you 
  can use to wget -S and see if the correct headers are coming out??
  
  
  
  Timothy Hitchens (HiTCHO)
  Open Platform Consulting
  e-mail: [EMAIL PROTECTED]
 


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




RE: [PHP] Write Image to Cache

2003-01-13 Thread Timothy Hitchens \(HiTCHO\)
Use the correct headers for no-cache see manual for starters:
 
http://www.php.net/manual/en/function.header.php http://www.php.net/ 
 
 

Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED] 

-Original Message-
From: Stephen [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, 14 January 2003 6:50 AM
To: PHP List
Subject: [PHP] Write Image to Cache


I have a chat script that refreshes the chat thing about every 5
seconds. The problem with it is emoticons. Each refresh, it makes the
images reload aswell which makes it do sort of a flicker. How could I
write the image to cache to make this stop happening or is there another
method that works better?


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




RE: [PHP] strip php tags from code ?

2003-01-12 Thread Timothy Hitchens \(HiTCHO\)
So you want to remove only the unparsed/raw php script blocks.

Why... are you displaying PHP without parsing??

If this is the case you can write a couple of very simple preg_replace
with a call
back and all is done.



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: David D [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, 6 January 2003 10:48 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] strip php tags from code ?
 
 
 I only want to keep html code of a page.
 I want to remove php tags.
 Some tell that strip_tags is not adapted.
 
 sample of what i want to do:
 html
 na
 ?php echo 'na';?
 /html
 -
 html
 na
 /html
 
 php tags can be :
 ? ?or ?= ?
 or script language='php'/script  /i
 
 Merci.
 
 
 
 ..
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] highlight keywords issue

2003-01-12 Thread Timothy Hitchens \(HiTCHO\)
You will need to break apart the entire document then process each area
inside of the
tags and to be very careful for nested tags.

The simplest way around I have found to do with is to add to tags that
have been processed
with attributes that are ignored by the browser renderer eg... a
href=/page.html done=yesPHP/a
as you can see the a href has been processed because I have added in a
extra attribute then continue
to process the entire page from my preg matches.

Nested tags are going to be your biggest issue.



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Hatem Ben [mailto:[EMAIL PROTECTED]] 
 Sent: Sunday, 12 January 2003 7:24 PM
 To: PHP List
 Subject: [PHP] highlight keywords issue
 
 
 Heya all,
 
 I'm trying to highlight search keywords in a string, 
 everything work expect when this keyword is inside a tag like this :
 
 keyword (php) :
 
 a href=?go=phpphp/a
 
 img src=php.gif border=0 alt=php.net
 
 will be highlighted to :
 
 a href=?go=b style=color: black; background-color: 
 #66php/bb
 style=color: black; background-color: #66php/b/a
 
 img src=b style=color: black; background-color: 
 #66php/b.gif border=0 alt=b style=color: black; 
 background-color: #66php/b.net
 
 I have tryed to separate text from html, then highlight it 
 then join html/text again, but this will be very long and not 
 really usefull !
 
 I'm using preg_replace :
 
 preg_replace('|\b('.quotemeta($keyword).')\b|iU', 'b 
 style=color: black;
 background-color: #66\\1/b', $content);
 
 Any help to fix that ?
 
 Thanks;
 Hatem
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Permission Denied

2003-01-12 Thread Timothy Hitchens \(HiTCHO\)
Did you use the umask(0) prior to the mkdir() in your script??


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Stephen [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, 13 January 2003 9:09 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Permission Denied
 
 
 Ok, I got it to make a directory as a absolute path but I'm 
 getting a Permission Denied error again. I'm running IIS so 
 I can't CHMOD and all the permission options are checked in 
 the options box.
 
 
 - Original Message -
 From: Jason Wong [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, January 12, 2003 4:03 AM
 Subject: Re: [PHP] Permission Denied
 
 
 : On Sunday 12 January 2003 10:10, Stephen wrote:
 :  There's already a folder named packs but my problem was 
 not having the /
 :  before it. One more question. How can I dynamically get 
 the path to the
 :  current folder? Like your at 
 http://www.bob.com/joe/index.php and you want
 :  to get the 
 http://www.bob.com/joe/ bit and do it dynamically?
 :
 : print_r($_SERVER) will show you which bits you can use.
 :
 : --
 : Jason Wong - Gremlins Associates - www.gremlins.biz
 : Open Source Software Systems Integrators
 : * Web Design  Hosting * Internet  Intranet Applications 
 Development *
 :
 : /*
 : I'll show you MY telex number if you show me YOURS ...
 : */
 :
 :
 : --
 : PHP General Mailing List (http://www.php.net/)
 : To unsubscribe, visit: http://www.php.net/unsub.php
 :
 :
 :
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] PHP/MySQL help?

2003-01-12 Thread Timothy Hitchens \(HiTCHO\)
Hmm from your code below:

FROM users WHERE 14 = '$0'

What is 14 it isn't a field I would hope!!


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Steven M [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, 13 January 2003 9:28 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] PHP/MySQL help?
 
 
 Hi Johannes
 
 Thanks for the help.  I have taken out the mysql_close() and 
 it looks like it is submitting ok (ie no error messages) but 
 it is not updating the database when i check it.  Any ideas?
 
 Thanks.
 
 Steven
 Johannes Schlueter [EMAIL PROTECTED] wrote in message 
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi Steven,
 
 On 
 Sunday 12 January 2003 23:58, Steven M wrote:
  include 'db.php';
 
  $result = mysql_query(SELECT newtest FROM users WHERE 14 = '$0');
  list($number) = mysql_fetch_row($result);
 
 Here you are closing your conenction to the MySQL-Server:
  mysql_close();
 
  if($number==0)
 
 But here you need it again:
  {mysql_query(UPDATE users SET points = '$+2' WHERE 14 = '$0'); 
  mysql_query(UPDATE users SET newtest = '$1' WHERE newtest = '$0');
 
 So remove the mysql_close() if it don't work: Post the error message!
 
 johannes
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] PHP/MySQL help?

2003-01-12 Thread Timothy Hitchens \(HiTCHO\)
You can't use numbers as vars:

$1 etc are illegal syntax for PHP



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Steven M [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, 13 January 2003 10:04 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] PHP/MySQL help?
 
 
 I thought i read somewhere that you could refer to the field 
 by number.  Was i wrong? It doesn't seem to make a difference 
 anyway.  It still doesn't work.  Here's the code with words 
 instead of numbers.  I'd be grateful if you could let me know 
 if there are any obvious errors.
 
 Best wishes.
 
 Steven M
 
 include 'db.php';
 
 $result = mysql_query(SELECT newtest FROM users WHERE 
 newtest = '$0');
 list($number) = mysql_fetch_row($result);
 
 if($number==0)
 {mysql_query(UPDATE users SET points = '$+2' WHERE newtest = 
 '$0'); mysql_query(UPDATE users SET newtest = '$1' WHERE 
 newtest = '$0');
 header(Location: redirect1.php);
 }
 elseif($number==1)
 {
 header(Location: redirect2.php);
 }
 else
 {
 header(Location: error.php);
 }
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] object in session security

2003-01-12 Thread Timothy Hitchens \(HiTCHO\)
It is viewable from the script only not the outside world eg the visitor
to the website
unless you output it.

Also you are better offer having your vars set by methods from a
constructor then you can
do what you just showed below.



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Hannes Smit [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, 13 January 2003 9:48 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] object in session  security
 
 
 Hello,
 
 Im building a object oriented webapplication with PHP. I know 
 PHP doesnt fully support OOP. I made a class called Database. 
 This class contains several variables. One of these vars is 
 the username and the password for the database. When i create 
 a Database object I want to register it in the applications 
 session, so it available through the whole app. Is this 
 secure? is it possible to view this variable from the 
 outside? To make it more secure i tried 'crypt()'. But this 
 doesnt work in this way:
 
 class Database{
  var $server=db.provider.com;
  var $username=myusername;
  var $password=crypt(8d3j22d);
  var $database=webshop;
 }
 
 it results in:
 
 Parse error: parse error, unexpected T_VARIABLE, expecting 
 T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}'
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Permission Denied

2003-01-12 Thread Timothy Hitchens \(HiTCHO\)
Who owns the htdocs root (I know it is Windows) when you right click you
should should see sharing/security.

Do you if not what OS Ver are you using?



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Stephen [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, 13 January 2003 1:36 PM
 To: [EMAIL PROTECTED]
 Cc: PHP List
 Subject: Re: [PHP] Permission Denied
 
 
 Yes, I just added it but same error:
 
 Warning: mkdir(c:\inetpub\wwwroot\phpiw\packs\bob) 
 [function.mkdir]: Permission denied in 
 c:\inetpub\wwwroot\phpiw\classes\class.cp.php on line 28
 
 Here's the part where I try and make the folder:
 
 function do_dir($package) {
  umask(0);
  if(mkdir($this-currentfolder().'packs\\bob', 0777)) {
 return true;
  } else {
   echo 'There is already a package by the name of 
 '.$package.'! Delete it and try again.brbr';
   return false;
  }
}
 
 Any ideas?
 - Original Message -
 From: Timothy Hitchens (HiTCHO) [EMAIL PROTECTED]
 To: 'Stephen' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Sunday, January 12, 2003 6:33 PM
 Subject: RE: [PHP] Permission Denied
 
 
 : Did you use the umask(0) prior to the mkdir() in your script??
 :
 :
 : Timothy Hitchens (HiTCHO)
 : Open Platform Consulting
 : e-mail: [EMAIL PROTECTED]
 :
 :  -Original Message-
 :  From: Stephen [mailto:[EMAIL PROTECTED]]
 :  Sent: Monday, 13 January 2003 9:09 AM
 :  To: [EMAIL PROTECTED]
 :  Subject: Re: [PHP] Permission Denied
 : 
 : 
 :  Ok, I got it to make a directory as a absolute path but I'm
 :  getting a Permission Denied error again. I'm running IIS so
 :  I can't CHMOD and all the permission options are checked in
 :  the options box.
 : 
 : 
 :  - Original Message -
 :  From: Jason Wong [EMAIL PROTECTED]
 :  To: [EMAIL PROTECTED]
 :  Sent: Sunday, January 12, 2003 4:03 AM
 :  Subject: Re: [PHP] Permission Denied
 : 
 : 
 :  : On Sunday 12 January 2003 10:10, Stephen wrote:
 :  :  There's already a folder named packs but my problem was
 :  not having the /
 :  :  before it. One more question. How can I dynamically get
 :  the path to the
 :  :  current folder? Like your at
 :  http://www.bob.com/joe/index.php and you want
 :  :  to get the
 :  http://www.bob.com/joe/ bit and do it dynamically?
 :  :
 :  : print_r($_SERVER) will show you which bits you can use.
 :  :
 :  : --
 :  : Jason Wong - Gremlins Associates - www.gremlins.biz
 :  : Open Source Software Systems Integrators
 :  : * Web Design  Hosting * Internet  Intranet Applications
 :  Development *
 :  :
 :  : /*
 :  : I'll show you MY telex number if you show me YOURS ...
 :  : */
 :  :
 :  :
 :  : --
 :  : PHP General Mailing List (http://www.php.net/)
 :  : To unsubscribe, visit: http://www.php.net/unsub.php
 :  :
 :  :
 :  :
 : 
 : 
 : 
 :  --
 :  PHP General Mailing List (http://www.php.net/)
 :  To unsubscribe, visit: http://www.php.net/unsub.php
 : 
 :
 :
 :
 
 


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




RE: [PHP] Png Could not find/open font

2003-01-12 Thread Timothy Hitchens \(HiTCHO\)
I would suggest that in your script it is using a font for a GD
operation
and you need to make sure that PHP know's how to find that font.


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Breno Cardoso Perucchi [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, 13 January 2003 4:37 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Png Could not find/open font 
 
 
 How I can resolve this ?
 This is my configuration of php (phpinfo)
 Somebody can help me ? This is very important
 GD
   GD Support  enabled
   GD Version  bundled (2.0 compatible)
   FreeType Support  enabled
   FreeType Linkage  with freetype
   GIF Read Support  enabled
   PNG Support  enabled
   WBMP Support  enabled
 
 Warning: Could not find/open font in 
 /usr/home/hosting/b4u/public_html/congressos/fenasoft/Programa
 caoListar.php
 on line 5
 ?PNG  IHDRj+¹¦ËPLTEÎÁ´Ï¿­ÊÈÈTÌÁ_%Y)IDATxocP 0( ~ 
 I×e¨Ä@ºcãQ]£ºFuê¢.*Yâ@uPIEND®B`,
 
 
 Breno
 [EMAIL PROTECTED]
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Sorry, PHP HTML

2003-01-11 Thread Timothy Hitchens \(HiTCHO\)
I don't see the problem I can run the script with one issue that the
comments are outside of PHP parsing.

The other issue is that you are closing off for PHP but not opening up
in the second block!!

** what are you errors exactly!! are they notices about variables???


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Denis L. Menezes [mailto:[EMAIL PROTECTED]] 
 Sent: Sunday, 12 January 2003 11:32 AM
 To: PHP general list
 Subject: [PHP] Sorry, PHP  HTML
 
 
 Hello friends.
 
 I have a database from which I take 2 variables as follows :
 $CompanyWebsite   
 $CompanyLogo
 
 I want to dynamically show two GIFs and when the user clicks 
 on these, they should go to  http://www.hotmail.com and 
 http://www.yahoo.com 
 respectively. I have problem only with 
 the displaying(the error is parse error on the lines 
 containing a tags), for which I use the folowing code. 
 Please tell me where I am wrong.
 
 ?php
 Print Organisation address   : 
 .$row[CompanyAddress]. br\n.; 
  Print Organisation website   : 
 .$row[CompanyWebsite].br\n. ; // I am 
 displaying this when testing only.
  Print Organisation logo   : 
 .$row[CompanyLogo].br\n. ;?   
 // I am displaying this when testing only.
 
  Print a href=http://www.hotmail.com;img 
 src=logos/constr12.gif width=100 height=100 
 border=0/a; Print a href=http://www.yahoo.com;img 
 src=logos/constr12.gif width=100 height=100 border=0/a; ?
 
 Thanks
 Denis
 


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




RE: [PHP] Amount of data in the database

2003-01-11 Thread Timothy Hitchens \(HiTCHO\)
Give this a go.. for each of the databases use:

SHOW TABLE STATUS FROM xx;

That will return a huge amount of size etc data!!



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Denis L. Menezes [mailto:[EMAIL PROTECTED]] 
 Sent: Sunday, 12 January 2003 2:58 PM
 To: PHP general list
 Subject: [PHP] Amount of data in the database
 
 
 Hello friends.
 
 I have a need for checking how much data(in kb) exists of 
 each of the user members in the MySQL so that when they 
 upload more data I can restrict/warn them of the amount of 
 data they have on the server at present.
 
 can anyone please tell me how to check the amount of data on 
 the mysql for each record?
 
 thanks very much
 Denis
 


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




RE: [PHP] Changing permissions with mkdir?

2003-01-11 Thread Timothy Hitchens \(HiTCHO\)
Hmm that is strange... chmod it after then:

http://www.php.net/manual/en/function.chmod.php



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Ben Cheng [mailto:[EMAIL PROTECTED]] 
 Sent: Sunday, 12 January 2003 2:56 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Changing permissions with mkdir?
 
 
 When I run mkdir(path to new dir, 0777); I get a directory that has 
 owner and group set to nobody and drwxr-xr-x permission.  How do I 
 get the permission to be set to drwxrwxrwx?
 
 -Ben
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Amount of data in the database

2003-01-11 Thread Timothy Hitchens \(HiTCHO\)
I haven't seen a way to get the size of an individual record.

What about using the max size of the fields in that table against number
of records eg:

255 char = x bytes etc etc = 156KB per record max



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Denis L. Menezes [mailto:[EMAIL PROTECTED]] 
 Sent: Sunday, 12 January 2003 4:10 PM
 To: [EMAIL PROTECTED]; 'PHP general list'
 Subject: Re: [PHP] Amount of data in the database
 
 
 Thanks Timothy.
 
 I want to find the amount of data for each member in the 
 database using PHP and displaying in a web page. I know how 
 to query records of a member and also know to display. Only I 
 need to know the command for finding the size(in bytes or kb) 
 for each of these records :Something like seeing the file 
 sizes of each email in hotmail.
 
 
 Thanks
 Denis
 - Original Message -
 From: Timothy Hitchens (HiTCHO) [EMAIL PROTECTED]
 To: 'Denis L. Menezes' [EMAIL PROTECTED]; 'PHP 
 general list' [EMAIL PROTECTED]
 Sent: Sunday, January 12, 2003 1:29 PM
 Subject: RE: [PHP] Amount of data in the database
 
 
  Give this a go.. for each of the databases use:
 
  SHOW TABLE STATUS FROM xx;
 
  That will return a huge amount of size etc data!!
 
 
 
  Timothy Hitchens (HiTCHO)
  Open Platform Consulting
  e-mail: [EMAIL PROTECTED]
 
   -Original Message-
   From: Denis L. Menezes [mailto:[EMAIL PROTECTED]]
   Sent: Sunday, 12 January 2003 2:58 PM
   To: PHP general list
   Subject: [PHP] Amount of data in the database
  
  
   Hello friends.
  
   I have a need for checking how much data(in kb) exists of each of 
   the user members in the MySQL so that when they upload 
 more data I 
   can restrict/warn them of the amount of data they have on 
 the server 
   at present.
  
   can anyone please tell me how to check the amount of data on the 
   mysql for each record?
  
   thanks very much
   Denis
  
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Make fil downloadable

2003-01-10 Thread Timothy Hitchens \(HiTCHO\)
You need to send headers to tell the browser how to handle it see:
header(); or.. if it is a php file and you want the visitor to
see/download the source you would be better off giving it another
extension eg .phps or .txt etc or have a handler file that did a
readfile after sending headers.


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED] 


-Original Message-
From: Stephen [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, 11 January 2003 10:17 AM
To: PHP List
Subject: [PHP] Make fil downloadable


I need to somehow make it so when a user clicks a link, then get
displayed the download dialogue for the file. The file is a .php file so
I'm not sure how this is done but I've seen it been done before. How can
you do this?

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


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




RE: [PHP] Make fil downloadable

2003-01-10 Thread Timothy Hitchens \(HiTCHO\)
eg:

a href=file.phpDownload File Click Here/a

Now in the file.php you have:

?php

header(Content-type: text/plain);
header(Content-Disposition: attachment; filename=xxx.php);;
// now we read the real file
readfile('xxx.php');

exit();

?

This won't put the headers into the downloaded file and remember to
change the xxx.php into the file
to be delivered and the xxx.php in the header to the name you would like
them to save as.

* the file.php in the top is not the real file but a script that reads
into the buffer the real file!!



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Stephen [mailto:[EMAIL PROTECTED]] 
 Sent: Saturday, 11 January 2003 10:29 AM
 To: Timothy Hitchens (HiTCHO)
 Cc: PHP List
 Subject: Re: [PHP] Make fil downloadable
 
 
 It's a dynamically created file the user downloads and uses 
 later as a PHP script. If I put header() in it, that would 
 make it downloadable again when the user uses it on his/her 
 server, wouldn't it?
 
 
 - Original Message -
 From: Timothy Hitchens (HiTCHO) [EMAIL PROTECTED]
 To: 'Stephen' [EMAIL PROTECTED]; 'PHP List' 
 [EMAIL PROTECTED]
 Sent: Friday, January 10, 2003 7:24 PM
 Subject: RE: [PHP] Make fil downloadable
 
 
 : You need to send headers to tell the browser how to handle it see:
 : header(); or.. if it is a php file and you want the visitor to
 : see/download the source you would be better off giving it another
 : extension eg .phps or .txt etc or have a handler file that did a
 : readfile after sending headers.
 :
 :
 : Timothy Hitchens (HiTCHO)
 : Open Platform Consulting
 : e-mail: [EMAIL PROTECTED]
 :
 :
 : -Original Message-
 : From: Stephen [mailto:[EMAIL PROTECTED]]
 : Sent: Saturday, 11 January 2003 10:17 AM
 : To: PHP List
 : Subject: [PHP] Make fil downloadable
 :
 :
 : I need to somehow make it so when a user clicks a link, then get
 : displayed the download dialogue for the file. The file is a 
 .php file so
 : I'm not sure how this is done but I've seen it been done 
 before. How can
 : you do this?
 :
 : 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
 :
 :
 : --
 : PHP General Mailing List (http://www.php.net/)
 : To unsubscribe, visit: http://www.php.net/unsub.php
 :
 :
 :
 
 


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




RE: [PHP] Make fil downloadable

2003-01-10 Thread Timothy Hitchens \(HiTCHO\)
Correct!... yes the source not interpreted raw!!

Isn't that what you wanted??


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Stephen [mailto:[EMAIL PROTECTED]] 
 Sent: Saturday, 11 January 2003 11:01 AM
 To: Timothy Hitchens (HiTCHO)
 Cc: PHP List
 Subject: Re: [PHP] Make fil downloadable
 
 
 Would this print the contents or the actual file for download?
 
 
 - Original Message - 
 From: Timothy Hitchens (HiTCHO) [EMAIL PROTECTED]
 To: 'Stephen' [EMAIL PROTECTED]
 Cc: 'PHP List' [EMAIL PROTECTED]
 Sent: Friday, January 10, 2003 7:47 PM
 Subject: RE: [PHP] Make fil downloadable
 
 
 : eg:
 : 
 : a href=file.phpDownload File Click Here/a
 : 
 : Now in the file.php you have:
 : 
 : ?php
 : 
 : header(Content-type: text/plain);
 : header(Content-Disposition: attachment; filename=xxx.php);;
 : // now we read the real file
 : readfile('xxx.php');
 : 
 : exit();
 : 
 : ?
 : 
 : This won't put the headers into the downloaded file and remember to
 : change the xxx.php into the file
 : to be delivered and the xxx.php in the header to the name 
 you would like
 : them to save as.
 : 
 : * the file.php in the top is not the real file but a script 
 that reads
 : into the buffer the real file!!
 : 
 : 
 : 
 : Timothy Hitchens (HiTCHO)
 : Open Platform Consulting
 : e-mail: [EMAIL PROTECTED]
 : 
 :  -Original Message-
 :  From: Stephen [mailto:[EMAIL PROTECTED]] 
 :  Sent: Saturday, 11 January 2003 10:29 AM
 :  To: Timothy Hitchens (HiTCHO)
 :  Cc: PHP List
 :  Subject: Re: [PHP] Make fil downloadable
 :  
 :  
 :  It's a dynamically created file the user downloads and uses 
 :  later as a PHP script. If I put header() in it, that would 
 :  make it downloadable again when the user uses it on his/her 
 :  server, wouldn't it?
 :  
 :  
 :  - Original Message -
 :  From: Timothy Hitchens (HiTCHO) [EMAIL PROTECTED]
 :  To: 'Stephen' [EMAIL PROTECTED]; 'PHP List' 
 :  [EMAIL PROTECTED]
 :  Sent: Friday, January 10, 2003 7:24 PM
 :  Subject: RE: [PHP] Make fil downloadable
 :  
 :  
 :  : You need to send headers to tell the browser how to 
 handle it see:
 :  : header(); or.. if it is a php file and you want the visitor to
 :  : see/download the source you would be better off giving 
 it another
 :  : extension eg .phps or .txt etc or have a handler file that did a
 :  : readfile after sending headers.
 :  :
 :  :
 :  : Timothy Hitchens (HiTCHO)
 :  : Open Platform Consulting
 :  : e-mail: [EMAIL PROTECTED]
 :  :
 :  :
 :  : -Original Message-
 :  : From: Stephen [mailto:[EMAIL PROTECTED]]
 :  : Sent: Saturday, 11 January 2003 10:17 AM
 :  : To: PHP List
 :  : Subject: [PHP] Make fil downloadable
 :  :
 :  :
 :  : I need to somehow make it so when a user clicks a link, then get
 :  : displayed the download dialogue for the file. The file is a 
 :  .php file so
 :  : I'm not sure how this is done but I've seen it been done 
 :  before. How can
 :  : you do this?
 :  :
 :  : 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
 :  :
 :  :
 :  : --
 :  : PHP General Mailing List (http://www.php.net/)
 :  : To unsubscribe, visit: http://www.php.net/unsub.php
 :  :
 :  :
 :  :
 :  
 :  
 : 
 : 
 : 
 


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




RE: [PHP] Suggestions on FAQ application?

2003-01-10 Thread Timothy Hitchens \(HiTCHO\)
It is a 30 minute write... not that hard!!


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Jeff Lewis [mailto:[EMAIL PROTECTED]] 
 Sent: Saturday, 11 January 2003 12:37 PM
 To: php-gen
 Subject: [PHP] Suggestions on FAQ application?
 
 
 I've checked Hotscripts and I can't findanything relatively 
 new or that suits my needs. I was wondering if anyone uses a 
 FAQ program that they could suggest?
 
 Jeff
 


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




RE: [PHP] HEEELP...please

2003-01-09 Thread Timothy Hitchens \(HiTCHO\)
You can get away without a include path set by ensuring that the path
is absolute eg:

If you have your data for your website as with FreeBSD in
/usr/local/www/data/
you then do the following to include:

** assume you have a lib directory in the /data/ area
** moving from platform to platform always has some impact on includes!!

include('/usr/local/www/data/lib/somefile.conf');

I hope this helps... the other way is to set the include paths etc!!



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, 10 January 2003 11:00 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] HEEELP...please
 
 
 I absolutely cannot understand the include_path directive.
 Can somebody, please, explain this?
 I have a situation that I find absolutely incomprehensible: I 
 moved my 
 experimental web-site from FreeBSD 4.5 running php4 v. 4.0 
 (or something), 
 apache 1.13 where thesite worked just fine to another box 
 with FreeBSD 4.7 
 running php4 v. 4.2.3, apache 1.13.27_1.
 All of a sudden, I get the message:
 Warning: Failed opening '/../lib/somefile.conf' for inclusion 
 (include_path='.:/usr/local/lib/php') in 
 /usr/local/www/html/index.php on 
 line 6
 
 I can find nothing in the httpd.conf files that could account 
 for this; 
 there is no configuration in them for include_path.
 
 Obviously, the php file is being parsed correctly, but there 
 is a problem 
 with the line :
 include $DOCUMENT_ROOT/../lib/somefile.conf.
 
 It works on one machine, but not on the latest version of 
 php4 an apache.
 
 I see there are others on the net who have had this problem, 
 but I have not 
 yet found an explanation or a cure.
 
 HELP please,
 
 PJ
 
 
   
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Medium to Large PHP Application Design

2003-01-09 Thread Timothy Hitchens \(HiTCHO\)
Many people develop their own framework which include classes /
functions etc.
We have build such a framework that includes authentication layers,
custom mark-up language,
advanced caching for data sets and templated content.

If you develop your application correctly you can build in caching and
replication
systems for enterprise operations.


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]


 -Original Message-
 From: Nick Oostveen [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, 10 January 2003 1:52 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Medium to Large PHP Application Design
 
 
 As PHP becomes more accepted in the corporate world, it is 
 only logical 
 that larger and more complex applications are going to be 
 developed using 
 it.  While there is an abundance of information out there 
 about making 
 specific things work, there seems to be a shortage regarding 
 the big picture.
 
 As such, my question is this: What methods and techniques can 
 be used to 
 help design and build complex, medium to large PHP 
 applications that are 
 not only scalable, but maintainable and extensible?  I'm 
 looking for online 
 references, personal experience and opinion and even examples of open 
 source code which you think demonstrate the above criteria on 
 this one.  I 
 think an extended discussion on this topic could be of great 
 benefit to 
 everyone.
 
 Obviously separating application and business logic from 
 interface code is 
 a given, but what about other things? Are the object 
 orientated facilities 
 of PHP currently worth really trying to take advantage of? If 
 so, what are 
 you doing to take advantage of them? Are design concepts such 
 as design 
 patterns relevant at this level?  What frameworks, if any, 
 currently exist 
 to assist in rapid, structured development, and what specific 
 benefits do 
 they bring to the table?
 
 These are just some of the questions that I'd like to see 
 expanded upon, 
 I'm sure there are others out there who can add more to the list.
 
 Nick Oostveen
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Converting Excel Spreadsheet to MySQL table ...

2003-01-09 Thread Timothy Hitchens \(HiTCHO\)
Native Excel.. good luck as it is a binary format. 

If you save it as a CSV version of the document then you have
many approaches to this issue.


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Adam Ferguson [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, 10 January 2003 4:05 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Converting Excel Spreadsheet to MySQL table ...
 
 
 Hello ...
 
 I was wondering if anyone had a good resource or code sample 
 for opening ( or accessing ) an excel spreadsheet using php.  
 I need to be able to convert a spreadsheet of products and 
 info to a table of products in a mysql database.  Also ... I 
 need to be able to perform this on a Linux machine.  Any help 
 would be great.
 
 Thanks guys!
 Adam Ferguson
 


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




RE: [PHP] searching for string inside document

2003-01-09 Thread Timothy Hitchens \(HiTCHO\)
Use Preg:

// put your html into $html

preg_match('/title(.*)\/title/Usi', $htlm, $title);

echo $title[1];

** very basic example


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Martin Hudec [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, 10 January 2003 3:22 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] searching for string inside document
 
 
 Hello,
 
 i have document in html and i want to get out string between 
 title tags to put it into another variable..
 
 i am wondering if i could use eregi() herebut how? I cant 
 figure out any possible way... same with strchr() and strstr()
 
 can anyone help me please?
 
 -- 
 Best regards,
  Martin  mail   [EMAIL PROTECTED]
  mobile +421.907.303.393
  icq34358414
  wwwhttp://www.corwin.sk
 
 PGP key fingerprint  21365ca05ecfd8aeb1cf19c838fff033
 
 In those days spirits were brave, the stakes were high, 
  men were real men, women were real women and small furry 
  creatures from Alpha Centauri were real small furry creatures 
  from Alpha Centauri.
 
 by Douglas Adams
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] searching for string inside document

2003-01-09 Thread Timothy Hitchens \(HiTCHO\)
Oops... 

// $htlm should have been $html

preg_match('/title(.*)\/title/Usi', $html, $title);

Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Timothy Hitchens (HiTCHO) [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, 10 January 2003 3:22 PM
 To: 'Martin Hudec'; [EMAIL PROTECTED]
 Subject: RE: [PHP] searching for string inside document
 
 
 Use Preg:
 
 // put your html into $html
 
 preg_match('/title(.*)\/title/Usi', $htlm, $title);
 
 echo $title[1];
 
 ** very basic example
 
 
 Timothy Hitchens (HiTCHO)
 Open Platform Consulting
 e-mail: [EMAIL PROTECTED]
 
  -Original Message-
  From: Martin Hudec [mailto:[EMAIL PROTECTED]]
  Sent: Friday, 10 January 2003 3:22 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] searching for string inside document
  
  
  Hello,
  
  i have document in html and i want to get out string between
  title tags to put it into another variable..
  
  i am wondering if i could use eregi() herebut how? I cant
  figure out any possible way... same with strchr() and strstr()
  
  can anyone help me please?
  
  --
  Best regards,
   Martin  mail   [EMAIL PROTECTED]
   mobile +421.907.303.393
   icq34358414
   wwwhttp://www.corwin.sk
  
  PGP key fingerprint  21365ca05ecfd8aeb1cf19c838fff033
  
  In those days spirits were brave, the stakes were high,
   men were real men, women were real women and small furry 
   creatures from Alpha Centauri were real small furry creatures 
   from Alpha Centauri.
  
  by Douglas Adams
  
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Is this possible with php?

2003-01-09 Thread Timothy Hitchens \(HiTCHO\)
So you want to be able to have a directory that when saved to it is
really the server well
besides ftp or samba integration into explorer the only other option you
have is to use
webdav with apache and that way it would be a post of sorts to the mod
webdav module in apache.



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, 10 January 2003 4:06 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Is this possible with php?
 
 
 I would like to know if the follwing function can be 
 implemneted in php with help of other tools:
 
 using MS Word in windows, when a file is saved, can it be 
 AUTOMATICALLY uploaded (via http POST or other mechanism) to a server?
 
 Currently I need to first save it on my desktop, then upload 
 that copy to a php-supported server.
 
 Thanks in advance.
 
 Tim
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] php stored in mysql

2003-01-09 Thread Timothy Hitchens \(HiTCHO\)
Please be aware that eval code is extremely hard to debug!!


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Paul Roberts [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, 10 January 2003 9:33 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] php stored in mysql
 
 
 I should have used
 
 return($price = $price - ($price *.1)); in the db
 
 and eval($str);
 
 Best Wishes  Happy New Year
 
 Paul Roberts
 [EMAIL PROTECTED]
 
 
 - Original Message - 
 From: Paul Roberts [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, January 09, 2003 10:29 PM
 Subject: [PHP] php stored in mysql
 
 
 Hi
 
 I want to store some discount codes in mysql, i was thinking 
 of putting
 
 $price = $price - ($price *.i);
 
 in a mysql field that can be looked up via the coupon number
 
 what's the best way to do this and return $price with the 
 discount applied.
 
 Thanks
 
 Best Wishes  Happy New Year
 
 Paul Roberts
 [EMAIL PROTECTED]
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Re: Double entry into MySQL..

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
I wish it was as simple as that but in the past it just hasn't always
worked!!


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Marek Kilimajer [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 8 January 2003 7:29 PM
 To: Timothy Hitchens (HiTCHO)
 Cc: 'Altug Sahin'; [EMAIL PROTECTED]
 Subject: Re: [PHP] Re: Double entry into MySQL..
 
 
 You should be able to get around it also by checking
 if $_SERVER[REQUEST_METHOD]=='HEAD'
 
 Timothy Hitchens (HiTCHO) wrote:
 
 When they first click on the file their browser will make a 
 request for 
 type, size etc then when it display's the dialog box on the 
 screen of 
 the client it will make another
 request to start the download.
 
 I get around this by putting the session id into the 
 database and if it 
 is double requested within 5 seconds to discard. So you will 
 need to do 
 a select, num_rows then if below 1 insert.
 
 
 Timothy Hitchens (HiTCHO)
 Open Platform Consulting
 e-mail: [EMAIL PROTECTED]
 
   
 
 -Original Message-
 From: Altug Sahin [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, 8 January 2003 2:07 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: Double entry into MySQL..
 
 
 Another strange behaviour... When I send the name of the file
 to be downloaded to this script, it works (still makes a 
 double entry into MySQL
 though) with GET method but it doesn't work if the file's 
 name is sent with the POST method.
 
 Why?  I am pulling my hair out here!!!
 
 Please help...
 
 Thanks again
 
 Altug Sahin [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
 
 Hi here,
 
 
   
 
 I am sending a file to user's browser and logging the 
 downloaded file
 
 
 into MySQL but everytime this script works, I see double
   
 
 entry in the
 
 
 MySQL table... Why is this happening?
 
 Any ideas?
 
 Thanks
 
 ?
  $today = date(Y-m-d);
 
  $conn = db_connect();
 
  if(!$conn)
   echo Can't connect to database...;
 
  $query = INSERT INTO track_dl (dldate, email, file)
 VALUES ('$today', '[EMAIL PROTECTED]', 'file.ext');
 
  $result = mysql_query($query);
 
  if(!$result)
   echo Can't execute query:  . mysql_error();
 
 header(Content-type: application/pdf); readfile(file.pdf); 
 exit(); ?
 
 
   
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 
 
   
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] uid checked by file_exists()

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
Have you checked your php.ini for a safe mode setting to true/on ??


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Emmanuel.Leguy [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 8 January 2003 7:49 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] uid checked by file_exists()
 
 
 Hello,
 
 I've just installed PHP 4.3.0. The 4.0.6 was installed 
 before. With the 
 new version, in safe mode, the 'file_exists' function produce 
 this warning:
 
 Warning: file_exists() [function.file-exists]: SAFE MODE 
 Restriction in 
 effect. The script whose uid is 302 is not allowed to access 
 /full/path/to/file.gif owned by uid 301 in 
 /full/path/to/script.php on 
 line 12
 
 I did not have this problem with version 4.0.6.
 
 Please help me!
 
 Thank you,
 
 
 Emmanuel.
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Re: EOF: how to generate one in a string

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
I would suggest you have a look at:

http://expect.nist.gov/



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 8 January 2003 8:24 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: EOF: how to generate one in a string
 
 
 I'm at wits end ... I've tried everything from system(), 
 shell_exec(), 
 bacticks, popen() and still no go ...
 
 I even tried writing the data to file first and then doing a 
 system(./prog 21  ./datafile) and that didn't work either.
 
 I know that it shoudl work b/c if from the command line I 
 issue the same 
 command (using the file created by PHP) it works fine.
 
 Can anyone offer advice on why I can't get PHP to execute 
 this external 
 program?
 
 Thanks!
 
 Jc
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Warning: Unlink failed (Permission denied) in

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
You are trying to delete/unlink a file with a php script.


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Kevin Meredith [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 8 January 2003 9:54 PM
 To: PHP
 Subject: [PHP] Warning: Unlink failed (Permission denied) in
 
 
 Please could someone let me know the cause of this error message
 Warning: Unlink failed (Permission denied) in 
 
 Regards
 Kevin
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] ftp_put: permission denied

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
I am assuming you have testing from a desktop client.

Are you sure that the PHP script has been logged in??

Can you see via a log file of the successful authentication??



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Oliver Witt [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 9 January 2003 4:53 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] ftp_put: permission denied
 
 
 Hi,
 I am running a really simple php script to upload files on my 
 server via ftp. But it always return this warning: ftp_put(): 
 Permission denied I can't have to do anything with CHMOD can 
 it? I mean it's ftp!! I don't know what else it is but I 
 guess it's a pretty common problem. Thx for any help, Olli
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] apache + mod_php question

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
use: apachectl graceful

It will reload the config's and allow operation to continue!!

See apachectl (help)

start  - start httpd
stop   - stop httpd
restart- restart httpd if running by sending a SIGHUP or start if
 not running
fullstatus - dump a full status screen; requires lynx and mod_status
enabled
status - dump a short status screen; requires lynx and mod_status
enabled
graceful   - do a graceful restart by sending a SIGUSR1 or start if not
running
configtest - do a configuration syntax test
help   - this screen




Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Hugh Beaumont [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 9 January 2003 5:14 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] apache + mod_php question
 
 
 Hello,
 
 I have searched the archives and not been able to find the 
 solution to 
 the following problem. I would be very grateful if someone 
 here could help or provide some pointers.
 
 The basic problem is this:
 
 Our apache server will not start if there are system 
 processes running that were spawned from apache's last 
 invocation (ie. spawned from cgi's, mod_php system() calls, 
 etc.). It dies with cannot bind to ip_address_here port 80, etc.
 
 
 Example:
 
 We restart our servers every so often via crontab in order to 
 reload modified conf files, etc.  However it appears that if 
 a user has spawned a process from mod_php, cgi, etc. that the 
 server will not restart until those processes are killed off 
 manually. 
 
 The worst cases are when badly wrote user scripts allow an 
 attacker to upload scripts that bind to a port and attempt to 
 make network access, etc. (I would love to disallow users 
 from having uploads to the server but 
 that is not currently an option).
 
 Does anyone have any suggestion on how to automagically kill 
 these processes?
 
 Does anyone have their own favorite recipe for 
 stopping/starting apache in an automated fashion.
 
 Right now these situations result in downtime for users and a 
 pager in the middle of the night to me! I would very much 
 like to stop this :)
 
 Thanks much!
 
 
 __
 Do you Yahoo!?
 Yahoo! Mail Plus - Powerful. Affordable. Sign up now. 
http://mailplus.yahoo.com

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


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




RE: [PHP] anyway to do a 'whos online' from session variable?

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
If you use a database for session management you have total control over
when and what is garbage collected and therefore extend / delete
whatever
anytime you want.


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Jeff Bluemel [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 9 January 2003 5:24 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] anyway to do a 'whos online' from session variable?
 
 
 ok - let me take that a step further - if I store the SID in 
 the table also are the files in the /tmp directory stored 
 with the SID?  if they are this may be a way I can delete out 
 inactive session, but be able to allow extended inactive 
 sessions for users who may be pulling lengthy reports...
 
 
 Timothy Hitchens ) [EMAIL PROTECTED] wrote in 
 message 007e01c2b6c4$4612d600$0500a8c0@bambino">news:007e01c2b6c4$4612d600$0500a8c0@bambino...
  Arr the garbage collection is based on a probability
  (session.gc_probability) and therefore it will clean
  up if you get enough hits to the server. Check the 
 documentation for 
  config of sessions.
 
  I use db for sessions with a check to ensure db is 
 available. (you can 
  then cleanup whatever you want)
 
 
 
  Timothy Hitchens (HiTCHO)
  Open Platform Consulting
  e-mail: [EMAIL PROTECTED]
 
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, 8 January 2003 1:11 PM
   To: Timothy Hitchens (HiTCHO)
   Cc: 'Jeff Bluemel'; [EMAIL PROTECTED]
   Subject: RE: [PHP] anyway to do a 'whos online' from session 
   variable?
  
  
  
  
   On Wed, 8 Jan 2003, Timothy Hitchens (HiTCHO) wrote:
  
Hmm... yes you could create an array of the files then
   check the last
mod stamp using stat (remember to reset stat).
   
Sessions are also cleaned up via the garbage collection system 
controlled via php.ini
  
How do you force garbage collection? I've written an application 
   using sessions for storage and there's been a session 
 sitting in my 
   /tmp directory for 2 days now, well over the 1440 seconds 
   expiration.
  
   Ed
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] ftp_put: permission denied

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
Using ftp_login() ??


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Oliver Witt [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 9 January 2003 5:30 AM
 To: [EMAIL PROTECTED]; Timothy Hitchens )
 Subject: Re: [PHP] ftp_put: permission denied
 
 
 Timothy Hitchens ) schrieb:
 
  I am assuming you have testing from a desktop client.
 
  Are you sure that the PHP script has been logged in??
 
  Can you see via a log file of the successful authentication??
 
 
 I logged in using the same information as I used to upload 
 that script.
 
 if ((!$conn_id) || (!$login_result)) {
 echo Not logged in;
 die;
 } else {
 echo Logged in;
 }
 
 That script returned Logged in.
 Olli
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] How Do I Return Values Across Servers

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
If I understand you want to be able to get a value from a script on
another server.

Well I would suggest a really each way would be to do have the calling
server call
a script on the supplying server using include(); which is supported but
please see
this page regarding URL fopen wrappers:

http://www.php.net/manual/en/function.include.php

Requests for includes and on the supplying server simply output the
value like:

?php

$answer = 'no';

?

If you do it this way it will be simply included and be available as a
variable instantly.

(**subject to security issues and speed)



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Bill Arbuckle, Jr. [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 9 January 2003 8:17 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] How Do I Return Values Across Servers
 
 
 This may be a no-brainer for everyone but me but ... I have 
 several php scripts residing on a web site on Server A.  In a 
 library file on Server A are misc. functions, some of which 
 query an underlying database and return a text string as the 
 result.  On another web site on Server B I would like to call 
 these functions to get the result without reinventing the 
 wheel so to speak.  So my question is ... How can I call a 
 function that returns a text string from Server A in a script 
 requiring that text during the processing of a web page on 
 Server B ... all in php?  Thanks in advance.
 
 Bill
 


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




RE: [PHP] strange problem (user poll)

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
You need to check like this:

if (isset($action)  $action == 'add')

AND if it is 4.1 + and global vars are turned off??

if (isset($_GET['action'])  $_GET['action'] == 'add')

** The above will need to changed if it is POST in the above example!!


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: - [ Paul Ferrie ] - [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 9 January 2003 8:43 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] strange problem (user poll)
 
 
 Can anyone see a problem in this?  When i run the script i am 
 getting this error Notice: Undefined variable: action in 
 C:\www\Apache2\htdocs\user_poll\2\addpoll.php on line 13
 
 ?
 // addpoll.php
 // Case Study 1: User Poll - Foundation PHP for Flash
 
 // If the form has been submitted...
 (line 13) if ($action == add) {
 // Include config file
 include('common.php');
 
 // Connect to database
 $link = dbConnect();
 
 // Get date for new poll
 $posted = time();
 
 // Build query to insert new poll
 $query = INSERT INTO polls (question, option1, option2, option3,
 posted)
   VALUES('$question', '$option1', '$option2', 
 '$option3', $posted);
 
 // Execute query
 $result = @mysql_query($query);
 
 // If query failed...
 if (!$result) {
 // Display error
 print font color=\#ff\Could not insert 
 poll/fontbr\n;
 } else {
 print font color=\#ff\Poll added/fontbr\n;
 }
 
 mysql_close($link);
 }
 ?
 please anyone
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] How Do I Return Values Across Servers

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
Issue you have is that if it is on another server you must you a http
etc transport to get it!!


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Bill Arbuckle, Jr. [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 9 January 2003 9:38 AM
 To: Timothy Hitchens (HiTCHO); [EMAIL PROTECTED]
 Subject: RE: [PHP] How Do I Return Values Across Servers
 
 
 Yes, I want to get a value from a script on Server A that 
 runs against a database on Server A, returning that value to 
 a script variable on Server B.
 
 I read the manual but must have missed something.  This is 
 what *seemed* as if it should work:
 
 Server A (containing functions and database)
 qotd.php
 
 ?php
 requireonce('miscfuncs.php');
 $qotd= qotd();
 ?
 
 ** qotd()is a f(x) in miscfuncs.php
 
 =
 Server B
 test.php
 
 ... HTML stuff
 
 ?php
 include 'http://www.servera.com/qotd.php';
 echo $qotd . \nbr\n;
 ?
 
 ... More HTML stuff
 
 With this setup I get the following error:  Warning: Failed 
 opening 'http://www.servera.com/qotd.php' for inclusion
 (include_path='.;c:\php4\pear') in 
 c:\webdev\kids\homebody.inc on line 27
 
 Any ideas?  I know that I am missing something here.
 
 Thanks,
 
 Bill
 
 
 
 -Original Message-
 From: Timothy Hitchens (HiTCHO) [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, January 08, 2003 4:45 PM
 To: 'Bill Arbuckle, Jr.'; [EMAIL PROTECTED]
 Subject: RE: [PHP] How Do I Return Values Across Servers
 
 
 If I understand you want to be able to get a value from a 
 script on another server.
 
 Well I would suggest a really each way would be to do have 
 the calling server call a script on the supplying server 
 using include(); which is supported but please see this page 
 regarding URL fopen wrappers:
 
http://www.php.net/manual/en/function.include.php

Requests for includes and on the supplying server simply output the
value like:

?php

$answer = 'no';

?

If you do it this way it will be simply included and be available as a
variable instantly.

(**subject to security issues and speed)



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Bill Arbuckle, Jr. [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, 9 January 2003 8:17 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] How Do I Return Values Across Servers


 This may be a no-brainer for everyone but me but ... I have several 
 php scripts residing on a web site on Server A.  In a library file on 
 Server A are misc. functions, some of which query an underlying 
 database and return a text string as the result.  On another web site 
 on Server B I would like to call these functions to get the result 
 without reinventing the wheel so to speak.  So my question is ... How 
 can I call a function that returns a text string from Server A in a 
 script requiring that text during the processing of a web page on
 Server B ... all in php?  Thanks in advance.

 Bill



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


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




RE: [PHP] HTML email that generates !s - any ideas?

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
You need to set an encoding and encode the body see:

http://www.php.net/manual/en/function.imap-8bit.php

 **You will need to add the headers for this plus encode**


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Tom Rogers [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 9 January 2003 9:49 AM
 To: Philipp Hartmann
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] HTML email that generates !s - any ideas?
 
 
 Hi,
 
 Thursday, January 9, 2003, 7:31:35 AM, you wrote:
 PH Hi everyone, I am new to this list, so this is my first post.
 
 PH I am trying to sen dan HTML email, and so far I got everything 
 PH running, except for one very odd problem.
 
 PH 1.) I am setting up all my variables within the .php Script.
 PH 2.) I generate my HTML email
 PH 3.) I am outputting the email to the browser and send it to myself
 
 -- Now here comes the problem:
 
 PH In the browseroutput the text looks like I want it to be. In the 
 PH email however, there are several EXCLAMATION MARKS (!) added to 
 PH the code (and therefore the body).
 PH How can this happen?? Is there some trick I have missed? 
 The exclamation
 PH marks are
 PH positioned within the email according to the amaount of 
 characters I submit
 PH with the
 PH email.
 
 PH I have set up a simple page where you can view the .php file, the 
 PH output and the email.
 
 PH http://www.gsdh.org/pleasehelp/index.html
 
 PH If anyone of you could spare the time, I would be really 
 gratefull 
 PH as I have to finish this but am stuck!  :(
 
 PH Thans again,
 PH Philipp
 
 What happens if you paste the php output directly into your mailer ?
 
 -- 
 regards,
 Tom
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] $query help :(

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
$posted needs to have '' around it!!  -- this could be stopping it!!

(and always check to see if the vars exist first and if you are using
4.1 + with globals off you will need to change you code now or in the
future)


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: - [ Paul Ferrie ] - [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 9 January 2003 10:07 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] $query help :(
 
 
 Hi again guys i have run into another problem :(
 
 i am trying to build a user poll (flash+php+mysql)
 I have the interface all sorted but i have a problem with my 
 add new poll php file. When i hit the update poll button in 
 flash it seem that everthing has work and it' send back a msg 
 saying all went well :).  but when i check with phpmyadmin i 
 see that the $query has been successfully added but the 
 question,opt1,opt2,opt3 fields are blank no data 
 added. the only fields to be added were the auto_id and date 
 stamp below is a sample code of the php file and after that 
 you will see the code on the button.
 
 [php]
 if ($action == add) {
 // Include config file
 include('common.php');
 
 // Connect to database
 $link = dbConnect();
 
 // Get date for new poll
 $posted = time();
 
 // Build query to insert new poll
 $query = INSERT INTO polls (question, option1, option2, option3,
 posted) VALUES ('$quest1', '$opt1', '$opt2', '$opt3', $posted);
 
 // Execute query
 $result = @mysql_query($query);
 
 // If query failed...
 if (!$result) {
 // Display error
 print result=Could not insert poll;
 } else {
 print result=poll created;
 }
 
 mysql_close($link);
 }
 ?
 [/php]
 
 on the button in Flash i have
 [code]
 on (release) {
  if (!quest1.length) {
   result = fields missing;
  }
  if (!opt1.length) {
   result = fields missing;
  }
  if (!opt2.length) {
   result = fields misasing;
  }
  if (!opt3.length) {
   result = fields missing;
  } else {
   loadVariables(addpoll.php, this, POST);
   gotoAndPlay(2);
  }
 }
 
 [/code]
 
 I have tried everything i can think of but i cab't seem to 
 get it working. Can anyone see anything i am missing? Cheers
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Variables

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
You are referring to Variables of Variables see:

http://www.php.net/manual/en/language.variables.variable.php



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED] 
-Original Message-
From: Stephen [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, 9 January 2003 10:52 AM
To: PHP List
Subject: [PHP] Variables


Yet another question: How would you make a variable's name the value of
another variable? For example... Variable 1's value is joe. I want to
make the value of variabe one, or joe, the name of variable two which
would equal something else.

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


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




RE: [PHP] Stumped...

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
Do you require searching of this data eg... select via these numbers or
not??


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED] 


-Original Message-
From: Stephen [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, 9 January 2003 11:56 AM
To: PHP List
Subject: [PHP] Stumped...


Sorry for so many questions but this should be the last one for a while.

I have a form that I want to insert into a MySQL table. This form is
based on how many entries a user wants to enter. For example, a user
wants to type in 12 names, so 12 form fields appear. Or they want 50, 50
appear. What I want to do is store them all into a database, but for
one, I can't quit figure out how I can insert them, and second, even if
I did know how, I couldn't possibly make enough tables unless I made 999
since I put the char limit to 3 digits. How could I work this keeping in
mine any number between 1 and 999 could be entered and without making
999 tables?

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


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




RE: [PHP] Stumped...

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
What you can do it simply get the data and create an array serialise the
array and sent it to
the database ... the issue that arises from this is that you can't
select if that record has
45 and 786 etc etc

The other option you have is to create a table then a second table that
has entries that show
you which numbers it has:

Table 1:

Code 
Name
etc

Table 2:

Code
Number

You will end up with multiple numbers listed in table 2 but you can then
easily find everyone with number 45.



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Stephen [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 9 January 2003 12:00 PM
 To: Timothy Hitchens (HiTCHO)
 Cc: PHP List
 Subject: Re: [PHP] Stumped...
 
 
 I will later select them and display them to be edited, but 
 other then that, not really...
 
 
 - Original Message -
 From: Timothy Hitchens (HiTCHO) [EMAIL PROTECTED]
 To: 'Stephen' [EMAIL PROTECTED]; 'PHP List' 
 [EMAIL PROTECTED]
 Sent: Wednesday, January 08, 2003 8:58 PM
 Subject: RE: [PHP] Stumped...
 
 
 : Do you require searching of this data eg... select via 
 these numbers or
 : not??
 :
 :
 : Timothy Hitchens (HiTCHO)
 : Open Platform Consulting
 : e-mail: [EMAIL PROTECTED]
 :
 :
 : -Original Message-
 : From: Stephen [mailto:[EMAIL PROTECTED]]
 : Sent: Thursday, 9 January 2003 11:56 AM
 : To: PHP List
 : Subject: [PHP] Stumped...
 :
 :
 : Sorry for so many questions but this should be the last one 
 for a while.
 :
 : I have a form that I want to insert into a MySQL table. This form is
 : based on how many entries a user wants to enter. For example, a user
 : wants to type in 12 names, so 12 form fields appear. Or 
 they want 50, 50
 : appear. What I want to do is store them all into a database, but for
 : one, I can't quit figure out how I can insert them, and 
 second, even if
 : I did know how, I couldn't possibly make enough tables 
 unless I made 999
 : since I put the char limit to 3 digits. How could I work 
 this keeping in
 : mine any number between 1 and 999 could be entered and 
 without making
 : 999 tables?
 :
 : 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
 :
 :
 :
 
 


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




RE: [PHP] apache and php

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
Your settings should be something similar to this:

IfModule mod_php4.c
AddType application/x-httpd-php .php .html
AddType application/x-httpd-php-source .phps
/IfModule

Do you have the page remotely available to see what is happening for
you??



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Gareth Thomas [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 9 January 2003 12:03 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] apache and php
 
 
 I am trying to run a PHP page from my browser (Mozilla) and 
 each time I load the page it is attempting to force a dowload 
 of the page instead, based on the mime-type. I had been 
 developing a command line PHP application which works fine 
 and then had just started on a web interface and realised 
 that Apache may not be configured correctly. So I edited 
 httpd.conf and added the Add Type line for x-type-httpd .php. 
 I am running Apache 2.0.40 on RedHat 8 and PHP 4.3.0pre2. Can 
 anyone tell me what I am doing wrong? What should the 
 modifications be to httpd.conf for PHP?
 
 Thanks in advance
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] How to strip extra characters off of a string

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
Give this a shot ... a bit of a hack but works for you:

?php

$string = '

Disk quotas for group site53 (gid 165):
 Filesystem  blocks   quota   limit   grace   files   quota   limit
grace
  /dev/hda4   57070  307201  3072001146   0   0 

';

$test = strstr($string, 'hda');

// replace two spaces with one - ensure differences in quota function
doesn't effect
$test = eregi_replace('  ', ' ', $test);

// split on spaces
$test = explode(' ', $test);

echo trim($test[2]);

?


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 9 January 2003 12:17 PM
 To: php-general
 Subject: [PHP] How to strip extra characters off of a string
 
 
 
 I need to be able to just extract the number that is right 
 Under blocks in this example it is the number 57070. This was 
 generated by the quota -g groupname command.
 
 Disk quotas for group site53 (gid 165):
  Filesystem  blocks   quota   limit   grace   files   
 quota   limit   grace
   /dev/hda4   57070  307201  3072001146   
 0   0 
 
 I have tried using some of the string
 functions like I used
 $test=strstr ($test, hda);
 $test= substr($test,7);
 This well get me up to the start of the number but now I need 
 to get read of every thing after the number. Is there a 
 better way of getting this info or for striping all the other 
 stuff away.
 
 
 
 
 -- 
 Best regards,
  rdkurth  mailto:[EMAIL PROTECTED]
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Stumped...

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
Check out:

http://www.php.net/manual/en/function.serialize.php

Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Stephen [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 9 January 2003 12:13 PM
 To: Timothy Hitchens (HiTCHO)
 Cc: PHP List
 Subject: Re: [PHP] Stumped...
 
 
 How would I serialise it? I can make the numbers into an 
 array, but if I echo the array itself, I'd get Array and I 
 need the number in the db, not the word...
 
 
 - Original Message -
 From: Timothy Hitchens (HiTCHO) [EMAIL PROTECTED]
 To: 'Stephen' [EMAIL PROTECTED]
 Cc: 'PHP List' [EMAIL PROTECTED]
 Sent: Wednesday, January 08, 2003 9:09 PM
 Subject: RE: [PHP] Stumped...
 
 
 : What you can do it simply get the data and create an array 
 serialise the
 : array and sent it to
 : the database ... the issue that arises from this is that you can't
 : select if that record has
 : 45 and 786 etc etc
 :
 : The other option you have is to create a table then a 
 second table that
 : has entries that show
 : you which numbers it has:
 :
 : Table 1:
 :
 : Code
 : Name
 : etc
 :
 : Table 2:
 :
 : Code
 : Number
 :
 : You will end up with multiple numbers listed in table 2 but 
 you can then
 : easily find everyone with number 45.
 :
 :
 :
 : Timothy Hitchens (HiTCHO)
 : Open Platform Consulting
 : e-mail: [EMAIL PROTECTED]
 :
 :  -Original Message-
 :  From: Stephen [mailto:[EMAIL PROTECTED]]
 :  Sent: Thursday, 9 January 2003 12:00 PM
 :  To: Timothy Hitchens (HiTCHO)
 :  Cc: PHP List
 :  Subject: Re: [PHP] Stumped...
 : 
 : 
 :  I will later select them and display them to be edited, but
 :  other then that, not really...
 : 
 : 
 :  - Original Message -
 :  From: Timothy Hitchens (HiTCHO) [EMAIL PROTECTED]
 :  To: 'Stephen' [EMAIL PROTECTED]; 'PHP List'
 :  [EMAIL PROTECTED]
 :  Sent: Wednesday, January 08, 2003 8:58 PM
 :  Subject: RE: [PHP] Stumped...
 : 
 : 
 :  : Do you require searching of this data eg... select via
 :  these numbers or
 :  : not??
 :  :
 :  :
 :  : Timothy Hitchens (HiTCHO)
 :  : Open Platform Consulting
 :  : e-mail: [EMAIL PROTECTED]
 :  :
 :  :
 :  : -Original Message-
 :  : From: Stephen [mailto:[EMAIL PROTECTED]]
 :  : Sent: Thursday, 9 January 2003 11:56 AM
 :  : To: PHP List
 :  : Subject: [PHP] Stumped...
 :  :
 :  :
 :  : Sorry for so many questions but this should be the last one
 :  for a while.
 :  :
 :  : I have a form that I want to insert into a MySQL table. 
 This form is
 :  : based on how many entries a user wants to enter. For 
 example, a user
 :  : wants to type in 12 names, so 12 form fields appear. Or
 :  they want 50, 50
 :  : appear. What I want to do is store them all into a 
 database, but for
 :  : one, I can't quit figure out how I can insert them, and
 :  second, even if
 :  : I did know how, I couldn't possibly make enough tables
 :  unless I made 999
 :  : since I put the char limit to 3 digits. How could I work
 :  this keeping in
 :  : mine any number between 1 and 999 could be entered and
 :  without making
 :  : 999 tables?
 :  :
 :  : 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
 :  :
 :  :
 :  :
 : 
 : 
 :
 :
 :
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] problem with location???

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
Hmm language !!!  languaje

Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Ysrael Guzmán [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 9 January 2003 12:43 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] problem with location???
 
 
 give a idea please.
  
 This is correct?
  
 script languaje=JavaScript 
 location.href=page.php??=SID?cliente=$cli;
 /script 
 
  
 
 Ysrael Guzmán Meza
 
  
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Different php.ini for each user on same server

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
You can set php_value and php_flags etc inside of the virtual host def
in httpd.conf etc



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: SED [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 9 January 2003 1:10 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Different php.ini for each user on same server
 
 
 Is it possible to define a different php.ini for each user 
 which use the same server, either Unix and Windows. Let me 
 give you example what I
 mean:
 
   User 1 (professional PHP-user)
   Allow him big uploads, long execution time etc.
   Virtual directory www.user1.com
 
   User 2 (amateur PHP-user)
   Allow smal uploads, short execution time etc.
   Virtual directory www.user2.com
 
 Thanks,
 Sumarlidi E. Dadason
 
 SED - Graphic Design
 _
 E-mail: [EMAIL PROTECTED]
 website: www.sed.is
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Different php.ini for each user on same server

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
Please keep it on list and (reply to all) as it assist everyone then!!

Check out:

http://www.php.net/manual/en/configuration.directives.php

As a starting point!!


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: SED [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 9 January 2003 1:14 PM
 To: 'Timothy Hitchens (HiTCHO)'
 Subject: RE: [PHP] Different php.ini for each user on same server
 
 
 Thanks, do you know where I can find document about that?
 
 
 Regards,
 Sumarlidi E. Dadason
 
 SED - Graphic Design
 _
 Tel: 896-0376, 461-5501
 E-mail: [EMAIL PROTECTED]
 website: www.sed.is
 
 -Original Message-
 From: Timothy Hitchens (HiTCHO) [mailto:[EMAIL PROTECTED]] 
 Sent: 9. janúar 2003 03:09
 To: 'SED'; [EMAIL PROTECTED]
 Subject: RE: [PHP] Different php.ini for each user on same server
 
 
 You can set php_value and php_flags etc inside of the virtual 
 host def in httpd.conf etc
 
 
 
 Timothy Hitchens (HiTCHO)
 Open Platform Consulting
 e-mail: [EMAIL PROTECTED]
 
  -Original Message-
  From: SED [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, 9 January 2003 1:10 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Different php.ini for each user on same server
  
  
  Is it possible to define a different php.ini for each user 
 which use 
  the same server, either Unix and Windows. Let me give you 
 example what 
  I
  mean:
  
  User 1 (professional PHP-user)
  Allow him big uploads, long execution time etc.
  Virtual directory www.user1.com
  
  User 2 (amateur PHP-user)
  Allow smal uploads, short execution time etc.
  Virtual directory www.user2.com
  
  Thanks,
  Sumarlidi E. Dadason
  
  SED - Graphic Design
  _
  E-mail: [EMAIL PROTECTED]
  website: www.sed.is
  
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Different php.ini for each user on same server

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
What you need to do is have a base php.ini and in each virtual you have
the specific eg:


# your vitual host
VirtualHost xxx.xxx.xxx.xxx
DocumentRoot /www/docroot/first/
ServerName dummy.yourdomain.com
php_admin_value disable_functions 'mysql_connect'
php_admin_value sendmail_path '/usr/sbin/sendmail -f
[EMAIL PROTECTED] -t -i'
/VirtualHost

The you can add the file upload size flag and value just like that.

Please note some flags and values can be added here and some to the
.htaccess files with some
restricted for security purposes such as base open etc!!



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: SED [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 9 January 2003 1:27 PM
 To: 'Timothy Hitchens (HiTCHO)'; [EMAIL PROTECTED]
 Subject: RE: [PHP] Different php.ini for each user on same server
 
 
 Maybe I'm little bit slow today but I already look into this 
 document. What paragraph should I focus better on? What I'm 
 looking for is *how
 to* refer to a different php.ini in each case.
 
 Thanks,
 SED
 
 -Original Message-
 From: Timothy Hitchens (HiTCHO) [mailto:[EMAIL PROTECTED]] 
 Sent: 9. janúar 2003 03:15
 To: 'SED'
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] Different php.ini for each user on same server
 
 
 Please keep it on list and (reply to all) as it assist everyone then!!
 
 Check out:
 
 http://www.php.net/manual/en/configuration.directives.php
 
 As a starting point!!
 
 
 Timothy Hitchens (HiTCHO)
 Open Platform Consulting
 e-mail: [EMAIL PROTECTED]
 
  -Original Message-
  From: SED [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, 9 January 2003 1:14 PM
  To: 'Timothy Hitchens (HiTCHO)'
  Subject: RE: [PHP] Different php.ini for each user on same server
  
  
  Thanks, do you know where I can find document about that?
  
  
  Regards,
  Sumarlidi E. Dadason
  
  SED - Graphic Design
  _
  Tel: 896-0376, 461-5501
  E-mail: [EMAIL PROTECTED]
  website: www.sed.is
  
  -Original Message-
  From: Timothy Hitchens (HiTCHO) [mailto:[EMAIL PROTECTED]]
  Sent: 9. janúar 2003 03:09
  To: 'SED'; [EMAIL PROTECTED]
  Subject: RE: [PHP] Different php.ini for each user on same server
  
  
  You can set php_value and php_flags etc inside of the 
 virtual host def 
  in httpd.conf etc
  
  
  
  Timothy Hitchens (HiTCHO)
  Open Platform Consulting
  e-mail: [EMAIL PROTECTED]
  
   -Original Message-
   From: SED [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, 9 January 2003 1:10 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP] Different php.ini for each user on same server
   
   
   Is it possible to define a different php.ini for each user
  which use
   the same server, either Unix and Windows. Let me give you
  example what
   I
   mean:
   
 User 1 (professional PHP-user)
 Allow him big uploads, long execution time etc.
 Virtual directory www.user1.com
   
 User 2 (amateur PHP-user)
 Allow smal uploads, short execution time etc.
 Virtual directory www.user2.com
   
   Thanks,
   Sumarlidi E. Dadason
   
   SED - Graphic Design
   _
   E-mail: [EMAIL PROTECTED]
   website: www.sed.is
   
   
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
   
  
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
 


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




RE: [PHP] Re: Databases vs. File Access

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
My 2 cents would be use a database and templates then create cached
static versions of
the pages on the first request and then when you need to changes things
it is just a
simple change the template and you a whole new look without the issue of
performance.

Make that 5 cents worth!!



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 9 January 2003 3:54 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: Databases vs. File Access
 
 
 Erich Kolb wrote:
 
  I am going to be dealing with a ton of data shortly and my 
 goal is to 
  make it accessible via the web.  I am curious about the performance 
  differences between using a database or leaving the data in the 
  individual files they originated in.  Can anyone offer any 
  recommendations?
 
 Depends on what you mean by a ton of data and what kind of work you 
 will do with the data.
 
 If all you will do is display the file as is on the web, then 
 leave in 
 file format.
 
 If the data needs to be searched, parsed, or indexed, the use a DB.
 
 My 2 cents,
 
 Jc
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Connection pool extension?

2003-01-08 Thread Timothy Hitchens \(HiTCHO\)
PHP supports sockets check out:

http://www.php.net/manual/en/ref.sockets.php


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Vinod Panicker [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, 9 January 2003 5:31 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Connection pool extension?
 
 
 Hi,
 
 I was wondering if there is a php extension available that 
 allows me to do the following -
 
 1.Connect to a given IP address and port
 2.Allow me to send and receive data from a particular ip and port
 3.Pool the connections so that further requests to the given ip
 and port will reuse the existing connection
 
 Tx,
 Vinod.
 
 ---
 Vinod Panicker [EMAIL PROTECTED]
 Sr. Software Designer
 Geodesic Information Systems Ltd. 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] InStallation Error Of ZendStudio on win98

2003-01-07 Thread Timothy Hitchens \(HiTCHO\)
Have you tried it in Safe Mode as you may have a Java Runtime issue.


HiTCHO has Spoken! 
Timothy Hitchens (HiTCHO)
[EMAIL PROTECTED] 

 -Original Message-
 From: Steven Seijmonsbergen [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, 7 January 2003 7:09 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] InStallation Error Of ZendStudio on win98
 
 
 I have a Problem With the install of ZendStudio-2_5_0b.
 I'm Using Windows 98 and I will get the error:
 
 This program has performed an illegal!
 
 What can I do to install ZendStudio???
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] Dreaded Return-Path and mail()

2003-01-07 Thread Timothy Hitchens \(HiTCHO\)
As I have said before that if you set the webserver user in as a trusted
user in the sendmail.cf file all is fixed.

You can then set a return-path etc without warnings as well.


HiTCHO has Spoken! 
Timothy Hitchens (HiTCHO)
[EMAIL PROTECTED] 

 -Original Message-
 From: Petre Agenbag [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, 7 January 2003 7:43 PM
 To: Timothy Hitchens (HiTCHO)
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] Dreaded Return-Path and mail()
 
 
 Almost exactly the same question as the message with subject: 
 Sendmail configuration
 
 The problem you are having took me a while to grasp. 
 Basically, what happens is that sendmail sends the mail as 
 the user php/apache was installed as (usually nobody@ or 
 apache@ yourdomain.com). Setting the Return-Path does not 
 work, as you cannot override the Return-Path set by the 
 server in this way, that's why messages bounce to your root 
 account when sent with a php mail() function. If you only 
 host one domain on a server, you can fix this by editing the 
 sendmail.cf file and setting the Return-Path: to something 
 more meaningful: However, most people don't have the luxury 
 of having a one domain hosting solution.
 
 Your only other option is to invoke sendmail with the -f 
 switch: sendmail -f sender@address recipient@address 
 file_containing_message
 
 This forces a from: address, but it also produces a warning 
 to the recipient that the message headers might be forged, 
 but return mails and replies are directed to the address specified.
 
 Only problem with all this is that you need to do one of 2 things:
 a) use of PHP's system commands eg.
 $mail = `echo -e Subject: Subject here\n\n Message here | 
 /usr/sbin/sendmail -f $your_address $recipient_address`;
 
 OR
 
 b) use a PERL script to do it.
 
 I am currently looking at both, and it seems at this stage 
 that the PERL script will be the better option, specially if 
 you need to mail to alot of people. You need to issue the 
 sendmail in a loop, and for load balancing, it's best to put 
 a sleep() inside the loop; even if you only make this a 
 sleep(1) (sleep for 1 sec), PHP will timeout after only 30 
 recipients unless you override the default timeout setting 
 for php scripts.
 
 On Tue, 2003-01-07 at 02:37, Timothy Hitchens (HiTCHO) wrote:
  Hmm... I would expect that your sendmail.cf (if you are using 
  sendmail) hasn't got your webserver (running as eg www or 
 apache etc) 
  in it's trusted users file / listing.
  
  
  
  HiTCHO has Spoken!
  Timothy Hitchens (HiTCHO)
  [EMAIL PROTECTED] 
  
   -Original Message-
   From: David T-G [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, 7 January 2003 10:34 AM
   To: PHP General list
   Cc: Monty
   Subject: Re: [PHP] Dreaded Return-Path and mail()
   
   
   Monty --
   
   ...and then Monty said...
   %
   % Okay, I've read just about everything on the Internet about 
   how the change % the Return-Path header in an e-mail sent 
   using mail(), but, I STILL can't % get it to work. All e-mail 
   sent via PHP says Return-Path: [EMAIL PROTECTED] % and 
   Received: (from nobody@localhost).
   
   How interesting.
   
   What do you get if you put
   
 $to = [EMAIL PROTECTED] ;
 $subj = here is a subject ;
 $body = this is the message body ;
 $hdrs = From: [EMAIL PROTECTED]\r\nReturn-Path:
   [EMAIL PROTECTED] ;
   
 mail($to,$subj,$body,$hdrs) ;
   
   in a php script and execute it?  If it doesn't work, what do
   the mail server lots on your web server say?  I just tested 
   this code on my box and it worked, so if you have problems 
   then you can figure it's your mail setup and not your code.  
   If it works, expand from there in small steps :-)
   
   
   HTH  HAND
   
   :-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!
   
   
  
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
 


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




RE: [PHP] anyway to do a 'whos online' from session variable?

2003-01-07 Thread Timothy Hitchens \(HiTCHO\)
Simple create a database table for logins and have a status that you
set to online / offline and last seen could also be added.

Then it is just a simple SELECT statement.

If you don't want to use a database you could flock (not perfect) a file
then read in a serialised array and update then write out and unlock.



HiTCHO has Spoken! 
Timothy Hitchens (HiTCHO)
[EMAIL PROTECTED] 

 -Original Message-
 From: Jeff Bluemel [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 8 January 2003 9:08 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] anyway to do a 'whos online' from session variable?
 
 
 when a user logs into my system I set a variable 
 $_SESSION['username']. now, every page somebody pulls up it 
 revalidates their login so somebody cannot get into the 
 backend of the system.
 
 now - is there a way I can make a utility that will show me 
 the session username's that are in use?  it would be useful 
 to be able to know who's currently online.  this is a website 
 that will not be published, and is used for a VERY limited 
 number of people.
 
 Jeff
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] restrictions

2003-01-07 Thread Timothy Hitchens \(HiTCHO\)
This is outgoing traffic the same as if you where surfing the Internet
and as the connection
is an established one your machine will allow it.

I would suggest looking at the (server) as it may not allow relaying
etc!!



HiTCHO has Spoken! 
Timothy Hitchens (HiTCHO)
[EMAIL PROTECTED] 

 -Original Message-
 From: Bruce Levick [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 8 January 2003 9:19 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] restrictions
 
 
 I find that my the company that I work for is a little over 
 protective. My machine is quite restricted (as in firewall 
 and accessability) when it comes to ftp and telnet. Well 
 basically my hands are tied in that sense.
  
 I am testing my database build on my local machine which runs 
 fine and all. I am curious though as to how these 
 restrictions may affect my attempts to send mail() I have 
 tried various external SMTP srervers (i am running off winxp 
 pro) in my php.ini file and I get nothing. Just the error 
 code I have placed in (below).
  
 ?php
  
 if (mail([EMAIL PROTECTED], this title, testing))
   echo Mail Sent!;
  else
   echo Mail could not be sent...;
  
 
 ?
  
 Warning: Failed to connect to mailserver, verify your SMTP 
 setting in php.ini in c:\inetpub\wwwroot\_tasks\email.php on 
 line 21 Mail could not be sent...
  
  
 Would my local machines restrictions be stopping the mail 
 function from communicating with the SMTP server??
  
 Cheers
  
 


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




RE: [PHP] restrictions

2003-01-07 Thread Timothy Hitchens \(HiTCHO\)
In windowsxp do the following:

Start - Run

Open: cmd

At the shell type:

telnet x.x.x.x 25 x.x.x.x being the smtp server

If you get a prompt then you have other issues such as relay etc etc



HiTCHO has Spoken! 
Timothy Hitchens (HiTCHO)
[EMAIL PROTECTED] 

 -Original Message-
 From: Bruce Levick [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 8 January 2003 9:25 AM
 To: Marco Tabini
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] restrictions
 
 
 Well I can't be totally sure but I think all outgoing mail 
 points to an external SMTP server.
 
 -Original Message-
 From: Marco Tabini [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, January 08, 2003 9:11 AM
 To: Bruce Levick
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] restrictions
 
 
 Hello Bruce--
 
 That depends on what restrictions are imposed on your box, of 
 course. Does your company use an SMTP-compatible mail server 
 for your internal mail? If so, you could use the server your 
 mail client points to to perform your tests.
 
 Cheers,
 
 
 Marco
 -- 
 
 php|architect - The Monthly Magazine for PHP Professionals
 Come check us out on the web at http://www.phparch.com!
 GET YOUR FREE COPY TODAY! Simply register  download!
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] restrictions

2003-01-07 Thread Timothy Hitchens \(HiTCHO\)
You need to follow my instructions and do telnet x.x.x.x 25 notice the
25 after the IP ??


HiTCHO has Spoken! 
Timothy Hitchens (HiTCHO)
[EMAIL PROTECTED] 

 -Original Message-
 From: Bruce Levick [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 8 January 2003 9:35 AM
 To: Timothy Hitchens (HiTCHO)
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] restrictions
 
 
 Thanks,
 Tried this and I get.
 
 Cannot opeen connection to host on port 23
 
 
 
 -Original Message-
 From: Timothy Hitchens (HiTCHO) [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, January 08, 2003 9:32 AM
 To: Bruce Levick; 'Marco Tabini'
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] restrictions
 
 
 In windowsxp do the following:
 
 Start - Run
 
 Open: cmd
 
 At the shell type:
 
 telnet x.x.x.x 25 x.x.x.x being the smtp server
 
 If you get a prompt then you have other issues such as relay etc etc
 
 
 
 HiTCHO has Spoken! 
 Timothy Hitchens (HiTCHO)
 [EMAIL PROTECTED] 
 
  -Original Message-
  From: Bruce Levick [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, 8 January 2003 9:25 AM
  To: Marco Tabini
  Cc: [EMAIL PROTECTED]
  Subject: RE: [PHP] restrictions
  
  
  Well I can't be totally sure but I think all outgoing mail 
 points to 
  an external SMTP server.
  
  -Original Message-
  From: Marco Tabini [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, January 08, 2003 9:11 AM
  To: Bruce Levick
  Cc: [EMAIL PROTECTED]
  Subject: Re: [PHP] restrictions
  
  
  Hello Bruce--
  
  That depends on what restrictions are imposed on your box, 
 of course. 
  Does your company use an SMTP-compatible mail server for 
 your internal 
  mail? If so, you could use the server your mail client points to to 
  perform your tests.
  
  Cheers,
  
  
  Marco
  --
  
  php|architect - The Monthly Magazine for PHP Professionals
  Come check us out on the web at http://www.phparch.com!
  GET YOUR FREE COPY TODAY! Simply register  download!
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
 


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




RE: [PHP] restrictions

2003-01-07 Thread Timothy Hitchens \(HiTCHO\)
Are you surfing and emailing from this box right now?? (strange if you
are)

HiTCHO has Spoken! 
Timothy Hitchens (HiTCHO)
[EMAIL PROTECTED] 

 -Original Message-
 From: Bruce Levick [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 8 January 2003 9:47 AM
 To: Timothy Hitchens (HiTCHO)
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] restrictions
 
 
 Sorry, I tried this as well and it failed to connect on port 25.
 
 -Original Message-
 From: Timothy Hitchens (HiTCHO) [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, January 08, 2003 9:39 AM
 To: Bruce Levick
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] restrictions
 
 
 You need to follow my instructions and do telnet x.x.x.x 25 
 notice the 25 after the IP ??
 
 
 HiTCHO has Spoken! 
 Timothy Hitchens (HiTCHO)
 [EMAIL PROTECTED] 
 
  -Original Message-
  From: Bruce Levick [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, 8 January 2003 9:35 AM
  To: Timothy Hitchens (HiTCHO)
  Cc: [EMAIL PROTECTED]
  Subject: RE: [PHP] restrictions
  
  
  Thanks,
  Tried this and I get.
  
  Cannot opeen connection to host on port 23
  
  
  
  -Original Message-
  From: Timothy Hitchens (HiTCHO) [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, January 08, 2003 9:32 AM
  To: Bruce Levick; 'Marco Tabini'
  Cc: [EMAIL PROTECTED]
  Subject: RE: [PHP] restrictions
  
  
  In windowsxp do the following:
  
  Start - Run
  
  Open: cmd
  
  At the shell type:
  
  telnet x.x.x.x 25 x.x.x.x being the smtp server
  
  If you get a prompt then you have other issues such as relay etc etc
  
  
  
  HiTCHO has Spoken!
  Timothy Hitchens (HiTCHO)
  [EMAIL PROTECTED]
  
   -Original Message-
   From: Bruce Levick [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, 8 January 2003 9:25 AM
   To: Marco Tabini
   Cc: [EMAIL PROTECTED]
   Subject: RE: [PHP] restrictions
   
   
   Well I can't be totally sure but I think all outgoing mail
  points to
   an external SMTP server.
   
   -Original Message-
   From: Marco Tabini [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, January 08, 2003 9:11 AM
   To: Bruce Levick
   Cc: [EMAIL PROTECTED]
   Subject: Re: [PHP] restrictions
   
   
   Hello Bruce--
   
   That depends on what restrictions are imposed on your box,
  of course.
   Does your company use an SMTP-compatible mail server for
  your internal
   mail? If so, you could use the server your mail client 
 points to to 
   perform your tests.
   
   Cheers,
   
   
   Marco
   --
   
   php|architect - The Monthly Magazine for PHP Professionals
   Come check us out on the web at http://www.phparch.com!
   GET YOUR FREE COPY TODAY! Simply register  download!
   
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
   
  
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] restrictions

2003-01-07 Thread Timothy Hitchens \(HiTCHO\)
This is now getting to off list issues I would suggest!!


HiTCHO has Spoken! 
Timothy Hitchens (HiTCHO)
[EMAIL PROTECTED] 

 -Original Message-
 From: Bruce Levick [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 8 January 2003 9:55 AM
 To: Timothy Hitchens (HiTCHO)
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] restrictions
 
 
 Yes I am and its very strange. I can't even ftp to my own website to
 test it from there.   
 
 -Original Message-
 From: Timothy Hitchens (HiTCHO) [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, January 08, 2003 9:48 AM
 To: Bruce Levick
 Cc: [EMAIL PROTECTED]
 Subject: RE: [PHP] restrictions
 
 
 Are you surfing and emailing from this box right now?? (strange if you
 are)
 
 HiTCHO has Spoken! 
 Timothy Hitchens (HiTCHO)
 [EMAIL PROTECTED] 
 
  -Original Message-
  From: Bruce Levick [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, 8 January 2003 9:47 AM
  To: Timothy Hitchens (HiTCHO)
  Cc: [EMAIL PROTECTED]
  Subject: RE: [PHP] restrictions
  
  
  Sorry, I tried this as well and it failed to connect on port 25.
  
  -Original Message-
  From: Timothy Hitchens (HiTCHO) [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, January 08, 2003 9:39 AM
  To: Bruce Levick
  Cc: [EMAIL PROTECTED]
  Subject: RE: [PHP] restrictions
  
  
  You need to follow my instructions and do telnet x.x.x.x 
 25 notice 
  the 25 after the IP ??
  
  
  HiTCHO has Spoken!
  Timothy Hitchens (HiTCHO)
  [EMAIL PROTECTED]
  
   -Original Message-
   From: Bruce Levick [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, 8 January 2003 9:35 AM
   To: Timothy Hitchens (HiTCHO)
   Cc: [EMAIL PROTECTED]
   Subject: RE: [PHP] restrictions
   
   
   Thanks,
   Tried this and I get.
   
   Cannot opeen connection to host on port 23
   
   
   
   -Original Message-
   From: Timothy Hitchens (HiTCHO) [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, January 08, 2003 9:32 AM
   To: Bruce Levick; 'Marco Tabini'
   Cc: [EMAIL PROTECTED]
   Subject: RE: [PHP] restrictions
   
   
   In windowsxp do the following:
   
   Start - Run
   
   Open: cmd
   
   At the shell type:
   
   telnet x.x.x.x 25 x.x.x.x being the smtp server
   
   If you get a prompt then you have other issues such as 
 relay etc etc
   
   
   
   HiTCHO has Spoken!
   Timothy Hitchens (HiTCHO)
   [EMAIL PROTECTED]
   
-Original Message-
From: Bruce Levick [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 8 January 2003 9:25 AM
To: Marco Tabini
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] restrictions


Well I can't be totally sure but I think all outgoing mail
   points to
an external SMTP server.

-Original Message-
From: Marco Tabini [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 9:11 AM
To: Bruce Levick
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] restrictions


Hello Bruce--

That depends on what restrictions are imposed on your box,
   of course.
Does your company use an SMTP-compatible mail server for
   your internal
mail? If so, you could use the server your mail client
  points to to
perform your tests.

Cheers,


Marco
--

php|architect - The Monthly Magazine for PHP Professionals
Come check us out on the web at http://www.phparch.com! GET YOUR
FREE COPY TODAY! Simply register  download!

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

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


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




RE: [PHP] anyway to do a 'whos online' from session variable?

2003-01-07 Thread Timothy Hitchens \(HiTCHO\)
Hmm... yes you could create an array of the files then check the last
mod stamp using stat (remember to reset stat).

Sessions are also cleaned up via the garbage collection system
controlled via php.ini



HiTCHO has Spoken! 
Timothy Hitchens (HiTCHO)
[EMAIL PROTECTED] 

 -Original Message-
 From: Jeff Bluemel [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 8 January 2003 10:04 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] anyway to do a 'whos online' from session variable?
 
 
 yea, that will work.  however, I was thinking of something a 
 little more dramatic like parsing the /tmp directly, 
 associating ID's, and killing dead sessions etc.
 
 Timothy Hitchens ) [EMAIL PROTECTED] wrote in 
 message 004701c2b6a2$2dfeb6a0$0500a8c0@bambino">news:004701c2b6a2$2dfeb6a0$0500a8c0@bambino...
  Simple create a database table for logins and have a status 
 that you 
  set to online / offline and last seen could also be added.
 
  Then it is just a simple SELECT statement.
 
  If you don't want to use a database you could flock (not perfect) a 
  file then read in a serialised array and update then write out and 
  unlock.
 
 
 
  HiTCHO has Spoken!
  Timothy Hitchens (HiTCHO)
  [EMAIL PROTECTED]
 
   -Original Message-
   From: Jeff Bluemel [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, 8 January 2003 9:08 AM
   To: [EMAIL PROTECTED]
   Subject: [PHP] anyway to do a 'whos online' from session variable?
  
  
   when a user logs into my system I set a variable 
   $_SESSION['username']. now, every page somebody pulls up it 
   revalidates their login so somebody cannot get into the 
 backend of 
   the system.
  
   now - is there a way I can make a utility that will show me the 
   session username's that are in use?  it would be useful 
 to be able 
   to know who's currently online.  this is a website that 
 will not be 
   published, and is used for a VERY limited number of people.
  
   Jeff
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] PHP Editors

2003-01-07 Thread Timothy Hitchens \(HiTCHO\)
That is the advantage of Zend Studio is that it is Java and will run on
Win, Mac OSX and Linux.

That is one of the reasons we use Zend Studio is that we can get our
designers on OSX, geeks on linux/unix and executive types mostly Windows
all using the same application for code writing, maintenance and soon
management with the introduction of CVS integration (2.6)
just announced on zend.com
 

Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Pierre-Luc Soucy [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 8 January 2003 12:07 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] PHP Editors
 
 
 Do you know any good equivalent with similar features for Linux?
 
 Thanks,
 
 Pierre-Luc Soucy
 
  PHPEdit i use it personally www.phpedit.net
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] anyway to do a 'whos online' from session variable?

2003-01-07 Thread Timothy Hitchens \(HiTCHO\)
Arr the garbage collection is based on a probability
(session.gc_probability) and therefore it will clean
up if you get enough hits to the server. Check the documentation for
config of sessions.

I use db for sessions with a check to ensure db is available. (you can
then cleanup whatever you want)



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 8 January 2003 1:11 PM
 To: Timothy Hitchens (HiTCHO)
 Cc: 'Jeff Bluemel'; [EMAIL PROTECTED]
 Subject: RE: [PHP] anyway to do a 'whos online' from session variable?
 
 
 
 
 On Wed, 8 Jan 2003, Timothy Hitchens (HiTCHO) wrote:
 
  Hmm... yes you could create an array of the files then 
 check the last 
  mod stamp using stat (remember to reset stat).
  
  Sessions are also cleaned up via the garbage collection system 
  controlled via php.ini
 
  How do you force garbage collection? I've written an 
 application using sessions for storage and there's been a 
 session sitting in my /tmp directory for 2 days now, well 
 over the 1440 seconds expiration. 
 
 Ed
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] How to detect a PHP script time-out?

2003-01-07 Thread Timothy Hitchens \(HiTCHO\)
This is a fairly simple one if both the server and browser obey the
specs:

Set up output buffering on your page then if the page times out the
buffer
should be sent to the browser and that is loaded with your message.

PSEUDO CODE:

start output buffering
put into buffer the required message
start building actual page in a string behind the scenes
fork-- page times out the buffer is sent out
 -- page ends properly ... clear the buffer and output the
string you built



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 8 January 2003 1:25 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] How to detect a PHP script time-out?
 
 
 How can I detect if my PHP script is about to time-out?
 
 I would like to be able to detect a time-out and display a 
 page with an 
 appropriate error message i.e. the server is busy now, 
 please try again 
 later.
 
 Jc
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




RE: [PHP] How to detect a PHP script time-out?

2003-01-07 Thread Timothy Hitchens \(HiTCHO\)
You want a call back method for timeout none avail.

- auto append won't work
- register shutdown won't work

I don't know of another solution right now.


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

 -Original Message-
 From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 8 January 2003 1:43 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] How to detect a PHP script time-out?
 
 
 Timothy Hitchens ) wrote:
  
  Set up output buffering on your page then if the page times out the 
  buffer should be sent to the browser and that is loaded with your 
  message.
 
 Ok. Is there another solution?
 
 The reason I ask is that in order to use your solution I 
 would need to 
 redesign my pages (quite a few of them).
 
 I was hoping to be able to do something like this:
 
 if (timeout()) include(try_again.html);
 
 Thanks,
 
 Jc
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


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




  1   2   >