[PHP] RE: PHP 4.2.3 and Apache 2.0.43 on FreeBSD 4.7

2002-11-03 Thread Peter Black
Hello,

I have been running into problems getting Apache 2.0.43 to work with PHP
4.2.3 as a module. The following is the error I get ... 

Cannot load /usr/local/APACHE/modules/libphp4.so into server:
/usr/local/APACHE/modules/libphp4.so: Undefined symbol
pthread_getspecific

Having said that, I did my research and found that many have come across
the same error and managed to get passed it by installing pthreads. Any
references and/or information on how to get passed this issue would be
greatly appreciated.

Regards,
Peter


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




php-general Digest 3 Nov 2002 08:44:23 -0000 Issue 1682

2002-11-03 Thread php-general-digest-help

php-general Digest 3 Nov 2002 08:44:23 - Issue 1682

Topics (messages 122532 through 122546):

Re: Problem with is_dir function
122532 by: Andrew Brampton
122533 by: Roger Lewis

XSLT Sablotron output
122534 by: Daniele Baroncelli

Send $out embedded in a mail in HTML FORMAT
122535 by: Kevin Fradkin

Geographic IP location
122536 by: olinux
122537 by: Jason Reid
122538 by: olinux

ereg (Why,  Does sort of  work)?
122539 by: David Jackson

Cookies disabled, new session ID each click!
122540 by: Steve Fatula
122545 by: Chris Shiflett

Re: Session Management
122541 by: Robert Samuel White

need help with project
122542 by: Karl James
122543 by: David Jackson
122544 by: David Jackson

Re: PHP 4.2.3 and Apache 2.0.43 on  FreeBSD 4.7
122546 by: Peter Black

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--

---BeginMessage---
what values of $user_dir are you passing to is_dir?

echo them out before the test, you might be sending paths which are most
certainly not directories... for example:
c:\windows
/home/blah
would be valid, but
c:\windows\win.com
/home/blah/myfile
http://somesite/somepath
ftp://someftpserver/incoming
are invalid

Hope this helps
Andrew
- Original Message -
From: Roger Lewis [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: Saturday, November 02, 2002 7:06 PM
Subject: [PHP] Problem with is_dir function


 I'm having a problem with the is_dir function, or maybe I don't understand
 how it supposed to work.  I'm using the following code to check whether or
 not a directory called $user_dir exists.  If it exists, I am returned the
 proper message.  But if it doesn't exist, I get the following error
message
 that says that it doesn't exist. (I already knew that!)


 ERROR Number=8 Description=Error: quot;stat failed for
 /home/sites/home/users/demodocs/web/userforum/user
 (errno=2 - No such file or directory)quot; on line 175 of
 /home/sites/home/users/demo/web/user_forum/messages.php./


 Can someone please explain what I am doing wrong here, and how to return a
 usable value if the directory doesn't exist.


 $test = is_dir($user_dir);
 if($test){echo You have a user directory.  It is $user_dir;}
 else{echo Your user directory doesn't exist;
 return;}


 Thanks a lot.

 Roger Lewis




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




---End Message---
---BeginMessage---
I believe the path is of the correct format.
So for example, if
$user_dir = /home/sites/home/users/demodocs/web/userforum/user
and $user_dir exists, then
is_dir($user_dir) should = 1
however, if $user_dir doesn't exist, then
is_dir($user_dir) should = 0

Isn't this the correct logic?

Roger


-Original Message-
From: Andrew Brampton [mailto:andrew;bramp.freeserve.co.uk]
Sent: Saturday, November 02, 2002 11:24 AM
To: Roger Lewis; [EMAIL PROTECTED]
Subject: Re: [PHP] Problem with is_dir function

what values of $user_dir are you passing to is_dir?

echo them out before the test, you might be sending paths which are most
certainly not directories... for example:
c:\windows
/home/blah
would be valid, but
c:\windows\win.com
/home/blah/myfile
http://somesite/somepath
ftp://someftpserver/incoming
are invalid

Hope this helps
Andrew
- Original Message -
From: Roger Lewis [EMAIL PROTECTED]
To: Php-General [EMAIL PROTECTED]
Sent: Saturday, November 02, 2002 7:06 PM
Subject: [PHP] Problem with is_dir function


 I'm having a problem with the is_dir function, or maybe I don't understand
 how it supposed to work.  I'm using the following code to check whether or
 not a directory called $user_dir exists.  If it exists, I am returned the
 proper message.  But if it doesn't exist, I get the following error
message
 that says that it doesn't exist. (I already knew that!)


 ERROR Number=8 Description=Error: quot;stat failed for
 /home/sites/home/users/demodocs/web/userforum/user
 (errno=2 - No such file or directory)quot; on line 175 of
 /home/sites/home/users/demo/web/user_forum/messages.php./


 Can someone please explain what I am doing wrong here, and how to return a
 usable value if the directory doesn't exist.


 $test = is_dir($user_dir);
 if($test){echo You have a user directory.  It is $user_dir;}
 else{echo Your user directory doesn't exist;
 return;}


 Thanks a lot.

 Roger Lewis




 --
 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


---End Message---
---BeginMessage---
Hi guys,

I have typed a simple script to test the Sablotron module 

[PHP] Send mail in HTML FORMAT

2002-11-03 Thread Kevin Fradkin
I read from a template, insert data and save it as a new file with html
code...
i want to send that file that is the same as $out via mail embedded in it...

i do

$fifi = fopen ('/'.$cursada.$cuatrimestre.'/'.$registronro.'.htm', w);
$fp = $fifi;
fputs ($fifi, $out . );
fclose ($fifi);
mail([EMAIL PROTECTED], subject,$out , From: website);

but when i receive that mail.. i get the source of the file with html
body bla bla bla not in HTML FORMAT..

thnx in advance!..

Spooky


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




[PHP] Variables

2002-11-03 Thread Bryan McLemore
What is a variables value before said value has been assigned a value?

Thanks
Bryan



Re: [PHP] Cookies disabled, new session ID each click!

2002-11-03 Thread Steve Fatula
Not using trans_sid, but it is set for this example and it doesn't 
matter either way, intentionally putting the SID on the link myself, 
this is the way the vendor software is set up. So, I want someone to run 
this example, and see if it works for them, and if it does, what might 
be the reason it does not work for me?

Steve

Chris Shiflett wrote:

Steve,

Check your php.ini file. PHP uses cookies for maintaining your Web 
client's unique ID, and unless you have use_trans_sid set, it will not 
attempt to pass the unique ID on the URL for those who have cookies 
disabled.

Chris

Steve Fatula wrote:

When you click on the link in the code, it gives you a session ID. 
Then, when you click again, it goes away. The SID appears to be blank 
every other time.

Why would that be? I am using PHP 4.2.0 and 4.2.2, BSD and Linux, and 
Apache 1.3.20 something. Two different hosts. Same result. Client is 
IE5.5 with cookies disabled, running on NT.






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




[PHP] Re: Variables

2002-11-03 Thread David Jackson
Bryan McLemore wrote:

What is a variables value before said value has been assigned a value?

Thanks
Bryan



Wouldn't it be null or empty  ?

Just a guess,
David



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




[PHP] how can me know the disbaled functions in php?

2002-11-03 Thread Alawi

How can me know?


Re: [PHP] how can me know the disbaled functions in php?

2002-11-03 Thread Rasmus Lerdorf
phpinfo()

On Sun, 3 Nov 2002, Alawi wrote:


 How can me know?


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




Re: [PHP] Variables

2002-11-03 Thread Hugh Danaher
Bryan,
I don't think the variable has any value before assignment--it isn't zerro
nor is it null.  Check the manual for isset() and empty()'
Hope this helps.
Hugh

- Original Message -
From: Bryan McLemore [EMAIL PROTECTED]
To: PHP - General [EMAIL PROTECTED]
Sent: Sunday, November 03, 2002 1:01 AM
Subject: [PHP] Variables


What is a variables value before said value has been assigned a value?

Thanks
Bryan



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




[PHP] max_ execution_time for scripts launched from command line

2002-11-03 Thread gap
Does the execution time limit apply to scripts that have been launched from
the shell command line and run independent from the http server (that is,
not as CGI and not through the server module)? If I give a script a shebang
line (#!/usr/bin/php -q), and make it executable, will it run for as long as
it takes to complete?

And if I don't have shell access, how can I run the script (I suppose that
calling it via the web server will limit its execution time)?

Thanks.



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




[PHP] fread() fails with large files

2002-11-03 Thread Sora B. Harbater
Hi.  I am using Linux/Apache with PHP 4.1.2.  I have been experiencing this 
problem since upgrading from an earlier version of PHP 4.

My script forces a download of a PDF file after looking up some info in a 
database.  The code looks like this:


$file=/path/to/file;
$fp = fopen($file, r);
$size=filesize($file);
$contents = fread($fp, $size);
fclose($fp);

Header(Content-Type: $type);
Header(Content-Disposition: attachment; filename=$downloadname);
header(Content-Length: $size);
header(Content-Transfer-Encoding: binary);
echo $contents;

filesize() is reporting the size properly. The code works perfectly for 
smaller files, but the fread() fails for files larger than 19 MB or so and 
I got a page cannot be displayed error. I know that it is fread() which is 
causing the problem because I commented out all the code that follows it 
and still get the error.  All the files being downloaded are PDF files.

Can anyone shed some light on this?



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



[PHP] what i'm doing wrong? (mysql/php)

2002-11-03 Thread Mr. BuNgL3
I can't validate this two variables ($logintxt, $passwdtxt)

?
$logintxt = $HTTP_POST_VARS['logintxt'];
$passwdtxt= $HTTP_POST_VARS['passwdtxt'];

if (!$logintxt || !$passwdtxt)
{
 include('login.htm');
}
else
{
 $ligacao=mysql_connect(localhost,,);
 if (!$ligacao)
 {
  echo 
  html
  titleERROR!!/title
  bodyProblemas na ligação á base de dados!/body
  ;
 }
 else
 {
  $pass=md5($passwdtxt);
  $sql=SELECT login,passwd FROM users WHERE (login='$logintxt') 
(passwd='$pass');
  $result=mysql_db_query(mysite,$sql) or die (mysql_error());
  if ($result)
  {
   $reg=mysql_fetch_array($result);
   if ($pass==$reg[passwd]  $logintxt==$reg[login])
   {
echo 
html
titleXaram!!/title
bodyUser logged in/body
;
   }
   else
   {
echo 
html
titleERROR!!/title
bodyUser não existente ou inválido/body
;
   }

  }
  else
  {
   echo 
   html
   titleERROR!!/title
   bodyNo result/body
   ;
  }


 }
 mysql_close();
}
?

it keeps telling me User não existente ou inválido i guess that the
problem is in the line code if ($pass==$reg[passwd] 
$logintxt==$reg[login]) but i can't figure it out!! what i'm doing wrong?

Thanks for the help...




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




RE: [PHP] what i'm doing wrong? (mysql/php)

2002-11-03 Thread John W. Holmes
Don't use mysql_db_query() for one. Use mysql_select_db() and
mysql_query(). 

Also, what's the structure of your table and how are you putting the
user's login and password in the table. If you're getting that message,
then that means there were no rows matched, plain and simple. It could
be for a variety of reasons. You might want to echo out the query before
you execute it just to make sure it's what you think it is. 

---John Holmes...

 -Original Message-
 From: Mr. BuNgL3 [mailto:mrbungle;netcabo.pt]
 Sent: Sunday, November 03, 2002 9:43 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] what i'm doing wrong? (mysql/php)
 
 I can't validate this two variables ($logintxt, $passwdtxt)
 
 ?
 $logintxt = $HTTP_POST_VARS['logintxt'];
 $passwdtxt= $HTTP_POST_VARS['passwdtxt'];
 
 if (!$logintxt || !$passwdtxt)
 {
  include('login.htm');
 }
 else
 {
  $ligacao=mysql_connect(localhost,,);
  if (!$ligacao)
  {
   echo 
   html
   titleERROR!!/title
   bodyProblemas na ligação á base de dados!/body
   ;
  }
  else
  {
   $pass=md5($passwdtxt);
   $sql=SELECT login,passwd FROM users WHERE (login='$logintxt') 
 (passwd='$pass');
   $result=mysql_db_query(mysite,$sql) or die (mysql_error());
   if ($result)
   {
$reg=mysql_fetch_array($result);
if ($pass==$reg[passwd]  $logintxt==$reg[login])
{
 echo 
 html
 titleXaram!!/title
 bodyUser logged in/body
 ;
}
else
{
 echo 
 html
 titleERROR!!/title
 bodyUser não existente ou inválido/body
 ;
}
 
   }
   else
   {
echo 
html
titleERROR!!/title
bodyNo result/body
;
   }
 
 
  }
  mysql_close();
 }
 ?
 
 it keeps telling me User não existente ou inválido i guess that the
 problem is in the line code if ($pass==$reg[passwd] 
 $logintxt==$reg[login]) but i can't figure it out!! what i'm doing
 wrong?
 
 Thanks for the help...
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




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




RE: [PHP] Session Management

2002-11-03 Thread John W. Holmes
 These were all the same assumptions I made, thanks.  I knew that it
was
 more of an HTTP thing than a PHP thing when it came to the blind
 faith thing...  I was just hoping that was something better out
 there.  I'm not willing to use session management as blindly as it is
 currently implemented.  I will find my own solution.

If you find a better method, please let everyone know. But I think this
is about the best you can do over HTTP. 

---John Holmes...



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




RE: [PHP] Send $out embedded in a mail in HTML FORMAT

2002-11-03 Thread John W. Holmes
Search the archives or google for HTML email with PHP and you'll get a
ton of examples. You just have to send a Content-Type: header to tell
the mail reader it's HTML.

---John Holmes...

 -Original Message-
 From: Kevin Fradkin [mailto:kfradkin;ciudad.com.ar]
 Sent: Saturday, November 02, 2002 7:53 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Send $out embedded in a mail in HTML FORMAT
 
 I read from a template, insert data and save it as a new file with
html
 code...
 i want to send that file that is the same as $out via mail embedded in
 it...
 
 i do
 
 $fifi = fopen ('/'.$cursada.$cuatrimestre.'/'.$registronro.'.htm',
w);
 $fp = $fifi;
 fputs ($fifi, $out . );
 fclose ($fifi);
 mail([EMAIL PROTECTED], subject,$out , From: website);
 
 but when i receive that mail.. i get the source of the file with
html
 body bla bla bla not in HTML FORMAT..
 
 thnx in advance!..
 
 Spooky
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




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




RE: [PHP] Session Management

2002-11-03 Thread Robert Samuel White
I already know how best to go about this.  I've been up too long to
explain this now.  But since eNetwizard Content Management Server is an
open source project, you'll be able to make use of its code if you so
choose, just wait till I release the next version.  ;-)

Session Management for eNetwizard is handled by the $State class, so it
shouldn't be too hard for others to make use of it independently for
their own projects.

-Samuel | http://enetwizard.net


-Original Message-
From: John W. Holmes [mailto:holmes072000;charter.net] 
Sent: Sunday, November 03, 2002 9:56 AM
To: 'Robert Samuel White'; [EMAIL PROTECTED]
Subject: RE: [PHP] Session Management

 These were all the same assumptions I made, thanks.  I knew that it
was
 more of an HTTP thing than a PHP thing when it came to the blind
 faith thing...  I was just hoping that was something better out
 there.  I'm not willing to use session management as blindly as it is
 currently implemented.  I will find my own solution.

If you find a better method, please let everyone know. But I think this
is about the best you can do over HTTP. 

---John Holmes...







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




Re: [PHP] Send $out embedded in a mail in HTML FORMAT

2002-11-03 Thread Jonathan Sharp
search google for 'phpmailer' (I think http://phpmailer.sourceforge.net)

-js


John W. Holmes wrote:
 Search the archives or google for HTML email with PHP and you'll get a
 ton of examples. You just have to send a Content-Type: header to tell
 the mail reader it's HTML.
 
 ---John Holmes...
 
 
-Original Message-
From: Kevin Fradkin [mailto:kfradkin;ciudad.com.ar]
Sent: Saturday, November 02, 2002 7:53 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Send $out embedded in a mail in HTML FORMAT

I read from a template, insert data and save it as a new file with
 
 html
 
code...
i want to send that file that is the same as $out via mail embedded in
it...

i do

$fifi = fopen ('/'.$cursada.$cuatrimestre.'/'.$registronro.'.htm',
 
 w);
 
$fp = $fifi;
fputs ($fifi, $out . );
fclose ($fifi);
mail([EMAIL PROTECTED], subject,$out , From: website);

but when i receive that mail.. i get the source of the file with
 
 html
 
body bla bla bla not in HTML FORMAT..

thnx in advance!..

Spooky


--
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] Your opinion on globals/reference

2002-11-03 Thread Gerard Samuel
Something I just thought of about using global in a function.
Mostly I global objects in a function like -

function foo()
{
   global $bar_object;
   $bar_object-do_something();
}

Is it better, more effiecient, if I pass it by reference, like -
function foo($bar_object)
{
   $bar_object-do_something();
}

Thanks for your thoughts...

--
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/



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




Re: [PHP] Geographic IP location

2002-11-03 Thread Gerard Samuel
Try GeoIP.  http://www.maxmind.com/app/php

olinux wrote:


Hi all,

I am looking for a way to determine the geographic
location based on IP address. I understand that 100%
accuracy is impossible. 

Does anyone know of a good software or service
provider that provides quality geographic detection to
US state level based on IP of website visitors. I have
tried several and find that they simply use whois
records. This is great but seems highly inaccurate.

Ideally I am looking for a utility that I can feed a
list of IP's to and then use this data to update mysql
records. 

These two services look pretty decent.

http://www.geobytes.com

http://www.serviceobjects.com/products/dots_ipgeo.asp

Thanks for any input,
olinux

__
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

 


--
Gerard Samuel
http://www.trini0.org:81/
http://dev.trini0.org:81/




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




Re: [PHP] Re: need help with project

2002-11-03 Thread Kevin Myrick
Check out FFL on Sourceforge.net. Currently, it is
still a standalone PHP app, but in the near/coming
soon future they are going to have it as a PHPWebsite
Module.

That is nice for me, since I have just converted to
PHPWebsite (would have used nuke, but it pissed me off
when it wouldn't let me do ANYTHING to config and
install), so I will probably go ahead and download it,
add it to my site somewhere, then use the module when
it comes out.

Will be nice to see how it works.

Hope that helps somewhat.

Kevin Myrick
www.ultimatealchemy.com

--- David Jackson [EMAIL PROTECTED] wrote:
 Karl --
 Before you go reinventing the wheel , you might
 check 
 http://freshmeat.net ... of course there is nothing
 actually wrong with 
   reinventing the wheel *grin*
 
 David Jackson
 
 Karl James wrote:
  Hello people
   
  Im in need help with creating a system where it
 will let me 
  Add/drop players off a web page..basically of a
 roster with salary cap
  control
  And I want to do trades as well
  This is for a fantasy football page.
   
  And I need to have username and passwords so my
 owners can login and
  there is no cheating..
   
  http://www.ultimatefootballleague.com/index4.shtml
   
  This is my site.
   
  Please email me directly if you are interested in
 helping.
   
  Thanks
  Karl james 
   
   
  
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


__
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

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




[PHP] Been looking for a tutorial on how to create themes in general

2002-11-03 Thread Kevin Myrick
Ok, like I stated in my last message, I am using
PHPWebsite as my portal system.

However, I would like to learn how to do custom
themes, because like sooo many aspiring web
designers/programmers, I got an imagination a mile
long and deep.

So, anyone want to point me in the right direction on
a theme creation tutorial, seeing as Sourceforge
doesn't want to help me out?

Thanks,
Kevin Myrick
www.ultimatealchemy.com

__
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/

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




Re: [PHP] Send mail in HTML FORMAT

2002-11-03 Thread Jennifer Swofford
You also need to add the text/html header, such as:

$headers = Content-Type: text/html \r\n;

mail([EMAIL PROTECTED], subject,$out , From: website, $headers);

jen

 I read from a template, insert data and save it as a new file with html
 code...
 i want to send that file that is the same as $out via mail embedded in
it...

 i do

 $fifi = fopen ('/'.$cursada.$cuatrimestre.'/'.$registronro.'.htm', w);
 $fp = $fifi;
 fputs ($fifi, $out . );
 fclose ($fifi);
 mail([EMAIL PROTECTED], subject,$out , From: website);

 but when i receive that mail.. i get the source of the file with html
 body bla bla bla not in HTML FORMAT..

 thnx in advance!..

 Spooky




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




[PHP] RE: Cookies disabled, new session ID each click!

2002-11-03 Thread Oleg Krogius
You do not need to add any SID to your links. Those will be added
automatically by the php session system when needed.

-Original Message-
From: Steve Fatula [mailto:sfatula;usa.net] 
Sent: Saturday, November 02, 2002 10:29 PM
To: [EMAIL PROTECTED]
Subject: Cookies disabled, new session ID each click!

I posted this but not sure Google works, so using my own account as it 
did not show up yet.

I am fairly new to PHP, and am running a shopping cart app written in 
PHP. Most people using this cart do not have this issue, but I do!

I have boiled the program down to a few lines, and it doesn't work. When

you click on the link in the code, it gives you a session ID. Then, when

you click again, it goes away. The SID appears to be blank every other
time.

Why would that be? I am using PHP 4.2.0 and 4.2.2, BSD and Linux, and 
Apache 1.3.20 something. Two different hosts. Same result. Client is 
IE5.5 with cookies disabled, running on NT. New session file is 
generated even though one already existed. This happens every other 
click as SID is blank every other click.

Please help me understand what the issue is.

Steve

?php
session_name('Steve');
session_start();
?
!doctype html public -//W3C//DTD HTML 4.01 Transitional//EN
html
head
meta http-equiv=Content-Type content=text/html
titleTest Page/title
/head
body marginwidth=0 marginheight=0 topmargin=0 bottommargin=0 
leftmargin=0 rightmargin=0
?php echo 'a href=http://linux.office.home/catalog/default_test.php?'

. SID . 'link to me/a'; ?
/body
/html





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




[PHP] Calendar script - help

2002-11-03 Thread Ray Healy \(Data Net Services\)
Dear All

I spent days and days on this little project but still cannot get it to work (new to 
PHP as you might guess).

I have a script which is a combination of tutorial scripts and free code to display a 
calendar with colour coded cells for the events on each day.

The only way to enter events is to enter them one at a time. What I want to do is to 
be able to enter either a start date and end date or start date and the number of 
days. This will then enter a new line in the mySQL database for each day. There would 
only ever be one vent per day.

I have the following fields at present in the database and would probably need another 
field (say number of days)
id int (auto_increment) - eventdate date ('-00-00') - title (varchar) - event 
(blob)

Can anyone help me as I have searched them web and mail lists to no avail. Everything 
that is available is excellent but does too much for what I need.

Summary:- a calendar that can colour code the background cells if there is an event 
title in the mySQL database and to be able to enter the event for multiple days.

Any help would be very much appreciated.

Thanks for your time

Ray



[PHP] Am I blind? simple 15 line code producing error

2002-11-03 Thread Paul
Perhaps I am blind but I have the following simple code that gets me
errors:
?php
session_start();
require_once (config.inc);
require_once classes/HtmlTemplate.class;

if ($HTTP_SESSION_VARS[user_id]){
//do something
 } else {
$message= *** Area is restricted! Please login! ***;
$m= urlencode($message);
$sid_value=PHPSESSID=.session_id();
header(Location:
index.php?error_message=$m$sid_value);
exit;
   }
?

The error is:
Warning: Cannot add header information - headers already sent by (output
started by.. ..line 6) ...on line 12

Line 6 is the line with if ($HTTP_SESSION_VARS[user_id])
Line 12 is the line starting with header



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




Re: [PHP] Am I blind? simple 15 line code producing error

2002-11-03 Thread Sascha Cunz
   require_once (config.inc);
   require_once classes/HtmlTemplate.class;

 The error is:
 Warning: Cannot add header information - headers already sent by (output
 started by.. ..line 6) ...on line 12

 Line 6 is the line with if ($HTTP_SESSION_VARS[user_id])
 Line 12 is the line starting with header

You should check, if these include files contain anything after their closing 
?.

-Sascha

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




Re: [PHP] Fwd: Quarter question..

2002-11-03 Thread Jim Hatridge

Hi JS et al...

Thanks! This was what I was looking for. Also thanks for the color code, much 
smaller!

JIM


On Saturday 02 November 2002 18:54, Jonathan Sharp wrote:
 try this:

 -js

 table border=1
 ?
 $i = 0;
 while ( $myrow = mysql_fetch_array($result) )
 {
 $c = ( ++$i % 2 ? 'yellow' : 'white' );
 echo tr bgcolor=\$c\;
 printf('tda href=%s?id=%sdelete=yesDelete/a/td',
 $PHP_SELF, $myrow['id'] );
 $q = ceil( 4/(int)date('n', strtotime($mydata['date']) ));
 printf('tda
 href=%s?id=%ssubmit=yes%s/a/tdtd%s/tdtd%s/td/tr',
 'update-inv.php', $myrow['id'], $myrow['name'], $myrow['details'], $q);
 }
 ?
 /table

 Jim Hatridge wrote:
  HI all,
 
  In the code below I'm trying to get the last column to show 1, 2, 3, or 4
  according to which quarter of the year it is. But all it shows in that
  column is  Resource ID # X. The X starts with #3 and goes to 18. There
  are (at the moment) 15 items in the table.  Any ideas what's wrong?
 
  Thanks
 
  JIM
 
  #
  ?php
  echo table border=1 \n;
  $i=1;
  while ($myrow = mysql_fetch_array($result)) {
  if($i % 2) { //this means if there is a remainder
  echo TR bgcolor=\yellow\\n;
  } else { //if there isn't a remainder we will do the else
  echo TR bgcolor=\white\\n;
  }
  $qdate=$myrow[date];
  $sql = select quarter($qdate) or die(not work #3);
  $yyy = mysql_query ($sql) or die(not work #4);
 
  printf(tda href=\%s?id=%sdelete=yes\Delete/a/td, $PHP_SELF,
  $myrow[id]);
  printf(tda href=\%s?id=%ssubmit=yes\Update/tdtd%s/tdtd
  %s/tdtd  %s/td/a/tr,
  update-inv.php, $myrow[id], $myrow[name], $myrow[details],
  $yyy); $i=$i+1;
  }
  echo /table\n;
  }
  ?
  #

-- 
Vielfeind -- Viel Ehr'
Antiamerikanische Propaganda in der Philatelie des 20. Jahrhunderts
  http:/www.fecundswamp.net/~hatridge/stamps/index.html

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




RE: [PHP] Am I blind? simple 15 line code producing error

2002-11-03 Thread Paul
Yes, I use those in other pages with no problem..it just this page
causes some problems..

-Original Message-
From: Sascha Cunz [mailto:Sascha;GaNoAn.org] 
Sent: Sunday, November 03, 2002 1:03 PM
To: Paul; [EMAIL PROTECTED]
Subject: Re: [PHP] Am I blind? simple 15 line code producing error

   require_once (config.inc);
   require_once classes/HtmlTemplate.class;

 The error is:
 Warning: Cannot add header information - headers already sent by
(output
 started by.. ..line 6) ...on line 12

 Line 6 is the line with if ($HTTP_SESSION_VARS[user_id])
 Line 12 is the line starting with header

You should check, if these include files contain anything after their
closing 
?.

-Sascha



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




Re: [PHP] Am I blind? simple 15 line code producing error

2002-11-03 Thread Sascha Cunz
 Yes, I use those in other pages with no problem..it just this page
 causes some problems..

Do you use Header('Location:...') in those other scripts? I can't see any 
reason inside the script you posted, that could produce this behaviour. Can 
you try it without the two require's, just to be sure?

btw: $HTTP_SESSION_VARS[user_id] should really be 
$HTTP_SESSION_VARS['user_id']

-Sascha


 -Original Message-
 From: Sascha Cunz [mailto:Sascha;GaNoAn.org]
 Sent: Sunday, November 03, 2002 1:03 PM
 To: Paul; [EMAIL PROTECTED]
 Subject: Re: [PHP] Am I blind? simple 15 line code producing error

  require_once (config.inc);
  require_once classes/HtmlTemplate.class;
 
  The error is:
  Warning: Cannot add header information - headers already sent by

 (output

  started by.. ..line 6) ...on line 12
 
  Line 6 is the line with if ($HTTP_SESSION_VARS[user_id])
  Line 12 is the line starting with header

 You should check, if these include files contain anything after their
 closing
 ?.

 -Sascha


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




[PHP] ASTemplate

2002-11-03 Thread Adam Atlas
First post!!! Um, yeah... anyway...

Hi people, I just got a beta of my ASTemplate code out. It's a PHP 
template system that uses an XML-based format to specify template 
format and text files (that can be HTML or any other text format) that 
make up the body of its output. If you're looking for a good template 
system for a PHP project, why don't you give ASTemplate a try? It's 
beta right now, so if you find any bugs, tell me and I'll try to fix it.

So, if you want to help me beta test it, or you think it might be 
useful (I wrote it for my own purposes, but now I'm releasing it in 
case others might find it useful) download it:
http://www.atommic.com/software/php/ASTemplate.tgz (GZipped tarball, 
for *nix and Mac- 11k)
http://www.atommic.com/software/php/ASTemplate.zip (ZIP archive, for 
Windows- 12k)

Currently it's distributed under the GNU GPL, but I might change it to 
the LGPL later so it can be more widely used. Anyway, I hope people 
enjoy ASTemplate!

--Adam Atlas


--
Adam Atlas

Your mouse has moved. Windows has to reboot for changes to take effect. 
[ OK ]


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



[PHP] Kxparse 0.2

2002-11-03 Thread Khalid El-Kary
hi,

i want to just tell you about the new release of Kxparse (a XML parser)
you can find everything about the new release here

http://creaturesx.ma.cx/kxparse/

khalid







_
Surf the Web without missing calls! Get MSN Broadband. 
http://resourcecenter.msn.com/access/plans/freeactivation.asp


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



[PHP] Re: XSLT Sablotron output

2002-11-03 Thread Daniele Baroncelli
No one replied yet, so I suppose no one was able to solve this.

By the way, is there anyone that actually experienced the same situation?


Cheers

Daniele



Daniele Baroncelli [EMAIL PROTECTED] wrote in message
news:20021102212518.34728.qmail;pb1.pair.com...
 Hi guys,

 I have typed a simple script to test the Sablotron module recently
 installed.
 I found out that the HTML is output all in one line, without newlines,
which
 is very annoying.
 Anyone can tell me if this is a bug of the module, or I have to specify
 something somewhere?

 Here is the script on the server, where you can watch the result:
 http://www.rockit.it/redazione/sixth/prova.php

 Below you can find my PHP, XML and XSL files.


 Cheers

 Daniele


 ==

 PHP file
 --


 ?php

 // Allocate a new XSLT processor
 $xh = xslt_create();

 // call the XSLT processor directly
 xslt_process($xh, 'prova.xml', 'prova.xsl', 'prova.html');

 // output the result
 readfile('prova.html');

 xslt_free($xh);

 ?

 ==

 XML file
 ---

 ?xml version=1.0?
 me
  nameJohn Doe/name
  address94, Main Street, Nowheresville 16463, XY/address
  tel738 2838/tel
  email[EMAIL PROTECTED]/email
  urlhttp://www.unknown_and_unsung.com//url
 /me

 ===

 XSL file
 -

 ?xml version=1.0?

 xsl:stylesheet version=1.0
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;

 xsl:template match=/

  html
  head
  /head
  body
  h1Contact information for bxsl:value-of select=me/name //b/h1

  h2Mailing address:/h2
  xsl:value-of select=me/address /

  h2Phone:/h2
  xsl:value-of select=me/tel /

  h2Email address:/h2
  xsl:value-of select=me/email /

  h2Web site URL:/h2
  xsl:value-of select=me/url /

  /body
  /html

 /xsl:template

 /xsl:stylesheet

 ==





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




Re: [PHP] Am I blind? simple 15 line code producing error

2002-11-03 Thread Jason Wong
On Monday 04 November 2002 02:25, Paul wrote:
 Yes, I use those in other pages with no problem..it just this page
 causes some problems..

 -Original Message-
 From: Sascha Cunz [mailto:Sascha;GaNoAn.org]
 Sent: Sunday, November 03, 2002 1:03 PM
 To: Paul; [EMAIL PROTECTED]
 Subject: Re: [PHP] Am I blind? simple 15 line code producing error

  require_once (config.inc);
  require_once classes/HtmlTemplate.class;
 
  The error is:
  Warning: Cannot add header information - headers already sent by

Search for the above error in google (or search the archives). This kind of 
problem has been covered so MANY times before!

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Total strangers need love, too; and I'm stranger than most.
*/


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




Re: [PHP] ASTemplate

2002-11-03 Thread Jonathan Sharp
Benchmarks?

-js


Adam Atlas wrote:
 First post!!! Um, yeah... anyway...
 
 Hi people, I just got a beta of my ASTemplate code out. It's a PHP
 template system that uses an XML-based format to specify template format
 and text files (that can be HTML or any other text format) that make up
 the body of its output. If you're looking for a good template system for
 a PHP project, why don't you give ASTemplate a try? It's beta right now,
 so if you find any bugs, tell me and I'll try to fix it.
 
 So, if you want to help me beta test it, or you think it might be useful
 (I wrote it for my own purposes, but now I'm releasing it in case others
 might find it useful) download it:
 http://www.atommic.com/software/php/ASTemplate.tgz (GZipped tarball, for
 *nix and Mac- 11k)
 http://www.atommic.com/software/php/ASTemplate.zip (ZIP archive, for
 Windows- 12k)
 
 Currently it's distributed under the GNU GPL, but I might change it to
 the LGPL later so it can be more widely used. Anyway, I hope people
 enjoy ASTemplate!
 
 --Adam Atlas
 
 
 -- 
 Adam Atlas
 
 Your mouse has moved. Windows has to reboot for changes to take effect.
 [ OK ]
 
 




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




Re: [PHP] Am I blind? simple 15 line code producing error

2002-11-03 Thread Hugh Danaher
Paul,
Got any spaces or lines above the ? ??  Spaces there will kill the
script.
Hugh
- Original Message -
From: Paul [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, November 03, 2002 9:53 AM
Subject: [PHP] Am I blind? simple 15 line code producing error


 Perhaps I am blind but I have the following simple code that gets me
 errors:
 ?php
 session_start();
 require_once (config.inc);
 require_once classes/HtmlTemplate.class;

 if ($HTTP_SESSION_VARS[user_id]){
 //do something
  } else {
 $message= *** Area is restricted! Please login! ***;
 $m= urlencode($message);
 $sid_value=PHPSESSID=.session_id();
 header(Location:
 index.php?error_message=$m$sid_value);
 exit;
}
 ?

 The error is:
 Warning: Cannot add header information - headers already sent by (output
 started by.. ..line 6) ...on line 12

 Line 6 is the line with if ($HTTP_SESSION_VARS[user_id])
 Line 12 is the line starting with header



 --
 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] Geographic IP location

2002-11-03 Thread Mika Tuupola
On Sat, 2 Nov 2002, olinux wrote:

 I am looking for a way to determine the geographic
 location based on IP address. I understand that 100%
 accuracy is impossible. 

There is a Net_Geo PEAR class, which uses CAIDA data.

http://pear.php.net/package-info.php?pacid=55

-- 
Mika Tuupola  http://www.appelsiini.net/~tuupola/


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




[PHP] Re: Send $out embedded in a mail in HTML FORMAT

2002-11-03 Thread Manuel Lemos
Hello,

On 11/02/2002 10:52 PM, Kevin Fradkin wrote:

I read from a template, insert data and save it as a new file with html
code...
i want to send that file that is the same as $out via mail embedded in it...

i do

$fifi = fopen ('/'.$cursada.$cuatrimestre.'/'.$registronro.'.htm', w);
$fp = $fifi;
fputs ($fifi, $out . );
fclose ($fifi);
mail([EMAIL PROTECTED], subject,$out , From: website);

but when i receive that mail.. i get the source of the file with html
body bla bla bla not in HTML FORMAT..


You need to use the Content-Type: text/html header in the 4th argument.

Anyway, if you send HTML only messages many spam filters will discard 
the messages you send because that is a pattern of many spammers messages.

What you need to do is to compose a message with both the text and HTML 
versions in the body as alternatives and so the spam filters will not 
discard the message.

In that case you may want to try this class that makes it easy to 
compose and send messages with text and HTML alternative versions in the 
same body and also other useful things like embedded images in the HTML 
page, attachments, etc...

http://www.phpclasses.org/mimemessage


--

Regards,
Manuel Lemos


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



php-general Digest 3 Nov 2002 22:57:54 -0000 Issue 1683

2002-11-03 Thread php-general-digest-help

php-general Digest 3 Nov 2002 22:57:54 - Issue 1683

Topics (messages 122547 through 122581):

Send mail in HTML FORMAT
122547 by: Kevin Fradkin
122566 by: Jennifer Swofford

Variables
122548 by: Bryan McLemore
122550 by: David Jackson
122553 by: Hugh Danaher

Re: Cookies disabled, new session ID each click!
122549 by: Steve Fatula
122567 by: Oleg Krogius

how can me know the disbaled functions in php?
122551 by: Alawi
122552 by: Rasmus Lerdorf

max_ execution_time for scripts launched from command line
122554 by: gap

fread() fails with large files
122555 by: Sora B. Harbater

what i'm doing wrong? (mysql/php)
122556 by: Mr. BuNgL3
122557 by: John W. Holmes

Re: Session Management
122558 by: John W. Holmes
122560 by: Robert Samuel White

Re: Send $out embedded in a mail in HTML FORMAT
122559 by: John W. Holmes
122561 by: Jonathan Sharp
122581 by: Manuel Lemos

Your opinion on globals/reference
122562 by: Gerard Samuel

Re: Geographic IP location
122563 by: Gerard Samuel
122580 by: Mika Tuupola

Re: need help with project
122564 by: Kevin Myrick

Been looking for a tutorial on how to create themes in general
122565 by: Kevin Myrick

Calendar script - help
122568 by: Ray Healy \(Data Net Services\)

Am I blind? simple 15 line code producing error
122569 by: Paul
122570 by: Sascha Cunz
122572 by: Paul
122573 by: Sascha Cunz
122577 by: Jason Wong
122579 by: Hugh Danaher

Re: Quarter question..
122571 by: Jim Hatridge

ASTemplate
122574 by: Adam Atlas
122578 by: Jonathan Sharp

Kxparse 0.2
122575 by: Khalid El-Kary

Re: XSLT Sablotron output
122576 by: Daniele Baroncelli

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--

---BeginMessage---
I read from a template, insert data and save it as a new file with html
code...
i want to send that file that is the same as $out via mail embedded in it...

i do

$fifi = fopen ('/'.$cursada.$cuatrimestre.'/'.$registronro.'.htm', w);
$fp = $fifi;
fputs ($fifi, $out . );
fclose ($fifi);
mail([EMAIL PROTECTED], subject,$out , From: website);

but when i receive that mail.. i get the source of the file with html
body bla bla bla not in HTML FORMAT..

thnx in advance!..

Spooky


---End Message---
---BeginMessage---
You also need to add the text/html header, such as:

$headers = Content-Type: text/html \r\n;

mail([EMAIL PROTECTED], subject,$out , From: website, $headers);

jen

 I read from a template, insert data and save it as a new file with html
 code...
 i want to send that file that is the same as $out via mail embedded in
it...

 i do

 $fifi = fopen ('/'.$cursada.$cuatrimestre.'/'.$registronro.'.htm', w);
 $fp = $fifi;
 fputs ($fifi, $out . );
 fclose ($fifi);
 mail([EMAIL PROTECTED], subject,$out , From: website);

 but when i receive that mail.. i get the source of the file with html
 body bla bla bla not in HTML FORMAT..

 thnx in advance!..

 Spooky




---End Message---
---BeginMessage---
What is a variables value before said value has been assigned a value?

Thanks
Bryan

---End Message---
---BeginMessage---
Bryan McLemore wrote:

What is a variables value before said value has been assigned a value?

Thanks
Bryan



Wouldn't it be null or empty  ?

Just a guess,
David



---End Message---
---BeginMessage---
Bryan,
I don't think the variable has any value before assignment--it isn't zerro
nor is it null.  Check the manual for isset() and empty()'
Hope this helps.
Hugh

- Original Message -
From: Bryan McLemore [EMAIL PROTECTED]
To: PHP - General [EMAIL PROTECTED]
Sent: Sunday, November 03, 2002 1:01 AM
Subject: [PHP] Variables


What is a variables value before said value has been assigned a value?

Thanks
Bryan



---End Message---
---BeginMessage---
Not using trans_sid, but it is set for this example and it doesn't 
matter either way, intentionally putting the SID on the link myself, 
this is the way the vendor software is set up. So, I want someone to run 
this example, and see if it works for them, and if it does, what might 
be the reason it does not work for me?

Steve

Chris Shiflett wrote:

Steve,

Check your php.ini file. PHP uses cookies for maintaining your Web 
client's unique ID, and unless you have use_trans_sid set, it will not 
attempt to pass the unique ID on the URL for those who have cookies 
disabled.

Chris

Steve Fatula wrote:

When you click on the link in the code, it gives you a session ID. 
Then, when you click again, it goes away. The SID appears to be blank 
every other time.

Why would that be? I am using PHP 4.2.0 

Re: [PHP] Am I blind? simple 15 line code producing error

2002-11-03 Thread Chris Shiflett
Paul,

Something I don't think others have mentioned yet is tht a common reason 
for this error is when there is an error somewhere in your script prior 
to the header() call. Because PHP will output the error to the screen 
(assuming you don't have any special error handling), it might not be 
you who is generating output but rather PHP due to an error somewhere. 
It might even just be a warning. So, the error you are receiving might 
be a bit misleading.

My advice would be to take the header() call out for the moment, and see 
if you get any output on the screen. If you see something, you've found 
the problem. If you don't see anything, check for any possible places 
where whitespace might be output (as others have suggested).

Chris

Paul wrote:

Warning: Cannot add header information - headers already sent by (output
started by.. ..line 6) ...on line 12




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




Re: [PHP] fread() fails with large files

2002-11-03 Thread rija
Use readfile instead fread() if you've got some problem with, it looks
better!

Header(Content-Type: $type);
Header(Content-Disposition: attachment; filename=$downloadname);
header(Content-Length: $size);
header(Content-Transfer-Encoding: binary);
readfile($file);


- Original Message -
From: Sora B. Harbater [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 04, 2002 12:44 AM
Subject: [PHP] fread() fails with large files


 Hi.  I am using Linux/Apache with PHP 4.1.2.  I have been experiencing
this
 problem since upgrading from an earlier version of PHP 4.

 My script forces a download of a PDF file after looking up some info in a
 database.  The code looks like this:


 $file=/path/to/file;
 $fp = fopen($file, r);
 $size=filesize($file);
 $contents = fread($fp, $size);
 fclose($fp);

 Header(Content-Type: $type);
 Header(Content-Disposition: attachment; filename=$downloadname);
 header(Content-Length: $size);
 header(Content-Transfer-Encoding: binary);
 echo $contents;

 filesize() is reporting the size properly. The code works perfectly for
 smaller files, but the fread() fails for files larger than 19 MB or so and
 I got a page cannot be displayed error. I know that it is fread() which is
 causing the problem because I commented out all the code that follows it
 and still get the error.  All the files being downloaded are PDF files.

 Can anyone shed some light on this?



 --
 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] Phpmyadmin HELP!!!

2002-11-03 Thread Rodrigo de Oliveira Costa
Hi people,

After I installed phpmyadmin on my computer that runs an Apache I've worked almost 
everything out. 
The only problem I seem to have is that when I create a Database I can't put more than 
8 columns and if I do it simply doesnt accept it. 
Another problem that it looks like I'm having is that when I log into a database it 
shows all the tables in that database on my left but if I click on a table with more 
than 8 columns, that I created in the DOS, it simply doesnt show the details. HELP!!! 

I'm running:

Windows XP
Php 4.2.2 
Apache 2.0.39 
MySql 3.23.51 
PhpMyAdmin 2.3.2 

Thanks,
Rodrigo



Re: [PHP] Multiple Addresses Mailer

2002-11-03 Thread Manuel Lemos
Hello,

On 10/31/2002 10:09 AM, -- wrote:

You are contradicting yourself. Most mailing list programs put all 
recipients in Bcc: and queue only on message, so it is the same thing 
that you are recommending against and for it.
 
But most listservers generate a new message for each receiver. Most

You are confusing queuing with sending. Most list servers queue a single 
message with all recipients in Bcc and the mail server delivers separate 
messages obviously because the destination SMTP server is different.


mailservers, my own included, do not accept more than 5 recipients in the
bcc field...50 total for to and cc combined (some allow more).


That is usually a limit that exists for relaying (via SMTP) .



The limit's there to prevent spam. Also it would be abuse of the intent to


The limit exists to prevent unwarned clients from abusing from their ISP 
servers overloading it with messages to many recipients that make the 
mail server hog the machine for a long time. You may even be sending 
solicited newsletter messages which are not SPAM, but for your ISP the 
load that it inflicts to the server is inacceptable.

You may still use the server for sending SPAM, either many messages at 
once or one at a time. Either way, you should not be doing that unless 
your ISP authorizes you to do so.


use bcc for the entire list of receivers. Also you cannot have a bcc
without a to field anyway ... 



Spam filters that discard messages which the recipients are in Bcc: are 
wrong, just like everybody that filters messages with general criteria 
like that. Anyway, it is their problem if they discard messages arbitrarily.


If the bcc field is the only field with a receiver, then the message is
malformed and should be rejected. The To:, Subject:, and Date: fields are
required to fullfill RFC 822. If you only get Bcc: and no To:, then the
message should be bounced, that's how alot of spam used to be addressed,
and some still is.


Let me tell you a secret, for the SMTP protocol, whatever you put in the 
headers is irrelevant. Message headers are actually part of the message 
body for the SMTP protocol. So, you can put a fake To: header in there 
but the message is actually not delivered to it.

What I mean is that SMTP servers do not parse headers. SPAM filters may 
do so and reject the message if you lack a wellformed To: header though.

So, to please everybody, you can just put an arbitrary To: header and 
put all the real recipients in Bcc:.


You need to check with the ISP if sending to many recipients respects 
the acceptable use policy. If they don't accept bulk mailing, it doesn't 
matter the method you use.


I've never met an ISP that would refuse bulk mailing, as long as you can
proove that you've got concent from the receivers for the messages. My
mail server handles all the concent things itself, and sofar my ISPs have
not complained about the up to 3 digit amounts of message that go out each
day, with up to 4 digits coming in...


So, there you have it, some ISP may allow a number of messages upto a 
limit but you need to ask them to know what the limit is.

--

Regards,
Manuel Lemos


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



Re: [PHP] Multiple Addresses Mailer

2002-11-03 Thread Manuel Lemos
Hello,

On 10/31/2002 01:53 PM, Olinux wrote:

I've never met an ISP that would refuse bulk
mailing, as long as you can
proove that you've got concent from the receivers
for the messages. My
mail server handles all the concent things itself,
and sofar my ISPs have
not complained about the up to 3 digit amounts of
message that go out each
day, with up to 4 digits coming in...


I have a site hosted on a shared server and if I try
to generate an email with more than 75 BCC addresses
it will not be sent. I was instructed to use the
listserve software that they provide to do mailings
like this. They don't disapprove high volume mailing,
but they do have a problem if you use BCC. I guess
that it's either harder on the server or because its
most likely spam. 

You need to understand what the difference is. Most likely what they do 
not allow is relaying messages to many receipients sent via SMTP which 
is different from injecting the messages in the mail queue using 
sendmail program or similar.



On my dedicated servers (another company) we can do
whatever we please, but I do think that a large number
of filters are tipped off by a high volume of BCC's
... 

Of course, you are already paying a lot of money for the dedicated 
resources.

--

Regards,
Manuel Lemos


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



RE: [PHP] Re: XSLT Sablotron output

2002-11-03 Thread Mark Charette
There's nothing to solve; without the complete XML doc  the XSL
stylesheet, there's no way to know if in fact everything is being parsed as
expected. I don't know if it's CDATA, xsl:text, a strip-spaces directive,
etc. And ... I'd expect anyone using XML  XSL to double check and
re-reference all their books before posting a problem (Sablotron is pretty
well tested; I don't think it's the problem ...)

Then, after exhausting my brain and building the smallest possible set of
code that reproduces my problem ...

I'd submit it to a XML list.

Of couse, the sample script to me looks perfectly valid, since HTML isn't
required to have newlines and of course newlines within text blocks aren't
preserved anyway ...

Mark C.
-Original Message-
From: Daniele Baroncelli [mailto:ubimmc93;libero.it]
Sent: Sunday, November 03, 2002 2:48 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: XSLT Sablotron output


No one replied yet, so I suppose no one was able to solve this.

By the way, is there anyone that actually experienced the same situation?

Daniele Baroncelli [EMAIL PROTECTED] wrote in message
news:20021102212518.34728.qmail;pb1.pair.com...
 Hi guys,

 I have typed a simple script to test the Sablotron module recently
 installed.
 I found out that the HTML is output all in one line, without newlines,
which
 is very annoying.
 Anyone can tell me if this is a bug of the module, or I have to specify
 something somewhere?

 Here is the script on the server, where you can watch the result:
 http://www.rockit.it/redazione/sixth/prova.php

 Below you can find my PHP, XML and XSL files.


 Cheers

 Daniele


 ==

 PHP file
 --


 ?php

 // Allocate a new XSLT processor
 $xh = xslt_create();

 // call the XSLT processor directly
 xslt_process($xh, 'prova.xml', 'prova.xsl', 'prova.html');

 // output the result
 readfile('prova.html');

 xslt_free($xh);

 ?

 ==

 XML file
 ---

 ?xml version=1.0?
 me
  nameJohn Doe/name
  address94, Main Street, Nowheresville 16463, XY/address
  tel738 2838/tel
  email[EMAIL PROTECTED]/email
  urlhttp://www.unknown_and_unsung.com//url
 /me

 ===

 XSL file
 -

 ?xml version=1.0?

 xsl:stylesheet version=1.0
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;

 xsl:template match=/

  html
  head
  /head
  body
  h1Contact information for bxsl:value-of select=me/name //b/h1

  h2Mailing address:/h2
  xsl:value-of select=me/address /

  h2Phone:/h2
  xsl:value-of select=me/tel /

  h2Email address:/h2
  xsl:value-of select=me/email /

  h2Web site URL:/h2
  xsl:value-of select=me/url /

  /body
  /html

 /xsl:template

 /xsl:stylesheet

 ==





--
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] Kxparse 0.2

2002-11-03 Thread Justin French
Haven't we heard about this a few times now?


on 04/11/02 5:45 AM, Khalid El-Kary ([EMAIL PROTECTED]) wrote:

 hi,
 
 i want to just tell you about the new release of Kxparse (a XML parser)
 you can find everything about the new release here
 
 http://creaturesx.ma.cx/kxparse/
 
 khalid
 
 
 
 
 
 
 
 _
 Surf the Web without missing calls! Get MSN Broadband.
 http://resourcecenter.msn.com/access/plans/freeactivation.asp
 


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




[PHP] Re: Cookies disabled, new session ID each click!

2002-11-03 Thread Steve Fatula
Oleg and anyone else, PLEASE READ THE POST.

This is vendor software, this is what it does, it doesn't matter if it's 
the way you would do it, if it is the best way, or anything else. So, 
please tell me why the short program I uploaded as an example does or 
does not work for you.

Steve


Oleg Krogius wrote:

You do not need to add any SID to your links. Those will be added
automatically by the php session system when needed.

-Original Message-
From: Steve Fatula [mailto:sfatula;usa.net] 
Sent: Saturday, November 02, 2002 10:29 PM
To: [EMAIL PROTECTED]
Subject: Cookies disabled, new session ID each click!

I posted this but not sure Google works, so using my own account as it 
did not show up yet.

I am fairly new to PHP, and am running a shopping cart app written in 
PHP. Most people using this cart do not have this issue, but I do!

I have boiled the program down to a few lines, and it doesn't work. When

you click on the link in the code, it gives you a session ID. Then, when

you click again, it goes away. The SID appears to be blank every other
time.

Why would that be? I am using PHP 4.2.0 and 4.2.2, BSD and Linux, and 
Apache 1.3.20 something. Two different hosts. Same result. Client is 
IE5.5 with cookies disabled, running on NT. New session file is 
generated even though one already existed. This happens every other 
click as SID is blank every other click.

Please help me understand what the issue is.

Steve

?php
session_name('Steve');
session_start();
?
!doctype html public -//W3C//DTD HTML 4.01 Transitional//EN
html
head
meta http-equiv=Content-Type content=text/html
titleTest Page/title
/head
body marginwidth=0 marginheight=0 topmargin=0 bottommargin=0 
leftmargin=0 rightmargin=0
?php echo 'a href=http://linux.office.home/catalog/default_test.php?'

. SID . 'link to me/a'; ?
/body
/html






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




[PHP] Re: Your opinion on globals/reference

2002-11-03 Thread rolf vreijdenberger
but what if you decide later you want more objects or globals in your
function??
your parameter list could get quit long!

--
Rolf Vreijdenberger
De Pannekoek en De Kale
W: www.depannekoekendekale.nl
Gerard Samuel [EMAIL PROTECTED] schreef in bericht
news:3DC54436.2090803;trini0.org...
 Something I just thought of about using global in a function.
 Mostly I global objects in a function like -

 function foo()
 {
 global $bar_object;
 $bar_object-do_something();
 }

 Is it better, more effiecient, if I pass it by reference, like -
 function foo($bar_object)
 {
 $bar_object-do_something();
 }

 Thanks for your thoughts...

 --
 Gerard Samuel
 http://www.trini0.org:81/
 http://dev.trini0.org:81/





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




Re: [PHP] Re: Send $out embedded in a mail in HTML FORMAT

2002-11-03 Thread Kevin Fradkin
Thanks a lot!!.. finally.. i found what i was looking! nice having people
who can help us!



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




[PHP] uploading help please again

2002-11-03 Thread marcelo
Ok I'm back

This script is to upload 2 image files

Whit register_globals = on it Works fine



script A

p.php

titleJornal O Leme/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head

body bgcolor=#006699
table width=100% border=0 cellpadding=0 cellspacing=0
  !--DWLayoutTable--
  tr
td width=100% height=70 valign=topimg src=test.jpg
width=600 height=120
/td
  /tr
  tr
td height=262 valign=toppnbsp;/p
  form method=post  action=pi.php  enctype=multipart/form-data
table width=75% border=0 align=center bgcolor=#FF
  tr
td width=23%div align=centerfont face=BankGothic Md
BT
/font/div/td
td width=77% bgcolor=#FFnbsp; /td
  /tr
  tr
tddiv align=center/div/td
td bgcolor=#FFnbsp; /td
  /tr
  tr
tddiv align=center/div/td
td bgcolor=#FFnbsp; /td
  /tr
  tr
tddiv align=leftstrongImagem pequena/strong/div/td
td bgcolor=#FF input type=hidden name=MAX_FILE_SIZE
value=102400
  input type=File name=origem /td
  /tr
  tr
tddiv align=leftstrongImagem grande/strong/div/td
td bgcolor=#FFinput type=hidden name=MAX_FILE_SIZE
value=102400
  input type=File name=origem2 /td
  /tr
  tr
tddiv align=center/div/td
td bgcolor=#FFnbsp; /td
  /tr
  tr
tdnbsp;/td
tdnbsp;/td
  /tr
/table
p align=center
  input name=submit type=submit value=Adicionar
input type=hidden name=page value=inserir1
  /form/p
  /td
  /tr
  tr
td height=81 valign=topdiv align=center
pnbsp;/p
p
  ?php

  include ('menu.php');

  ?
  nbsp;/p
  /div/td
  /tr
/table







pi.php



echo $page;  --- returns inserir1   _correct
echo $origem;   --- returns the temp path of the file _correct
set_time_limit(60);
$path=(dirname($PATH_TRANSLATED))./primeirapagina/;
$origem_name=fdx.jpg;
$dest= $path.$origem_name;

if (($origem  none)  ($origem  )){
   if (copy($origem,$dest)){;

 } else {
  echo directoria sem direitos de escrita br;
  }
unlink ($origem);
}

set_time_limit(60);
$path2=(dirname($PATH_TRANSLATED))./primeirapagina/;
$origem2_name=porra.jpg;
$dest2= $path2.$origem2_name;
//printf($path);
//printf(br);
//printf($origem_name);
if (($origem2  none)  ($origem2  )){
   if (copy($origem2,$dest2)){;
//echo brupload do ficheiro $origem_name efectuada com sucesso !!!;
//  echo brtamanho do ficheiro $origem_size;
//  echo  brtipo de ficheiro $origem_type;
 } else {
  echo directoria sem direitos de escrita br;
  }
unlink ($origem2);
}
?


/body
/html








but Whit register_globals = off the script B dont work

script B:



p.php

titleJornal O Leme/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head

body bgcolor=#006699
table width=100% border=0 cellpadding=0 cellspacing=0
  !--DWLayoutTable--
  tr
td width=100% height=70 valign=topimg src=test.jpg
width=600 height=120
/td
  /tr
  tr
td height=262 valign=toppnbsp;/p
  form method=post  action=pi.php  enctype=multipart/form-data
table width=75% border=0 align=center bgcolor=#FF
  tr
td width=23%div align=centerfont face=BankGothic Md
BT
/font/div/td
td width=77% bgcolor=#FFnbsp; /td
  /tr
  tr
tddiv align=center/div/td
td bgcolor=#FFnbsp; /td
  /tr
  tr
tddiv align=center/div/td
td bgcolor=#FFnbsp; /td
  /tr
  tr
tddiv align=leftstrongImagem pequena/strong/div/td
td bgcolor=#FF input type=hidden name=MAX_FILE_SIZE
value=102400
  input type=File name=origem /td
  /tr
  tr
tddiv align=leftstrongImagem grande/strong/div/td
td bgcolor=#FFinput type=hidden name=MAX_FILE_SIZE
value=102400
  input type=File name=origem2 /td
  /tr
  tr
tddiv align=center/div/td
td bgcolor=#FFnbsp; /td
  /tr
  tr
tdnbsp;/td
tdnbsp;/td
  /tr
/table
p align=center
  input name=submit type=submit value=Adicionar
input type=hidden name=page value=inserir1
  /form/p
  /td
  /tr
  tr
td height=81 valign=topdiv align=center
pnbsp;/p
p
  ?php

  include ('menu.php');

  ?
  nbsp;/p
  /div/td
  /tr
/table







pi.php



 echo $_REQUEST['page']; returns inserir1   _correct


echo $_FILES['origem']; returns ARRAY 

[PHP] Add content thru e-mail

2002-11-03 Thread Rodrigo de Oliveira Costa
Hi people, i'd like to know if there is a way to add content to a database thru 
sending an e-mail, and if there is how it would be done.
Thanks,
Rodrigo



RE: [PHP] uploading help please again

2002-11-03 Thread John W. Holmes
That's because $_FILES['origem'] is an array. It will have the following
elements, where 'userfile' is 'origem' in your case:


$_FILES['userfile']['name']
The original name of the file on the client machine. 

$_FILES['userfile']['type']
The mime type of the file, if the browser provided this information. An
example would be image/gif. 

$_FILES['userfile']['size']
The size, in bytes, of the uploaded file. 

$_FILES['userfile']['tmp_name']
The temporary filename of the file in which the uploaded file was stored
on the server. 

$_FILES['userfile']['error']
The error code associated with this file upload. ['error'] was added in
PHP 4.2.0 


Note: In PHP versions prior 4.1.0 this was named $HTTP_POST_FILES and
it's not an autoglobal variable like $_FILES is. PHP 3 does not support
$HTTP_POST_FILES. 

When register_globals is turned on in php.ini, additional variables are
available. For example, $userfile_name will equal
$_FILES['userfile']['name'], $userfile_type will equal
$_FILES['userfile']['type'], etc. Keep in mind that as of PHP 4.2.0,
register_globals defaults to off. It's preferred to not rely on this
directive. 

---John Holmes...

 -Original Message-
 From: marcelo [mailto:msalvador;sinesdigital.pt]
 Sent: Sunday, November 03, 2002 8:32 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] uploading help please again
 
 Ok I'm back
 
 This script is to upload 2 image files
 
 Whit register_globals = on it Works fine
 
 
 
 script A
 
 p.php
 
 titleJornal O Leme/title
 meta http-equiv=Content-Type content=text/html;
charset=iso-8859-1
 /head
 
 body bgcolor=#006699
 table width=100% border=0 cellpadding=0 cellspacing=0
   !--DWLayoutTable--
   tr
 td width=100% height=70 valign=topimg src=test.jpg
 width=600 height=120
 /td
   /tr
   tr
 td height=262 valign=toppnbsp;/p
   form method=post  action=pi.php
enctype=multipart/form-data
 table width=75% border=0 align=center
bgcolor=#FF
   tr
 td width=23%div align=centerfont face=BankGothic
Md
 BT
 /font/div/td
 td width=77% bgcolor=#FFnbsp; /td
   /tr
   tr
 tddiv align=center/div/td
 td bgcolor=#FFnbsp; /td
   /tr
   tr
 tddiv align=center/div/td
 td bgcolor=#FFnbsp; /td
   /tr
   tr
 tddiv align=leftstrongImagem
 pequena/strong/div/td
 td bgcolor=#FF input type=hidden
name=MAX_FILE_SIZE
 value=102400
   input type=File name=origem /td
   /tr
   tr
 tddiv align=leftstrongImagem
 grande/strong/div/td
 td bgcolor=#FFinput type=hidden
name=MAX_FILE_SIZE
 value=102400
   input type=File name=origem2 /td
   /tr
   tr
 tddiv align=center/div/td
 td bgcolor=#FFnbsp; /td
   /tr
   tr
 tdnbsp;/td
 tdnbsp;/td
   /tr
 /table
 p align=center
   input name=submit type=submit value=Adicionar
 input type=hidden name=page value=inserir1
   /form/p
   /td
   /tr
   tr
 td height=81 valign=topdiv align=center
 pnbsp;/p
 p
   ?php
 
   include ('menu.php');
 
   ?
   nbsp;/p
   /div/td
   /tr
 /table
 
 
 
 


--
 --
 
 
 pi.php
 
 
 
 echo $page;  --- returns inserir1   _correct
 echo $origem;   --- returns the temp path of the file _correct
 set_time_limit(60);
 $path=(dirname($PATH_TRANSLATED))./primeirapagina/;
 $origem_name=fdx.jpg;
 $dest= $path.$origem_name;
 
 if (($origem  none)  ($origem  )){
if (copy($origem,$dest)){;
 
  } else {
   echo directoria sem direitos de escrita br;
   }
 unlink ($origem);
 }
 
 set_time_limit(60);
 $path2=(dirname($PATH_TRANSLATED))./primeirapagina/;
 $origem2_name=porra.jpg;
 $dest2= $path2.$origem2_name;
 //printf($path);
 //printf(br);
 //printf($origem_name);
 if (($origem2  none)  ($origem2  )){
if (copy($origem2,$dest2)){;
 //echo brupload do ficheiro $origem_name efectuada com sucesso
!!!;
 //  echo brtamanho do ficheiro $origem_size;
 //  echo  brtipo de ficheiro $origem_type;
  } else {
   echo directoria sem direitos de escrita br;
   }
 unlink ($origem2);
 }
 ?
 
 
 /body
 /html
 
 
 
 
 
 
 
 
 but Whit register_globals = off the script B dont work
 
 script B:
 
 
 
 p.php
 
 titleJornal O Leme/title
 meta http-equiv=Content-Type content=text/html;
charset=iso-8859-1
 /head
 
 body bgcolor=#006699
 table width=100% border=0 cellpadding=0 cellspacing=0
   !--DWLayoutTable--
   tr
 td width=100% height=70 valign=topimg src=test.jpg
 width=600 height=120
 /td
   /tr
   tr
 td height=262 valign=toppnbsp;/p
   form method=post  action=pi.php
enctype=multipart/form-data
 table width=75% border=0 align=center
bgcolor=#FF
   tr
   

Re: [PHP] Add content thru e-mail

2002-11-03 Thread Timothy Hitchens (HiTCHO)
The simplest way to do this to setup a pop3 account and have a php
script check this account at intervals via cron.

Or you could write a pipe script via aliases.


Timothy Hitchens (HiTCHO)
[EMAIL PROTECTED]


On Sun, 3 Nov 2002, Rodrigo de Oliveira Costa wrote:

 Hi people, i'd like to know if there is a way to add content to a database thru 
sending an e-mail, and if there is how it would be done.
 Thanks,
 Rodrigo



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




[PHP] FTP Search

2002-11-03 Thread Manuel Jenne
Hi,
 
i wont to find a special Dir on many FTP Server's over PHP.
For searching my Server's have an site command like site dupe
Dirname
 
But if I try it with ftp_site I get only a bool back and not the search
result.
With a ftp_nlist I can't search Dir's only files.
And with ftp_rawlist I get this:
 total 3
drwxrwxrwx 4 user group 96 Oct 18 17:24 pub
drwxrwxrwx 29 user group 2000 Oct 31 03:58 bin
drwxrwxrwx 5 user group 120 Oct 18 17:23 misc
 
the code:
$dir=ftp_pwd($conn_id); 
$list=Array(); 
$list=ftp_rawlist($conn_id, $dir); 
$i=0; 
 
do{ 
   echo $list[$i], br; 
   $i++; 
}while($list[$i]);
 
But how to extract only the Dir name from this result, enter it, list
and so on.
Is there any other easier way to search for an Dir?
 
 
thx
 
Manuel



[PHP] radio buttons from MySQL query?

2002-11-03 Thread David Jackson
How do I go about building radio buttons using the results of a MySQL 
query. The record layout looks like this:

acct
cat
description

I want to use acct as the value=acct in the input statement for the 
radio box. The code below almost works?

TIA,
David


?php
$header = mysql_query (SELECT * FROM chart
   ORDER BY acct );

if ($row = mysql_fetch_array($header)) {
do {
print(tr  bgcolor=\white\ );
   print 'td width=5input type=radio name=gl_acct 
value=acct[]/td';
   print(td width=\12\);
   print $row[acct];
print /tdtd width=\12\;
   print $row[cat];
print /tdtd ;
   print $row[descript];
   print(/td/tr\n);
   } while($row = mysql_fetch_array($header));

} else {print Sorry, no records were found!;}


?


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



[PHP] Re: Cookies disabled, new session ID each click!

2002-11-03 Thread Steve Fatula
If you want to see a site where the small program works (and be SURE and 
turn cookies off), click here: 
http://www.thewebmakerscorner.com/snapmods_new/default_test.php


So, can anyone tell me why it does not work on MY site(s)? Any ideas? 
Surely this is a PHP configuration issue/bug perhaps? Logically, I don't 
see any settings that could possibly affect the outcome using this 
technique.

Steve



Steve Fatula wrote:

Oleg and anyone else, PLEASE READ THE POST.

This is vendor software, this is what it does, it doesn't matter if it's 
the way you would do it, if it is the best way, or anything else. So, 
please tell me why the short program I uploaded as an example does or 
does not work for you.

Steve


Oleg Krogius wrote:

You do not need to add any SID to your links. Those will be added
automatically by the php session system when needed.

-Original Message-
From: Steve Fatula [mailto:sfatula;usa.net] Sent: Saturday, November 
02, 2002 10:29 PM
To: [EMAIL PROTECTED]
Subject: Cookies disabled, new session ID each click!

I posted this but not sure Google works, so using my own account as it 
did not show up yet.

I am fairly new to PHP, and am running a shopping cart app written in 
PHP. Most people using this cart do not have this issue, but I do!

I have boiled the program down to a few lines, and it doesn't work. When

you click on the link in the code, it gives you a session ID. Then, when

you click again, it goes away. The SID appears to be blank every other
time.

Why would that be? I am using PHP 4.2.0 and 4.2.2, BSD and Linux, and 
Apache 1.3.20 something. Two different hosts. Same result. Client is 
IE5.5 with cookies disabled, running on NT. New session file is 
generated even though one already existed. This happens every other 
click as SID is blank every other click.

Please help me understand what the issue is.

Steve

?php
session_name('Steve');
session_start();
?
!doctype html public -//W3C//DTD HTML 4.01 Transitional//EN
html
head
meta http-equiv=Content-Type content=text/html
titleTest Page/title
/head
body marginwidth=0 marginheight=0 topmargin=0 bottommargin=0 
leftmargin=0 rightmargin=0
?php echo 'a href=http://linux.office.home/catalog/default_test.php?'

. SID . 'link to me/a'; ?
/body
/html








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




[PHP] Error in code - Seems simple enough

2002-11-03 Thread vernon
I'm having trouble with the following code dispalying an error, which I
don't understand because the code actually works (other than the error). Any
ideas?

?
if(!isset($HTTP_SESSION_VARS['svUserAccess'])){
  echo td class='mainmenu' align='center' width='12.5%'
style='cursor:hand' onMouseover='this.style.backgroundColor='#C0E0FF''
onMouseout='this.style.backgroundColor='''
onClick='window.location.href='login.php''a
href='login.php'Login/a/td;
} else {
  echo td class='mainmenu' align='center' width='12.5%'
style='cursor:hand' onMouseover='this.style.backgroundColor='#C0E0FF''
onMouseout='this.style.backgroundColor='''
onClick='window.location.href='logout.php''a
href='login.php'Logout/a/td;
  }
?

Thanks



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




[PHP] Images retrieved from MYSQL database using PHP becoming corrupted.

2002-11-03 Thread Darren McPhee
I have spent the last 3 days trying to figure this out.  And will probably
give up very soon.  I have written 2 programs (which are very common PHP
programs) that A) Allows me to upload image files into a MYSQL database
using a simple form.  And B) Allows me to retrieve and display the image
using a PHP script.  This is my problem:-

I can upload the images ok.  I store the binary code, image type, name, and
size within the MYSQL database.  On checking the database directly using
DBTools, I can see that the files have uploaded.  The file sizes reflect
exactly what was originally on the hard disk of my PC (not sure if this is a
correct gauge).

When I run my PHP program to display the images, maybe only 1 out of 10
actually displays correctly.  The rest are broken up or non displayable
images.  One image even made a prompt window appear and somehow now causes
Windows paint to load the image instead of the browser.  God only knows how
that occurred !!

Below are my (designed by others) 2 programs.  The first program is the
upload form.  This seems to work ok.

HTML
HEADTITLEStore binary data into SQL Database/TITLE/HEAD
BODY

?php
// code that will be executed if the form has been submitted:

if ($submit) {

// connect to the database

require_once('../../Connections/TestServer.php');
mysql_select_db($database_TestServer, $TestServer);

$data = addslashes(fread(fopen($form_data, r), filesize($form_data)));

$result=MYSQL_QUERY(INSERT INTO master_products
(image_thumbnail,image_thumbnail_name,image_thumbnail_size,image_thumbnail_t
ype) .
VALUES
('$data','$form_data_name','$form_data_size','$form_data_type'));

$id= mysql_insert_id();
print pThis file has the following Database ID: b$id/b;

MYSQL_CLOSE();

} else {

// else show the form to submit new data:
?

form method=post action=?php echo $PHP_SELF; ?
enctype=multipart/form-data
  INPUT TYPE=hidden name=MAX_FILE_SIZE value=100
brFile to upload/store in database:br
input type=file name=form_data  size=40
pinput type=submit name=submit value=submit
/form

?php

}

?

/BODY
/HTML

Here is the code to display the image:-

?php
if($id) {
require_once('../Connections/TestServer.php');
mysql_select_db($database_TestServer, $TestServer);
$query = select image_thumbnail,image_thumbnail_type from
master_products where item_id=$id;
$result = MYSQL_QUERY($query);
$data = MYSQL_RESULT($result,0,image_thumbnail);
$type = MYSQL_RESULT($result,0,image_thumbnail_type);
Header( Content-type: $type);
echo $data;
};
?

I run the above program in the following way:
http://192.168.0.11/htdocs/displayimage2.php?id=9  The ID is the item_id
primary key field for whichever record I want to display.

I have tried these programs on a test server here in my room to a test
Apache server and MYSQL test database, and also from my ISP to a MYSQL
database at a server at my ISP.  I get exactly the same problem.  When I run
the display image program, the images being displayed are always being
displayed the same.  Which points the problem towards the upload process
(maybe).  If anybody can tell me what the heck is wrong here, I'll give them
a medal !!  There is basically some kind of binary corruption going on (it
looks like)

For added information, below is my database table structure.  At the moment,
the only part I am actually using relates to the image_thumbnail sections.

Darren.



CREATE TABLE master_products (
 item_id SMALLINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
 item_code VARCHAR (10) UNIQUE,
 item_dateadded DATETIME DEFAULT '-00-00 00:00:00',
 item_datemodified DATETIME DEFAULT '-00-00 00:00:00',

 category ENUM (none,single herbs,general
vitality,ageing,arthritis,eyesite,prostate,ahlzheimers,
 weight
loss,menopause,depression,fatigue,headaches,insomnia,colds and
flues,allergies,
 healthy heart,cancer prevention,aphrodisiacs,sexual herbs,for
women,for men,books),

 name VARCHAR (30),
 name_dateadded DATETIME DEFAULT '-00-00 00:00:00',
 name_datemodified DATETIME DEFAULT '-00-00 00:00:00',
 INDEX idx_name (name),

 desc_brief VARCHAR (255),
 desc_brief_dateadded DATETIME DEFAULT '-00-00 00:00:00',
 desc_brief_datemodified DATETIME DEFAULT '-00-00 00:00:00',
 INDEX idx_desc_brief (desc_brief),

 desc_long TEXT,
 desc_long_dateadded DATETIME DEFAULT '-00-00 00:00:00',
 desc_long_datemodified DATETIME DEFAULT '-00-00 00:00:00',

 price DECIMAL (7,2),
 price_dateadded DATETIME DEFAULT '-00-00 00:00:00',
 price_datemodified DATETIME DEFAULT '-00-00 00:00:00',

 image LONGBLOB,
 image_name VARCHAR (50),
 image_size INT UNSIGNED,
 image_type VARCHAR (50),
 image_dateadded DATETIME DEFAULT '-00-00 00:00:00',
 image_datemodified DATETIME DEFAULT '-00-00 00:00:00',

 image_thumbnail LONGBLOB,
 image_thumbnail_name VARCHAR (50),
 image_thumbnail_size INT UNSIGNED,
 image_thumbnail_type VARCHAR (50),
 image_thumbnail_dateadded DATETIME 

RE: [PHP] Error in code - Seems simple enough

2002-11-03 Thread John W. Holmes
And the error is??

 -Original Message-
 From: vernon [mailto:vernon;comp-wiz.com]
 Sent: Sunday, November 03, 2002 9:28 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Error in code - Seems simple enough
 
 I'm having trouble with the following code dispalying an error, which
I
 don't understand because the code actually works (other than the
error).
 Any
 ideas?
 
 ?
 if(!isset($HTTP_SESSION_VARS['svUserAccess'])){
   echo td class='mainmenu' align='center' width='12.5%'
 style='cursor:hand' onMouseover='this.style.backgroundColor='#C0E0FF''
 onMouseout='this.style.backgroundColor='''
 onClick='window.location.href='login.php''a
 href='login.php'Login/a/td;
 } else {
   echo td class='mainmenu' align='center' width='12.5%'
 style='cursor:hand' onMouseover='this.style.backgroundColor='#C0E0FF''
 onMouseout='this.style.backgroundColor='''
 onClick='window.location.href='logout.php''a
 href='login.php'Logout/a/td;
   }
 ?
 
 Thanks
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




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




[PHP] trouble with maximum_execution_time and file upload

2002-11-03 Thread Eduardo M. Bragatto
I've send an e-mail with a doubt related with the
maximum_execution_time variable but it has no answers, so, I'm
submiting it again...

I'm using a single php script to send files named upload.php,
here is the source code:

?php

set_time_limit(500);

copy($userfile, log\\$userfile_name);

echo htmlheadtitleUploading file.../titlemeta 
http-equiv=\refresh\ content=\0; 
url=http://test.com/file_sent.html\;/headbodycenterfont 
face=\Verdana\ size=\4\Uploading 
file.../font/center/body/html;

?

I've tried to change the time limit because there's an error that
doesn't stop when trying to send big files (when the duration of
upload takes more than 20 seconds):

Fatal error: Maximum execution time of 20 seconds exceeded in
D:\dominios\E\escolas-es\spe\upload.php on line 2

As you can see, the time limit is exceeded before the
set_time_limit is executed. I thing that's because the script begins
only after the file is uploaded. My problem is that I can't change the
maximum_execution_time in the configuration file.

Does anyone knows how to solve that problem?

Thank you,
Eduardo M. Bragatto.

PS: Sorry for my miserable english #)



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



Re: [PHP] Error in code - Seems simple enough

2002-11-03 Thread vernon
That's the thing, everything works but the error message keeps coming up?

Runtime Error: Syntax Error



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




[PHP] re:[PHP] uploading help please again

2002-11-03 Thread rija
You might receive 2 files throught upload,
then the first file name should be $_FILES['origem'] ;
and the second file name $_FILES['origem2'] ;

To use the different variables you can use, peer John Holmes's answer, there
aren't no full answer like this anywhere?

to ask if file uploaded is ok
uploaded_file() is better than you are doing
and use move_uploaded_file() instead copy() and unset() ;
like this :

if (is_uploaded_file($_FILES['origem']) )
move_uploaded_file($_FILES['origem'], $dest) ;

/*
$path=(dirname($PATH_TRANSLATED))./primeirapagina/;
$origem_name=fdx.jpg;
$dest= $path.$origem_name;

if (($origem  none)  ($origem  )){
   if (copy($origem,$dest)){;

 } else {
  echo directoria sem direitos de escrita br;
  }
unlink ($origem);
}




- Original Message -
From: 'marcelo' [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 04, 2002 12:46 PM
Subject: RE: [PHP] uploading help please again

Ok I'm back

This script is to upload 2 image files

Whit register_globals = on it Works fine



script A

p.php

titleJornal O Leme/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head

body bgcolor=#006699
table width=100% border=0 cellpadding=0 cellspacing=0
  !--DWLayoutTable--
  tr
td width=100% height=70 valign=topimg src=test.jpg
width=600 height=120
/td
  /tr
  tr
td height=262 valign=toppnbsp;/p
  form method=post  action=pi.php  enctype=multipart/form-data
table width=75% border=0 align=center bgcolor=#FF
  tr
td width=23%div align=centerfont face=BankGothic Md
BT
/font/div/td
td width=77% bgcolor=#FFnbsp; /td
  /tr
  tr
tddiv align=center/div/td
td bgcolor=#FFnbsp; /td
  /tr
  tr
tddiv align=center/div/td
td bgcolor=#FFnbsp; /td
  /tr
  tr
tddiv align=leftstrongImagem pequena/strong/div/td
td bgcolor=#FF input type=hidden name=MAX_FILE_SIZE
value=102400
  input type=File name=origem /td
  /tr
  tr
tddiv align=leftstrongImagem grande/strong/div/td
td bgcolor=#FFinput type=hidden name=MAX_FILE_SIZE
value=102400
  input type=File name=origem2 /td
  /tr
  tr
tddiv align=center/div/td
td bgcolor=#FFnbsp; /td
  /tr
  tr
tdnbsp;/td
tdnbsp;/td
  /tr
/table
p align=center
  input name=submit type=submit value=Adicionar
input type=hidden name=page value=inserir1
  /form/p
  /td
  /tr
  tr
td height=81 valign=topdiv align=center
pnbsp;/p
p
  ?php

  include ('menu.php');

  ?
  nbsp;/p
  /div/td
  /tr
/table







pi.php



echo $page;  --- returns inserir1   _correct
echo $origem;   --- returns the temp path of the file _correct
set_time_limit(60);
$path=(dirname($PATH_TRANSLATED))./primeirapagina/;
$origem_name=fdx.jpg;
$dest= $path.$origem_name;

if (($origem  none)  ($origem  )){
   if (copy($origem,$dest)){;

 } else {
  echo directoria sem direitos de escrita br;
  }
unlink ($origem);
}

set_time_limit(60);
$path2=(dirname($PATH_TRANSLATED))./primeirapagina/;
$origem2_name=porra.jpg;
$dest2= $path2.$origem2_name;
file://printf($path);
file://printf(br);
file://printf($origem_name);
if (($origem2  none)  ($origem2  )){
   if (copy($origem2,$dest2)){;
file://echo brupload do ficheiro $origem_name efectuada com sucesso !!!;
//  echo brtamanho do ficheiro $origem_size;
//  echo  brtipo de ficheiro $origem_type;
 } else {
  echo directoria sem direitos de escrita br;
  }
unlink ($origem2);
}
?


/body
/html








but Whit register_globals = off the script B dont work

script B:



p.php

titleJornal O Leme/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head

body bgcolor=#006699
table width=100% border=0 cellpadding=0 cellspacing=0
  !--DWLayoutTable--
  tr
td width=100% height=70 valign=topimg src=test.jpg
width=600 height=120
/td
  /tr
  tr
td height=262 valign=toppnbsp;/p
  form method=post  action=pi.php  enctype=multipart/form-data
table width=75% border=0 align=center bgcolor=#FF
  tr
td width=23%div align=centerfont face=BankGothic Md
BT
/font/div/td
td width=77% bgcolor=#FFnbsp; /td
  /tr
  tr
tddiv align=center/div/td
td bgcolor=#FFnbsp; /td
  /tr
  tr
tddiv align=center/div/td
td bgcolor=#FFnbsp; /td
  /tr
  tr
tddiv align=leftstrongImagem pequena/strong/div/td
td bgcolor=#FF input type=hidden name=MAX_FILE_SIZE
value=102400
  input 

[PHP] Global Variables Off

2002-11-03 Thread Paul
Ok, I have turned global vars off and I have replaced my old
$HTTP_GET_VARS with $_GET[] but I seem to not get the values passed. I
run the phpinfo and I see the variables being stored as
_GET[variable_name]

Is calling $_GET[variable_name] correct? If so, why would I not get
the value? 

I use it in the following statement (checking if error_message is empty)
:
if ($_GET[error_message])

Thanks
Paul



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




Re: [PHP] Global Variables Off

2002-11-03 Thread Chris Shiflett
You didn't really tell us how you're passing data or what is not working.

Try this. Create a test script called test.php that looks like this:

?
echo pThe test variable is [ . $_GET[test] . ]/p;
?

Assuming this script is located at http://example.org/test.php, access 
this page using a URL like this:

http://example.org/test.php?test=foo

Chris

Paul wrote:

Ok, I have turned global vars off and I have replaced my old
$HTTP_GET_VARS with $_GET[] but I seem to not get the values passed. I
run the phpinfo and I see the variables being stored as
_GET[variable_name]

Is calling $_GET[variable_name] correct? If so, why would I not get
the value? 

I use it in the following statement (checking if error_message is empty)
:
if ($_GET[error_message])



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




Re: [PHP] radio buttons from MySQL query?

2002-11-03 Thread rija
I don't think so,
Put the bracket with your radio's name not with your the value///

For example :
print td width=2input type=radio name=gl_acct[]
value=$row['acct']{$row['acct']}/td ...
and so one/

- Original Message -
From: David Jackson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 04, 2002 1:15 PM
Subject: [PHP] radio buttons from MySQL query?


 How do I go about building radio buttons using the results of a MySQL
 query. The record layout looks like this:

 acct
 cat
 description

 I want to use acct as the value=acct in the input statement for the
 radio box. The code below almost works?

 TIA,
 David


 ?php
 $header = mysql_query (SELECT * FROM chart
 ORDER BY acct );

 if ($row = mysql_fetch_array($header)) {
  do {
  print(tr  bgcolor=\white\ );
 print 'td width=5input type=radio name=gl_acct
 value=acct[]/td';
 print(td width=\12\);
 print $row[acct];
  print /tdtd width=\12\;
 print $row[cat];
  print /tdtd ;
 print $row[descript];
 print(/td/tr\n);
 } while($row = mysql_fetch_array($header));

  } else {print Sorry, no records were found!;}


 ?


 --
 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] Error in code - Seems simple enough

2002-11-03 Thread rija
This is rather problem about javascript than PHP -
But I think that you need to use double quotes (escaped) to distinguish query and 
variables in your javascript query:

Try out this, It work fine for me:
if(!isset($HTTP_SESSION_VARS['svUserAccess'])){

echo td class='mainmenu' align='center' width='12.5%'

style='cursor:hand' onMouseover=\this.style.backgroundColor='#C0E0FF'\

onMouseout=\this.style.backgroundColor=''\

onClick=\window.location.href='login.php'\a

href='login.php'Login/a/td;

} else {

echo td class='mainmenu' align='center' width='12.5%'

style='cursor:hand' onMouseover=\this.style.backgroundColor='#C0E0FF'\

onMouseout=\this.style.backgroundColor=''\

onClick=\window.location.href='logout.php'\a

href='login.php'Logout/a/td;



wrote in message news:20021104022815.4043.qmail;pb1.pair.com...
 I'm having trouble with the following code dispalying an error, which I
 don't understand because the code actually works (other than the error). Any
 ideas?
 
 ?
 if(!isset($HTTP_SESSION_VARS['svUserAccess'])){
   echo td class='mainmenu' align='center' width='12.5%'
 style='cursor:hand' onMouseover='this.style.backgroundColor='#C0E0FF''
 onMouseout='this.style.backgroundColor='''
 onClick='window.location.href='login.php''a
 href='login.php'Login/a/td;
 } else {
   echo td class='mainmenu' align='center' width='12.5%'
 style='cursor:hand' onMouseover='this.style.backgroundColor='#C0E0FF''
 onMouseout='this.style.backgroundColor='''
 onClick='window.location.href='logout.php''a
 href='login.php'Logout/a/td;
   }
 ?
 
 Thanks
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 



RE: [PHP] Global Variables Off

2002-11-03 Thread Paul
I am passing it via URL as: http://example.org/test.php?test=foo

When I do that call to $_GET[test] shows that variable is not set,
however, when I run phpinfo() it shows value assigned to _GET.
With no change in code, I turn global variables 'on' and the same page
works..

Paul

PS using php 4.2.3

-Original Message-
From: Chris Shiflett [mailto:shiflett;php.net] 
Sent: Sunday, November 03, 2002 10:15 PM
To: Paul
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Global Variables Off

You didn't really tell us how you're passing data or what is not
working.

Try this. Create a test script called test.php that looks like this:

?
echo pThe test variable is [ . $_GET[test] . ]/p;
?

Assuming this script is located at http://example.org/test.php, access 
this page using a URL like this:

http://example.org/test.php?test=foo

Chris

Paul wrote:

Ok, I have turned global vars off and I have replaced my old
$HTTP_GET_VARS with $_GET[] but I seem to not get the values passed. I
run the phpinfo and I see the variables being stored as
_GET[variable_name]

Is calling $_GET[variable_name] correct? If so, why would I not get
the value? 

I use it in the following statement (checking if error_message is
empty)
:
if ($_GET[error_message])





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




Re: [PHP] radio buttons from MySQL query?

2002-11-03 Thread John Nichel
There is no reason to put brackets behind the name of the radio element.  The brackets are neccessary for multi-select elements like checkboxes, but radio buttone are a single select element.

Your if statement should be a while loop.

I'm sure you don't want to set this ( value=acct[] ) as the value for each radio button.  Do it that way, and no matter which one is picked, it will be the same value.

rija wrote:

I don't think so,
Put the bracket with your radio's name not with your the value///

For example :
print td width=2input type=radio name=gl_acct[]
value=$row['acct']{$row['acct']}/td ...
and so one/

- Original Message -
From: David Jackson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 04, 2002 1:15 PM
Subject: [PHP] radio buttons from MySQL query?




How do I go about building radio buttons using the results of a MySQL
query. The record layout looks like this:

acct
cat
description

I want to use acct as the value=acct in the input statement for the
radio box. The code below almost works?

TIA,
David


?php
$header = mysql_query (SELECT * FROM chart
   ORDER BY acct );

if ($row = mysql_fetch_array($header)) {
do {
print(tr  bgcolor=\white\ );
   print 'td width=5input type=radio name=gl_acct
value=acct[]/td';
   print(td width=\12\);
   print $row[acct];
print /tdtd width=\12\;
   print $row[cat];
print /tdtd ;
   print $row[descript];
   print(/td/tr\n);
   } while($row = mysql_fetch_array($header));

} else {print Sorry, no records were found!;}


?


--
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] Global Variables Off

2002-11-03 Thread John Nichel
Try single quotes...

$_GET['test']

Paul wrote:

I am passing it via URL as: http://example.org/test.php?test=foo

When I do that call to $_GET[test] shows that variable is not set,
however, when I run phpinfo() it shows value assigned to _GET.
With no change in code, I turn global variables 'on' and the same page
works..

Paul

PS using php 4.2.3

-Original Message-
From: Chris Shiflett [mailto:shiflett;php.net] 
Sent: Sunday, November 03, 2002 10:15 PM
To: Paul
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Global Variables Off

You didn't really tell us how you're passing data or what is not
working.

Try this. Create a test script called test.php that looks like this:

?
echo pThe test variable is [ . $_GET[test] . ]/p;
?

Assuming this script is located at http://example.org/test.php, access 
this page using a URL like this:

http://example.org/test.php?test=foo

Chris

Paul wrote:


Ok, I have turned global vars off and I have replaced my old
$HTTP_GET_VARS with $_GET[] but I seem to not get the values passed. I
run the phpinfo and I see the variables being stored as
_GET[variable_name]

Is calling $_GET[variable_name] correct? If so, why would I not get
the value? 

I use it in the following statement (checking if error_message is

empty)


:
if ($_GET[error_message])











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




RE: [PHP] Global Variables Off

2002-11-03 Thread Paul
Makes no difference..I tried them both

-Original Message-
From: John Nichel [mailto:jnichel;by-tor.com] 
Sent: Sunday, November 03, 2002 10:59 PM
To: Paul
Cc: 'Chris Shiflett'; [EMAIL PROTECTED]
Subject: Re: [PHP] Global Variables Off

Try single quotes...

$_GET['test']

Paul wrote:
 I am passing it via URL as: http://example.org/test.php?test=foo
 
 When I do that call to $_GET[test] shows that variable is not set,
 however, when I run phpinfo() it shows value assigned to _GET.
 With no change in code, I turn global variables 'on' and the same page
 works..
 
 Paul
 
 PS using php 4.2.3
 
 -Original Message-
 From: Chris Shiflett [mailto:shiflett;php.net] 
 Sent: Sunday, November 03, 2002 10:15 PM
 To: Paul
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Global Variables Off
 
 You didn't really tell us how you're passing data or what is not
 working.
 
 Try this. Create a test script called test.php that looks like this:
 
 ?
 echo pThe test variable is [ . $_GET[test] . ]/p;
 ?
 
 Assuming this script is located at http://example.org/test.php, access

 this page using a URL like this:
 
 http://example.org/test.php?test=foo
 
 Chris
 
 Paul wrote:
 
 
Ok, I have turned global vars off and I have replaced my old
$HTTP_GET_VARS with $_GET[] but I seem to not get the values passed. I
run the phpinfo and I see the variables being stored as
_GET[variable_name]

Is calling $_GET[variable_name] correct? If so, why would I not get
the value? 

I use it in the following statement (checking if error_message is
 
 empty)
 
:
if ($_GET[error_message])

 
 
 
 
 





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




Re: [PHP] Global Variables Off

2002-11-03 Thread Chris Shiflett
I assume you mean that the echo statement I gave as an example shows this:

The test variable is []

Right? If so, that is truly odd, especially considering you are using 
4.2.3. I don't have a good answer for that ...

Add this code to the top of your script to see if PHP thinks the client 
is passing any data at all:

echo pre;
print_r($_REQUEST);
echo /pre;

Chris

Paul wrote:

I am passing it via URL as: http://example.org/test.php?test=foo

When I do that call to $_GET[test] shows that variable is not set,
however, when I run phpinfo() it shows value assigned to _GET.
With no change in code, I turn global variables 'on' and the same page
works..

Paul

PS using php 4.2.3

-Original Message-
From: Chris Shiflett [mailto:shiflett;php.net] 
Sent: Sunday, November 03, 2002 10:15 PM
To: Paul
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Global Variables Off

You didn't really tell us how you're passing data or what is not
working.

Try this. Create a test script called test.php that looks like this:

?
echo pThe test variable is [ . $_GET[test] . ]/p;
?

Assuming this script is located at http://example.org/test.php, access 
this page using a URL like this:

http://example.org/test.php?test=foo

Chris

Paul wrote:

 

Ok, I have turned global vars off and I have replaced my old
$HTTP_GET_VARS with $_GET[] but I seem to not get the values passed. I
run the phpinfo and I see the variables being stored as
_GET[variable_name]

Is calling $_GET[variable_name] correct? If so, why would I not get
the value? 

I use it in the following statement (checking if error_message is
   

empty)
 

:
if ($_GET[error_message])

   





 




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




Re: [PHP] Global Variables Off

2002-11-03 Thread Justin French
Try these two simple tests, with the url test.php?test=foo

HTML
BODY
? print_r($_GET); ?br /
?=$_GET['test']?
/BODY
/HTML

And show us the results.


Justin



on 04/11/02 1:54 PM, Paul ([EMAIL PROTECTED]) wrote:

 I am passing it via URL as: http://example.org/test.php?test=foo
 
 When I do that call to $_GET[test] shows that variable is not set,
 however, when I run phpinfo() it shows value assigned to _GET.
 With no change in code, I turn global variables 'on' and the same page
 works..
 
 Paul
 
 PS using php 4.2.3
 
 -Original Message-
 From: Chris Shiflett [mailto:shiflett;php.net]
 Sent: Sunday, November 03, 2002 10:15 PM
 To: Paul
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Global Variables Off
 
 You didn't really tell us how you're passing data or what is not
 working.
 
 Try this. Create a test script called test.php that looks like this:
 
 ?
 echo pThe test variable is [ . $_GET[test] . ]/p;
 ?
 
 Assuming this script is located at http://example.org/test.php, access
 this page using a URL like this:
 
 http://example.org/test.php?test=foo
 
 Chris
 
 Paul wrote:
 
 Ok, I have turned global vars off and I have replaced my old
 $HTTP_GET_VARS with $_GET[] but I seem to not get the values passed. I
 run the phpinfo and I see the variables being stored as
 _GET[variable_name]
 
 Is calling $_GET[variable_name] correct? If so, why would I not get
 the value? 
 
 I use it in the following statement (checking if error_message is
 empty)
 :
 if ($_GET[error_message])
 
 
 
 


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




RE: [PHP] Global Variables Off

2002-11-03 Thread Paul
OK I guess I am closer = the variable is being passed as I tested but I
guess is failing on the test:

if (isset($_GET[error_message]))

Thank you for all your help

Paul

-Original Message-
From: Chris Shiflett [mailto:shiflett;php.net] 
Sent: Sunday, November 03, 2002 11:08 PM
To: Paul
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Global Variables Off

I assume you mean that the echo statement I gave as an example shows
this:

The test variable is []

Right? If so, that is truly odd, especially considering you are using 
4.2.3. I don't have a good answer for that ...

Add this code to the top of your script to see if PHP thinks the client 
is passing any data at all:

echo pre;
print_r($_REQUEST);
echo /pre;

Chris

Paul wrote:

I am passing it via URL as: http://example.org/test.php?test=foo

When I do that call to $_GET[test] shows that variable is not set,
however, when I run phpinfo() it shows value assigned to _GET.
With no change in code, I turn global variables 'on' and the same page
works..

Paul

PS using php 4.2.3

-Original Message-
From: Chris Shiflett [mailto:shiflett;php.net] 
Sent: Sunday, November 03, 2002 10:15 PM
To: Paul
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Global Variables Off

You didn't really tell us how you're passing data or what is not
working.

Try this. Create a test script called test.php that looks like this:

?
echo pThe test variable is [ . $_GET[test] . ]/p;
?

Assuming this script is located at http://example.org/test.php, access 
this page using a URL like this:

http://example.org/test.php?test=foo

Chris

Paul wrote:

  

Ok, I have turned global vars off and I have replaced my old
$HTTP_GET_VARS with $_GET[] but I seem to not get the values passed. I
run the phpinfo and I see the variables being stored as
_GET[variable_name]

Is calling $_GET[variable_name] correct? If so, why would I not get
the value? 

I use it in the following statement (checking if error_message is


empty)
  

:
if ($_GET[error_message])







  




-- 
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] radio buttons from MySQL query?

2002-11-03 Thread rija
oups ... you're right !

- Original Message -
From: John Nichel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: php [EMAIL PROTECTED]; David Jackson
[EMAIL PROTECTED]
Sent: Monday, November 04, 2002 2:57 PM
Subject: Re: [PHP] radio buttons from MySQL query?


 There is no reason to put brackets behind the name of the radio element.
The brackets are neccessary for multi-select elements like checkboxes, but
radio buttone are a single select element.

 Your if statement should be a while loop.

 I'm sure you don't want to set this ( value=acct[] ) as the value for each
radio button.  Do it that way, and no matter which one is picked, it will be
the same value.

 rija wrote:
  I don't think so,
  Put the bracket with your radio's name not with your the value///
 
  For example :
  print td width=2input type=radio name=gl_acct[]
  value=$row['acct']{$row['acct']}/td ...
  and so one/
 
  - Original Message -
  From: David Jackson [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, November 04, 2002 1:15 PM
  Subject: [PHP] radio buttons from MySQL query?
 
 
 
 How do I go about building radio buttons using the results of a MySQL
 query. The record layout looks like this:
 
 acct
 cat
 description
 
 I want to use acct as the value=acct in the input statement for the
 radio box. The code below almost works?
 
 TIA,
 David
 
 
 ?php
 $header = mysql_query (SELECT * FROM chart
 ORDER BY acct );
 
 if ($row = mysql_fetch_array($header)) {
  do {
  print(tr  bgcolor=\white\ );
 print 'td width=5input type=radio name=gl_acct
 value=acct[]/td';
 print(td width=\12\);
 print $row[acct];
  print /tdtd width=\12\;
 print $row[cat];
  print /tdtd ;
 print $row[descript];
 print(/td/tr\n);
 } while($row = mysql_fetch_array($header));
 
  } else {print Sorry, no records were found!;}
 
 
 ?
 
 
 --
 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] More on cleaning Windows characters...

2002-11-03 Thread a . h . s . boy
After considerable investigation into the form input of non-Latin 1 
characters to be processed by PHP on a Linux box, I've been able to 
distill the issue down considerably, though a solution (and one oddity) 
remains confusing.

I found a very helpful web page entitled On the use of some MS Windows 
characters in HTML that explains my problem rather well at 
http://www.cs.tut.fi/~jkorpela/www/windows-chars.html. Recommended 
reading for anyone displaying text that may have been entered by 
Windows users, especially text pasted in from word-processing apps.

Basically, the problem is this: on a Windows machine using Windows 1252 
(Windows Latin 1), a pair of smart quotes are ASCII characters 147 
and 148. There are a number of other special characters that Windows 
maps onto ASCII 128-159, like em dashes and trademark symbols.

Unfortunately, _true_ Latin 1 (iso-8859-1) reserves chars 128-159 for 
control characters. So, while you may type ALT-0147 to type a smart 
quote into your word processing app (or allow Word to create them 
automagically when you type a quote), when that very same character is 
pasted into a web page form set to accept iso-8859-1 or UTF-8 encoding, 
it DOES NOT MAP to chr(147) when processed by PHP on a Linux box.

Strangely, pasting in a Word-created smart quote character into a web 
form and processing it with PHP produces VERY ODD results. Take the 
string

==

where the quotation mark is a curly-style quote. Tell PHP to step 
through the characters and print their ASCII value. The two equal signs 
are fine (char 61), but the curly quote comes across as THREE 
characters: (226)(128)(156). Where this comes from, I do not understand.

I'm inclined to think that if I _don't_ try to specify the 
accept-charset parameter on the form, and _don't_ try to convert em 
dashes, curly quotes, etc that I'll probably end up with cleaner text 
than I do now.

Still, if anyone has any really helpful input on this topic, please 
write me and let me know. We're getting into the ugly guts of page 
charset vs. form accept-charset vs. browser input charset vs. latin 1 
vs. Windows latin 1 vs. MacRoman here, but I'm surprised that no one 
has chimed in on this. Does anyone else ever run into this problem, or 
does everyone else's forms just handle all of this magically without 
any intervention?

spud.

---
a.h.s. boy
spud(at)nothingness.orgas yes is to if,love is to yes
http://www.nothingness.org/
---


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



Re: [PHP] Global Variables Off

2002-11-03 Thread rija
I think your machine is blasted -
Find out an exorcist or a witch
or move out to other program-

- Original Message - 
From: Paul [EMAIL PROTECTED]
To: 'John Nichel' [EMAIL PROTECTED]
Cc: 'Chris Shiflett' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, November 04, 2002 3:02 PM
Subject: RE: [PHP] Global Variables Off


 Makes no difference..I tried them both
 
 -Original Message-
 From: John Nichel [mailto:jnichel;by-tor.com] 
 Sent: Sunday, November 03, 2002 10:59 PM
 To: Paul
 Cc: 'Chris Shiflett'; [EMAIL PROTECTED]
 Subject: Re: [PHP] Global Variables Off
 
 Try single quotes...
 
 $_GET['test']
 
 Paul wrote:
  I am passing it via URL as: http://example.org/test.php?test=foo
  
  When I do that call to $_GET[test] shows that variable is not set,
  however, when I run phpinfo() it shows value assigned to _GET.
  With no change in code, I turn global variables 'on' and the same page
  works..
  
  Paul
  
  PS using php 4.2.3
  
  -Original Message-
  From: Chris Shiflett [mailto:shiflett;php.net] 
  Sent: Sunday, November 03, 2002 10:15 PM
  To: Paul
  Cc: [EMAIL PROTECTED]
  Subject: Re: [PHP] Global Variables Off
  
  You didn't really tell us how you're passing data or what is not
  working.
  
  Try this. Create a test script called test.php that looks like this:
  
  ?
  echo pThe test variable is [ . $_GET[test] . ]/p;
  ?
  
  Assuming this script is located at http://example.org/test.php, access
 
  this page using a URL like this:
  
  http://example.org/test.php?test=foo
  
  Chris
  
  Paul wrote:
  
  
 Ok, I have turned global vars off and I have replaced my old
 $HTTP_GET_VARS with $_GET[] but I seem to not get the values passed. I
 run the phpinfo and I see the variables being stored as
 _GET[variable_name]
 
 Is calling $_GET[variable_name] correct? If so, why would I not get
 the value? 
 
 I use it in the following statement (checking if error_message is
  
  empty)
  
 :
 if ($_GET[error_message])
 
  
  
  
  
  
 
 
 
 
 
 -- 
 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] radio buttons from MySQL query?

2002-11-03 Thread David Jackson
OK, this works but there has to be a pretty way?
John, I'm not sure what you mean about the while loop?


David

- Works -

html
headtitleOperation Sticky Bun/title/head
body
h3 align=centerOperation Sticky Bun /h3
?php require('connect.php'); ?
?php
print 'form action=hello.php method=post';
$header = mysql_query (SELECT * FROM chart
   ORDER BY acct );
if ($row = mysql_fetch_array($header)) {
do {
   print 'input type=radio name=ledger_acct value=';
   print $row[acct];print '';
   print $row[descript];print 'br';
   } while($row = mysql_fetch_array($header));

} else {print Sorry, no records were found!;}

print '/form';
?
/body
/html




Rija wrote:

oups ... you're right !

- Original Message -
From: John Nichel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: php [EMAIL PROTECTED]; David Jackson
[EMAIL PROTECTED]
Sent: Monday, November 04, 2002 2:57 PM
Subject: Re: [PHP] radio buttons from MySQL query?




There is no reason to put brackets behind the name of the radio element.


The brackets are neccessary for multi-select elements like checkboxes, but
radio buttone are a single select element.


Your if statement should be a while loop.

I'm sure you don't want to set this ( value=acct[] ) as the value for each


radio button.  Do it that way, and no matter which one is picked, it will be
the same value.


rija wrote:


I don't think so,
Put the bracket with your radio's name not with your the value///

For example :
print td width=2input type=radio name=gl_acct[]
value=$row['acct']{$row['acct']}/td ...
and so one/

- Original Message -
From: David Jackson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 04, 2002 1:15 PM
Subject: [PHP] radio buttons from MySQL query?





How do I go about building radio buttons using the results of a MySQL
query. The record layout looks like this:

acct
cat
description

I want to use acct as the value=acct in the input statement for the
radio box. The code below almost works?

TIA,
David


?php
$header = mysql_query (SELECT * FROM chart
  ORDER BY acct );

if ($row = mysql_fetch_array($header)) {
   do {
   print(tr  bgcolor=\white\ );
  print 'td width=5input type=radio name=gl_acct
value=acct[]/td';
  print(td width=\12\);
  print $row[acct];
   print /tdtd width=\12\;
  print $row[cat];
   print /tdtd ;
  print $row[descript];
  print(/td/tr\n);
  } while($row = mysql_fetch_array($header));

   } else {print Sorry, no records were found!;}


?


--
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] radio buttons from MySQL query?

2002-11-03 Thread John Nichel
Belay that.  I didn't notice the do / while loop inside of the if 
statement.  I don't know if this is prettier, but I would echo out the 
radio button in one line

echo ( input type=\radio\ name=\ledger_acct\ value=\ . 
$row[acct] . \ . $row[descript] . br\n;

David Jackson wrote:
OK, this works but there has to be a pretty way?
John, I'm not sure what you mean about the while loop?


David

- Works -

html
headtitleOperation Sticky Bun/title/head
body
h3 align=centerOperation Sticky Bun /h3
?php require('connect.php'); ?
?php
print 'form action=hello.php method=post';
$header = mysql_query (SELECT * FROM chart
   ORDER BY acct );
if ($row = mysql_fetch_array($header)) {
do {
   print 'input type=radio name=ledger_acct value=';
   print $row[acct];print '';
   print $row[descript];print 'br';
   } while($row = mysql_fetch_array($header));

} else {print Sorry, no records were found!;}

print '/form';
?
/body
/html




Rija wrote:


oups ... you're right !

- Original Message -
From: John Nichel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: php [EMAIL PROTECTED]; David Jackson
[EMAIL PROTECTED]
Sent: Monday, November 04, 2002 2:57 PM
Subject: Re: [PHP] radio buttons from MySQL query?




There is no reason to put brackets behind the name of the radio element.



The brackets are neccessary for multi-select elements like checkboxes, 
but
radio buttone are a single select element.

Your if statement should be a while loop.

I'm sure you don't want to set this ( value=acct[] ) as the value for 
each


radio button.  Do it that way, and no matter which one is picked, it 
will be
the same value.

rija wrote:


I don't think so,
Put the bracket with your radio's name not with your the value///

For example :
print td width=2input type=radio name=gl_acct[]
value=$row['acct']{$row['acct']}/td ...
and so one/

- Original Message -
From: David Jackson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 04, 2002 1:15 PM
Subject: [PHP] radio buttons from MySQL query?





How do I go about building radio buttons using the results of a MySQL
query. The record layout looks like this:

acct
cat
description

I want to use acct as the value=acct in the input statement for the
radio box. The code below almost works?

TIA,
David


?php
$header = mysql_query (SELECT * FROM chart
  ORDER BY acct );

if ($row = mysql_fetch_array($header)) {
   do {
   print(tr  bgcolor=\white\ );
  print 'td width=5input type=radio name=gl_acct
value=acct[]/td';
  print(td width=\12\);
  print $row[acct];
   print /tdtd width=\12\;
  print $row[cat];
   print /tdtd ;
  print $row[descript];
  print(/td/tr\n);
  } while($row = mysql_fetch_array($header));

   } else {print Sorry, no records were found!;}


?


--
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] Threads

2002-11-03 Thread Khalid El-Kary
hi,

i would like to ask about PHP threads support, is there any threads support, 
how powerful, please redirect me to the right place

thanx

khalid

_
Unlimited Internet access -- and 2 months free!  Try MSN. 
http://resourcecenter.msn.com/access/plans/2monthsfree.asp


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



Re: [PHP] Threads

2002-11-03 Thread Rasmus Lerdorf
Nope

On Mon, 4 Nov 2002, Khalid El-Kary wrote:

 hi,

 i would like to ask about PHP threads support, is there any threads support,
 how powerful, please redirect me to the right place

 thanx

 khalid

 _
 Unlimited Internet access -- and 2 months free!  Try MSN.
 http://resourcecenter.msn.com/access/plans/2monthsfree.asp


 --
 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] Am I blind? simple 15 line code producing error

2002-11-03 Thread @ Edwin
Hello,

Could it be that because you have a blank line between

 require_once classes/HtmlTemplate.class;
 
 if ($HTTP_SESSION_VARS[user_id]){

?

(Or even some blank lines or spaces before require_once.)

Just guessing...

- E

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




Re: [PHP] re:[PHP] uploading help please again

2002-11-03 Thread Jason Wong
On Monday 04 November 2002 11:04, rija wrote:
 You might receive 2 files throught upload,
 then the first file name should be $_FILES['origem'] ;
 and the second file name $_FILES['origem2'] ;

 To use the different variables you can use, peer John Holmes's answer,
 there aren't no full answer like this anywhere?

There's a perfectly good example in the manual that people should use and 
adapt instead of trying to write their own non-working upload forms.

If they could just spend a couple of minutes searching the archives or even 
reading the manual, they could save themselved oodles of time and grief.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
Getting into trouble is easy.
-- D. Winkel and F. Prosser
*/


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




Re: [PHP] Global Variables Off

2002-11-03 Thread @ Edwin
Hello,

Paul [EMAIL PROTECTED] wrote:
 OK I guess I am closer = the variable is being passed as I tested but I
 guess is failing on the test:

 if (isset($_GET[error_message]))


What do you mean by failing on the test? What are you trying to
accomplish,
btw? How are you testing it? Also, have you tried the single quotes here (in
this
portion) as mentioned by the others earlier?

- E

...[snip]...

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




Re: [PHP] Am I blind? simple 15 line code producing error

2002-11-03 Thread Justin French
on 04/11/02 4:15 PM, @ Edwin ([EMAIL PROTECTED]) wrote:

 Hello,
 
 Could it be that because you have a blank line between
 
 require_once classes/HtmlTemplate.class;

Shouldn't it be require_once(classes/HtmlTemplate.class);

???


Justin


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




Re: [PHP] Re: Cookies disabled, new session ID each click!

2002-11-03 Thread Jason Wong
On Monday 04 November 2002 10:24, Steve Fatula wrote:
 If you want to see a site where the small program works (and be SURE and
 turn cookies off), click here:
 http://www.thewebmakerscorner.com/snapmods_new/default_test.php


 So, can anyone tell me why it does not work on MY site(s)? Any ideas?
 Surely this is a PHP configuration issue/bug perhaps? Logically, I don't
 see any settings that could possibly affect the outcome using this

Have you tried any browsers other than IE 5.5?

First time I go into that page, my URL shows this

 http://www.thewebmakerscorner.com/snapmods_new/default_test.php

Clicking on the link appends the session id to the URL. As does clicking on 
the link again (same session id). Ad infinitum.

So basically it works?

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
University politics are vicious precisely because the stakes are so small.
-- Henry Kissinger
*/


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




Re: [PHP] Phpmyadmin HELP!!!

2002-11-03 Thread Jason Wong
On Monday 04 November 2002 07:16, Rodrigo de Oliveira Costa wrote:
 Hi people,

 After I installed phpmyadmin on my computer that runs an Apache I've worked
 almost everything out. The only problem I seem to have is that when I
 create a Database I can't put more than 8 columns and if I do it simply
 doesnt accept it. Another problem that it looks like I'm having is that
 when I log into a database it shows all the tables in that database on my
 left but if I click on a table with more than 8 columns, that I created in
 the DOS, it simply doesnt show the details. HELP!!!

I think phpmyadmin has its own mailing list. You should be asking on there.

-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *

/*
I used to be disgusted, now I find I'm just amused.
-- Elvis Costello
*/


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




Re: [PHP] Am I blind? simple 15 line code producing error

2002-11-03 Thread @ Edwin
Perhaps?

But you don't really need the parenthesis ;)

- E


Justin French [EMAIL PROTECTED] wrote:

 on 04/11/02 4:15 PM, @ Edwin ([EMAIL PROTECTED]) wrote:
 
  Hello,
  
  Could it be that because you have a blank line between
  
  require_once classes/HtmlTemplate.class;
 
 Shouldn't it be require_once(classes/HtmlTemplate.class);
 
 ???
 

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




[PHP] Session cookies

2002-11-03 Thread Shaun
Hi,

When the user logs in , i create a session with session varialbles, the
session cookie is saved on clients computer.

When i log off i say

session_unset();
session_destroy();
setcookie(session_name());

The session in the tmp is deleted , but the cookie is still there , i know
this because when i login , the same session id is used ! Why is that ?

The session id changes when you close the browser , as the default is 0.

Thanks
Shaun









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




RE: [PHP] phpinfo

2002-11-03 Thread David Russell
Been there, done that. Didn't help...

I was told (off list) that it is because php4.2.3 is compiled with
Apache 1.3.24. is this possible?

It is definitely Apache 1.3.27 (404 error message returned the version
number), but php is not reporting as such.

Thanks again

David Russell
IT Support Manager
Barloworld Optimus (Pty) Ltd
Tel: +2711 444-7250 
Fax: +2711 444-7256
e-mail: [EMAIL PROTECTED]
web: www.BarloworldOptimus.com

-Original Message-
From: Matt T. Galvin [mailto:mattg;disaster.com] 
Sent: 01 November 2002 10:50 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] phpinfo


Restart apache... that should be it

on XP use the Restart Script in you apache program group

on unix do a

/usr/local/apache/bin/apachectl graceful

or just

apachectl graceful

if it is in your path

HTH,

Matt

At 05:50 AM 11/2/2002 +0900, you wrote:
[EMAIL PROTECTED]



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




smime.p7s
Description: application/pkcs7-signature


[PHP] fgets()

2002-11-03 Thread Khalid El-Kary
hi,
i want to open a remote file using fopen() i tried both of these ways

$filename=http://www.domain.com/filename.txt;;
$file=fopen($filename,r);
$filecontents=fread($file,filesize($filename));

this one didn't work because it's apparent that the file isn't in the local 
file system so filesize($filename) won't work ...

the second way was this:

$filename=http://www.domain.com/filename.txt;;
$file=fopen($filename,r);
$filecontents=;
while (!feof($file))
{
 $filecontents.=fgets($file);
}

this one worked well with PHP4.2.3 but with versions under PHP 4.2.0 it 
didn't work

So what else can i try to just get the whole contents of the file into a 
string?

thanx
khalid


_
Internet access plans that fit your lifestyle -- join MSN. 
http://resourcecenter.msn.com/access/plans/default.asp


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



[PHP] Re: Session cookies

2002-11-03 Thread Erwin
 When the user logs in , i create a session with session varialbles,
 the session cookie is saved on clients computer.

 When i log off i say

 session_unset();
 session_destroy();
 setcookie(session_name());

 The session in the tmp is deleted , but the cookie is still there , i
 know this because when i login , the same session id is used ! Why is
 that ?

Because you use the same session to connect from client to server. You don't
close your browser, don't wait 20 minutes (or something like that), so the
webserver knows you are the same. The session between the client and server
is not yet gone.

It's also possible that you need to set your cookie in the past. You're just
setting a cookie with setcookie(session_name()). If you want it destroyed,
set it some time ago, like setcookie(session_name(),-3600).


 The session id changes when you close the browser , as the default is
 0.

Not because default is 0, but because there isn't any session yet.

HTH
Erwin


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




[PHP] Re: fgets()

2002-11-03 Thread Erwin
Khalid El-Kary wrote:
 hi,
 i want to open a remote file using fopen() i tried both of these ways
 
 $filename=http://www.domain.com/filename.txt;;
 $file=fopen($filename,r);
 $filecontents=fread($file,filesize($filename));
 
 this one didn't work because it's apparent that the file isn't in the
 local file system so filesize($filename) won't work ...
 
 the second way was this:
 
 $filename=http://www.domain.com/filename.txt;;
 $file=fopen($filename,r);
 $filecontents=;
 while (!feof($file))
 {
   $filecontents.=fgets($file);
 }
 
 this one worked well with PHP4.2.3 but with versions under PHP 4.2.0
 it didn't work
 
 So what else can i try to just get the whole contents of the file
 into a string?

$filename = http://www.domain.com/filename.txt;
$fp = fopen($filename,r);
while (!feof($file))
   $content .= fread($fp,4096);


HTH
Erwin

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