Re: Re[2]: [PHP] setting request variables

2004-03-04 Thread matthew oatham
Thanks for your reply,

I am still a bit confused though as the var error is never set! i.e. in your
code example below $error is never going to be set! Basically I have 2 pages
as follows:

page1.php - login form page
page2.php - validation page

page2.php checks the usernae and password against database and if all is
well it sends to the members area. If there was an error then it sends back
to the login page. When there is an error on page2.php I want to set a
request variabel called $someError with a value representing the error
that occured i.e. Please enter a username or Please enter a password or
Invalid username or invalid password etc.. Then on page1.php just before
the login form I would do:

if (!empty($_POST('someError'))) {
  echo $_POST('someError');
}
//display login form.

So my question is how do I add the variable $someError to the request with
the value invalid usernam and disaply this on page1.php

   $error = ''; //assume no errors
   if(isset($_PHP['password']  !empty($_POST['username']){
$sql = SELECT id FROM members WHERE
username = '.$_POST['username'].'
AND password = '.$_POST['password'].';
 $result = mysql_query($sql);
 if(!$mysql_num_rows($result)  0){
  $error = 'font color=redbError:/b Invalid password/font';
  include('login.php');
  exit;
}
   //password ok
   echo 'Welcome '.$_POST['username'].'br';
 }else{
  //first pass and $error is still empty
  include('login.php');
 }
- Original Message - 
From: Tom Rogers [EMAIL PROTECTED]
To: matthew oatham [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 2:02 AM
Subject: Re[2]: [PHP] setting request variables


 Hi,

 Thursday, March 4, 2004, 11:08:06 AM, you wrote:
 mo but what if I wanted the variable $error to be a message. I want to
set a
 mo variable called $error to something like invalided password then
display
 mo this on the login page.

 mo Cheers

 mo Matt
 mo - Original Message - 
 mo From: Tom Rogers [EMAIL PROTECTED]
 mo To: matthew oatham [EMAIL PROTECTED]
 mo Cc: [EMAIL PROTECTED]
 mo Sent: Thursday, March 04, 2004 12:24 AM
 mo Subject: Re: [PHP] setting request variables


  Hi,
 
  Thursday, March 4, 2004, 9:08:19 AM, you wrote:
  mo Hi,
 
  mo I have created a small login system for my website. However
  mo if a user logs in incorrectly I want to display a error message
  mo currently I use the code
 
  mo echo You could not be logged in! Either the username and
  mo password do not match or you have not validated your membership!
  mo br /
  mo Please try again! br /;
  mo include  (login.php);
 
  mo However this appears at the top of my website but I want it
  mo to appear above the login form so I though I could set a variable
  mo in the request called error or similar then on the login page
  mo just above the login form check for the presence of the request
  mo variable error and print the appropriate message. So I want to
  mo do the following:
 
  mo SET REQUEST VARIABLE ERROR HERE
  mo include  (login.php);
 
  mo But can I set a request variable? i.e in JAVA I would do
  mo HttpRequest.setAttribute(error, true); etc..
 
  mo Any help?
 
  mo Cheers
 
  add something like this to login.php
 
  if(!empty($error)){
echo 'trtd'.$error.'/td/tr';
  }
 
  as it is included it will have $error available to it
  -- 
  regards,
  Tom
 
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 


 well that would be easy, for example

 $error = ''; //assume no errors
 if(isset($_PHP['password']  !empty($_POST['username']){
   $sql = SELECT id FROM members WHERE
   username = '.$_POST['username'].'
   AND password = '.$_POST['password'].';
   $result = mysql_query($sql);
   if(!$mysql_num_rows($result)  0){
 $error = 'font color=redbError:/b Invalid password/font';
 include('login.php');
 exit;
   }
   //password ok
   echo 'Welcome '.$_POST['username'].'br';
 }else{
  //first pass and $error is still empty
  include('login.php');
 }
 -- 
 regards,
 Tom



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



[PHP] php session ID attached to URL

2004-03-04 Thread matthew oatham
Hi,

I have a quick question about PHP session. In my website I have included the command 
session_start(); at the top of every page. Firstly is this correct? Secondly when I 
visit the website the first link I click on has the php session ID appended to the url 
however this php session ID is not appended to subsequent links ! Is this correct 
behaviour? What is going on? Can anyone explain?

Thanks

Matt

RE: [PHP] php session ID attached to URL

2004-03-04 Thread Ford, Mike [LSS]
On 04 March 2004 10:25, matthew oatham wrote:

 Hi,
 
 I have a quick question about PHP session. In my website I
 have included the command session_start(); at the top of
 every page. Firstly is this correct?

Yes (sort of).  The real deal is that session_start() has to occur before you start 
sending any actual content -- if you have, say, a lot of initialization logic, this 
could actually be quite a long way into your script.

  Secondly when I visit
 the website the first link I click on has the php session ID
 appended to the url however this php session ID is not
 appended to subsequent links ! Is this correct behaviour?

Yes.  It's simply the nature of cookies that it takes at least one round trip to the 
server to work out if you have them enabled -- and on that trip, the only way to 
propagate the session id is to pass it in the URL.

 What is going on? Can anyone explain?

On your initial visit to the site, you will not have a session-id cookie set, so PHP 
doesn't know if you have cookies enabled or not.  When you first click a link, 
therefore, the session id is appended to the URL, *and* a session-id cookie header is 
sent.  On the next (and subsequent) clicks, the cookie will be received from your 
browser, PHP knows you have cookies enabled, and therefore relies on the cookie and 
does not add the session id to the URL.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re[4]: [PHP] setting request variables

2004-03-04 Thread Tom Rogers
Hi,

Thursday, March 4, 2004, 8:11:16 PM, you wrote:
mo Thanks for your reply,

mo I am still a bit confused though as the var error is never set! i.e. in your
mo code example below $error is never going to be set! Basically I have 2 pages
mo as follows:

mo page1.php - login form page
mo page2.php - validation page

mo page2.php checks the usernae and password against database and if all is
mo well it sends to the members area. If there was an error then it sends back
mo to the login page. When there is an error on page2.php I want to set a
mo request variabel called $someError with a value representing the error
mo that occured i.e. Please enter a username or Please enter a password or
mo Invalid username or invalid password etc.. Then on page1.php just before
mo the login form I would do:

mo if (!empty($_POST('someError'))) {
mo   echo $_POST('someError');
mo }
mo //display login form.

mo So my question is how do I add the variable $someError to the request with
mo the value invalid usernam and disaply this on page1.php

mo$error = ''; //assume no errors
moif(isset($_PHP['password']  !empty($_POST['username']){
mo $sql = SELECT id FROM members WHERE
mo username = '.$_POST['username'].'
mo AND password = '.$_POST['password'].';
mo  $result = mysql_query($sql);
mo  if(!$mysql_num_rows($result)  0){
mo   $error = 'font color=redbError:/b Invalid password/font';
mo   include('login.php');
mo   exit;
mo }
mo//password ok
moecho 'Welcome '.$_POST['username'].'br';
mo  }else{
mo   //first pass and $error is still empty
mo   include('login.php');
mo  }
mo - Original Message - 
mo From: Tom Rogers [EMAIL PROTECTED]
mo To: matthew oatham [EMAIL PROTECTED]
mo Cc: [EMAIL PROTECTED]
mo Sent: Thursday, March 04, 2004 2:02 AM
mo Subject: Re[2]: [PHP] setting request variables

But you are not posting to the login page ...you are including it so
all the variables are available. $error only gets filled if there is
an error, thats why in login.php we do a check to see if it is
!empty() which would indicate something has gone wrong.

Try this simplified code to demonstrate the flow:
(validate.php)
?php
if(isset($_POST['submit'])){
$error = '';
if($_POST['username'] != 'Fred'){
$error = 'font color=redbError: /bYou did not enter 
Fred/font';
include('./login.php');
exit;
}else{
?
html
head
titleSuccess/title
/head
body
h1 Welcome Fred/h1
/body
/html
?php   
}
}else{
include('./login.php');
}
?

(login.php)

html
head
titleLogin/title
/head
body
form action=validate.php method=post
table border=1
tr
tdLogin/td
/tr
?php if(isset($error)  !empty($error)):?
tr
td?php echo $error?/td
/tr
?php endif?
tr
tdinput type=text name=username value=/td
/tr
tr
tdinput type=submit name=submit value=submit/td
/tr
/table
/form
/body
/html

Then go to validate.php or login.php it won't matter :)

-- 
regards,
Tom

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



RE: [PHP] convert a strtotime date into a text representation of the date

2004-03-04 Thread Ford, Mike [LSS]
On 04 March 2004 04:37, Andy B wrote:

 hi.
 
 i found strtotime and it seems to work but not quite sure if i know
 how to use it right... here is my code:
 ?php
 $time= strtotime(third saturday january 2005);
 echo date(M/D/YY, $time);
  
 
 i wanted it to take the third saturday of next year (2005)
 and say do this: saturday january 24?? 2005 for the output.
 All I get for the output though is sat/june/20092009?? I'm sort of
 confused now... 
 
 any ideas on what the problem is?

Firstly, 'Y' is date()'s format letter for a 4-digit year -- so 'YY' outputs
the 4-digit year twice.  If you want a 2-digit year, the format code is 'y'

Now, on to your more serious problem.  strtotime() won't let you have both
an absolute date and a relative date in the same string -- if you try, the
absolute date alwys seems to take precedence.  So hte 'third saturday'
phrase in your string is completely ignored.

Looking at 'january 2005': a month on its own has no particular meaning to
strtotime(), since valid calendar date formats containing a literal month
name either have the day number in front, or are 'month day year' or 'month
day'.  Only the latter of these fits your string, so we have to consider
'january 2005' as meaning the 2005th day of January, with the current year
being assumed by default; by a quick estimate, the 2005th January 2004 is
roughly 180 days into 2009, or somewhere near the end of June 2009 -- which,
unsurprisingly, is the result you've been getting.

The way to do what you want is in two steps -- first getting an absolute
value for 1-Jan-2005, and then finding the third Saturday from that base
date.  There are probably several valid ways to do this, but here are two
possibilities:

   strtotime('third saturday', strtotime('1 jan 2005'));
   strtotime('third saturday', mktime(12, 0, 0, 1, 1, 2005));

(Note: I strongly advocate using midday-ish as a base time when calculating
relative dates, because of the possible adverse effects of a DST timeshift
intervening if you use anything in the 00:00-03:00 range -- I'm sure dealing
exclusively with January is probably fairly safe in this respect, but
getting into the habit of using 12:00:00 for such calculations is just plain
good practice.)

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP] about image

2004-03-04 Thread Marek Kilimajer
Did you restart your webserver after changing its configuration?

Kenneth wrote:

dear all,
additional to the previous post, I was told that for later version of php,
there is already GD with it, and what should i do is just uncomment the
php_gd2.dll line...i've tried this also, but it still doesn't work, how can
i solve this and use the function imagethanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] about image

2004-03-04 Thread Marek Kilimajer
BTW there is no image() function, but there are plenty of functions that 
start with image, try one of those, e.g. $im = imagecreate(100, 100);

Kenneth wrote:

dear all,
additional to the previous post, I was told that for later version of php,
there is already GD with it, and what should i do is just uncomment the
php_gd2.dll line...i've tried this also, but it still doesn't work, how can
i solve this and use the function imagethanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: Re[4]: [PHP] setting request variables

2004-03-04 Thread matthew oatham
Sorry, I understand now! Thanks for your help and your patience !

It works!

Matt
- Original Message - 
From: Tom Rogers [EMAIL PROTECTED]
To: matthew oatham [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 11:27 AM
Subject: Re[4]: [PHP] setting request variables


 Hi,

 Thursday, March 4, 2004, 8:11:16 PM, you wrote:
 mo Thanks for your reply,

 mo I am still a bit confused though as the var error is never set! i.e.
in your
 mo code example below $error is never going to be set! Basically I have 2
pages
 mo as follows:

 mo page1.php - login form page
 mo page2.php - validation page

 mo page2.php checks the usernae and password against database and if all
is
 mo well it sends to the members area. If there was an error then it sends
back
 mo to the login page. When there is an error on page2.php I want to set a
 mo request variabel called $someError with a value representing the
error
 mo that occured i.e. Please enter a username or Please enter a
password or
 mo Invalid username or invalid password etc.. Then on page1.php just
before
 mo the login form I would do:

 mo if (!empty($_POST('someError'))) {
 mo   echo $_POST('someError');
 mo }
 mo //display login form.

 mo So my question is how do I add the variable $someError to the request
with
 mo the value invalid usernam and disaply this on page1.php

 mo$error = ''; //assume no errors
 moif(isset($_PHP['password']  !empty($_POST['username']){
 mo $sql = SELECT id FROM members WHERE
 mo username = '.$_POST['username'].'
 mo AND password = '.$_POST['password'].';
 mo  $result = mysql_query($sql);
 mo  if(!$mysql_num_rows($result)  0){
 mo   $error = 'font color=redbError:/b Invalid
password/font';
 mo   include('login.php');
 mo   exit;
 mo }
 mo//password ok
 moecho 'Welcome '.$_POST['username'].'br';
 mo  }else{
 mo   //first pass and $error is still empty
 mo   include('login.php');
 mo  }
 mo - Original Message - 
 mo From: Tom Rogers [EMAIL PROTECTED]
 mo To: matthew oatham [EMAIL PROTECTED]
 mo Cc: [EMAIL PROTECTED]
 mo Sent: Thursday, March 04, 2004 2:02 AM
 mo Subject: Re[2]: [PHP] setting request variables

 But you are not posting to the login page ...you are including it so
 all the variables are available. $error only gets filled if there is
 an error, thats why in login.php we do a check to see if it is
 !empty() which would indicate something has gone wrong.

 Try this simplified code to demonstrate the flow:
 (validate.php)
 ?php
 if(isset($_POST['submit'])){
 $error = '';
 if($_POST['username'] != 'Fred'){
 $error = 'font color=redbError: /bYou did not
enter Fred/font';
 include('./login.php');
 exit;
 }else{
 ?
 html
 head
 titleSuccess/title
 /head
 body
 h1 Welcome Fred/h1
 /body
 /html
 ?php
 }
 }else{
 include('./login.php');
 }
 ?

 (login.php)

 html
 head
 titleLogin/title
 /head
 body
 form action=validate.php method=post
 table border=1
 tr
 tdLogin/td
 /tr
 ?php if(isset($error)  !empty($error)):?
 tr
 td?php echo $error?/td
 /tr
 ?php endif?
 tr
 tdinput type=text name=username value=/td
 /tr
 tr
 tdinput type=submit name=submit
value=submit/td
 /tr
 /table
 /form
 /body
 /html

 Then go to validate.php or login.php it won't matter :)

 -- 
 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] php session ID attached to URL

2004-03-04 Thread Marek Kilimajer
matthew oatham wrote:

Hi,

I have a quick question about PHP session. In my website I have included the command session_start(); at the top of every page. Firstly is this correct? 
Yes, this makes sure you don't lose the session somewhere.

Secondly when I visit the website the first link I click on has the php session ID appended to the url however this php session ID is not appended to subsequent links ! Is this correct behaviour? What is going on? Can anyone explain?
When you first visit the site, session_start() sets a cookie that 
contains the session id. However, since this is your first visit, 
session code has no way of finding out if the cookie was accepted by the 
browser. For this reason (session.use_trans_sid is on) all links, forms 
etc are rewriten to contain the session id.

Thanks

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


[PHP] correctly replaced?

2004-03-04 Thread Torsten Lange
Hi,
I'm not sure, is this
$val_matrix[$i][$k]= OCIResult($stmt,.$column_array.);
 -
a correct replacement for
$val_matrix[$i][$k]= OCIResult($stmt, 'COLUMN_NAME');
  -
If I use '.$column_array.' the coloring of my editor tells me that it 
might be wrong. Unfortunately I cannot test it right now...

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


Re: [PHP] correctly replaced?

2004-03-04 Thread Richard Davey
Hello Torsten,

Thursday, March 4, 2004, 1:20:18 PM, you wrote:

TL I'm not sure, is this
TL $val_matrix[$i][$k]= OCIResult($stmt,.$column_array.);
TL   -
TL a correct replacement for
TL $val_matrix[$i][$k]= OCIResult($stmt, 'COLUMN_NAME');
TL-
TL If I use '.$column_array.' the coloring of my editor tells me that it
TL might be wrong. Unfortunately I cannot test it right now...

It doesn't look correct to me, I would have thought it should be:

$val_matrix[$i][$k]= OCIResult($stmt, $column_array);

I can't see why you need the fullstops (periods). The above will work
IF $column_array = COLUMN_NAME as required.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html


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



[PHP] [Job][Sydney.AU] PHP/mySQL - 3-6 Month Contract... On Site ONLY - no remote work

2004-03-04 Thread Skeeve Stevens



Hey all

We are looking for a PHP/mySQL programmer for a 3-6 month contract
in Seven Hills, Sydney, Australia.

There is a lot of internal system development required and we want
to get it out of the way by getting someone in-house for the time it takes
to finish it.

We are an ISP and the systems we are developing are all related to
ISP operations.  Including Online Ordering, IP Address tacking, Quote
Systems, Automated Systems Management, interfaces with other systems.  We
are even looking at possibly building our own accounting system if deemed
appropriate.

If you are a good PHP/mySQL programmer, who knows Linux quite well,
can work in a fast paced environment and stick to deadlines, then please
send your resume to '[EMAIL PROTECTED]' with details of experience and
hourly rates expected.  Please also be prepared to have some of your work
available to check out - online preferably.

This could turn in to some long term ongoing work for the right
person.  ISP experience will be a serious advantage.

Repeat.. I said send your resume to [EMAIL PROTECTED] - replying
directly to me, this list, or anywhere else, signifies you cant follow
instructions so please don't apply ;-)

...Skeeve 



___
Skeeve Stevens, RHCE Email: [EMAIL PROTECTED]
Website: www.skeeve.org  - Telephone: (0414) 753 383
Address: P.O Box 1035, Epping, NSW, 1710, Australia

eIntellego - [EMAIL PROTECTED] - www.eintellego.net
___
Si vis pacem, para bellum






[PHP] Re: server side redirects

2004-03-04 Thread Anil Kumar K.

On Thu, 4 Mar 2004, matthew oatham wrote:

 Hi,
 
 I have a page that checks to see if a session exists and if so does a
 server side redirect - i tired using header(Location:
 membersArea.php); but I got an error about headers already sent, guess

HTTP 1.1 needs the redirect string of the form: Location: 
http://hostname/resource

Most of the browsers are tolerant in this case though. But it would be
good idea to stick with standards.

 this is because I have already output html before this php command. So I

Verify your PHP scripts. Make sure that there is no character ( space
character or even empty lines) lying around outside PHP open/close tags.

Avoid putting new lines, spaces, etc.. outside  PHP open/close tags
especially while writing library files which are meant for include-ing.

best
   Anil

--
Linuxense Information Systems Pvt. Ltd., Trivandrum, India
http://www.linuxense.com/

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



Re: [PHP] convert a strtotime date into a text representation of the date

2004-03-04 Thread Andy B
   strtotime('third saturday', strtotime('1 jan 2005'));
   strtotime('third saturday', mktime(12, 0, 0, 1, 1, 2005));

yea thanks... now i can figure out most of the other stuff i need (at least
for now anyways)

will probably use the mktime way since i can always use variables from a
combo box to get the month/year for mktime and they can always type in the
third saturday (or whatever relative date they are looking for)...

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



[PHP] Parse error ???

2004-03-04 Thread Mike Mapsnac
The script should upload files (images).

Error message is give below, any ideas why I get this errror message?
Parse error: parse error in /var/www/html/uploadproc.php on line 3
//Upload.php (form)
form method=post action=uploadproc.php enctype=multipart/form-data
input type=file name=myfilebr /
input type=hidden name=MAX_FILE_SIZE value=1024
input type=submit value=Upload File
/form
//uploadproc.php
if(!isset($_FILES['myfile'])) {
die Error! The expected file wasn't a part of the submitted form;
}
if($_FILES['myfile']['error'] != UPLOAD_ERR_OK) {
die Error The file uploaded failed.;
}
if(!move_uploaded_file($_FILES['myfile']['tmp_name
'],
/var/www/html/upload/)) {
die Error! Moving the uploaded file failed.;
}

echo File successfully uploaded.;
?
_
Learn how to help protect your privacy and prevent fraud online at Tech 
Hacks  Scams. http://special.msn.com/msnbc/techsafety.armx

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


RE: [PHP] Parse error ???

2004-03-04 Thread Jay Blanchard
[snip]
Error message is give below, any ideas why I get this errror message?
Parse error: parse error in /var/www/html/uploadproc.php on line 3

//uploadproc.php
if(!isset($_FILES['myfile'])) {
die Error! The expected file wasn't a part of the submitted form;
}
[/snip]

Try

if(!(isset($_FILES['myfile']))) {
die Error! The expected file wasn't a part of the submitted form;
}

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



[PHP] Re: Parse error ???

2004-03-04 Thread Michael Nolan
Mike Mapsnac wrote:
The script should upload files (images).

Error message is give below, any ideas why I get this errror message?
Parse error: parse error in /var/www/html/uploadproc.php on line 3
die() needs brackets around its arguments, eg:

die(Error! The expected file wasn't a part of the submitted form);

Mike

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


Re: [PHP] Call to undefined function: vadmin_rc4_crypt()

2004-03-04 Thread Brian V Bonini
On Wed, 2004-03-03 at 23:55, [EMAIL PROTECTED] wrote:
 Hi, 
 
 Squirrelmail 1.4.2 serversidefilters plugin version 1.32, apache 1.3.26 and 
 php 4.3.4,  qmail/vpopmail/courier-imap, maildrop on debian stable.
 
 When the serversidefilters plugin goes to en/decrypt domain passwords using 
 mcrypt, I get  this error message:
 
 
 Fatal error: Call to undefined function: vadmin_rc4_crypt() 
 in /var/www/squirrelmail-1.4.2/plugins/serversidefilter/backend.php on line 
 420
 

Since vadmin_rc4_crypt() is not a standard predefined php function it
just means the file containing vadmin_rc4_crypt() is not available to
your script. Find where vadmin_rc4_crypt() is and make it available to
to backend.php


-- 
BrianGnuPG - KeyID: 0x04A4F0DC | URL: www.gfx-design.com/keys
  Key Server: pgp.mit.edu
==
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
GnuPG: http://gnupg.org
http://www.biglumber.com/x/web?qs=0x2C35011004A4F0DC
Linux Registered User #339825 at http://counter.li.org

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



RE: [PHP] Re: Parse error ???

2004-03-04 Thread Mike Mapsnac
brackets solve the probleb. But why I have the warning messages? The 
permission on the directory is correct. Any ideas what can cause such 
messages?

Warning: move_uploaded_file(/var/www/html/upload/): failed to open stream: 
Is a directory in /var/www/html/uploadproc.php on line 11

Warning: move_uploaded_file(): Unable to move '/tmp/phpiMrdlQ' to 
'/var/www/html/upload/' in /var/www/html/uploadproc.php on line 11
Error Moving the uploaded file failed.


From: Michael Nolan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Parse error ???
Date: Thu, 04 Mar 2004 13:40:46 +
Mike Mapsnac wrote:
The script should upload files (images).

Error message is give below, any ideas why I get this errror message?
Parse error: parse error in /var/www/html/uploadproc.php on line 3
die() needs brackets around its arguments, eg:

die(Error! The expected file wasn't a part of the submitted form);

Mike

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
One-click access to Hotmail from any Web page – download MSN Toolbar now! 
http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/

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


[PHP] Re: Parse error ???

2004-03-04 Thread Michael Nolan
Is this what it actually looks like?

if(!move_uploaded_file($_FILES['myfile']['tmp_name
'],
/var/www/html/upload/)) {
die Error! Moving the uploaded file failed.;
If so, the files array shouldn't be like that.  It shouldn't be split 
onto two lines.  Try $_FILES['myfile']['tmp_name'].

Mike

Mike Mapsnac wrote:
brackets solve the probleb. But why I have the warning messages? The 
permission on the directory is correct. Any ideas what can cause such 
messages?

Warning: move_uploaded_file(/var/www/html/upload/): failed to open 
stream: Is a directory in /var/www/html/uploadproc.php on line 11

Warning: move_uploaded_file(): Unable to move '/tmp/phpiMrdlQ' to 
'/var/www/html/upload/' in /var/www/html/uploadproc.php on line 11
Error Moving the uploaded file failed.


From: Michael Nolan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Parse error ???
Date: Thu, 04 Mar 2004 13:40:46 +
Mike Mapsnac wrote:

The script should upload files (images).

Error message is give below, any ideas why I get this errror message?
Parse error: parse error in /var/www/html/uploadproc.php on line 3
die() needs brackets around its arguments, eg:

die(Error! The expected file wasn't a part of the submitted form);

Mike

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


Re: [PHP] Re: Parse error ???

2004-03-04 Thread Neil Freeman
If I remember correctly the second parameter of move_uploaded_file() 
needs to be the full filename, ie path plus required filename.

so...

if(!move_uploaded_file($_FILES['myfile']['tmp_name'],
(/var/www/html/upload/ . $_FILES['myfile']['name'])))
Neil

Mike Mapsnac wrote:

***
This Email Has Been Virus Swept
***
brackets solve the probleb. But why I have the warning messages? The 
permission on the directory is correct. Any ideas what can cause such 
messages?

Warning: move_uploaded_file(/var/www/html/upload/): failed to open 
stream: Is a directory in /var/www/html/uploadproc.php on line 11

Warning: move_uploaded_file(): Unable to move '/tmp/phpiMrdlQ' to 
'/var/www/html/upload/' in /var/www/html/uploadproc.php on line 11
Error Moving the uploaded file failed.


From: Michael Nolan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Parse error ???
Date: Thu, 04 Mar 2004 13:40:46 +
Mike Mapsnac wrote:

The script should upload files (images).

Error message is give below, any ideas why I get this errror message?
Parse error: parse error in /var/www/html/uploadproc.php on line 3
die() needs brackets around its arguments, eg:

die(Error! The expected file wasn't a part of the submitted form);

Mike

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
One-click access to Hotmail from any Web page  download MSN Toolbar 
now! http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/

--
--
 www.curvedvision.com
--
This communication is confidential to the intended recipient(s). If you are not that person you are not permitted to make use of the information and you are requested to notify the sender immediately of its receipt then destroy the copy in your possession. Any views or opinions expressed are those of the originator and may not represent those of Advanced System Architectures Ltd.

*** This Email Has Been Virus Checked ***

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


[PHP] Notify about your e-mail account utilization.

2004-03-04 Thread management
Dear user of e-mail server Php.net,

Some  of  our clients complained about the spam  (negative e-mail content)
outgoing from your e-mail account. Probably, you have been infected  by
a  proxy-relay trojan server. In order to keep your computer safe,
follow the  instructions.

Further details can be obtained from attached file.

For security purposes the attached file is password protected. Password  is 21553.

Kind regards,
   The Php.net team   http://www.php.net

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

[PHP] protecting directories and files inside them based on session variables

2004-03-04 Thread Matthew Oatham
Hi,

I have created a small website members area - this is protected using php session 
variables so to access it a variable user_id must exist in the session. However I have 
a directory on my webserver that holds documents that I want to make accessible only 
to users who have logged in however because this directory contains word documents 
nothing stops someone from finding the url i.e. 
http://www.mydomain.com/private/some_privat_file.doc and downloading this file! I need 
a way to make this file only accessible to users who have a user_id in there session - 
is this possible? Or is my only alternative to password protect this directory using 
the webserver and force users to re-authenticate in order to download there files?

Cheers


[PHP] protecting directories and files inside them based on session variables

2004-03-04 Thread matthew oatham
Hi,

I have created a small website members area - this is protected using php session 
variables so to access it a variable user_id must exist in the session. However I have 
a directory on my webserver that holds documents that I want to make accessible only 
to users who have logged in however because this directory contains word documents 
nothing stops someone from finding the url i.e. 
http://www.mydomain.com/private/some_privat_file.doc and downloading this file! I need 
a way to make this file only accessible to users who have a user_id in there session - 
is this possible? Or is my only alternative to password protect this directory using 
the webserver and force users to re-authenticate in order to download there files?

Cheers


RE: [PHP] php session ID attached to URL

2004-03-04 Thread Hardik Doshi
In case, client has selected disabled cookie option
then everytime you have to append session id variable
to the URL.

While appending the session id variable to the URL,
one must know the security concerns.

This is the nice article about session and security.
http://shiflett.org/articles/the-truth-about-sessions

Thanks
Hardik

--- Ford, Mike   [LSS]
[EMAIL PROTECTED] wrote:
 On 04 March 2004 10:25, matthew oatham wrote:
 
  Hi,
  
  I have a quick question about PHP session. In my
 website I
  have included the command session_start(); at the
 top of
  every page. Firstly is this correct?
 
 Yes (sort of).  The real deal is that
 session_start() has to occur before you start
 sending any actual content -- if you have, say, a
 lot of initialization logic, this could actually be
 quite a long way into your script.
 
   Secondly when I visit
  the website the first link I click on has the php
 session ID
  appended to the url however this php session ID is
 not
  appended to subsequent links ! Is this correct
 behaviour?
 
 Yes.  It's simply the nature of cookies that it
 takes at least one round trip to the server to work
 out if you have them enabled -- and on that trip,
 the only way to propagate the session id is to pass
 it in the URL.
 
  What is going on? Can anyone explain?
 
 On your initial visit to the site, you will not have
 a session-id cookie set, so PHP doesn't know if you
 have cookies enabled or not.  When you first click a
 link, therefore, the session id is appended to the
 URL, *and* a session-id cookie header is sent.  On
 the next (and subsequent) clicks, the cookie will be
 received from your browser, PHP knows you have
 cookies enabled, and therefore relies on the cookie
 and does not add the session id to the URL.
 
 Cheers!
 
 Mike
 

-
 Mike Ford,  Electronic Information Services Adviser,
 Learning Support Services, Learning  Information
 Services,
 JG125, James Graham Building, Leeds Metropolitan
 University,
 Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
 Email: [EMAIL PROTECTED]
 Tel: +44 113 283 2600 extn 4730  Fax:  +44 113
 283 3211 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

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



Re: [PHP] protecting directories and files inside them based on session variables

2004-03-04 Thread Matt Matijevich
snip
 http://www.mydomain.com/private/some_privat_file.doc and downloading
this file! I need a way to make this file only accessible to users who
have a user_id in there session - is this possible? Or is my only
alternative to password protect this directory using the webserver and
force users to re-authenticate in order to download there files?
/snip

Move them outside of the website directory and use readfile to display
them to the user.

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



[PHP] executing ant from php

2004-03-04 Thread Edward Peloke
Hello All,

I have an ant build file that I want to execute from a php page.  I have
never had much luck with the exec function but is this simply what I would
use?  This is on a windows 2000 system.  Do I need to put the build file in
the same directory as the php page executing it?

Thanks,
Eddie



 WARNING:  The information contained in this message and any attachments is
intended only for the use of the individual or entity to which it is
addressed.  This message may contain information that is privileged,
confidential and exempt from disclosure under applicable law.  It may also
contain trade secrets and other proprietary information for which you and
your employer may be held liable for disclosing.  You are hereby notified
that any unauthorized dissemination, distribution or copying of this
communication is strictly prohibited.  If you have received this
communication in error,  please notify [EMAIL PROTECTED] by E-Mail and then
destroy this communication in a manner appropriate for privileged
information.

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



Re: [PHP] POST form header

2004-03-04 Thread Raditha Dissanayake

Doesn't $GLOBALS['HTTP_RAW_POST_DATA'] have this info?

 

it should but it does not!. It only gets populated when the encoding is 
unknown.
I think Chris has already given a good suggestion. An alternative would 
be to POST to a perl script and just echo the input from stdin to stdout.

--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] regex to change ' to ?

2004-03-04 Thread Adam Williams
What would be the PHP expression to change any and all ' to ? in a 
variable?

I want to change any and all ' in $_POST[data] to ?

what would be the statement?  Thanks!

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



[PHP] .htaccess... why it is deleted by the server?!!!?

2004-03-04 Thread Radwan Aladdin
Hi.. 

I made a .htaccess file. and then uploaded it to my server.. but everytime I do it 
deletes it automatically.. it is hidden directly.. or sure deleted from there.. so 
what is the problem! 

My hosting account is Linux, WebServer : Apache.. so what is the problem? and how to 
solve it? 

Cheers..


Re: [PHP] regex to change ' to ?

2004-03-04 Thread Richard Davey
Hello Adam,

Thursday, March 4, 2004, 3:36:06 PM, you wrote:

AW What would be the PHP expression to change any and all ' to ? in a
AW variable?

AW I want to change any and all ' in $_POST[data] to ?

$output_array = str_replace(', ?, $_POST);

Use this instead of a reg exp for such a simple task, it's quicker and
will cope with the whole array in one command.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re: [PHP] .htaccess... why it is deleted by the server?!!!?

2004-03-04 Thread Richard Davey
Hello Radwan,

Thursday, March 4, 2004, 3:38:28 PM, you wrote:

RA I made a .htaccess file. and then uploaded it to my server..
RA but everytime I do it deletes it automatically.. it is hidden
RA directly.. or sure deleted from there.. so what is the
RA problem! 

Are you *sure* it is deleted? By default the fullstop (period) at the
start of the filename in Unix will HIDE it from you. If you can
SSH/Telnet into your account do: ls -al to show any hidden files in
the directory listing. If you're viewing via an FTP client, check for
Options to show hidden files. If you know this all already, sorry!
:)

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



RE: [PHP] .htaccess... why it is deleted by the server?!!!?

2004-03-04 Thread jon roig
It's probably is still there, just hiding. You could write a quick
little php script to check it out if you ftp client is blocking it from
being seen.

-- jon

---
jon roig
web developer
email: [EMAIL PROTECTED]
phone: 888.230.7557


-Original Message-
From: Radwan Aladdin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 04, 2004 8:38 AM
To: [EMAIL PROTECTED]
Subject: [PHP] .htaccess... why it is deleted by the server?!!!?


Hi.. 

I made a .htaccess file. and then uploaded it to my server.. but
everytime I do it deletes it automatically.. it is hidden directly.. or
sure deleted from there.. so what is the problem! 

My hosting account is Linux, WebServer : Apache.. so what is the
problem? and how to solve it? 

Cheers..

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.611 / Virus Database: 391 - Release Date: 3/3/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.611 / Virus Database: 391 - Release Date: 3/3/2004
 

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



[PHP] Executing JavaScript

2004-03-04 Thread Todd Cary
How can I execute window.close() with php?

Todd

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


[PHP] Hidden File Upload Limit

2004-03-04 Thread Chris Dion
OK Here is no problem..I'm trying to upload files to the server using the
exact code from the php site except that the MAX_FILE_SIZE is changed to
900.  I can upload files less than somewhere between 2mb and 4mb but not
above.  I've changed post_max_size to 10M and (1000), memory_limit to
11M and (1100), and upload_file_size to 9M and (900).  The code
works on another server but not this one.  I'm running Solaris 5.7, Php
4.3.4, and Apache 1.3.29.  I'm sure I've left out something you ask me to
try but chances are I'd tried it.  
 
What am I missing?
 
Chris


Re: [PHP] regex to change ' to ?

2004-03-04 Thread Adam Williams
Thank you, that works great!

On Thu, 4 Mar 2004, Richard Davey wrote:

 Hello Adam,
 
 Thursday, March 4, 2004, 3:36:06 PM, you wrote:
 
 AW What would be the PHP expression to change any and all ' to ? in a
 AW variable?
 
 AW I want to change any and all ' in $_POST[data] to ?
 
 $output_array = str_replace(', ?, $_POST);
 
 Use this instead of a reg exp for such a simple task, it's quicker and
 will cope with the whole array in one command.
 
 

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



Re: [PHP] Executing JavaScript

2004-03-04 Thread Richard Davey
Hello Todd,

Thursday, March 4, 2004, 6:52:33 PM, you wrote:

TC How can I execute window.close() with php?

You can't, PHP is a server side language. You can echo out the above
JS using PHP, but you can't force it to happen.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



[PHP] .htaccess... why it is deleted by the server?!!!?

2004-03-04 Thread Radwan Aladdin
You are right..

It is hidden only..

Okay now this problem is solved.. but the other problem is that in my
.htaccess file :


AuthUserFile /pass2
AuthGroupFile /pass2
AuthName AllowLocalAccess
AuthType Basic

order deny,allow
deny from 217.164.249.134
allow from all


The IP 217.164.249.134 is mine.. I want to try blocking it from transfering
data from the folder /pass2 into my PC..

I mean in my website :
http://www.alaedin.com/pass2/www.alaedin.com/pass2/tetetet.rm

So I want to deny that RM file.. so that IP can't access it or download it
to his machine.. is it possible?

where must I put this file? And must I change in this script? or it is
right?

Please help me in this problem..

Cheers..

- Original Message -
From: Richard Davey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 7:44 PM
Subject: Re: [PHP] .htaccess... why it is deleted by the server?!!!?


 Hello Radwan,

 Thursday, March 4, 2004, 3:38:28 PM, you wrote:

 RA I made a .htaccess file. and then uploaded it to my server..
 RA but everytime I do it deletes it automatically.. it is hidden
 RA directly.. or sure deleted from there.. so what is the
 RA problem!

 Are you *sure* it is deleted? By default the fullstop (period) at the
 start of the filename in Unix will HIDE it from you. If you can
 SSH/Telnet into your account do: ls -al to show any hidden files in
 the directory listing. If you're viewing via an FTP client, check for
 Options to show hidden files. If you know this all already, sorry!
 :)

 --
 Best regards,
  Richard Davey
  http://www.phpcommunity.org/wiki/296.html

 --
 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] .htaccess... why it is deleted by the server?!!!?

2004-03-04 Thread Radwan Aladdin
And also must I put it without name? or can I name it for example :
test.htaccess? or must I name it : .htaccess (Without name)??

Please help me..

Cheers..

- Original Message -
From: Radwan Aladdin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 7:58 PM
Subject: [PHP] .htaccess... why it is deleted by the server?!!!?


 You are right..

 It is hidden only..

 Okay now this problem is solved.. but the other problem is that in my
 .htaccess file :

 
 AuthUserFile /pass2
 AuthGroupFile /pass2
 AuthName AllowLocalAccess
 AuthType Basic

 order deny,allow
 deny from 217.164.249.134
 allow from all
 

 The IP 217.164.249.134 is mine.. I want to try blocking it from
transfering
 data from the folder /pass2 into my PC..

 I mean in my website :
 http://www.alaedin.com/pass2/www.alaedin.com/pass2/tetetet.rm

 So I want to deny that RM file.. so that IP can't access it or download it
 to his machine.. is it possible?

 where must I put this file? And must I change in this script? or it is
 right?

 Please help me in this problem..

 Cheers..

 - Original Message -
 From: Richard Davey [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, March 04, 2004 7:44 PM
 Subject: Re: [PHP] .htaccess... why it is deleted by the server?!!!?


  Hello Radwan,
 
  Thursday, March 4, 2004, 3:38:28 PM, you wrote:
 
  RA I made a .htaccess file. and then uploaded it to my server..
  RA but everytime I do it deletes it automatically.. it is hidden
  RA directly.. or sure deleted from there.. so what is the
  RA problem!
 
  Are you *sure* it is deleted? By default the fullstop (period) at the
  start of the filename in Unix will HIDE it from you. If you can
  SSH/Telnet into your account do: ls -al to show any hidden files in
  the directory listing. If you're viewing via an FTP client, check for
  Options to show hidden files. If you know this all already, sorry!
  :)
 
  --
  Best regards,
   Richard Davey
   http://www.phpcommunity.org/wiki/296.html
 
  --
  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] .htaccess... why it is deleted by the server?!!!?

2004-03-04 Thread Jay Blanchard
[snip]
And also must I put it without name? or can I name it for example :
test.htaccess? or must I name it : .htaccess (Without name)??
[/snip]


While wonderfully fascinating in many aspects, shouldn't this be on an
Apache list somewhere? And it is .htaccess [no name]

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



Re: [PHP] .htaccess... why it is deleted by the server?!!!?

2004-03-04 Thread Richard Davey
Hello Radwan,

Thursday, March 4, 2004, 4:09:07 PM, you wrote:

RA And also must I put it without name? or can I name it for example :
RA test.htaccess? or must I name it : .htaccess (Without name)??

Usually you must name it .htaccess

There is probably a way to change what it can be called, but I'm no
Apache admin so I couldn't tell you how. I dare say it might be a
httpd.conf setting somewhere.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



RE: [PHP] Executing JavaScript

2004-03-04 Thread Jeremy
Of *course* you can do that with php! When the user clicks a link, with
PHP respond like this:

...
body onLoad=javascript:window.close()
...

And voila! PHP closes the window!

-J

-Original Message-
From: Richard Davey [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 9:58 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Executing JavaScript


Hello Todd,

Thursday, March 4, 2004, 6:52:33 PM, you wrote:

TC How can I execute window.close() with php?

You can't, PHP is a server side language. You can echo out the above
JS using PHP, but you can't force it to happen.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

-- 
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] .htaccess... why it is deleted by the server?!!!?

2004-03-04 Thread Richard Davey
Hello Radwan,

Thursday, March 4, 2004, 3:58:52 PM, you wrote:

RA Okay now this problem is solved.. but the other problem is that in my
RA .htaccess file :

This isn't really PHP related I'm afraid, the following might be of
more help to you:

http://www.google.com/search?sourceid=navclientie=UTF-8oe=UTF-8q=htaccess+tutorial

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re: [PHP] .htaccess... why it is deleted by the server?!!!?

2004-03-04 Thread Radwan Aladdin
Okay.. and is the code right in the .htaccess file?

This is the code again :

AuthUserFile /pass2
AuthGroupFile /pass2
AuthName AllowLocalAccess
AuthType Basic

order deny,allow
deny from 217.164.249.134
allow from all


The directory that I want to prevent that IP from download from it is :
http://www.alaedin.com/pass2

So where must I put the .htaccess file.. and does the code working well??

Cheers..

- Original Message -
From: Richard Davey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 8:18 PM
Subject: Re: [PHP] .htaccess... why it is deleted by the server?!!!?


 Hello Radwan,

 Thursday, March 4, 2004, 4:09:07 PM, you wrote:

 RA And also must I put it without name? or can I name it for example :
 RA test.htaccess? or must I name it : .htaccess (Without name)??

 Usually you must name it .htaccess

 There is probably a way to change what it can be called, but I'm no
 Apache admin so I couldn't tell you how. I dare say it might be a
 httpd.conf setting somewhere.

 --
 Best regards,
  Richard Davey
  http://www.phpcommunity.org/wiki/296.html

 --
 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[2]: [PHP] Executing JavaScript

2004-03-04 Thread Richard Davey
Hello Jeremy,

Thursday, March 4, 2004, 4:20:32 PM, you wrote:

J Of *course* you can do that with php! When the user clicks a link, with
J PHP respond like this:

J ...
J body onLoad=javascript:window.close()
J ...

J And voila! PHP closes the window!

No, PHP itself hasn't closed anything. JavaScript has.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



Re: [PHP] Hidden File Upload Limit

2004-03-04 Thread Raditha Dissanayake
You didn't tell us the error message and you have not mentioned if you 
tried LimitRequestBody and max_input_time and max_execution_time.

Chris Dion wrote:

OK Here is no problem..I'm trying to upload files to the server using the
exact code from the php site except that the MAX_FILE_SIZE is changed to
900.  I can upload files less than somewhere between 2mb and 4mb but not
above.  I've changed post_max_size to 10M and (1000), memory_limit to
11M and (1100), and upload_file_size to 9M and (900).  The code
works on another server but not this one.  I'm running Solaris 5.7, Php
4.3.4, and Apache 1.3.29.  I'm sure I've left out something you ask me to
try but chances are I'd tried it.  

What am I missing?

Chris

 



--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Executing JavaScript

2004-03-04 Thread Raditha Dissanayake
Siva Kumar,
Where is your famous monthly post :-)
Todd Cary wrote:

How can I execute window.close() with php?

Todd



--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Hidden File Upload Limit

2004-03-04 Thread Ford, Mike [LSS]
On 04 March 2004 16:44, Raditha Dissanayake wrote:

 You didn't tell us the error message and you have not
 mentioned if you
 tried LimitRequestBody and max_input_time and max_execution_time.

... or if you restarted the Web server after each change to php.ini.

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



[PHP] About the character set of the records of the value of the table

2004-03-04 Thread edwardspl
Dear All,

How can we enable support multi character set of the records of the
value of the table of the database with other language ( eg : chinese -
big-5 code ) ?

Thank for your help !

Ed.

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



Re: [PHP] Executing JavaScript

2004-03-04 Thread Todd Cary
Yes!  Makes absolute sense.  I put it on an Input Type=Button onClick.

Thanks for your patience...

Todd

Richard Davey wrote:
Hello Todd,

Thursday, March 4, 2004, 6:52:33 PM, you wrote:

TC How can I execute window.close() with php?

You can't, PHP is a server side language. You can echo out the above
JS using PHP, but you can't force it to happen.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] someone is loosing parameters

2004-03-04 Thread Michael Kunze
hi,

i've run in a really odd problem. maybe someone experienced something
simular?
i have a few php scripts that all passing a number to a loader script.
so all urls generated by my app look like this:

loader.php?sn=72f464a1c0263a3068906cb8607f7160

with that number i know which script to include and what else todo. for
most action i have a script that changes something in the database and
in the end uses a

header(Location: $url/loader.php?sn=72f464a1c0263a3068906cb8607f7160);

to go to the 'view' script. that way. if the user presses F5 the same
action isn't redone. only the view part will be re-executed.

to clarify a bit:
- the user clicks a link
- the loader is executed (with the number the script includes a
do_action script)
- at the end of that do_action script the above mentioned header() call
is done
- second time the loader.php is executed (this time the sn leads to a
view script)

so on very rare circumstances i have the following problem that the
loader.php says that there is no 'sn' number on the second run.

-
$sn = $_REQUEST['sn'];

// check if we got a sn number with our url
if (empty($sn))
   create_error(blah);
-

you see? there is no miracle in that code. and really sometimes the
loader.php stops at that error.
it happens to different links. same links work for 10.000 clicks. then
out of nowhere it throws that error and it happens to different users.

i'm sure it has something todo with the location header. the server gets
a 302 and does a GET request to get the requested page. maybe it fails
to append any previous parameters?

i'm lost. any help appreciated.

best regards
-- 
Michael Kunze
http://www.smrealms.de/

I'll tell you my real name! It's P-Chan. That's right!

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



[PHP] PHP5: Segmentation Fault in ext/dom

2004-03-04 Thread Vivian Steller
Hello,

i know that this post should better been sent to bugs.php but making my
first experiences on segmentation faults i can't identify the right causes
to report it... have a look and help me getting right informations to post
the bug so that it can be solved.

Error type:
'''
error_log sais segmentation fault sometimes; while running the script the
server (not all the time!) starts a proc with 50-90% of users processor
resources?!

Source:
'''
Using todays snapshot php5-200403041230.tar.gz

Concerning extensions:
''
- ext/dom: XPath query function
(- maybe referencing behavior of variables in general??)

Code:
'
[The code is VERY BIG... here is just a snippet causing the error]

?php
...
// $xpath is a DomXPath Object
// $filesystem holds a wellformed expression string
if(is_string($this-filesystem)) {
$this-filesystem = $xpath-query($this-filesystem);
}
// $this-filesystem should store a DomNodeList
// and sometimes it does!!
...
?


This code (i think) works fine:
?php
...
// $xpath is a DomXPath Object
// $filesystem holds a wellformed expression string
if(is_string($this-filesystem)) {
$nodeList = $xpath-query($this-filesystem);
}
// $nodeList should store a DomNodeList
...
?
 
Problem description:

Other tests in my script showed that the problem occurs if I try to store in
an $object-var.


Maybe you need some more informations to fix this problem?
Comments are appreciated!

Thanks in advance,
vivi

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



[PHP] memo fields

2004-03-04 Thread Diana Castillo
how do I read memo fields with php from a mysql database?

--
Diana Castillo
Global Reservas, S.L.
C/Granvia 22 dcdo 4-dcha
28013 Madrid-Spain
Tel : 00-34-913604039 ext 214
Fax : 00-34-915228673
email: [EMAIL PROTECTED]
Web : http://www.hotelkey.com
  http://www.destinia.com

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



Re: [PHP] memo fields

2004-03-04 Thread Richard Davey
Hello Diana,

Thursday, March 4, 2004, 5:28:09 PM, you wrote:

DC how do I read memo fields with php from a mysql database?

There's no such thing as a Memo datatype in MySQL - you are probably
referring to either a text or blob type. You read them exactly the
same way as any other field.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



[PHP] Global Vars

2004-03-04 Thread Patrick Fowler
I installed SuSE Linux 9.0 along with php.  The flag below is turned off
by default.  I could not send any vars with a post or get form.  I
turned it one and all works well.  The comments tell you not to turn it
on because of possible security issues and to code around it.  My
question is how do you send vars and session var from page to page
without it turned on?  Any info would be a big help.  Thanks for your
time.
 
 
; You should do your best to write your scripts so that they do not
require
; register_globals to be on;  Using form variables as globals can easily
lead
; to possible security problems, if the code is not very well thought
of.
register_globals = On

 

Patrick Fowler 
Unix Admin/database Admin 
Wynit, Inc. 
6847 Ellicott Drive 
East Syracuse, NY 13057 
V (315)437-1086 x2172 
F (315)437-0432 

 


Re: [PHP] Global Vars

2004-03-04 Thread Adrian
use $_POST['name_of_your_form_field'] or
$_GET['name_of_your_form_field'] or $_REQUEST['name_of_your_form_field']
$_REQUEST contains $_GET, $_POST and $_COOKIE

for server vars there is $_SERVER and $_ENV for environment vars
$_SESSION is for session vars

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



RE: [PHP] Global Vars

2004-03-04 Thread Jay Blanchard
[snip]My question is how do you send vars and session var from page to
page without it turned on?  Any info would be a big help. [/snip]

rtfm, rtfa, stfw 

use $_POST or $_GET array

http://www.php.net/variable

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



Re: [PHP] Global Vars

2004-03-04 Thread Ryan A
$_GET['variable_name'] for GET variables
and
$_POST['variable_name'] for POST variables.

Change the variable_name to whatever was in your form, for example the
below variable name is
cust_name

input type=text name=cust_name

For session it would be $_SESSION['session_name']

etc etc

The above should get you going, but read up in the manual.

Cheers,
-Ryan


On 3/4/2004 6:55:50 PM, Patrick Fowler ([EMAIL PROTECTED]) wrote:
 I installed SuSE Linux 9.0 along with php.  The flag below is turned off
 by default.  I could not send any vars with a post or get form.  I
 turned it one and all works well.  The comments tell you not to turn it
 on because of possible security issues and to code around it.  My
 question is how do you send vars and session var from page to page
 without it turned on?  Any info would be a big help.  Thanks for your
 time.


 ; You should do your best to write your scripts so that they do not
 require
 ; register_globals to be on;  Using form variables as globals can easily
 lead
 ; to possible security problems, if the code is not very well thought
 of.
 register_globals = On



 Patrick Fowler
 Unix Admin/database Admin
 Wynit, Inc.
 6847 Ellicott Drive
 East Syracuse, NY 13057
 V (315)437-1086 x2172
 F (315)437-0432

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



[PHP] Blocking IPs from entering some files on my server??

2004-03-04 Thread Radwan Aladdin
Hello..

I put a .htaccess file on my server, and everything is fine..

But the problem is that I want to prevent all users from seeing a page.. only some IP 
addresses can see it..

So I tried to put my IP to be allowded.. but it said that I'm not allowded... So what 
to do? Did anybody tried .htaccess files to prevent IP from seeing some pages and 
worked? Or to give the permission for an IP address to see the page..??

This is the code :

AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName ExampleAllowFromNCSA
AuthType Basic

Limit GET
order deny,allow
allow from 217.164.237.105
deny from all
/Limit

So please try it on your IP address.. 


Waiting your replies..

Cheers..


Re: [PHP] Re: Parse error ???

2004-03-04 Thread Mike Mapsnac
It works now.

I run the script as user mike and mike:mike is owner of the directory, when 
I upload something to directory the owner of the file is apache:apache.
Why the owner of the file is not mike ?

thanks

From: Neil Freeman [EMAIL PROTECTED]
To: Mike Mapsnac [EMAIL PROTECTED]
CC: [EMAIL PROTECTED],  [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Parse error ???
Date: Thu, 04 Mar 2004 13:58:26 +
If I remember correctly the second parameter of move_uploaded_file() needs 
to be the full filename, ie path plus required filename.

so...

if(!move_uploaded_file($_FILES['myfile']['tmp_name'],
(/var/www/html/upload/ . $_FILES['myfile']['name'])))
Neil

Mike Mapsnac wrote:

***
This Email Has Been Virus Swept
***
brackets solve the probleb. But why I have the warning messages? The 
permission on the directory is correct. Any ideas what can cause such 
messages?

Warning: move_uploaded_file(/var/www/html/upload/): failed to open stream: 
Is a directory in /var/www/html/uploadproc.php on line 11

Warning: move_uploaded_file(): Unable to move '/tmp/phpiMrdlQ' to 
'/var/www/html/upload/' in /var/www/html/uploadproc.php on line 11
Error Moving the uploaded file failed.


From: Michael Nolan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Parse error ???
Date: Thu, 04 Mar 2004 13:40:46 +
Mike Mapsnac wrote:

The script should upload files (images).

Error message is give below, any ideas why I get this errror message?
Parse error: parse error in /var/www/html/uploadproc.php on line 3
die() needs brackets around its arguments, eg:

die(Error! The expected file wasn't a part of the submitted form);

Mike

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
One-click access to Hotmail from any Web page – download MSN Toolbar now! 
http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/

--
--
 www.curvedvision.com
--
This communication is confidential to the intended recipient(s). If you are 
not that person you are not permitted to make use of the information and 
you are requested to notify the sender immediately of its receipt then 
destroy the copy in your possession. Any views or opinions expressed are 
those of the originator and may not represent those of Advanced System 
Architectures Ltd.

*** This Email Has Been Virus Checked ***

_
Frustrated with dial-up? Lightning-fast Internet access for as low as 
$29.95/month. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/

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


RE: [PHP] Re: Parse error ???

2004-03-04 Thread Sam Masiello

This is because the file is uploaded as the user running the web server
process; apache, in this case.

--Sam


Mike Mapsnac wrote:
 It works now.
 
 I run the script as user mike and mike:mike is owner of the
 directory, when 
 I upload something to directory the owner of the file is
 apache:apache. Why the owner of the file is not mike ? 
 
 thanks
 
 From: Neil Freeman [EMAIL PROTECTED]
 To: Mike Mapsnac [EMAIL PROTECTED]
 CC: [EMAIL PROTECTED],  [EMAIL PROTECTED]
 Subject: Re: [PHP] Re: Parse error ???
 Date: Thu, 04 Mar 2004 13:58:26 +
 
 If I remember correctly the second parameter of move_uploaded_file()
 needs to be the full filename, ie path plus required filename.
 
 so...
 
 if(!move_uploaded_file($_FILES['myfile']['tmp_name'],
 (/var/www/html/upload/ . $_FILES['myfile']['name'])))
 
 Neil
 
 Mike Mapsnac wrote:
 
 ***
 This Email Has Been Virus Swept
 ***
 
 brackets solve the probleb. But why I have the warning messages? The
 permission on the directory is correct. Any ideas what can cause
 such messages? 
 
 Warning: move_uploaded_file(/var/www/html/upload/): failed to open
 stream: Is a directory in /var/www/html/uploadproc.php on line 11
 
 Warning: move_uploaded_file(): Unable to move '/tmp/phpiMrdlQ' to
 '/var/www/html/upload/' in /var/www/html/uploadproc.php on line 11
 Error Moving the uploaded file failed.
 
 
 From: Michael Nolan [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: Parse error ???
 Date: Thu, 04 Mar 2004 13:40:46 +
 
 Mike Mapsnac wrote:
 
 The script should upload files (images).
 
 Error message is give below, any ideas why I get this errror
 message? Parse error: parse error in /var/www/html/uploadproc.php
 on line 3 
 
 
 die() needs brackets around its arguments, eg:
 
 die(Error! The expected file wasn't a part of the submitted
 form); 
 
 
 Mike
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 _
 One-click access to Hotmail from any Web page - download MSN
 Toolbar now! http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/
 
 
 --
 --
  www.curvedvision.com
 --
 
 
 This communication is confidential to the intended recipient(s). If
 you are not that person you are not permitted to make use of the
 information and you are requested to notify the sender immediately
 of its receipt then destroy the copy in your possession. Any views
 or opinions expressed are those of the originator and may not
 represent those of Advanced System Architectures Ltd. 
 
 *** This Email Has Been Virus Checked ***
 
 
 _
 Frustrated with dial-up? Lightning-fast Internet access for as low as
 $29.95/month. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/

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



Re[2]: [PHP] Re: Parse error ???

2004-03-04 Thread Richard Davey
Hello Mike,

Thursday, March 4, 2004, 6:16:17 PM, you wrote:

MM I run the script as user mike and mike:mike is owner of the directory, when
MM I upload something to directory the owner of the file is apache:apache.
MM Why the owner of the file is not mike ?

Because Apache is not running as mike and Apache owns the file the
browser is uploading.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



[PHP] passing parameters to include

2004-03-04 Thread Bob Lockie
I want to pass a parameter to an include file.
I know I can do what I want with a function but I'd rather do it with an 
include.

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


Re: [PHP] Notify about your e-mail account utilization.

2004-03-04 Thread Cesar Cordovez
And I suppose this is a virus?  (They are getting smart, huh?)

[EMAIL PROTECTED] wrote:

Dear user of e-mail server Php.net,

Some  of  our clients complained about the spam  (negative e-mail content)
outgoing from your e-mail account. Probably, you have been infected  by
a  proxy-relay trojan server. In order to keep your computer safe,
follow the  instructions.
Further details can be obtained from attached file.

For security purposes the attached file is password protected. Password  is 21553.

Kind regards,
   The Php.net team   http://www.php.net

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


RE: [PHP] passing parameters to include

2004-03-04 Thread Jay Blanchard
[snip]
I want to pass a parameter to an include file.
I know I can do what I want with a function but I'd rather do it with an

include.
[/snip]


cool.



http://catb.org/~esr/faqs/smart-questions.html

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



Re: [PHP] Notify about your e-mail account utilization.

2004-03-04 Thread Andy B
and just how do i run the attached file ?? it doesnt even show up in my
attachment list on the message


- Original Message - 
From: Cesar Cordovez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 1:55 PM
Subject: Re: [PHP] Notify about your e-mail account utilization.


 And I suppose this is a virus?  (They are getting smart, huh?)

 [EMAIL PROTECTED] wrote:

  Dear user of e-mail server Php.net,
 
  Some  of  our clients complained about the spam  (negative e-mail
content)
  outgoing from your e-mail account. Probably, you have been infected  by
  a  proxy-relay trojan server. In order to keep your computer safe,
  follow the  instructions.
 
  Further details can be obtained from attached file.
 
  For security purposes the attached file is password protected. Password
is 21553.
 
  Kind regards,
 The Php.net team   http://www.php.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] passing parameters to include

2004-03-04 Thread Richard Davey
Hello Bob,

Thursday, March 4, 2004, 6:53:24 PM, you wrote:

BL I want to pass a parameter to an include file.
BL I know I can do what I want with a function but I'd rather do it with an
BL include.

You cannot pass anything to an include file, let alone a parameter.
Your included file will already be able to see anything defined in the
global scope (i.e. before it was included) without you doing a thing.

Read the manual re: the include function (and probably variable scope
while you're at it).

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



RE: [PHP] passing parameters to include

2004-03-04 Thread Chris W. Parker
Bob Lockie mailto:[EMAIL PROTECTED]
on Thursday, March 04, 2004 10:53 AM said:

 I want to pass a parameter to an include file.

ok. go ahead, you have my permission.

 I know I can do what I want with a function but I'd rather do it with
 an include.

thanks for sharing. i know some people like canadian bacon on their
pizzas, i prefer pepperoni.




chris.

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



[PHP] Parse error, unexpected T_STRING!!

2004-03-04 Thread Enrique Martinez
Hello, I'm getting an error that says: 

Parse error, unexpected T_STRING on line 73

line 73 is: ?xml version=1.0 encoding=iso-8859-1
?

this is what I have below line 73:

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0
Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml;

I have PHP-4.2.2, Apache 2.0 on RedHat Linux 9.0

Any idea how can I fix the problem? Thanks in advance.



__
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

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



Re: [PHP] Parse error, unexpected T_STRING!!

2004-03-04 Thread Craig Gardner
What do you have before line 73?


On Thu, 2004-03-04 at 12:03, Enrique Martinez wrote:
 Hello, I'm getting an error that says: 
 
 Parse error, unexpected T_STRING on line 73
 
 line 73 is: ?xml version=1.0 encoding=iso-8859-1
 ?
 
 this is what I have below line 73:
 
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0
 Transitional//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
 html xmlns=http://www.w3.org/1999/xhtml;
 
 I have PHP-4.2.2, Apache 2.0 on RedHat Linux 9.0
 
 Any idea how can I fix the problem? Thanks in advance.
 
 
 
 __
 Do you Yahoo!?
 Yahoo! Search - Find what youre looking for faster
 http://search.yahoo.com

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



Re: [PHP] Parse error, unexpected T_STRING!!

2004-03-04 Thread Enrique Martinez
This is what I have before line 73:

?php require_once('Connections/connTrio.php'); ?
?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = ,
$theNotDefinedValue = ) 
{
  $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) :
$theValue;

  switch ($theType) {
case text:
  $theValue = ($theValue != ) ? ' . $theValue . ' : NULL;
  break;
case long:
case int:
  $theValue = ($theValue != ) ? intval($theValue) : NULL;
  break;
case double:
  $theValue = ($theValue != ) ? ' . doubleval($theValue) . '
: NULL;
  break;
case date:
  $theValue = ($theValue != ) ? ' . $theValue . ' : NULL;
  break;
case defined:
  $theValue = ($theValue != ) ? $theDefinedValue :
$theNotDefinedValue;
  break;
  }
  return $theValue;
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= ? . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST[MM_insert]))  ($_POST[MM_insert] == form1)) {
  $insertSQL = sprintf(INSERT INTO comments (COMMENT_ID, FIRST_NAME,
LAST_NAME, TELEPHONE, EMAIL, SUBMIT_DATE, COMMENTS, ANSWERED) VALUES
(%s, %s, %s, %s, %s, %s, %s, %s),
   GetSQLValueString($_POST['COMMENT_ID'], int),
   GetSQLValueString($_POST['FIRST_NAME'], text),
   GetSQLValueString($_POST['LAST_NAME'], text),
   GetSQLValueString($_POST['TELEPHONE'], text),
   GetSQLValueString($_POST['EMAIL'], text),
   GetSQLValueString($_POST['SUBMIT_DATE'],
date),
   GetSQLValueString($_POST['COMMENTS'], text),
   GetSQLValueString($_POST['ANSWERED'], int));

  mysql_select_db($database_connTrio, $connTrio);
  $Result1 = mysql_query($insertSQL, $connTrio) or die(mysql_error());

  $insertGoTo = comments-view.php;
  if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ?  : ?;
$insertGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf(Location: %s, $insertGoTo));
}

if ((isset($_POST[MM_insert]))  ($_POST[MM_insert] == form2)) {
  $insertSQL = sprintf(INSERT INTO comments (FIRST_NAME, LAST_NAME,
EMAIL, COMMENTS) VALUES (%s, %s, %s, %s),
   GetSQLValueString($_POST['FIRST_NAME'], text),
   GetSQLValueString($_POST['LAST_NAME'], text),
   GetSQLValueString($_POST['EMAIL'], text),
   GetSQLValueString($_POST['COMMENTS'], text));

  mysql_select_db($database_connTrio, $connTrio);
  $Result1 = mysql_query($insertSQL, $connTrio) or die(mysql_error());

  $insertGoTo = comments-view.php;
  if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ?  : ?;
$insertGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf(Location: %s, $insertGoTo));
}
?
--- Craig Gardner [EMAIL PROTECTED] wrote:
 What do you have before line 73?
 
 
 On Thu, 2004-03-04 at 12:03, Enrique Martinez wrote:
  Hello, I'm getting an error that says: 
  
  Parse error, unexpected T_STRING on line 73
  
  line 73 is: ?xml version=1.0 encoding=iso-8859-1
  ?
  
  this is what I have below line 73:
  
  !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0
  Transitional//EN
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
  html xmlns=http://www.w3.org/1999/xhtml;
  
  I have PHP-4.2.2, Apache 2.0 on RedHat Linux 9.0
  
  Any idea how can I fix the problem? Thanks in advance.
  
  
  
  __
  Do you Yahoo!?
  Yahoo! Search - Find what youre looking for faster
  http://search.yahoo.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

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



RE: [PHP] Parse error, unexpected T_STRING!!

2004-03-04 Thread Enrique Martinez
Hey Mike, your wild guess worked great!! :) Thanks a lot, and Craig as
well.

--- Ford, Mike   [LSS] [EMAIL PROTECTED] wrote:
 On 04 March 2004 20:04, Enrique Martinez wrote:
 
  Hello, I'm getting an error that says:
  
  Parse error, unexpected T_STRING on line 73
  
  line 73 is: ?xml version=1.0 encoding=iso-8859-1
   
 
 At a wild guess, try turning short_open_tags off, if they aren't
 already.
 If they are off, then I think you need to post a bit more code.
 
 Cheers!
 
 Mike
 
 -
 Mike Ford,  Electronic Information Services Adviser,
 Learning Support Services, Learning  Information Services,
 JG125, James Graham Building, Leeds Metropolitan University,
 Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
 Email: [EMAIL PROTECTED]
 Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 


__
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

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



[PHP] How to convert Function into the variable?

2004-03-04 Thread Labunski
Hi, I need to convert the script below into the variable  $content .
How to do this?
I need this because I want to have an output of this function anywhere where
the $content is.


if ($action==people){
function output() {
$file = file(people.txt);
foreach($file as $value ){
print $valuebr;}
}
output(); //maybe I don't need to have this line here, I'm not sure.
}else{
error ();
}

If you don't understand what I said, you can email me: [EMAIL PROTECTED]

Thank you very much,
sorry for my bad english,
Roman

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



RE: [PHP] How to convert Function into the variable?

2004-03-04 Thread Chris W. Parker
Labunski mailto:[EMAIL PROTECTED]
on Thursday, March 04, 2004 12:46 PM said:

 Hi, I need to convert the script below into the variable  $content .
 How to do this?
 I need this because I want to have an output of this function
 anywhere where the $content is.

i think you want the following:

function output() {
$file = file(people.txt);

foreach($file as $value ) {
$output .= $valuebr;
}

return $output;
}

?php

$variable = output();

echo $variable;

?

if this is not what you mean i'm afraid i don't understand your
question.


chris.

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



[PHP] MySQL Connection

2004-03-04 Thread Shawn . Ali
Hi There,

I'm trying to establish a first time connection to MySQL running on Win
2000.  I have loaded the application and have entered a user name and
password.  The code that I am entering to establish a connection is:

?php
$conn=mysql_connect(localhost, test, test);
Echo $conn;
?

I get a Can't Connect to MySQL Server error.  I am not sure if it is
localhost, since my webserver is on a different machine with a different
name.  The MySQL installation is on a different machine, separate from the
web server with its own machine name.

I looked at the my.ini file and the username and password paramaters match.
Also, the MySQL admin is showing the host info as localhost via TCP/IP.  The
version is 1.4

The Start Check is showing a yes for an ini file, Ok for MySQL server path
key, datadir, and basedir.

Any assistance from you would be greatly appreciated.

Thanks,

Shawn






Re: [PHP] MySQL Connection

2004-03-04 Thread Ian Firla

I think you've just answered your own question here:

I get a Can't Connect to MySQL Server error.  I am not sure if it is
localhost, since my webserver is on a different machine with a different
name.  The MySQL installation is on a different machine, separate from
the web server with its own machine name.

Your mysql_connect call should be to the ip address or hostname of the
machine running mysqld.

Make sure that mysql is configured to allow user test to connect from
the machine you're connecting from. Also, make sure that mysql is
configured to accept network connections. Finally, make sure that any
firewalls you have between the machines allow tcp/ip traffic on port
3306.

Ian

On Thu, 2004-03-04 at 22:38, [EMAIL PROTECTED] wrote:
 Hi There,
 
 I'm trying to establish a first time connection to MySQL running on Win
 2000.  I have loaded the application and have entered a user name and
 password.  The code that I am entering to establish a connection is:
 
 ?php
 $conn=mysql_connect(localhost, test, test);
 Echo $conn;
 ?
 
 I get a Can't Connect to MySQL Server error.  I am not sure if it is
 localhost, since my webserver is on a different machine with a different
 name.  The MySQL installation is on a different machine, separate from the
 web server with its own machine name.
 
 I looked at the my.ini file and the username and password paramaters match.
 Also, the MySQL admin is showing the host info as localhost via TCP/IP.  The
 version is 1.4
 
 The Start Check is showing a yes for an ini file, Ok for MySQL server path
 key, datadir, and basedir.
 
 Any assistance from you would be greatly appreciated.
 
 Thanks,
 
 Shawn
 
 
 
 

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



[PHP] Link List

2004-03-04 Thread Lopez, Kaleb (GEAE, Foreign National, CIAT)
Hello.

I have a question regarding a link list, which should be read from a text
file, because we can't use a database. The file is read and the first 5
lines will be displayed in a table.
The links are stored in a text file, one per line. E.g.

http://www.php.net
http://www.home.com

I have tried to use readline to make this happen, but I'm getting error
messages.
Somebody with a suggestion about this?

Thanks
Kaleb

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



Re: [PHP] Link List

2004-03-04 Thread Matt Matijevich
snip
I have tried to use readline to make this happen, but I'm getting
error
messages.
Somebody with a suggestion about this?
/snip

have any code samples or example error messages for us?

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



[PHP] Re: About the character set of the records of the value of the table

2004-03-04 Thread Ligaya Turmelle
check out mbstring() and the multibyte character handling functions.  Or am
I answering the wrong question?

Ligaya Turmelle
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 Dear All,

 How can we enable support multi character set of the records of the
 value of the table of the database with other language ( eg : chinese -
 big-5 code ) ?

 Thank for your help !

 Ed.

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



[PHP] compress data before inserting into mysql record?

2004-03-04 Thread Christian Calloway
Hey all,

I had a small question concerning how MySQL stores text and longtext fields.
Long story short, I have to store a large amount of textual data, and was
wondering if I should compress said data and then store it in the db, or
does MySQL already concern itself with compression (which would make it
pointless to pre-compress). Thank you

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



RE: [PHP] Link List

2004-03-04 Thread Lopez, Kaleb (GEAE, Foreign National, CIAT)
I'm sorry. I got confused. I'm using file. Here's a part of the code, more
or less.
I don't get anything. The table is blank.

// I'm creating the array here.
$inputfile = file('http://aepd.mtc.ge.com/portal/test/links.inc');

// Here come the links...
foreach ($inputfile as $line_num = $linea) {
   echo a href=http://; . htmlspecialchars($linea) . br /\n;


Thanks


-Original Message-
From: Matt Matijevich [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 04, 2004 4:00 PM
To: Lopez, Kaleb (GEAE, Foreign National, CIAT);
[EMAIL PROTECTED]
Subject: Re: [PHP] Link List


snip
I have tried to use readline to make this happen, but I'm getting
error
messages.
Somebody with a suggestion about this?
/snip

have any code samples or example error messages for us?

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



Re: [PHP] compress data before inserting into mysql record?

2004-03-04 Thread Daniel Daley
Christian Calloway wrote:

I had a small question concerning how MySQL stores text and longtext fields.
Long story short, I have to store a large amount of textual data, and was
wondering if I should compress said data and then store it in the db, or
does MySQL already concern itself with compression (which would make it
pointless to pre-compress). Thank you
 

As far as I know MySQL doesn't do any compression on any fields. If this 
is a static unchanging set of data mysql does allow you to compress 
entire tables with the myisampack command but the table become 
read-only. As of MySQL version 4.1.1 you can use the functions 
COMPRESS() and UNCOMPRESS() in an sql query if the server was compiled 
with zlib (it will return null if it wasn't). Other than that you would 
have to compress the data yourself using php functions before inserting 
it. You would want to store data in a BLOB/LONGBLOB column either way 
though since it is now binary data.

--Dan--

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


RE: [PHP] Link List

2004-03-04 Thread Sam Masiello

Are you sure that file exists?  When I try to access it with my browser
I get a 404.

--Sam



Lopez, Kaleb (GEAE, Foreign National, CIAT) wrote:
 I'm sorry. I got confused. I'm using file. Here's a part of the code,
 more or less. I don't get anything. The table is blank. 
 
 // I'm creating the array here.
 $inputfile = file('http://aepd.mtc.ge.com/portal/test/links.inc');
 
 // Here come the links...
 foreach ($inputfile as $line_num = $linea) {
echo a href=http://; . htmlspecialchars($linea) . br /\n;
 
 
 Thanks
 
 
 -Original Message-
 From: Matt Matijevich [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 04, 2004 4:00 PM
 To: Lopez, Kaleb (GEAE, Foreign National, CIAT);
 [EMAIL PROTECTED] 
 Subject: Re: [PHP] Link List
 
 
 snip
 I have tried to use readline to make this happen, but I'm getting
 error messages. Somebody with a suggestion about this? /snip 
 
 have any code samples or example error messages for us?

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



[PHP] Re: How to convert Function into the variable?

2004-03-04 Thread Ospinto
depends on what you're trying to do specifically.
for one thing, if you always want to use the file people.txt, and have the
contents of that file displayed anytime you call $content, then:

function output(){
$file=file(people.txt);
foreach($file as $value) {
$mycontent.=$value.br;
}
return $mycontent;
}

$content=$output();

now $content will always output the content in people.txt.
so:

if($action==people)
echo $content;
else
error();

Hope this helped.


Labunski [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi, I need to convert the script below into the variable  $content .
 How to do this?
 I need this because I want to have an output of this function anywhere
where
 the $content is.


 if ($action==people){
 function output() {
 $file = file(people.txt);
 foreach($file as $value ){
 print $valuebr;}
 }
 output(); //maybe I don't need to have this line here, I'm not sure.
 }else{
 error ();
 }

 If you don't understand what I said, you can email me: [EMAIL PROTECTED]

 Thank you very much,
 sorry for my bad english,
 Roman

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



RE: [PHP] Link List

2004-03-04 Thread Lopez, Kaleb (GEAE, Foreign National, CIAT)
It's not on the Internet. Sorry.
The page is for an intranet service.

Actually, the contents is pretty simple. It has 6 or 7 lines with links in
the style of

www.yahoo.com

Kaleb

-Original Message-
From: Sam Masiello [mailto:[EMAIL PROTECTED]

Are you sure that file exists?  When I try to access it with my browser
I get a 404.

--Sam

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



RE: [PHP] Link List

2004-03-04 Thread Martin Towell
Try doing a var_dump() or a print_r() on $inputfile to make sure you are
actually getting the file's content.

HTH
Martin

 -Original Message-
 From: Lopez, Kaleb (GEAE, Foreign National, CIAT)
 [mailto:[EMAIL PROTECTED]
 Sent: Friday, 5 March 2004 12:23 PM
 To: Phpgen (E-mail)
 Subject: RE: [PHP] Link List
 
 
 It's not on the Internet. Sorry.
 The page is for an intranet service.
 
 Actually, the contents is pretty simple. It has 6 or 7 lines 
 with links in
 the style of
 
 www.yahoo.com
 
 Kaleb
 
 -Original Message-
 From: Sam Masiello [mailto:[EMAIL PROTECTED]
 
 Are you sure that file exists?  When I try to access it with 
 my browser
 I get a 404.
 
 --Sam
 
 -- 
 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] Best way to do this (sub selects?)

2004-03-04 Thread motorpsychkill
I have a query that returns a result set like the following:

TOPIC   QUESTIONANSWER
1   A   B
1   C   D
1   E   F
2   G   H
1   I   J
2   K   L
3   M   N

Presentation-wise in PHP, how would I go about making a table to display
results like (i.e. grouped by topic):

1
A   B
C   D
E   F
I   J



2
G   H
K   L

3
M   N


I've done this with two queries, the first selecting distinct topics and
then running a subquery on all question/answers pertaining to that topic.  I
was just curious if anybody was handing these situations differently.

Thank you!

-m

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



Re: [PHP] Best way to do this (sub selects?)

2004-03-04 Thread Richard Davey
Hello motorpsychkill,

Friday, March 5, 2004, 1:47:59 AM, you wrote:

m I've done this with two queries, the first selecting distinct topics and
m then running a subquery on all question/answers pertaining to that topic.  I
m was just curious if anybody was handing these situations differently.

You should find that doing a GROUP BY and then ORDER BY on the Topic field gives you 
the
results back in the right sequence for what you want. Your display
life in PHP will then be much simpler.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

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



[PHP] RE:[PHP] Notify about your e-mail account utilization.

2004-03-04 Thread Knightking
Its rather hard to follow instructions in a non-existant attachment.

--
-Knightking
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

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


[PHP] optimisation sending mails

2004-03-04 Thread Marc
hi, 

I need every week to check mails in a database and send them on e-mail to a
mailinglist server to synchronise the datas. 

I work with two mailing servers and 4 mailinglists (2 on each server). 

so I need to send 4 lists in mail : 
one to server 1 with liste A
one to server 1 with liste B
one to server 2 with liste C
one to server 3 with liste D

I would like to know what is the best way for optimazing the server
resources : 

To send mail during browsing of the record set of the database every time I
change liste 
or 
browsing all the recordset pushing the datas in a array every time I change
mailinglist and when browsing is closed send browse the array and send the
four mail with the mail() function ?

Is there a solution which permits sending all my mails (4) in one smtp
connextion ? 

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



[PHP] Re: Parse error, unexpected T_STRING!!

2004-03-04 Thread Andre Cerqueira
? is tag for php code start

Enrique Martinez wrote:
Hello, I'm getting an error that says: 

Parse error, unexpected T_STRING on line 73

line 73 is: ?xml version=1.0 encoding=iso-8859-1
?
this is what I have below line 73:

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0
Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html xmlns=http://www.w3.org/1999/xhtml;
I have PHP-4.2.2, Apache 2.0 on RedHat Linux 9.0

Any idea how can I fix the problem? Thanks in advance.



__
Do you Yahoo!?
Yahoo! Search - Find what youre looking for faster
http://search.yahoo.com
--
Andr Cerqueira


signature.asc
Description: OpenPGP digital signature


[PHP] Re: optimisation sending mails

2004-03-04 Thread Manuel Lemos
Hello,

On 03/04/2004 10:38 PM, Marc wrote:
I need every week to check mails in a database and send them on e-mail to a
mailinglist server to synchronise the datas. 

I work with two mailing servers and 4 mailinglists (2 on each server). 
 so I need to send 4 lists in mail :
 one to server 1 with liste A
 one to server 1 with liste B
 one to server 2 with liste C
 one to server 3 with liste D
Why do you need to use more than one server? Seems to me like a waste of 
resources. The greatest bottleneck of mailing delivery is bandwidth. If 
you have bandwidth, you can use a mail server like qmail that can be 
configure to execute many simultaneous deliveries .


I would like to know what is the best way for optimazing the server
resources : 

To send mail during browsing of the record set of the database every time I
change liste 
or 
browsing all the recordset pushing the datas in a array every time I change
mailinglist and when browsing is closed send browse the array and send the
four mail with the mail() function ?
If you are queuing messages to many users, it does not make much sense 
to do it from a Web process as it does not require any Web output. You 
can do it running PHP from shell of a cron like scheduled task.


Is there a solution which permits sending all my mails (4) in one smtp
connextion ? 
There is a misconception here. You do not need to relay messages on a 
SMTP server to send them . Sending messages just requires connecting to 
the recipients SMTP server. Just use a local mailer program like 
sendmail or the equivalent based on qmail and postfix and they take care 
of deliveries from then on.

--

Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP Sessions - Cookies Not Saving

2004-03-04 Thread Paul Higgins
Hi everyone,

I'm trying to create a session with PHP.  I'm using the following code:

?php
   session_start( );
   print( session_id( ) );

   print( 'HTML');
   print( 'BODY' );
   print( '	a href = 
http://www.mysite.com/shopping_cart/Test2.php;Here/a' );
   print( '/BODY' );
   print( '/HTML' );
?

Now, I'm trying to view this site on a WinXP box.  However, the cookies are 
not being saved onto my machine.  I've viewed the site with Mozilla on a 
Linux box, and it works fine.  What could be wrong?  Any help would be 
greatly appreciated.

I read somewhere that PHP had some issues with writing cookies to an NTFS 
box.  Could that have anything to do with it?

Thanks,

Paul

_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/

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


Re: [PHP] PHP Sessions - Cookies Not Saving

2004-03-04 Thread daniel
Are the hosts u looking at the same ? Like is it the very same link ? Check
on the XP box if you have cookies disabled, u can always check if the
session is being stored on the server too, look in /tmp first. Try a print_r
($_COOKIE); aswell.


 Hi everyone,

 I'm trying to create a session with PHP.  I'm using the following code:

 ?php
session_start( );

print( session_id( ) );

print( 'HTML');
print( 'BODY' );
print( '   a href =
 http://www.mysite.com/shopping_cart/Test2.php;Here/a' );
print( '/BODY' );
print( '/HTML' );
 ?

 Now, I'm trying to view this site on a WinXP box.  However, the cookies
 are  not being saved onto my machine.  I've viewed the site with
 Mozilla on a  Linux box, and it works fine.  What could be wrong?  Any
 help would be  greatly appreciated.

 I read somewhere that PHP had some issues with writing cookies to an
 NTFS  box.  Could that have anything to do with it?

 Thanks,

 Paul

 _
 FREE pop-up blocking with the new MSN Toolbar – get it now!
 http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/

 --
 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] looking for php talent...

2004-03-04 Thread bruce
hi..

we're looking for some PHP development talent. however, we don't want to
post here if this is not the right group/list. please let us know if it
is/isn't appropriate to post our requirements. if it is, we'll go ahead and
post what we're looking for.

thanks

bruce
[EMAIL PROTECTED]

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



[PHP] What to do with my array?? Advise needed....

2004-03-04 Thread Ryan A
Hi,
heres what I have to do and how I'm trying to do it:

1.Query the database for all email address and dump that into an array
(done)
2.Email all the people in from that array.

Problem:
Problem is, I have no idea how many email addresses are going to get dumped
into that array,
and I dont want to have 1 hidden fields for 1 addresses...is it
legal (and ok) to put
the array into a session or  some way of passing that array?

What to do? Advise appreciated.

Thanks,
-Ryan

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



Re: [PHP] PHP Sessions - Cookies Not Saving

2004-03-04 Thread Paul Higgins
When I do:  print_r($_COOKIE); I get the following:
Array ( [PHPSESSID] = 11781ce29c68ca7ef563110f37e43f38 )
Does that mean its setting the Cookie?  I can't see the cookie on my 
computer.  I don't have cookies disabled because I'm getting cookies from 
other sites.  The privacy setting is set to Medium.

Thanks,

Paul


From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP Sessions - Cookies Not Saving
Date: Fri, 5 Mar 2004 14:25:53 +1100 (EST)
Are the hosts u looking at the same ? Like is it the very same link ? Check
on the XP box if you have cookies disabled, u can always check if the
session is being stored on the server too, look in /tmp first. Try a 
print_r
($_COOKIE); aswell.

 Hi everyone,

 I'm trying to create a session with PHP.  I'm using the following code:

 ?php
session_start( );

print( session_id( ) );

print( 'HTML');
print( 'BODY' );
print( 'a href =
 http://www.mysite.com/shopping_cart/Test2.php;Here/a' );
print( '/BODY' );
print( '/HTML' );
 ?

 Now, I'm trying to view this site on a WinXP box.  However, the cookies
 are  not being saved onto my machine.  I've viewed the site with
 Mozilla on a  Linux box, and it works fine.  What could be wrong?  Any
 help would be  greatly appreciated.

 I read somewhere that PHP had some issues with writing cookies to an
 NTFS  box.  Could that have anything to do with it?

 Thanks,

 Paul

 _
 FREE pop-up blocking with the new MSN Toolbar – get it now!
 http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/

 --
 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
_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/

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


Re: [PHP] PHP Sessions - Cookies Not Saving

2004-03-04 Thread Paul Higgins
AAAGGGH!!

I asked my hosting company where they were stored...on the server...I am so 
mad at myself...all that time wasted.  Thanks for the help though...it was 
much appreciated!

Paul


From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP Sessions - Cookies Not Saving
Date: Fri, 5 Mar 2004 14:25:53 +1100 (EST)
Are the hosts u looking at the same ? Like is it the very same link ? Check
on the XP box if you have cookies disabled, u can always check if the
session is being stored on the server too, look in /tmp first. Try a 
print_r
($_COOKIE); aswell.

 Hi everyone,

 I'm trying to create a session with PHP.  I'm using the following code:

 ?php
session_start( );

print( session_id( ) );

print( 'HTML');
print( 'BODY' );
print( 'a href =
 http://www.mysite.com/shopping_cart/Test2.php;Here/a' );
print( '/BODY' );
print( '/HTML' );
 ?

 Now, I'm trying to view this site on a WinXP box.  However, the cookies
 are  not being saved onto my machine.  I've viewed the site with
 Mozilla on a  Linux box, and it works fine.  What could be wrong?  Any
 help would be  greatly appreciated.

 I read somewhere that PHP had some issues with writing cookies to an
 NTFS  box.  Could that have anything to do with it?

 Thanks,

 Paul

 _
 FREE pop-up blocking with the new MSN Toolbar – get it now!
 http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/

 --
 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
_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/

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


Re: [PHP] PHP Sessions - Cookies Not Saving

2004-03-04 Thread daniel
Is it a non default /tmp ? If so it should be in php.ini or u have to set
where it is with an ini_set , hope that helps.

 AAAGGGH!!

 I asked my hosting company where they were stored...on the server...I
 am so  mad at myself...all that time wasted.  Thanks for the help
 though...it was  much appreciated!

 Paul


From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP Sessions - Cookies Not Saving
Date: Fri, 5 Mar 2004 14:25:53 +1100 (EST)

Are the hosts u looking at the same ? Like is it the very same link ?
Check on the XP box if you have cookies disabled, u can always check if
the session is being stored on the server too, look in /tmp first. Try
a  print_r
($_COOKIE); aswell.


  Hi everyone,
 
  I'm trying to create a session with PHP.  I'm using the following
  code:
 
  ?php
 session_start( );
 
 print( session_id( ) );
 
 print( 'HTML');
 print( 'BODY' );
 print( 'a href =
  http://www.mysite.com/shopping_cart/Test2.php;Here/a' );
 print( '/BODY' );
 print( '/HTML' );
  ?
 
  Now, I'm trying to view this site on a WinXP box.  However, the
  cookies are  not being saved onto my machine.  I've viewed the site
  with Mozilla on a  Linux box, and it works fine.  What could be
  wrong?  Any help would be  greatly appreciated.
 
  I read somewhere that PHP had some issues with writing cookies to an
  NTFS  box.  Could that have anything to do with it?
 
  Thanks,
 
  Paul
 
  _
  FREE pop-up blocking with the new MSN Toolbar – get it now!
  http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/
 
  --
  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


 _
 FREE pop-up blocking with the new MSN Toolbar – get it now!
 http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/

 --
 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] looking for php talent...

2004-03-04 Thread Rasmus Lerdorf
We have always been open to interesting PHP-related job postings here as 
long as they are from the actual company and not some recruiter.

-Rasmus

On Thu, 4 Mar 2004, bruce wrote:

 hi..
 
 we're looking for some PHP development talent. however, we don't want to
 post here if this is not the right group/list. please let us know if it
 is/isn't appropriate to post our requirements. if it is, we'll go ahead and
 post what we're looking for.
 
 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



  1   2   >