Re: [PHP] Should I convert special characters before writing them to a table?

2001-10-04 Thread Steve Werby

"René Fournier" <[EMAIL PROTECTED]> wrote:
> The reason I ask is, I'm having a problem processing rows in a table that
> contain single quotes (specifically, the PHP code I wrote that allows the
> user to duplicate a row doesn't work if the a field in the row has a
single
> quote in it).

Try addslashes() before executing the query and stripslashes() when
retrieving data from the db.  See the online manual for more details.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Downloading Images

2001-10-04 Thread David Otton

On Thu, 4 Oct 2001 07:32:17 -0700 (PDT), you wrote:

>I have added a download button to a web-site that
>enables users to download images to their local
>drives. (I'm using a button as I want to wrap some
>logic round this function) I have the following
>(simplified code )that will be called from the
>web-site when the button is clicked. 
>
>header("Content-type: application/octet-stream");
>header( "Content-Disposition: attachment;
>filename=01lg.jpg");   
>$filename= "c:/program files/apache
>group/apache/kidz/gallery/download/01lg.jpg";
>   include($filename);
>
>The result is the SaveAs box appears and the image is
>being downloaded with the correct name however when I
>try and re-open the image i get the message invalid
>header. Does anyone have any ideas?

What does the downloaded file look like internally? Open it in a hex
editor (or even just Notepad). Check the file-lengths of the original
and copy. My guess is you're saving an error message with a .jpeg
extension.

djo


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Should I convert special characters before writing them to a table?

2001-10-04 Thread Oliver Ruf

Hi

ASFAIK, the quote character (') is used in ANSI-SQL (and also in MySQL)
as string-delimiter... (e.g. "SELECT * FROM users WHERE name = 'admin';")

So I definitvely would replace the character or you'll might run into 
problems with SQL. 

Maybe there's another and better solution, but it should be no big thing to 
exchange the quotes quickly.

-- Cheers, Oliver




[EMAIL PROTECTED] (René fournier) wrote in
[EMAIL PROTECTED]:">news:[EMAIL PROTECTED]: 

> The reason I ask is, I'm having a problem processing rows in a table
> that contain single quotes (specifically, the PHP code I wrote that
> allows the user to duplicate a row doesn't work if the a field in the
> row has a single quote in it).
> 
> Would it be better for me to strip out the single quotes before the
> rows are written, replacing them with another special [harmless]
> character, and just dynamically swapping that character out for the
> orginal when the row is displayed?  Any thoughts?  I just started doing
> this PHP/MySQL thing a couple weeks ago, and I realize I have a lot to
> learn.  Any suggestions would be much appreciated.
> 
> Oh, and by the way, here is the PHP code for duplicating rows that
> fails to execute when a field in the row it's processing contains a
> single quote. 
> 
> =
> // DUPLICATE
>if ($action == "dup") {
> 
>   $result = mysql_query("SELECT * FROM $table WHERE
>   id=$id",$db); $myrow = mysql_fetch_array($result);
> 
> $comma = "";
> 
> for ($i = $priv; $i < $columns; $i++) {
>  $fld = mysql_field_name($fields, $i);
> $set .= $comma."$fld='".$myrow[$i]."'";
> $comma = ", ";
>  }
> 
> // run SQL against the DB
>$sql = "INSERT $table SET $set";
>$result = mysql_query($sql);
> 
>$affected = $id;
>echo "width=10 
> height=1> class=adminnormalgrey>Record duplicated";
>  }
> =
> 
> Thanks.
> 
> ...Rene
> 
> ---
> Rene Fournier
> [EMAIL PROTECTED]
> 
> 
> _
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Downloading Images

2001-10-04 Thread Roger Bryant

All,

I have searched high and low through the lists to find
a solution to this problem but none of the suggestions
appear to work for me.

I have added a download button to a web-site that
enables users to download images to their local
drives. (I'm using a button as I want to wrap some
logic round this function) I have the following
(simplified code )that will be called from the
web-site when the button is clicked. 

header("Content-type: application/octet-stream");
header( "Content-Disposition: attachment;
filename=01lg.jpg");
$filename= "c:/program files/apache
group/apache/kidz/gallery/download/01lg.jpg";
include($filename);

The result is the SaveAs box appears and the image is
being downloaded with the correct name however when I
try and re-open the image i get the message invalid
header. Does anyone have any ideas?

Vesrions are PHP 3,IE6, Windows ME.

Thanks very much in advance,

Roger



__
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] need phpmyAdmin but no so good

2001-10-04 Thread Michael A. Peters

http://www.webmin.com/webmin/

On Thu, 4 Oct 2001 10:48:57 +0200
<[EMAIL PROTECTED]> wrote:

> Hi:
> I'm looking for a mysql administrator but no so good as
> phpmyAdmin, just listing dbs, tables, insert, delete, edit
> options; no create or alter tables and dbs
> 
> anybody knows about?
> thanks in advance
>  


-- 
-=-=-=-=-=-=-=-=-=-=-=-=-
Michael A. Peters
http://24.5.29.77:10080/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] printing comma-delimited lists

2001-10-04 Thread David Otton

On Thu, 4 Oct 2001 16:27:11 +0200 (CEST), you wrote:

>You could try implode()
>
>$lis = implode(",", $arr);

That'll do it; thanks.

djo


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Should I convert special characters before writing them to a table?

2001-10-04 Thread René Fournier

The reason I ask is, I'm having a problem processing rows in a table that
contain single quotes (specifically, the PHP code I wrote that allows the
user to duplicate a row doesn't work if the a field in the row has a single
quote in it).

Would it be better for me to strip out the single quotes before the rows are
written, replacing them with another special [harmless] character, and just
dynamically swapping that character out for the orginal when the row is
displayed?  Any thoughts?  I just started doing this PHP/MySQL thing a
couple weeks ago, and I realize I have a lot to learn.  Any suggestions
would be much appreciated.

Oh, and by the way, here is the PHP code for duplicating rows that fails to
execute when a field in the row it's processing contains a single quote.

=
// DUPLICATE
   if ($action == "dup") {

$result = mysql_query("SELECT * FROM $table WHERE id=$id",$db);
$myrow = mysql_fetch_array($result);

$comma = "";

for ($i = $priv; $i < $columns; $i++) {
$fld = mysql_field_name($fields, $i);
$set .= $comma."$fld='".$myrow[$i]."'";
$comma = ", ";
}

  // run SQL against the DB
  $sql = "INSERT $table SET $set";
  $result = mysql_query($sql);

   $affected = $id;
   echo "Record duplicated";
}
=

Thanks.

...Rene

---
Rene Fournier
[EMAIL PROTECTED]


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] printing comma-delimited lists

2001-10-04 Thread Stig-Ørjan Smelror

> What I'm doing here is fairly obvious (build a comma-delimited
>string).
> 
> $arr = array(1,2,3,4,5);
> 
> for ($i=0; $i< sizeof($arr); $i++) {
>   $lis = $lis . $arr[$i];
>   if ($i != (sizeof($arr)-1)) {
>   $lis = $lis . ',';
>   }
> }
> 
> 
> Question is, is there a more elegant way? I'm thinking of something
> like DTML's sequence-start and sequence-end, in a foreach
> construction.
> 
> djo
> 


You could try implode()

$lis = implode(",", $arr);


-- 
Stig-Ørjan Smelror
Systemutvikler

Linux Communications AS
Sandakerveien 48b
Box 1801 - Vika
N-0123 Oslo, Norway

tel. +47 22 09 28 80
fax. +47 22 09 28 81
http://www.lincom.no/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] preg_replace

2001-10-04 Thread Oliver Ruf

Hello 

I'm trying to write some kind of parser... see the example:

$text = "[LINK image.png]MyImage[/LINK]";

$out = preg_replace ("/\[LINK*\]*\[/LINK\]/i",
  "/*/",$text);

Well... What I would like is, that $out would be something like about this:
"MyImage"


But this somehow doesn't work because Regexp don't seem to be supported for 
the replacement string...

Any idea ??
Thx, Oliver


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] printing comma-delimited lists

2001-10-04 Thread David Otton

What I'm doing here is fairly obvious (build a comma-delimited
string).

$arr = array(1,2,3,4,5);

for ($i=0; $i< sizeof($arr); $i++) {
$lis = $lis . $arr[$i];
if ($i != (sizeof($arr)-1)) {
$lis = $lis . ',';
}
}


Question is, is there a more elegant way? I'm thinking of something
like DTML's sequence-start and sequence-end, in a foreach
construction.

djo


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: stripslashes

2001-10-04 Thread Hidulf

if you just want to add slashes to the data, use addslashes
if you want to get away the alashes from the data, use it in the print or
echo function.

--
Hidulf
http://www.hidulf.com
"Caleb Carvalho" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi all,
>
> if i have an array that is fetching the result to be display
> example,
> for ($i =1; $i<=sybase_num_rows($result); $i++){
> $row =sybase_fetch_array($result);
>
>   $row[product]
>   $row[prob_title]
>   $row[description]$row[solution]
>
> where would i put the stripslashes function to get the description?
> ...
> I have tried up and down, but unfortunately am still learning php,
>
> sorry,
>
> Caleb Carvalho
> Application Engineer
> LoadRunner/APM
> --
---
> Enterprise Testing and Performance Management Solutions
> --
---
> Mercury Interactive
> 410 Frimley Business Park
> Frimley, Surrey.  GU16 7ST
> United Kingdom
> Telephone :  +44 (0)1276 808300
>
>
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Session and header() errrors

2001-10-04 Thread Naintara Jain

There are 2 things you are doing here:
1) Session start
2) page redirection

put session_start() as the 1st line in your script.
Echo commands in the included file causes such warnings:
"Warning: Cannot send session cookie - headers already sent by (output
started at c:\program files\apache group\apache\htdocs\web1\html-head.inc:9)"

The first two warnings are on account of the above problem.

The 3rd warning is becoz of the php.ini that Dimitris talks about.

For the last warning, another simple mistake:
<---echo "session_id: ".session_id()."";-->
comment this line and then redirect the page.

the header() function will cause errors if you have already written, sent output 
('echoed', etc) to
the current page.

-Naintara


- Original Message - 
From: "Dimitris Kossikidis" <[EMAIL PROTECTED]>
To: "Web user" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, October 04, 2001 4:48 PM
Subject: Re: [PHP] Session and header() errrors


You should change sessions configuration in php.ini

The default value for sessions dir /tmp.
In windows shoud point to c:\tmp

The header error occurs because you get a warning about session.


- Original Message -
From: "Web user" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 04, 2001 11:51 AM
Subject: [PHP] Session and header() errrors


> Why do the errors occur while running the scripts below? It seems that the
> errors occured at the part of session and header(). Please give me some
> advice!
> Thank you!
>
> Mike
>
> System: PHP4.06 + Apache 1.3.20 Win32 + Win98 (the session configurations
> are default in php.ini)
>
> when the 1.php is running, the IE shows errors info as below :
> -
> Warning: Cannot send session cookie - headers already sent by (output
> started at c:\program files\apache
group\apache\htdocs\web1\html-head.inc:9)
> in c:\program files\apache group\apache\htdocs\web1\1.php on line 3
>
> Warning: Cannot send session cache limiter - headers already sent (output
> started at c:\program files\apache
group\apache\htdocs\web1\html-head.inc:9)
> in c:\program files\apache group\apache\htdocs\web1\1.php on line 3
>
> Warning: open(/tmp\sess_96ae897bcb501486860552d2df862863, O_RDWR) failed:
m
> (2) in c:\program files\apache group\apache\htdocs\web1\1.php on line 3
> session_id: 96ae897bcb501486860552d2df862863
>
>
> Warning: Cannot add header information - headers already sent by (output
> started at c:\program files\apache
group\apache\htdocs\web1\html-head.inc:9)
> in c:\program files\apache group\apache\htdocs\web1\1.php on line 9
>
> -
> The scripts of 1.php: (1.php and 2.php are under the same base directory)
>  require("html-head.inc");
> session_start();
> $name="user";
> session_register("name");
> echo "session_id: ".session_id()."";
> sleep(10);
> header("Location: 2.php");
> require("html-foot.inc");
> ?>
>
> -
> The scripts of html-head.inc:
> 
> 
> 
> page title
> 
> 
>
> -
> The scripts of html-foot.inc:
> 
> 
>
>
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Fwd: Re: [PHP] Unable to get a dot-decimal ip address from a decimal ip address

2001-10-04 Thread dharana

- Forwarded message from [EMAIL PROTECTED] -

From: [EMAIL PROTECTED]
To: David Robley <[EMAIL PROTECTED]>
Date: Thu, 4 Oct 2001 13:37:07 +0200
Subject: Re: [PHP] Unable to get a dot-decimal ip address from a decimal ip address

Something weird is going on:

PHP translates 
thisintothis
3232235524 127.255.255.255
3579939092 127.255.255.255
3579949354 127.255.255.255
3232235524 127.255.255.255
3237340682 127.255.255.255

but then..

1042595228 62.36.189.156

Is it just my PHP installation that is corrupt or does long2ip has the same
limitations as decbin()?

PHP Version 4.0.6 compilled from sources into a linux 2.4.10 box.

David Robley([EMAIL PROTECTED])@2001.10.04 14:09:33 +:
> On Thu,  4 Oct 2001 13:10, [EMAIL PROTECTED] wrote:
> > Hi,
> >
> > decbin() is unable to handle decimal numers greater than 2147483647 and
> > it's a problem. That's in the docs, ok. The situation is: I have a list
> > of IPs in decimal format (ex: 3232235524) and I wanted to translate
> > them into dot decimal. As far as I know the formula is:
> >
> > [...]by converting the
> > number to binary, breaking the binary number down into 4 octets and
> > then converting each octet into a dotted-decimal number.
> >
> > (got from http://www.montagar.com/~patj/ipmath.txt)
> >
> >
> > When I try to do this with PHP, I get just 1's because the IPs are
> > greater than 2147483647. Anyone knows a workaround for this?
> >
> > Thanks in advance.
> 
> I think the function ip2long might be what you want.
> 
> -- 
> David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
> CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  
> 
>Keyboard Not Found - Press [F1] to Continue

-- 
dharana <[EMAIL PROTECTED]>Black holes are where 
PGP KeyID: 0xC32A724 GOOD is dividing by zero



- End forwarded message -

-- 
dharana <[EMAIL PROTECTED]>Black holes are where 
PGP KeyID: 0xC32A724 GOOD is dividing by zero

 PGP signature


Re[2]: [PHP] something like alert (javascript)

2001-10-04 Thread Morten Winkler Jørgensen

EK> I'm using a simple print() (PHP) but alert() would
EK> be much better.


Have php print your BODY tag like this:
 

That's the best solution I think.



-- 
Kind regards,
  Morten Winkler



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Session and header() errrors

2001-10-04 Thread Dimitris Kossikidis

You should change sessions configuration in php.ini

The default value for sessions dir /tmp.
In windows shoud point to c:\tmp

The header error occurs because you get a warning about session.


- Original Message -
From: "Web user" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 04, 2001 11:51 AM
Subject: [PHP] Session and header() errrors


> Why do the errors occur while running the scripts below? It seems that the
> errors occured at the part of session and header(). Please give me some
> advice!
> Thank you!
>
> Mike
>
> System: PHP4.06 + Apache 1.3.20 Win32 + Win98 (the session configurations
> are default in php.ini)
>
> when the 1.php is running, the IE shows errors info as below :
> -
> Warning: Cannot send session cookie - headers already sent by (output
> started at c:\program files\apache
group\apache\htdocs\web1\html-head.inc:9)
> in c:\program files\apache group\apache\htdocs\web1\1.php on line 3
>
> Warning: Cannot send session cache limiter - headers already sent (output
> started at c:\program files\apache
group\apache\htdocs\web1\html-head.inc:9)
> in c:\program files\apache group\apache\htdocs\web1\1.php on line 3
>
> Warning: open(/tmp\sess_96ae897bcb501486860552d2df862863, O_RDWR) failed:
m
> (2) in c:\program files\apache group\apache\htdocs\web1\1.php on line 3
> session_id: 96ae897bcb501486860552d2df862863
>
>
> Warning: Cannot add header information - headers already sent by (output
> started at c:\program files\apache
group\apache\htdocs\web1\html-head.inc:9)
> in c:\program files\apache group\apache\htdocs\web1\1.php on line 9
>
> -
> The scripts of 1.php: (1.php and 2.php are under the same base directory)
>  require("html-head.inc");
> session_start();
> $name="user";
> session_register("name");
> echo "session_id: ".session_id()."";
> sleep(10);
> header("Location: 2.php");
> require("html-foot.inc");
> ?>
>
> -
> The scripts of html-head.inc:
> 
> 
> 
> page title
> 
> 
>
> -
> The scripts of html-foot.inc:
> 
> 
>
>
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] something like alert (javascript)

2001-10-04 Thread Eduardo Kokubo

I'm implementing a system that allows the users create pages on-line. They
can create several different pages to complete a site. What I want to do is
alert them that there are still pages to be created before they finish. I'm
trying to do it checking the files they create and alerting a message, but I
think javascript can not check the files and php can not alert the user with
a function like alert(). I'm using a simple print() (PHP) but alert() would
be much better.

- Original Message -
From: Maxim Maletsky (PHPBeginner.com) <[EMAIL PROTECTED]>
To: 'Eduardo Kokubo' <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, October 03, 2001 11:38 AM
Subject: RE: [PHP] something like alert (javascript)


> Then what do you need?
>
> We are not any sure on what your question is ...
>
> Maxim Maletsky
> www.PHPBeginner.com
>
>
> -Original Message-
> From: Eduardo Kokubo [mailto:[EMAIL PROTECTED]]
> Sent: mercoledì 3 ottobre 2001 16.31
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: [PHP] something like alert (javascript)
>
>
> Is there any function in PHP that is similar to alert() or confirm() of
> javascript ? I tried die() but that's not what I need.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] stripslashes

2001-10-04 Thread Caleb Carvalho

Hi all,

if i have an array that is fetching the result to be display
example,
for ($i =1; $i<=sybase_num_rows($result); $i++){
$row =sybase_fetch_array($result);

  $row[product]
  $row[prob_title]
  $row[description]$row[solution]

where would i put the stripslashes function to get the description?
...
I have tried up and down, but unfortunately am still learning php,

sorry,

Caleb Carvalho
Application Engineer
LoadRunner/APM
-
Enterprise Testing and Performance Management Solutions
-
Mercury Interactive
410 Frimley Business Park
Frimley, Surrey.  GU16 7ST
United Kingdom
Telephone :  +44 (0)1276 808300


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: Re: [PHP] How to simulate any browser

2001-10-04 Thread Kamil Nowicki


Me again

> > And gives error page in $output.
> What does the error page have?
The error page is generated by JSP and gives me
some error with VBS and dll.
When I use cURL (on other server) to get to
the same script on the same JSP server with
the same input I get correct data (if using GET
method) or partialy correct data and type
mismatch error (if using POST method).

Kamil 'Hilarion' Nowicki


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: Re: Re: [PHP] How to simulate any browser

2001-10-04 Thread Kamil Nowicki


Thanx. I'll check it out.

> I think you need snoopy. (http://sourceforge.net/projects/snoopy/)


Kamil 'Hilarion' Nowicki


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] New version of community calendar released!

2001-10-04 Thread Christopher Ostmo

Hello,

AppIdeas.com has been working hard to update it's Open Source 
PHP/MySQL offerings and has just released version 4.0 of it's popular 
community calendar system.

You can run a demo, see real world examples, view the source code 
and download a copy online at:
http://open.appideas.com/
Click "Projects" and then "phpCommunityCalendar"

We have also recently archived and made searchable our last two years 
of support mailing list data and opened online discussion forums for 
folks who have needed help but have been reluctant to signup for the 
mailing list.

Stop by and have a look!

Thanks...

Christopher Ostmo
a.k.a. [EMAIL PROTECTED]
AppIdeas.com
Innovative Application Ideas
Meeting cutting edge dynamic
web site needs since the 
dawn of World Wide Web time
(1995)

Business Applications:
http://www.AppIdeas.com/

Open Source Applications:
http://open.AppIdeas.com/
got Unix?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Session and header() errrors

2001-10-04 Thread Rasmus Lerdorf

You can't send any output before the session_start() call.  You require a
file which outputs html before calling session_start().  Simply do the
session_start() before the require and it should work.

-Rasmus

On Thu, 4 Oct 2001, Web user wrote:

> Why do the errors occur while running the scripts below? It seems that the
> errors occured at the part of session and header(). Please give me some
> advice!
> Thank you!
>
> Mike
>
> System: PHP4.06 + Apache 1.3.20 Win32 + Win98 (the session configurations
> are default in php.ini)
>
> when the 1.php is running, the IE shows errors info as below :
> -
> Warning: Cannot send session cookie - headers already sent by (output
> started at c:\program files\apache group\apache\htdocs\web1\html-head.inc:9)
> in c:\program files\apache group\apache\htdocs\web1\1.php on line 3
>
> Warning: Cannot send session cache limiter - headers already sent (output
> started at c:\program files\apache group\apache\htdocs\web1\html-head.inc:9)
> in c:\program files\apache group\apache\htdocs\web1\1.php on line 3
>
> Warning: open(/tmp\sess_96ae897bcb501486860552d2df862863, O_RDWR) failed: m
> (2) in c:\program files\apache group\apache\htdocs\web1\1.php on line 3
> session_id: 96ae897bcb501486860552d2df862863
>
>
> Warning: Cannot add header information - headers already sent by (output
> started at c:\program files\apache group\apache\htdocs\web1\html-head.inc:9)
> in c:\program files\apache group\apache\htdocs\web1\1.php on line 9
>
> -
> The scripts of 1.php: (1.php and 2.php are under the same base directory)
>  require("html-head.inc");
> session_start();
> $name="user";
> session_register("name");
> echo "session_id: ".session_id()."";
> sleep(10);
> header("Location: 2.php");
> require("html-foot.inc");
> ?>
>
> -
> The scripts of html-head.inc:
> 
> 
> 
> page title
> 
> 
>
> -
> The scripts of html-foot.inc:
> 
> 
>
>
>
>
>
>
>
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Session and header() errrors

2001-10-04 Thread Web user

Why do the errors occur while running the scripts below? It seems that the
errors occured at the part of session and header(). Please give me some
advice!
Thank you!

Mike

System: PHP4.06 + Apache 1.3.20 Win32 + Win98 (the session configurations
are default in php.ini)

when the 1.php is running, the IE shows errors info as below :
-
Warning: Cannot send session cookie - headers already sent by (output
started at c:\program files\apache group\apache\htdocs\web1\html-head.inc:9)
in c:\program files\apache group\apache\htdocs\web1\1.php on line 3

Warning: Cannot send session cache limiter - headers already sent (output
started at c:\program files\apache group\apache\htdocs\web1\html-head.inc:9)
in c:\program files\apache group\apache\htdocs\web1\1.php on line 3

Warning: open(/tmp\sess_96ae897bcb501486860552d2df862863, O_RDWR) failed: m
(2) in c:\program files\apache group\apache\htdocs\web1\1.php on line 3
session_id: 96ae897bcb501486860552d2df862863


Warning: Cannot add header information - headers already sent by (output
started at c:\program files\apache group\apache\htdocs\web1\html-head.inc:9)
in c:\program files\apache group\apache\htdocs\web1\1.php on line 9

-
The scripts of 1.php: (1.php and 2.php are under the same base directory)
";
sleep(10);
header("Location: 2.php");
require("html-foot.inc");
?>

-
The scripts of html-head.inc:



page title



-
The scripts of html-foot.inc:











-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] need phpmyAdmin but no so good

2001-10-04 Thread ani

Hi:
I'm looking for a mysql administrator but no so good as
phpmyAdmin, just listing dbs, tables, insert, delete, edit
options; no create or alter tables and dbs

anybody knows about?
thanks in advance

Aniceto Lopez
www.laMundial.net
download our free music


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] How can I simulate the login process?

2001-10-04 Thread _lallous

I want to write a script that simulates the login process and logs on and
grabs some pages (that can only be viewed when logged in) and the logs
out...
how can i do that?

consider the authentication system is done via session variables method...

any ideas would help.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Session ID

2001-10-04 Thread Rosen

Hi,
I'm creating web site with sessions.
Normally the site uses PHPSESSID to pass session ID to next page.
I want to use some script whitch use SID to pass session ID.
Can I set standart (i.e. PHPSESSID ) to use to pass session ID ?

Thanks,
Rosen



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Sessions Variables and refresh pages

2001-10-04 Thread Derek Mailer

Karina,

If this is the problem you are getting and you can't find a way around it,
you could start the session on a splash or index page so that when you move
from that first page into the main part of the website, the session has
already been started and all session variables are available.

This is more of a quick-fix than a techncal solution, but it should work.

After experimenting with using session id's to track users I opted for using
cookies.  Not because I was having too many problems with sessions, but more
for the benefits that I could get using cookies in that particular
application.

Cheers the noo,

Derek



- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Karina" <[EMAIL PROTECTED]>
Cc: "Derek Mailer" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, October 03, 2001 5:50 PM
Subject: Re: [PHP] Sessions Variables and refresh pages


> Both of SID and session_id() should return the current session id after
> session_start() has been called.
>
> -Rasmus
>
> On Wed, 3 Oct 2001, Karina wrote:
>
> > Yes, it is.
> >
> > This is exactly the problem. Do you know a way to solution this ?
> >
> > Thks, Karina
> >
> > ---
> >
> >
> > I'm not sure I fully understand the problem, but I think I can
> > have a guess
> > at it based on my past experiences...
> >
> > if you have a php page that starts a session with
> > session_start() and, say
> > for example, you then try and echo the session id with
> > session_id() it will
> > not be displayed on screen until you actually refresh the page
> > or move to
> > another page that calls the session id.
> >
> > In other words, the session id seems to be set when the session
> > is started,
> > but isn't availale to use in your script until the page is
> > re-loaded.
> >
> > This is based on what I can remember from 8 months ago and I
> > haven't tested
> > it out, but I believe this is the sort of problem being
> > described in this
> > thread.
> >
> > Cheers the noo,
> >
> > Derek
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



**
This e-mail (and any attachment) is intended only for the attention
of the addressee(s). Its unauthorised use, disclosure, storage
or copying is not permitted. If you are not the intended recipient,
please destroy all copies and inform the sender by return e-mail. 
This e-mail (whether you are the sender or the recipient) may be 
monitored, recorded and retained by Business Information 
Publications Limited (BiP). E-mail monitoring/ blocking software 
may be used, and e-mail content may be read at any time.You 
have a responsibility to ensure laws are not broken when composing 
or forwarding e-mails and their contents.
**


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




<    1   2