[PHP] Error message: No input file specified

2004-03-12 Thread Thorsten Müller
Hi

I'm using the thttpd webserver and php as cgi. Up to php version 4.3.1 
everything is fine. When i try to upgrade to 4.3.2 or 4.3.5RC3 the only 
thing i can see is the message No input file specified. Is this a bug in 
php, or an incorrect configuration of my php?
Sorry if this question is not new, i found some similar questions in the 
archive, but no helpful answer.

Thanks,
Thorsten

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



Re[2]: [PHP] Get nice variables from POST

2004-03-12 Thread Richard Davey
Hello trlists,

Friday, March 12, 2004, 3:56:23 AM, you wrote:

tcc It seems to me that for security one wants both things -- first, to
tcc move only what you need from _POST into the global symbol table, and
tcc second, validate it thoroughly.

Indeed.. roll-on input filters in PHP5 :)

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

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



[PHP] Re: Help with arrays

2004-03-12 Thread Michael Nolan
Elliot J. Balanza wrote:
I need to make a query to a MySQL database that only has two fields, name 
value. That I can do.
Then I need to store the values i receive in an array in the form of:

$variable['name'] = value;

But haven't been able to do it neither with a foreach nor with a do while...
Can anyone please assist me?
If you mean how do you store all the returned results in an array of 
name/value pairs, this is how I'd do it:

?php

while ($result = mysql_fetch_assoc($query)) {
$variable[$result['name']] = $result['value'];
}
?

Don't know what 'value' represents, but it will give you an array 
something like this:

print_r($variable);

Array
(
[michael] = nolan
[joe] = bloggs
[john] = smith
)
HTH,

Mike

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


RE: [PHP] Re: DOM XML and php

2004-03-12 Thread Tassos T
Sory for delay

I use sablotron because I take xml data via curl from windows server. I need
only a way to transform xml data with xslt and I want to present data to web
pages. I think DOMXML provide functions to create XML docs from the
beginning and manipulate xml data like add or remove xml elements.

I hope to help you.

tassos

-Original Message-
From: Lucian COZMA [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 11, 2004 5:31 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: DOM XML and php


I have a question please (I'm trying to clarify something for me): Why do
you preffer Sablotron to DOMXML ? As I'm developping XML/XSLT framework
applications, I'm trying to understand why would our clients use it instead
of DOMXML and adapt to it if there is a good reason for it. I want to know
this because DOMXML is faster and more reliable than Sablotron (my opinion
after using extesively both of them), and both are extensions, that you have
to install, not something native that comes directly embeded into PHP.

Thanks,
Lucian COZMA


Tassos T [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Thanks I use this code and it works.

 tassos


 -Original Message-
 From: Lucian COZMA [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 11, 2004 4:03 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Re: DOM XML and php


 It should look something like (pretty much extracted from manual): 
 ?php
//
 $xml and $xsl contain the XML and XSL data ($xsl =
 file_get_contents('myxsl.xsl') and $xml 
 ='blabla1lalala/bla1/bla $arguments = array(
  '/_xml' = $xml,
  '/_xsl' = $xsl
 );

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

 // Process the document
 $result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, 
 $arguments);
if
 ($result) {
 //SUCCESS, sample.xml was transformed by sample.xsl into the $result
 print $result;
 } else {
 print Sorry, sample.xml could not be transformed by sample.xsl into;
 print   the \$result variable the reason is that  . 
 xslt_error($xh)
.
 print  and the error code is  . xslt_errno($xh);
 }
 xslt_free($xh);
 ?Lucian COZMA

 Lucian Cozma [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
  If you really want to use Sablotron (although I tried it I not liked 
  it as much as DOMXML, gimme a sign, and I'll debug you.
 
  Regards,
  Lucian COZMA @ InterAKT
 
 
  Tassos T [EMAIL PROTECTED] wrote in message 
  news:[EMAIL PROTECTED]
   Thanks for your reply but I have another problem
  
   I have an xml string if I use this code
  
   ?
   header(Content-Type: text/xml);
   echo $xml_string;
   ?
   I can see the xml tree but I cannot transform with te xslt. Eg. ? 
   $xp = xslt_create();
  $result_xsl = xslt_process($xp, $xml_string, 'myxsl.xsl');
  echo $result_xsl;
  xslt_free($xp);
  
   ?
  
   Please advise
  
   Regards
  
   tassos
  
   -Original Message-
   From: Lucian COZMA [mailto:[EMAIL PROTECTED]
   Sent: Thursday, March 11, 2004 3:20 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP] Re: DOM XML and php
  
  
   ?php
   $xmlstr = 'blabla1blabalabalab/bla1/bla';
   if(!$dom = domxml_open_mem($xmlstr)) {
 echo Error while parsing the document\n;
 exit;
   }
   // The root domdocument node
   $root = $dom-document_element();
   ///Dump the content back to string var_dump($dom-dump_mem()); ?
  
   Read the manual in the DOM XML functions section. Regards,
   Lucian COZMA
   Tassos T [EMAIL PROTECTED] wrote in message
   news:[EMAIL PROTECTED]
Hello,
   
I face a problem. I have a php script and I send a xml request 
to a
   server.
After I receive xml data but I have this data to an php string 
variable.
   
How to create a xml dom with out to write a xml file ?
   
I want to use a xslt to tranform that xml data.
   
   
Any idea ?
   
Thanks
   
tassos
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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

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

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



[PHP] Trke php mail grup...

2004-03-12 Thread EMIN GONAL





SELAMLAR

Trke php mail grubumuza katlmak isteyen arkadalar aadaki mail
adresine bo bir mail gndererek ye olabilirler, gelen confirm mesajn
hibir ey yazmadan direkt olarak reply ediniz...

[EMAIL PROTECTED]

veya

webden kayt olmak isterseniz

http://groups.yahoo.com/group/turkphp/

adresine gelerek giri yapabilirsiniz...

SEVGILER

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



Re: [PHP] Re: DOM XML and php

2004-03-12 Thread Lucian COZMA
True, but it does much more than that. It also provides xslt
transformations. It uses the powerfull libxslt library that provides far
more features, speed and reliablility than Sablot. I would rather do XSL
transformations with DOMXML than with Sablot just for these reasons.

Thanks for your response.
Lucian

Tassos T [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Sory for delay

I use sablotron because I take xml data via curl from windows server. I need
only a way to transform xml data with xslt and I want to present data to web
pages. I think DOMXML provide functions to create XML docs from the
beginning and manipulate xml data like add or remove xml elements.

I hope to help you.

tassos

-Original Message-
From: Lucian COZMA [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 11, 2004 5:31 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: DOM XML and php


I have a question please (I'm trying to clarify something for me): Why do
you preffer Sablotron to DOMXML ? As I'm developping XML/XSLT framework
applications, I'm trying to understand why would our clients use it instead
of DOMXML and adapt to it if there is a good reason for it. I want to know
this because DOMXML is faster and more reliable than Sablotron (my opinion
after using extesively both of them), and both are extensions, that you have
to install, not something native that comes directly embeded into PHP.

Thanks,
Lucian COZMA


Tassos T [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Thanks I use this code and it works.

 tassos


 -Original Message-
 From: Lucian COZMA [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 11, 2004 4:03 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Re: DOM XML and php


 It should look something like (pretty much extracted from manual):
 ?php
//
 $xml and $xsl contain the XML and XSL data ($xsl =
 file_get_contents('myxsl.xsl') and $xml
 ='blabla1lalala/bla1/bla $arguments = array(
  '/_xml' = $xml,
  '/_xsl' = $xsl
 );

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

 // Process the document
 $result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL,
 $arguments);
if
 ($result) {
 //SUCCESS, sample.xml was transformed by sample.xsl into the $result
 print $result;
 } else {
 print Sorry, sample.xml could not be transformed by sample.xsl into;
 print   the \$result variable the reason is that  .
 xslt_error($xh)
.
 print  and the error code is  . xslt_errno($xh);
 }
 xslt_free($xh);
 ?Lucian COZMA

 Lucian Cozma [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  If you really want to use Sablotron (although I tried it I not liked
  it as much as DOMXML, gimme a sign, and I'll debug you.
 
  Regards,
  Lucian COZMA @ InterAKT
 
 
  Tassos T [EMAIL PROTECTED] wrote in message
  news:[EMAIL PROTECTED]
   Thanks for your reply but I have another problem
  
   I have an xml string if I use this code
  
   ?
   header(Content-Type: text/xml);
   echo $xml_string;
   ?
   I can see the xml tree but I cannot transform with te xslt. Eg. ?
   $xp = xslt_create();
  $result_xsl = xslt_process($xp, $xml_string, 'myxsl.xsl');
  echo $result_xsl;
  xslt_free($xp);
  
   ?
  
   Please advise
  
   Regards
  
   tassos
  
   -Original Message-
   From: Lucian COZMA [mailto:[EMAIL PROTECTED]
   Sent: Thursday, March 11, 2004 3:20 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP] Re: DOM XML and php
  
  
   ?php
   $xmlstr = 'blabla1blabalabalab/bla1/bla';
   if(!$dom = domxml_open_mem($xmlstr)) {
 echo Error while parsing the document\n;
 exit;
   }
   // The root domdocument node
   $root = $dom-document_element();
   ///Dump the content back to string var_dump($dom-dump_mem()); ?
  
   Read the manual in the DOM XML functions section. Regards,
   Lucian COZMA
   Tassos T [EMAIL PROTECTED] wrote in message
   news:[EMAIL PROTECTED]
Hello,
   
I face a problem. I have a php script and I send a xml request
to a
   server.
After I receive xml data but I have this data to an php string
variable.
   
How to create a xml dom with out to write a xml file ?
   
I want to use a xslt to tranform that xml data.
   
   
Any idea ?
   
Thanks
   
tassos
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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

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

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



[PHP] Re: Help with arrays

2004-03-12 Thread memoimyself
Hello Elliot,

On 11 Mar 2004 at 23:55, Elliot J. Balanza wrote:

 I need to make a query to a MySQL database that only has two fields, name 
 value. That I can do.
 
 Then I need to store the values i receive in an array in the form of:
 
 $variable['name'] = value;
 
 But haven't been able to do it neither with a foreach nor with a do while...
 Can anyone please assist me?
 
Assuming you've read the introductory sections of the PHP manual and are not trying to 
get other people to spend their time on your project so that you won't need to spend 
yours, please show us your code so that we can help you spot the problem.

Erik

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



[PHP] Windows and easyphp

2004-03-12 Thread Tassos T
Hi,

I use easyphp at windows to make test my php scripts and I face a problem
when I use the php function domxml_xmltree() explode apache. 

I configure all extensions whitch required for using DOMXML.

Any idea ?


Thanks

tassos

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



[PHP] Re: Help with arrays

2004-03-12 Thread Elliot J. Balanza
I have tried several combinations, including foreach, do whiles. This works
when i submit the values one by one, but when i try to automatize it it wont
work. Thanks

mysql_select_db($database_MBTTIENDA, $MBTTIENDA);
$query_prefsname = SELECT Pref_name FROM mtmbt_prefs;
$prefsname = mysql_query($query_prefsname, $MBTTIENDA) or
die(mysql_error());
$row_prefsname = mysql_fetch_assoc($prefsname);

mysql_select_db($database_MBTTIENDA, $MBTTIENDA);
$query_prefsvalue = SELECT Pref_value FROM mtmbt_prefs;
$prefsvalue = mysql_query($query_prefsvalue, $MBTTIENDA) or
die(mysql_error());
$row_prefsvalue = mysql_fetch_assoc($prefsvalue);

// merging them into the new array $MTMBT
foreach($row_prefsvalue as $i = $v)
{
 $MTMBT[$row_prefsname[$i]] = $v;
}

// printing result
foreach($MTMBT as $k = $v)
{
 echo \$MTMBT[$k] = $v.br;
}

echo the end lets see the results;
print_r($MTMBT);
echo br;
echo $MTMBT['Titulo'];

snip - snip
[EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
 Hello Elliot,

 On 11 Mar 2004 at 23:55, Elliot J. Balanza wrote:

  I need to make a query to a MySQL database that only has two fields,
name 
  value. That I can do.
 
  Then I need to store the values i receive in an array in the form of:
 
  $variable['name'] = value;
 
  But haven't been able to do it neither with a foreach nor with a do
while...
  Can anyone please assist me?

 Assuming you've read the introductory sections of the PHP manual and are
not trying to
 get other people to spend their time on your project so that you won't
need to spend
 yours, please show us your code so that we can help you spot the problem.

 Erik

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



[PHP] RE: R: [PHP] Get nice variables from POST

2004-03-12 Thread Mike Mapsnac
I try to use quotes in the query and this doesn't work.
  $query = SELECT * FROM user WHERE user_id = '$_POST['user_id']}';
But you use brackets and it works.. Why do you use brackets ?
$query = SELECT * FROM user WHERE user_id = ${_POST['user_id']};

From: Alessandro Vitale [EMAIL PROTECTED]
To: Mike Mapsnac [EMAIL PROTECTED],[EMAIL PROTECTED]
Subject: R: [PHP] Get nice  variables from POST
Date: Thu, 11 Mar 2004 17:30:57 +0100
hi,

why don't you simple use the $_POST vars? they are already available to 
you,
so why you should copy them?

example:

function show_function()
{
   $query = SELECT * FROM user WHERE user_id = ${_POST['user_id']};
   
}
at the same time:
- you save a lot of time ( you don't need to write code for copying vars )
- you can always identify in your script the variable you are using is the
one that comes from POST
cheers,

alessandro

-Messaggio originale-
Da: Mike Mapsnac [mailto:[EMAIL PROTECTED]
Inviato: giovedì 11 marzo 2004 15.51
A: [EMAIL PROTECTED]
Oggetto: [PHP] Get nice variables from POST
I have about 10 fields in the form. And I get the fields through POST:
//Get Variable from the form
$username = $_POST['username'];
$password = $_POST['password'];
$password2 = $_POST['password2'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$nickname = $_POST['name'];
$city = $POST['city'];
$state = $_POST['state'];
$country = $_POST['country'];
$misc = $_POST['misc'];
$country = $_POST['country'];
It works but it looks ugly. For each variable I have statemet. Is there a
way to get the variables in the loop?
I'm looking for nice way to get variables from POST?

Thanks

_
Frustrated with dial-up? Lightning-fast Internet access for as low as
$29.95/month. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_
Get a FREE online computer virus scan from McAfee when you click here. 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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


[PHP] Re: PHP || Create File (not upload) with ftp()?

2004-03-12 Thread CF High
Hey all.

I've been having ownership issues when writing files with fwrite(); i.e.
file owner is nobody while ftp'd files are owned by the site owner.

In order to streamline file management, I'd like to be able to write files
on our webhost server using PHP's ftp functions; not using fwrite() and the
like.

So, for example, let's say I have the following data to be written to file:

$test = I'm test data;

How would I use ftp() functions to write $test to file on the webserver?

Any help much appreciated.

--Noah

--

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



[PHP] Enabling exif using the Ports branch on OpenBSD

2004-03-12 Thread Teren
Hi, I'm trying to enable exif on my OpenBSD box so I tried adding --enable-exif in 
core/Makefile under CONFIGURE_ARGS but that makes it so i can't make it. Does anyone 
know how to enable exif with ports? Thanks

Teren

RE: [PHP] RE: R: [PHP] Get nice variables from POST

2004-03-12 Thread Tassos T
Try to use
$query = SELECT * FROM user WHERE user_id = $_POST['user_id'];

-Original Message-
From: Mike Mapsnac [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 12, 2004 3:40 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] RE: R: [PHP] Get nice variables from POST


I try to use quotes in the query and this doesn't work.
   $query = SELECT * FROM user WHERE user_id = '$_POST['user_id']}'; But
you use brackets and it works.. Why do you use brackets ? $query = SELECT *
FROM user WHERE user_id = ${_POST['user_id']};


From: Alessandro Vitale [EMAIL PROTECTED]
To: Mike Mapsnac [EMAIL PROTECTED],[EMAIL PROTECTED]
Subject: R: [PHP] Get nice  variables from POST
Date: Thu, 11 Mar 2004 17:30:57 +0100

hi,

why don't you simple use the $_POST vars? they are already available to
you,
so why you should copy them?

example:

function show_function()
{
$query = SELECT * FROM user WHERE user_id = ${_POST['user_id']};

}

at the same time:
- you save a lot of time ( you don't need to write code for copying 
vars )
- you can always identify in your script the variable you are using is the
one that comes from POST

cheers,

alessandro

-Messaggio originale-
Da: Mike Mapsnac [mailto:[EMAIL PROTECTED]
Inviato: gioved 11 marzo 2004 15.51
A: [EMAIL PROTECTED]
Oggetto: [PHP] Get nice variables from POST


I have about 10 fields in the form. And I get the fields through POST: 
//Get Variable from the form $username = $_POST['username'];
$password = $_POST['password'];
$password2 = $_POST['password2'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$nickname = $_POST['name'];
$city = $POST['city'];
$state = $_POST['state'];
$country = $_POST['country'];
$misc = $_POST['misc'];
$country = $_POST['country'];

It works but it looks ugly. For each variable I have statemet. Is there 
a way to get the variables in the loop?

I'm looking for nice way to get variables from POST?

Thanks

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

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


_
Get a FREE online computer virus scan from McAfee when you click here. 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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

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



Re: [PHP] RE: R: [PHP] Get nice variables from POST

2004-03-12 Thread Tom Meinlschmidt
oops. It's much better to use single quotes and entire variable in {}

eg
 .. where user_id = '{$_POST['user_id']}' ...

realize - POST variable user_id has no value, so in your code it will be as 
select * from users where user_id =;

as a result - you have wrong sql query.

/tom

On Fri, 12 Mar 2004 13:40:12 +
Mike Mapsnac [EMAIL PROTECTED] wrote:

 I try to use quotes in the query and this doesn't work.
$query = SELECT * FROM user WHERE user_id = '$_POST['user_id']}';
 But you use brackets and it works.. Why do you use brackets ?
 $query = SELECT * FROM user WHERE user_id = ${_POST['user_id']};
 
 
 From: Alessandro Vitale [EMAIL PROTECTED]
 To: Mike Mapsnac [EMAIL PROTECTED],[EMAIL PROTECTED]
 Subject: R: [PHP] Get nice  variables from POST
 Date: Thu, 11 Mar 2004 17:30:57 +0100
 
 hi,
 
 why don't you simple use the $_POST vars? they are already available to 
 you,
 so why you should copy them?
 
 example:
 
 function show_function()
 {
 $query = SELECT * FROM user WHERE user_id = ${_POST['user_id']};
 
 }
 
 at the same time:
 - you save a lot of time ( you don't need to write code for copying vars )
 - you can always identify in your script the variable you are using is the
 one that comes from POST
 
 cheers,
 
 alessandro
 
 -Messaggio originale-
 Da: Mike Mapsnac [mailto:[EMAIL PROTECTED]
 Inviato: gioved 11 marzo 2004 15.51
 A: [EMAIL PROTECTED]
 Oggetto: [PHP] Get nice variables from POST
 
 
 I have about 10 fields in the form. And I get the fields through POST:
 //Get Variable from the form
 $username = $_POST['username'];
 $password = $_POST['password'];
 $password2 = $_POST['password2'];
 $email = $_POST['email'];
 $email2 = $_POST['email2'];
 $nickname = $_POST['name'];
 $city = $POST['city'];
 $state = $_POST['state'];
 $country = $_POST['country'];
 $misc = $_POST['misc'];
 $country = $_POST['country'];
 
 It works but it looks ugly. For each variable I have statemet. Is there a
 way to get the variables in the loop?
 
 I'm looking for nice way to get variables from POST?
 
 Thanks
 
 _
 Frustrated with dial-up? Lightning-fast Internet access for as low as
 $29.95/month. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 _
 Get a FREE online computer virus scan from McAfee when you click here. 
 http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 


[PHP] windows 2003 server configuration

2004-03-12 Thread Schmidt, Jeffrey
I am running Windows 2003 server and am having trouble configuring. I
unzipped php 4.+ to c:\php. I renamed php.ini and put it in C;\windows
and configured the extension_dir = c:\php\extensions, doc_root =
c:\inetpub\wwwroot, and cgi.force_redirect = 0. I also moved php4ts.dll
to c:\windows\sytem32 and then created a ned webservice extension named
.php and set the path to c:\php\sapi\php4isapi.dll. Then on to
properties of and execute permissions added scripts and executables.
Configure tab added .php and set the path to c:\php\sapi\php4isapi.dll
and check mark out of verify file exist. Then I went to add content page
and added index.php and moved it to the top.
 
I am getting in my web browser with a test file SERVICE UNAVAILABLE.
At other configurations I would get an NO INPUT FILE SPECIFIED. Now
when I am trying to run my script a windows dialogue box is coming up
asking me for username and password and I am logged in as administrator.
 
I f you have any ideas where you can help PLEASE understand my pain.
 
Thank you,
Jeff Schmidt. 


Re: [PHP] Get nice variables from POST

2004-03-12 Thread trlists
On 12 Mar 2004 Mike Mapsnac wrote:

 I try to use quotes in the query and this doesn't work.
$query = SELECT * FROM user WHERE user_id = '$_POST['user_id']}';
 But you use brackets and it works.. Why do you use brackets ?
 $query = SELECT * FROM user WHERE user_id = ${_POST['user_id']};

See http://us3.php.net/manual/en/language.types.string.php, scroll to 
the section called Complex (curly) syntax.

--
Tom

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



[PHP] Static vs. Dynamic Build of PHP4

2004-03-12 Thread trlists
I am running on one Linux server which has PHP built statically; the 
CLI and Apache modules are both over 5.5MB.  On another where it is 
built dynamically they are closer to 1.2MB.

Is there any data on the performance tradeoffs of static vs. dynamic 
builds?  I understand the factors (static eliminates the overhead to 
load needed libraries, dynamic reduces memory footprint) but I wonder 
if there is any real-world data on when one is better than the other.  
We are using PHP primarily as an Apache module, not CGI or CLI.

Thanks,

--
Tom

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



Re: [PHP] Get nice variables from POST

2004-03-12 Thread trlists
On 12 Mar 2004 Richard Davey wrote:

 Indeed.. roll-on input filters in PHP5 :)

Hmmm, can't find the docs on those online.

--
Tom

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



[PHP] R: R: [PHP] Get nice variables from POST

2004-03-12 Thread Alessandro Vitale
hi,

curly braces are useful to specify in a double quoted string where is the
end of the variable name.

$ciao  == ${ciao}
in case of associative arrays is recommended to prevent the parser to mess
up.

see php manual at the following section for details

Main : Language Reference : Types : Strings


-Messaggio originale-
Da: Mike Mapsnac [mailto:[EMAIL PROTECTED]
Inviato: venerdì 12 marzo 2004 14.40
A: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Oggetto: RE: R: [PHP] Get nice variables from POST


I try to use quotes in the query and this doesn't work.
   $query = SELECT * FROM user WHERE user_id = '$_POST['user_id']}';
But you use brackets and it works.. Why do you use brackets ?
$query = SELECT * FROM user WHERE user_id = ${_POST['user_id']};


From: Alessandro Vitale [EMAIL PROTECTED]
To: Mike Mapsnac [EMAIL PROTECTED],[EMAIL PROTECTED]
Subject: R: [PHP] Get nice  variables from POST
Date: Thu, 11 Mar 2004 17:30:57 +0100

hi,

why don't you simple use the $_POST vars? they are already available to
you,
so why you should copy them?

example:

function show_function()
{
$query = SELECT * FROM user WHERE user_id = ${_POST['user_id']};

}

at the same time:
- you save a lot of time ( you don't need to write code for copying vars )
- you can always identify in your script the variable you are using is the
one that comes from POST

cheers,

alessandro

-Messaggio originale-
Da: Mike Mapsnac [mailto:[EMAIL PROTECTED]
Inviato: giovedì 11 marzo 2004 15.51
A: [EMAIL PROTECTED]
Oggetto: [PHP] Get nice variables from POST


I have about 10 fields in the form. And I get the fields through POST:
//Get Variable from the form
$username = $_POST['username'];
$password = $_POST['password'];
$password2 = $_POST['password2'];
$email = $_POST['email'];
$email2 = $_POST['email2'];
$nickname = $_POST['name'];
$city = $POST['city'];
$state = $_POST['state'];
$country = $_POST['country'];
$misc = $_POST['misc'];
$country = $_POST['country'];

It works but it looks ugly. For each variable I have statemet. Is there a
way to get the variables in the loop?

I'm looking for nice way to get variables from POST?

Thanks

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

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


_
Get a FREE online computer virus scan from McAfee when you click here.
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

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



RE: [PHP] Re: DOM XML and php

2004-03-12 Thread Tassos T
Hi,

I agree but I cannot find a way to transform xlm data from variable not open
xml file with using DOMXML.

tassos


-Original Message-
From: Lucian COZMA [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 12, 2004 1:50 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: DOM XML and php


True, but it does much more than that. It also provides xslt
transformations. It uses the powerfull libxslt library that provides far
more features, speed and reliablility than Sablot. I would rather do XSL
transformations with DOMXML than with Sablot just for these reasons.

Thanks for your response.
Lucian

Tassos T [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Sory for delay

I use sablotron because I take xml data via curl from windows server. I need
only a way to transform xml data with xslt and I want to present data to web
pages. I think DOMXML provide functions to create XML docs from the
beginning and manipulate xml data like add or remove xml elements.

I hope to help you.

tassos

-Original Message-
From: Lucian COZMA [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 11, 2004 5:31 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: DOM XML and php


I have a question please (I'm trying to clarify something for me): Why do
you preffer Sablotron to DOMXML ? As I'm developping XML/XSLT framework
applications, I'm trying to understand why would our clients use it instead
of DOMXML and adapt to it if there is a good reason for it. I want to know
this because DOMXML is faster and more reliable than Sablotron (my opinion
after using extesively both of them), and both are extensions, that you have
to install, not something native that comes directly embeded into PHP.

Thanks,
Lucian COZMA


Tassos T [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Thanks I use this code and it works.

 tassos


 -Original Message-
 From: Lucian COZMA [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 11, 2004 4:03 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Re: DOM XML and php


 It should look something like (pretty much extracted from manual): 
 ?php
//
 $xml and $xsl contain the XML and XSL data ($xsl =
 file_get_contents('myxsl.xsl') and $xml 
 ='blabla1lalala/bla1/bla $arguments = array(
  '/_xml' = $xml,
  '/_xsl' = $xsl
 );

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

 // Process the document
 $result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, 
 $arguments);
if
 ($result) {
 //SUCCESS, sample.xml was transformed by sample.xsl into the $result
 print $result;
 } else {
 print Sorry, sample.xml could not be transformed by sample.xsl into;
 print   the \$result variable the reason is that  .
 xslt_error($xh)
.
 print  and the error code is  . xslt_errno($xh);
 }
 xslt_free($xh);
 ?Lucian COZMA

 Lucian Cozma [EMAIL PROTECTED] wrote in message 
 news:[EMAIL PROTECTED]
  If you really want to use Sablotron (although I tried it I not liked 
  it as much as DOMXML, gimme a sign, and I'll debug you.
 
  Regards,
  Lucian COZMA @ InterAKT
 
 
  Tassos T [EMAIL PROTECTED] wrote in message 
  news:[EMAIL PROTECTED]
   Thanks for your reply but I have another problem
  
   I have an xml string if I use this code
  
   ?
   header(Content-Type: text/xml);
   echo $xml_string;
   ?
   I can see the xml tree but I cannot transform with te xslt. Eg. ? 
   $xp = xslt_create();
  $result_xsl = xslt_process($xp, $xml_string, 'myxsl.xsl');
  echo $result_xsl;
  xslt_free($xp);
  
   ?
  
   Please advise
  
   Regards
  
   tassos
  
   -Original Message-
   From: Lucian COZMA [mailto:[EMAIL PROTECTED]
   Sent: Thursday, March 11, 2004 3:20 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP] Re: DOM XML and php
  
  
   ?php
   $xmlstr = 'blabla1blabalabalab/bla1/bla';
   if(!$dom = domxml_open_mem($xmlstr)) {
 echo Error while parsing the document\n;
 exit;
   }
   // The root domdocument node
   $root = $dom-document_element();
   ///Dump the content back to string var_dump($dom-dump_mem()); ?
  
   Read the manual in the DOM XML functions section. Regards, Lucian 
   COZMA Tassos T [EMAIL PROTECTED] wrote in message
   news:[EMAIL PROTECTED]
Hello,
   
I face a problem. I have a php script and I send a xml request 
to a
   server.
After I receive xml data but I have this data to an php string 
variable.
   
How to create a xml dom with out to write a xml file ?
   
I want to use a xslt to tranform that xml data.
   
   
Any idea ?
   
Thanks
   
tassos
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
 
 

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

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

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

--
PHP General Mailing 

Re: [PHP] Get nice variables from POST

2004-03-12 Thread Hans Juergen von Lengerke
I know this isn't what you want, but nevertheless, this
does not look ugly:

pre

  # Get variables from the form
  #
  $username  = $_POST['username'];
  $password  = $_POST['password'];
  $password2 = $_POST['password2'];
  $email = $_POST['email'];
  $email2= $_POST['email2'];
  $nickname  = $_POST['name'];
  $city  = $POST['city'];
  $state = $_POST['state'];
  $country   = $_POST['country'];
  $misc  = $_POST['misc'];
  $country   = $_POST['country'];

/pre

and there you go, you can now easily spot a typo too :-)

Hans


PS: If you read this with variable-width font
you might think I am an idiot. never mind.


 Date: Thu, 11 Mar 2004 14:51:25 +
 From: Mike Mapsnac [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [PHP] Get nice  variables from POST

 I have about 10 fields in the form. And I get the fields through POST:
 //Get Variable from the form
 $username = $_POST['username'];
 $password = $_POST['password'];
 $password2 = $_POST['password2'];
 $email = $_POST['email'];
 $email2 = $_POST['email2'];
 $nickname = $_POST['name'];
 $city = $POST['city'];
 $state = $_POST['state'];
 $country = $_POST['country'];
 $misc = $_POST['misc'];
 $country = $_POST['country'];

 It works but it looks ugly. For each variable I have statemet. Is there a
 way to get the variables in the loop?

 I'm looking for nice way to get variables from POST?

 Thanks

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



RE: [PHP] Re: Loosing redirect in if...else

2004-03-12 Thread Alex Hogan
 (a) if you're using any values sent via the URL string (e.g.
 cf=0), you need to
 use $_GET, not $_POST;

Some of the information is coming from a form and the info from the url is
to call the different questions.  They are all on one page in a switch
statement.

 (b) empty() will also evaluate to true if the value of the variable 
 is zero.

That's right I forgot about that.  Thanks.



alex


** 
The contents of this e-mail and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom it is addressed.  The views stated herein do not 
necessarily represent the view of the company.  If you are not the 
intended recipient of this e-mail you may not copy, forward, 
disclose, or otherwise use it or any part of it in any form 
whatsoever.  If you have received this e-mail in error please 
e-mail the sender. 
** 




Re: [PHP] Get nice variables from POST

2004-03-12 Thread Tom Meinlschmidt

 if (is_array($_POST)) {
  foreach($_POST as $name=$value) {
   ${$name} = $value;
 }
}

/tom


On Fri, 12 Mar 2004 15:59:00 +0100 (CET)
Hans Juergen von Lengerke [EMAIL PROTECTED] wrote:

 I know this isn't what you want, but nevertheless, this
 does not look ugly:
 
 pre
 
   # Get variables from the form
   #
   $username  = $_POST['username'];
   $password  = $_POST['password'];
   $password2 = $_POST['password2'];
   $email = $_POST['email'];
   $email2= $_POST['email2'];
   $nickname  = $_POST['name'];
   $city  = $POST['city'];
   $state = $_POST['state'];
   $country   = $_POST['country'];
   $misc  = $_POST['misc'];
   $country   = $_POST['country'];
 
 /pre
 
 and there you go, you can now easily spot a typo too :-)
 
 Hans
 
 
 PS: If you read this with variable-width font
 you might think I am an idiot. never mind.
 
 
  Date: Thu, 11 Mar 2004 14:51:25 +
  From: Mike Mapsnac [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: [PHP] Get nice  variables from POST
 
  I have about 10 fields in the form. And I get the fields through POST:
  //Get Variable from the form
  $username = $_POST['username'];
  $password = $_POST['password'];
  $password2 = $_POST['password2'];
  $email = $_POST['email'];
  $email2 = $_POST['email2'];
  $nickname = $_POST['name'];
  $city = $POST['city'];
  $state = $_POST['state'];
  $country = $_POST['country'];
  $misc = $_POST['misc'];
  $country = $_POST['country'];
 
  It works but it looks ugly. For each variable I have statemet. Is there a
  way to get the variables in the loop?
 
  I'm looking for nice way to get variables from POST?
 
  Thanks
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


-- 

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



Re: [PHP] More php Questions about PHP 4.3.4 (cli)

2004-03-12 Thread Martin McCormick
My thanks to both of you.  I am trying to find out now how to
compile in the oci8 functions because it is not obvious in the list of
configuration selections.

When I do get those functions, I can probably use the
information from Marcelo so every bit helps.

Martin Towell writes:
I don't think this is the problem...

The problem is that oci* functions haven't been compiled.

 From: Marcelo Pereira Fonseca da Silva 

 The ocilogon() function should have in third parameter
 something like
 
 $db=(DESCRIPTION=
  (ADDRESS_LIST=
(ADDRESS=(PROTOCOL=TCP)
  (HOST=HOST_HERE)(PORT=PORT_HERE)
)
  )

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



[PHP] XSS Vulnerabilities and strip_tags

2004-03-12 Thread trlists
Is the general wisdom that using strip_tags on input is sufficient to 
protect against XSS vulnerabilities from that input?  I have been doing 
some reading on it but haven't found anything that suggests a 
vulnerability that removing the tags in this way would not cure.

Are there multi-level encodings that can get past strip_tags?

I probably should also be doing a urldecode before strip_tags to get 
around any hex encodings, or does strip_tags handle that?

Thanks for any info,

--
Tom

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



[PHP] load a URL and trap output

2004-03-12 Thread Roger Spears
Hello,

I have this application which is accessed via a web portal.  The first 
thing my application must do is make sure the visitor is logged in via 
the portal.  The only way to do this is by making a request to a 
specific URL.  This URL (which includes the log in cookie id) will 
return XML to my application.  Once I parse this XML, I will know if 
visitors are logged in.

Simple enough.  

How do I make my application load a URL and trap the returned data so 
that it never creates any browser output?

My first reaction was header(Location: URL) but then I'd be handing 
off control to the URL and the output would appear in the browser.

I've done some research and found system(), exec(), and passthru().  But 
I'm not sure if these functions are the proper way to do such a task 
especially since I'm calling a URL and not a specific UNIX command.

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


Re: [PHP] load a URL and trap output

2004-03-12 Thread Tom Meinlschmidt

simple use fopen() or file()

as $fp = fopen(http://somedomain/some.url?blablah,r;);

and read via fread()

/tom

On Fri, 12 Mar 2004 10:54:53 -0500
Roger Spears [EMAIL PROTECTED] wrote:

 Hello,
 
 I have this application which is accessed via a web portal.  The first 
 thing my application must do is make sure the visitor is logged in via 
 the portal.  The only way to do this is by making a request to a 
 specific URL.  This URL (which includes the log in cookie id) will 
 return XML to my application.  Once I parse this XML, I will know if 
 visitors are logged in.
 
 Simple enough.  
 
 How do I make my application load a URL and trap the returned data so 
 that it never creates any browser output?
 
 My first reaction was header(Location: URL) but then I'd be handing 
 off control to the URL and the output would appear in the browser.
 
 I've done some research and found system(), exec(), and passthru().  But 
 I'm not sure if these functions are the proper way to do such a task 
 especially since I'm calling a URL and not a specific UNIX command.
 
 Thanks,
 Roger
 
 -- 
 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] load a URL and trap output

2004-03-12 Thread Chris Boget
 How do I make my application load a URL and trap the returned data so 
 that it never creates any browser output?

Aside from the fopen() and fread() that was suggested by another person
you can also use the ob_* functions.

Chris

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



[PHP] building a statically linked php cli

2004-03-12 Thread Hugh Beaumont
Hi List,

I am trying to build a statically linked php cli binary. I believe I am using the 
correct
terminology. What I want is a php cli binary that will work on (for the most part)
any server I need to copy it to even if the particular extra libs I compiled against
are not on that server.

I need a cli binary that I can copy to a Linux box and be sure it will work even if 
(for example,
mcrypt, or ming or whatever the case may be is not installed on that server.

For exampe, I want:

ldd php

to return nothing.

I have checked the archives but could not find anything. I tried --enable-static but I 
believe
this is just meant to have the compiler use both .a and .so libs when building.

What I want is a binary that has all the libs built into it (I realize this will 
result in a 
larger binary and memory footprint). 

Any advice? 

Thanks in advance!


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

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



[PHP] load a URL and trap output

2004-03-12 Thread Roger Spears
Tom Meinlschmidt wrote:

simple use fopen() or file()

as $fp = fopen(http://somedomain/some.url?blablah,r;);

and read via fread()

 

Perhaps I was mistaken, I thought:

$fp = fopen(http://somedomain/some.url?blablah,r;);
fread();
Would just return the actual HTML code of the page and NOT the results 
of running the page?.?.?.?.?

I will test it out and see.  Thank you for your suggestion!

Roger

Hello,

I have this application which is accessed via a web portal.  The first 
thing my application must do is make sure the visitor is logged in via 
the portal.  The only way to do this is by making a request to a 
specific URL.  This URL (which includes the log in cookie id) will 
return XML to my application.  Once I parse this XML, I will know if 
visitors are logged in.

Simple enough.  

How do I make my application load a URL and trap the returned data so 
that it never creates any browser output?

My first reaction was header(Location: URL) but then I'd be handing 
off control to the URL and the output would appear in the browser.

I've done some research and found system(), exec(), and passthru().  But 
I'm not sure if these functions are the proper way to do such a task 
especially since I'm calling a URL and not a specific UNIX command.

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



 

--
...and I say unto you, the Geek shall inherit the earth.



Re: [PHP] load a URL and trap output

2004-03-12 Thread Red Wingate
Best way would be filegetcontents() and implode the content
with \n.
eg:

?php
$temp = filegetcontents('http://www.somedomain.com');
$temp = implode ( \n , $temp );
echo $temp ;
?
Chris Boget wrote:

How do I make my application load a URL and trap the returned data so 
that it never creates any browser output?


Aside from the fopen() and fread() that was suggested by another person
you can also use the ob_* functions.
Chris

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


Re: [PHP] Dumb

2004-03-12 Thread PHP
Thanks, that is what I figured.

I really don't get rpm's, it seems you are stuck with whatever the packager
felt like putting in the rpm.
Want to add a library? Like zlib for example? then you have to re-compile it
yourself anyways.
They seem completely useless to me for anything but a very basic program
with no real compile options.


- Original Message - 
From: Jason Davidson [EMAIL PROTECTED]
To: PHP [EMAIL PROTECTED]
Sent: Thursday, March 11, 2004 11:44 AM
Subject: Re: [PHP] Dumb


 Not a dumb question at all.  I suppose you could try forcefeeding the
 php rpm into the system again, but that is certainly not the 'nice'
 way.  I think short of installing php or the php module again, Im not
 sure you can simply change a config setting or anything.
 My experience in the past, is that , the rpms of apache and php have
 been flakey, that was 3 years ago, and Im sure its improved a great
 deal, but nontheless, i prefer to compile apache and php, and rpm
 mysql.  Seems to be easier.
 Good Luck
 Jason

 PHP [EMAIL PROTECTED] wrote:
 
  Hi,
  I have a dum question.
 
  I recently picked up a new RH9 dedicated server. Apache 2, Mysql 3 and
php4 are
  all installed , via rpm I am assuming.
 
  I upgraded mysql to version 4, however, php is still using the version 3
client.
  (from php_info)
 
  How do I get php4 to use the mysql4 client?
 
  I would like to know if this is possible just using rpms.  I could do it
  re-compiling everything myself, but I kind of want to stick to the rpm
style
  installation on this server if possible.
 
  Thanks for any help.


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



Re: [PHP] load a URL and trap output

2004-03-12 Thread Roger Spears
Tom Meinlschmidt wrote:


simple use fopen() or file()

as $fp = fopen(http://somedomain/some.url?blablah,r;);

and read via fread()

 

Then I replied with:

Perhaps I was mistaken, I thought:

$fp = fopen(http://somedomain/some.url?blablah,r;);
fread();
Would just return the actual HTML code of the page and NOT the results 
of running the page?.?.?.?.?

I will test it out and see.  Thank you for your suggestion!

Hello All,

It seems fopen() did not work.  However, it did stop the FORBIDDEN 
message I was receiving.  So I think I'm on the right track.  Here's 
what I tried...

$filename = actual URL;

$fd = fopen($filename, r);
$contents = fread($fd, $filename);
fclose($fd);
print strlen($contents);
print p.$contents;
I can open the URL, that works ( fopen() ).
I've tested out the fread(), file(), fgets(), and file_get_contents 
functions.  Nothing works.
I can close the URL, that works ( fclose() ).

With each attempt, I get 0 for the strlen of $contents and nothing else 
prints out.

I also tried adding this to the script right before fopen:
ini_set('allow_url_fopen','1');
That didn't work either...

Any idea(s) on what I'm doing wrong?  I'm using php 4.3.3 and I believe 
it's Apache 1.3

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


[PHP] STrange Problem

2004-03-12 Thread PHP
Hi,
I am using RH9, Mysql 3.23.58, PHP 4.2.2, apache2.0

 mysql_select_db(mydatabase,$connect_id)

allways fails.

I can use $connect_id = mysql_connect(localhost,apache); (YES, I do have this line 
before the mysql_select_db);
just fine.
I can run querys against the database with no problems, but for some reason, 

mysql_select_db(mydatabase,$connect_id)

will allways return false, and I don't see any errors anywhere in any log. Why can I 
not select the database with this, but have no problems using the database with every 
other mysql function?

[PHP] An extension to CREATE zips??

2004-03-12 Thread Brian J. Celenza
Is there function library capable of creating zip files and adding files to
a zip archive under the windows/apache platform? After some extensive
browsing I can only turn up read-only access functions.

Thank you,
Brian

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



[PHP] Re: XSS Vulnerabilities and strip_tags

2004-03-12 Thread Andre Cerqueira
i didnt know what XSS was, just read it on webopedia.com now, maybe i 
got the wrong idea...

strip_tags should prevent a kind of explotation, but maybe its behavior 
is not exactly what you want...
see also htmlentities (http://www.php.net/htmlentities)

you need to ask yourself how the environment that you are using will 
interpret things
if you are sending SELECT ... FROM ... WHERE field1='. 
$_POST['field1'] .', if $_POST['field1'] is:
0' OR field2=0 AND ''='

the resulting string would be:
SELECT ... FROM ... WHERE field1='0' OR field2=0 AND ''=''
and you probably dont want people making queries as they like hehe

dont let ppl upload files and save them as .php or any other extension 
that would trigger a special behavior on the server that they shouldnt 
be able to

remember you can never trust input data...

[EMAIL PROTECTED] wrote:
Is the general wisdom that using strip_tags on input is sufficient to 
protect against XSS vulnerabilities from that input?  I have been doing 
some reading on it but haven't found anything that suggests a 
vulnerability that removing the tags in this way would not cure.

Are there multi-level encodings that can get past strip_tags?

I probably should also be doing a urldecode before strip_tags to get 
around any hex encodings, or does strip_tags handle that?

Thanks for any info,

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


Re: [PHP] STrange Problem

2004-03-12 Thread PHP

OK, I do get the following error.
1044: Access denied for user: '@localhost' to database 'mydatabase'

Even though I specify the user in mysql_connect, for some reason,
mysql_select_db is trying to user a blank user,
Any Ideas?



Hi,
I am using RH9, Mysql 3.23.58, PHP 4.2.2, apache2.0

 mysql_select_db(mydatabase,$connect_id)

allways fails.

I can use $connect_id = mysql_connect(localhost,apache); (YES, I do
have this line before the mysql_select_db);
just fine.
I can run querys against the database with no problems, but for some
reason,

mysql_select_db(mydatabase,$connect_id)

will allways return false, and I don't see any errors anywhere in any log.
Why can I not select the database with this, but have no problems using the
database with every other mysql function?

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



Re[2]: [PHP] STrange Problem

2004-03-12 Thread Richard Davey
Hello PHP,

Friday, March 12, 2004, 6:25:09 PM, you wrote:

P OK, I do get the following error.
P 1044: Access denied for user: '@localhost' to database 'mydatabase'

P Even though I specify the user in mysql_connect, for some reason,
P mysql_select_db is trying to user a blank user,
P Any Ideas?

You said that you use apache as the username for MySQL - is this
something you've configured yourself? If not, it should be root and
the password should be blank unless you have also set that? In which
case it's missing from your connect command.

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

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



Re: [PHP] STrange Problem

2004-03-12 Thread trlists
On 12 Mar 2004 Richard Davey wrote:

 P 1044: Access denied for user: '@localhost' to database 'mydatabase'
 
 You said that you use apache as the username for MySQL - is this
 something you've configured yourself? 

It appears he is actually using a blank username as there is noting 
before the '@' in the error message.

 If not, it should be root and the password should be blank unless
 you have also set that? 

Configuring a MySQL database with a blank root password sounds like a 
potential security risk to me ... why not just create a MySQL user/PW 
for the specific PHP application and connect that way.  Then you can 
grant that user just the privileges they need to deal with the actions 
the web page can take (SELECT, UPDATE, INSERT, and DELETE might be 
enough, or even too much).

--
Tom

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



Re: Re[2]: [PHP] STrange Problem

2004-03-12 Thread PHP
Yes, I have it configured to run as apache. But, as I mentioned, I have no
problems accessing the database and running querys against it, it is only
the mysql_select_db function that fails.


 Hello PHP,

 Friday, March 12, 2004, 6:25:09 PM, you wrote:

 P OK, I do get the following error.
 P 1044: Access denied for user: '@localhost' to database 'mydatabase'

 P Even though I specify the user in mysql_connect, for some reason,
 P mysql_select_db is trying to user a blank user,
 P Any Ideas?

 You said that you use apache as the username for MySQL - is this
 something you've configured yourself? If not, it should be root and
 the password should be blank unless you have also set that? In which
 case it's missing from your connect command.

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

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


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



Re[2]: [PHP] STrange Problem

2004-03-12 Thread Richard Davey
Hello trlists,

Friday, March 12, 2004, 6:37:34 PM, you wrote:

tcc Configuring a MySQL database with a blank root password sounds like a
tcc potential security risk to me ...

It is, but if he hasn't modified it otherwise, that's what it'll be.
Also for local development purposes, there is no harm in it.

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

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



Re: Re[2]: [PHP] STrange Problem

2004-03-12 Thread trlists
On 12 Mar 2004 Richard Davey wrote:

 It is, but if he hasn't modified it otherwise, that's what it'll be.
 Also for local development purposes, there is no harm in it.

Agreed, as long as he's not connected so someone can try to connect to 
the MySQL port.

--
Tom

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



Re[4]: [PHP] STrange Problem

2004-03-12 Thread Richard Davey
Hello trlists,

Friday, March 12, 2004, 6:48:03 PM, you wrote:

tcc Agreed, as long as he's not connected so someone can try to connect to
tcc the MySQL port.

If he's connected that long and not running a firewall, he deserves it
;)

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

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



Re[4]: [PHP] STrange Problem

2004-03-12 Thread Richard Davey
Hello,

Friday, March 12, 2004, 6:38:37 PM, you wrote:

P Yes, I have it configured to run as apache. But, as I mentioned, I have no
P problems accessing the database and running querys against it, it is only
P the mysql_select_db function that fails.

You mean you have no problems querying the database from within
*MySQL* itself, right? i.e. from the command-line?

As Tom pointed out, your error stated that no username was given.

Have you tried the command using the root MySQL user account? It's
possible the apache one hasn't been configured correctly.

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

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



Re: [PHP] Get nice variables from POST

2004-03-12 Thread Jaskirat Singh
if (is_array($_POST)) {
  foreach($_POST as $name=$value) {
   ${$name} = $value;
 }
}

or use this

if (is_array($_POST))
{
   extract($_POST);
}

Jaski

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

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



Re: Re[4]: [PHP] STrange Problem

2004-03-12 Thread PHP
Yes, I have a root password.
No, I do not use root to run the server or connect to the database.
Yes, I do have the user apache in the grant tables for mysql with
permissions for the specific database.
Yes, I can run querys against said database and connect with user apache
with no problems.

Only msyql_select_db will not connect, it claims I am trying to use a blank
user, even though I specifically connect earlier with mysql_connect with the
specific user with no problems..


 Hello trlists,

 Friday, March 12, 2004, 6:48:03 PM, you wrote:

 tcc Agreed, as long as he's not connected so someone can try to connect
to
 tcc the MySQL port.

 If he's connected that long and not running a firewall, he deserves it
 ;)

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

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


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



Re[6]: [PHP] STrange Problem

2004-03-12 Thread Richard Davey
Hello,

Friday, March 12, 2004, 7:00:38 PM, you wrote:

P Only msyql_select_db will not connect, it claims I am trying to use a blank
P user, even though I specifically connect earlier with mysql_connect with the
P specific user with no problems..

What does this output?

?php
$link = mysql_connect(localhost, mysql_user, mysql_password)
or die(Could not connect:  . mysql_error());
echo Connected successfully;
mysql_close($link);
? 

And don't just remove the user and password parts, fill them in.
If there is no password, put .

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

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



Re: Re[6]: [PHP] STrange Problem

2004-03-12 Thread PHP
It returns:
Connected successfully

Like I said, I have not problems connecting. Only mysql_select_db will not
work.


 Hello,

 Friday, March 12, 2004, 7:00:38 PM, you wrote:

 P Only msyql_select_db will not connect, it claims I am trying to use a
blank
 P user, even though I specifically connect earlier with mysql_connect
with the
 P specific user with no problems..

 What does this output?

 ?php
 $link = mysql_connect(localhost, mysql_user, mysql_password)
 or die(Could not connect:  . mysql_error());
 echo Connected successfully;
 mysql_close($link);
 ?

 And don't just remove the user and password parts, fill them in.
 If there is no password, put .

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

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


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



Re: Re[4]: [PHP] STrange Problem

2004-03-12 Thread PHP
It seems the only way I can get mysql_select_db to work is to actually add a
blank user to the msyql.db table with appropiate privileges.



 Yes, I have a root password.
 No, I do not use root to run the server or connect to the database.
 Yes, I do have the user apache in the grant tables for mysql with
 permissions for the specific database.
 Yes, I can run querys against said database and connect with user apache
 with no problems.

 Only msyql_select_db will not connect, it claims I am trying to use a
blank
 user, even though I specifically connect earlier with mysql_connect with
the
 specific user with no problems..


  Hello trlists,
 
  Friday, March 12, 2004, 6:48:03 PM, you wrote:
 
  tcc Agreed, as long as he's not connected so someone can try to connect
 to
  tcc the MySQL port.
 
  If he's connected that long and not running a firewall, he deserves it
  ;)
 
  -- 
  Best regards,
   Richard Davey
   http://www.phpcommunity.org/wiki/296.html
 
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 

 -- 
 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[8]: [PHP] STrange Problem

2004-03-12 Thread Richard Davey
Hello PHP,

Friday, March 12, 2004, 7:23:47 PM, you wrote:

P It returns:
P Connected successfully

P Like I said, I have not problems connecting. Only mysql_select_db will not
P work.

Fine, what does this return? With foo replaced with your database
name.

?php

$lnk = mysql_connect('localhost', 'mysql_user', 'mysql_password')
   or die('Not connected : ' . mysql_error());

// make foo the current db
mysql_select_db('foo', $lnk) or die ('Can\'t use foo : ' . mysql_error());

? 

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

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



Re: [PHP] STrange Problem

2004-03-12 Thread trlists
Is it possible that either $connect_id is not defined at the point 
where you use it in the mysql_select_db call (e.g. it's global, the 
call is in a function, and you forgot to use a global declaration), 
and/or the previosuly opened connection has been closed?

What do you get if you do a var_dump($connect_id) right before the 
mysql_select_db call?

--
Tom

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



[PHP] creating thumbnails

2004-03-12 Thread Maxi Yedid
hello

I have a form from where you can upload an image.

the script saves the file on the server in a folder.

what I want now is when it saves the file; I also want to save a copy of
that file in another folder with thumbnail size. How do I create a copy
with for example 100 x 100 and save that?

thanks

max

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



RE: [PHP] creating thumbnails

2004-03-12 Thread Jay Blanchard
[snip]
I have a form from where you can upload an image.

the script saves the file on the server in a folder.

what I want now is when it saves the file; I also want to save a copy of
that file in another folder with thumbnail size. How do I create a
copy
with for example 100 x 100 and save that?
[/snip]

Start with TFM at http://us2.php.net/image

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



Re: [PHP] creating thumbnails

2004-03-12 Thread Brad Pauly
On Fri, 2004-03-12 at 15:17, Maxi Yedid wrote:
 

[snip]

 what I want now is when it saves the file; I also want to save a copy of
 that file in another folder with thumbnail size. How do I create a copy
 with for example 100 x 100 and save that?

If you are using Linux (maybe others too) you might be able to use
'mogrify' which is part of ImageMagick. I think it works very well for
this.

http://www.imagemagick.org/www/mogrify.html

- Brad

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



[PHP] Adding php to the include_path in the php.ini???

2004-03-12 Thread Scott Fletcher
Hi!

After doing many testing for hte fsockopen() bugs with PHP developers
which is now fixed.  I just happen to noticed that in the middle of those
testing when I do the PHP installation after doing the usual configure and
make.  What I noticed is that it asked me to ..

--snip--
You may want to add: /usr/local/bin/php to your php.ini include_path
--snip--

Anyone know what so important about it?  Since that PHP is already compiled
with Apache and that PHP work, so what is the purpose of adding the binary
php in /usr/local/bin/php to the php.ini configuration when it come to using
the website??

Thanks,
 FletchSOD

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



[PHP] Re: Help with arrays

2004-03-12 Thread Elliot J. Balanza
Thank you Michael... That did the trick :D

thank you very very much, it took me three days... and now it seems so damn
easy.

vamp
Michael Nolan [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
 Elliot J. Balanza wrote:
  I need to make a query to a MySQL database that only has two fields,
name 
  value. That I can do.
 
  Then I need to store the values i receive in an array in the form of:
 
  $variable['name'] = value;
 
  But haven't been able to do it neither with a foreach nor with a do
while...
  Can anyone please assist me?
 

 If you mean how do you store all the returned results in an array of
 name/value pairs, this is how I'd do it:

 ?php

 while ($result = mysql_fetch_assoc($query)) {
  $variable[$result['name']] = $result['value'];
 }

 ?

 Don't know what 'value' represents, but it will give you an array
 something like this:

 print_r($variable);

 Array
 (
  [michael] = nolan
  [joe] = bloggs
  [john] = smith
 )


 HTH,

 Mike

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



[PHP] Character Question

2004-03-12 Thread David Westbrooks
I have articles held in a MySQL database for a law firm. When I pull the
information from the DB and display it, words like that's are shown as
that\'s. To take care of this problem I have done this: $newsart =
eregi_replace(\\\',', $newsart);

Is there a better way to handle this to catch all irregular characters?

Thank you for your help in advance.

-Dave



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.598 / Virus Database: 380 - Release Date: 2/28/2004

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



RE: [PHP] Character Question

2004-03-12 Thread Pablo Gosse
David Westbrooks wrote:
 I have articles held in a MySQL database for a law firm. When I pull
 the information from the DB and display it, words like that's are
 shown as that\'s. To take care of this problem I have done this:
 $newsart = eregi_replace(\\\',', $newsart);   
 
 Is there a better way to handle this to catch all irregular
 characters? 
 
 Thank you for your help in advance.
 
 -Dave
 
 
 
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.598 / Virus Database: 380 - Release Date: 2/28/2004

http://www.php.net/stripslashes

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



[PHP] New Problem with Arrays won't show the first record of a query.

2004-03-12 Thread Elliot J. Balanza
Ok thanks to Michael Nolan I was able to do what I needed. The final code is
this:

snip-snip
mysql_select_db($database_MBTTIENDA, $MBTTIENDA);
$query_prefs = SELECT * FROM mtmbt_prefs ORDER BY Pref_name ASC;
$prefs = mysql_query($query_prefs, $MBTTIENDA) or die(mysql_error());
$row_prefs = mysql_fetch_assoc($prefs);
$totalRows_prefs = mysql_num_rows($prefs);

while ($row_prefs = mysql_fetch_assoc($prefs)) {
 $MTMBT[$row_prefs['Pref_name']] = $row_prefs['Pref_value'];
}

mysql_free_result($prefs);
snip-snip

and it works fine EXCEPT it wont show the first record of the query... any
ideas why?

Vamp

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



[PHP] Servlet/PHP integration

2004-03-12 Thread dba user
I am sorry, if this message is a duplicate post. (I unwittingly press some key and the 
page got refreshed before completing my post).
 
I am trying the Servlet/Php integration. I installed php with java support. But, I do 
not see php_java.jar in any of the directories. I have 
/usr/local/php4/lib/php/phpsrvlt.jar though. I am wondering why I did not have the 
php_java.jar file? How do I verify I got php installed with java support? [I did not 
get any error message during make install].
 
Also, when I tried to acess the test.php, as http://my-server:8080/examples/test.php , 
I get the error Class not found. net.php.servlet. I copied the phpsrvlt.jar under 
../server/lib of tomcat. If this is not correct, where would I copy the phpsrvlt.jar? 
Also, does the CLASSPATH of the tomcat should have this jar included? Should it have 
the LD_CONFIG set in the startup script?
 
Thanks.


-
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster.

Re: [PHP] Adding php to the include_path in the php.ini???

2004-03-12 Thread Jason Wong
On Saturday 13 March 2004 05:35, Scott Fletcher wrote:

 After doing many testing for hte fsockopen() bugs with PHP developers
 which is now fixed.  I just happen to noticed that in the middle of those
 testing when I do the PHP installation after doing the usual configure and
 make.  What I noticed is that it asked me to ..

 --snip--
 You may want to add: /usr/local/bin/php to your php.ini include_path
 --snip--

You mean /usr/local/lib/php ?

 Anyone know what so important about it?  Since that PHP is already compiled
 with Apache and that PHP work, so what is the purpose of adding the binary
 php in /usr/local/bin/php to the php.ini configuration when it come to
 using the website??

That's usually where the PEAR stuff are stored.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
And they shall beat their swords into plowshares, for if you hit a man
with a plowshare, he's going to know he's been hit.
*/

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



Re: [PHP] Character Question

2004-03-12 Thread Filip de Waard
On Mar 12, 2004, at 11:24 PM, Pablo Gosse wrote:
David Westbrooks wrote:
I have articles held in a MySQL database for a law firm. When I pull
the information from the DB and display it, words like that's are
shown as that\'s. To take care of this problem I have done this:
$newsart = eregi_replace(\\\',', $newsart);
Is there a better way to handle this to catch all irregular
characters?
snip

http://www.php.net/stripslashes
stripslashes() is, like Pablo said, the solution to your question. But 
you should not ask how to remove the slashes, but why they are there.

You should read the excellent article by Jeffrey Siegel and Michael 
Southwell in PHP Magazine 2.04 about 'Storing and displaying data', 
which explains some elementary stuff about this issue. I suppose that 
'magic_quotes' 
(http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc) is 
switched on on your database server, which is a bad thing.

Since you are using MySQL you should store your data using 
mysql_real_escape_string() 
(http://www.php.net/mysql_real_escape_string). This way you won't have 
to bother with slashes inside of your data.

I would suggest to study the manual carefully on this issue, since it 
relates with security and possible SQL injection (and we don't want 
that, do we?).

Regards,

Filip de Waard

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


[PHP] test

2004-03-12 Thread JAMES OXFORD
test

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


RE: [PHP] Servlet/PHP integration

2004-03-12 Thread Vail, Warren
in order to execute code under http://my-server:8080/ doesn't it have to be
a java class?

Since PHP was never written in JAVA, that I know of, I suspect it will never
be a class file, and that may explain why you don't find a php_java.jar.
What you will find is a php_java.so or php_java.dll (depending on your
platform) that executes under PHP which executes usually on an apache
server, usually as a cgi at port 80 (try
http://my-server:80/examples/test.php).

I may be wrong here, but PHP can invoke Java modules, only if it first
invokes the JRE to execute those modules, conversely a Java module could
invoke PHP modules if it first invokes the PHP runtime environment.  Whether
you like it or not, Java and PHP run pretty much as equals, each in their
own environment, and the only way they can co exist is you invoke their
runtime environment first.  Java runtime has no ability to run PHP code that
I know of and PHP has no ability to interpret the java byte code without
invoking a JRE to do it.  When you read the manuals, the authors usually try
to imply that it is more tightly integrated than it really is, but I think
you will find it is pretty much as I've described here.  If others disagree,
you will probably hear about it here as well, stay tuned.

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

Warren Vail



-Original Message-
From: dba user [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 2:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Servlet/PHP integration


I am sorry, if this message is a duplicate post. (I unwittingly press some
key and the page got refreshed before completing my post).
 
I am trying the Servlet/Php integration. I installed php with java support.
But, I do not see php_java.jar in any of the directories. I have
/usr/local/php4/lib/php/phpsrvlt.jar though. I am wondering why I did not
have the php_java.jar file? How do I verify I got php installed with java
support? [I did not get any error message during make install].
 
Also, when I tried to acess the test.php, as
http://my-server:8080/examples/test.php , I get the error Class not found.
net.php.servlet. I copied the phpsrvlt.jar under ../server/lib of tomcat.
If this is not correct, where would I copy the phpsrvlt.jar? Also, does the
CLASSPATH of the tomcat should have this jar included? Should it have the
LD_CONFIG set in the startup script?
 
Thanks.


-
Do you Yahoo!?
Yahoo! Search - Find what you're looking for faster.

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



RE: [PHP] Servlet/PHP integration

2004-03-12 Thread dba user
Thanks Vail,
 
I was following http://us4.php.net/manual/en/ref.java.php#java.servlet and the README 
from php install at sapi/servlet/README. I am new to php and servlet. My friend has a 
requirement to integrate some php stuff into his existing java. I tried to get it 
setup as described in sapi/servlet/README. But, I am not sure whether I can invoke it 
directly from tomcat as in my previous example. 
 
As you said, I will stay tuned to the forum.
 
Regards.

Vail, Warren [EMAIL PROTECTED] wrote:
in order to execute code under http://my-server:8080/ doesn't it have to be
a java class?

Since PHP was never written in JAVA, that I know of, I suspect it will never
be a class file, and that may explain why you don't find a php_java.jar.
What you will find is a php_java.so or php_java.dll (depending on your
platform) that executes under PHP which executes usually on an apache
server, usually as a cgi at port 80 (try
http://my-server:80/examples/test.php).

I may be wrong here, but PHP can invoke Java modules, only if it first
invokes the JRE to execute those modules, conversely a Java module could
invoke PHP modules if it first invokes the PHP runtime environment. Whether
you like it or not, Java and PHP run pretty much as equals, each in their
own environment, and the only way they can co exist is you invoke their
runtime environment first. Java runtime has no ability to run PHP code that
I know of and PHP has no ability to interpret the java byte code without
invoking a JRE to do it. When you read the manuals, the authors usually try
to imply that it is more tightly integrated than it really is, but I think
you will find it is pretty much as I've described here. If others disagree,
you will probably hear about it here as well, stay tuned.

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

Warren Vail



-Original Message-
From: dba user [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 2:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Servlet/PHP integration


I am sorry, if this message is a duplicate post. (I unwittingly press some
key and the page got refreshed before completing my post).

I am trying the Servlet/Php integration. I installed php with java support.
But, I do not see php_java.jar in any of the directories. I have
/usr/local/php4/lib/php/phpsrvlt.jar though. I am wondering why I did not
have the php_java.jar file? How do I verify I got php installed with java
support? [I did not get any error message during make install].

Also, when I tried to acess the test.php, as
http://my-server:8080/examples/test.php , I get the error Class not found.
net.php.servlet. I copied the phpsrvlt.jar under ../server/lib of tomcat.
If this is not correct, where would I copy the phpsrvlt.jar? Also, does the
CLASSPATH of the tomcat should have this jar included? Should it have the
LD_CONFIG set in the startup script?

Thanks.


-
Do you Yahoo!?
Yahoo! Search - Find what you're looking for faster.

-
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster.

Re: [PHP] New Problem with Arrays won't show the first record of a query.

2004-03-12 Thread Rasmus Lerdorf
Because you do mysql_fetch_assoc() once before going into your while loop.  
Get rid of that first $row_prefs = mysql_fetch_assoc(...) line there and 
it will work.

-Rasmus

On Fri, 12 Mar 2004, Elliot J. Balanza wrote:

 Ok thanks to Michael Nolan I was able to do what I needed. The final code is
 this:
 
 snip-snip
 mysql_select_db($database_MBTTIENDA, $MBTTIENDA);
 $query_prefs = SELECT * FROM mtmbt_prefs ORDER BY Pref_name ASC;
 $prefs = mysql_query($query_prefs, $MBTTIENDA) or die(mysql_error());
 $row_prefs = mysql_fetch_assoc($prefs);
 $totalRows_prefs = mysql_num_rows($prefs);
 
 while ($row_prefs = mysql_fetch_assoc($prefs)) {
  $MTMBT[$row_prefs['Pref_name']] = $row_prefs['Pref_value'];
 }
 
 mysql_free_result($prefs);
 snip-snip
 
 and it works fine EXCEPT it wont show the first record of the query... any
 ideas why?
 
 Vamp
 
 -- 
 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] SESSIONS SESSIONS SESSIONS

2004-03-12 Thread Alberto García Gómez
Friends:

I need a good example to create a session and navigate an entire site with this 
sessions. Also I need that sessions handle a three variables.
__
Atte.
Alberto García Gómez
Administrador Nodo Atenas
http://www.mtz.sld.cu/
Tel: 53-45-282212


Re: [PHP] ereg problem

2004-03-12 Thread Newman Weekly.
Don't worry about this I worked out that the example was wrong (o;

- Original Message - 
From: Newman Weekly. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 13, 2004 1:59 PM
Subject: [PHP] ereg problem


?php  

$formUserName=foobar;

   if (ereg(^[a-bA-B][a-bA-B0-9]{3,11}$,$formUserName)
   {
   // IS VALID.
$pageUserNameValid=YES;
   }
   else
   {
   // NOT VALID
$pageUserNameValid=NO;
   }
 // PAGE OUT PUT..
  echo $pageUserNameValid;

?

This simple script is ment to check to a user nae field but I have done something 
wrong.  

$pageUserNameValid This should be yes for foo bar.

// Phil

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



Re: [PHP] SESSIONS SESSIONS SESSIONS

2004-03-12 Thread Jason Davidson

http://ca.php.net/manual/en/function.session-start.php



=?iso-8859-1?Q?Alberto_Garc=EDa_G=F3mez?= [EMAIL PROTECTED]
wrote:
 
 Friends:
 
 I need a good example to create a session and navigate an entire site with this
 sessions. Also I need that sessions handle a three variables.
 __
 Atte.
 Alberto García Gómez
 Administrador Nodo Atenas
 http://www.mtz.sld.cu/
 Tel: 53-45-282212
 

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



Re: [PHP] New Problem with Arrays won't show the first record of a query.

2004-03-12 Thread trlists
On 12 Mar 2004 Elliot J. Balanza wrote:

 .
 $row_prefs = mysql_fetch_assoc($prefs);
 .
 while ($row_prefs = mysql_fetch_assoc($prefs)) {
 .

 and it works fine EXCEPT it wont show the first record of the query... any
 ideas why?

Yes ... see the two lines quoted above.  Each time you call 
mysql_fetch_assoc you get another record.  The first one loads the 
first record, the second loads all the others.  Delete the first call 
and it should do what you want.

--
Tom

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



[PHP] SMTP Authentication

2004-03-12 Thread Beauford
Hi,

How would I set up PHP to use SMTP authentication when I send an email. For
example, in MS Outlook I have authentication set to use the same settings as
my incoming mail. I have searched around but haven't found anything that
deals with this.

Thanks

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



Re: [PHP] New Problem with Arrays won't show the first record of a query.

2004-03-12 Thread Elliot J. Balanza
Thanks guys... it works dandy now.

Vamp
[EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
 On 12 Mar 2004 Elliot J. Balanza wrote:

  .
  $row_prefs = mysql_fetch_assoc($prefs);
  .
  while ($row_prefs = mysql_fetch_assoc($prefs)) {
  .

  and it works fine EXCEPT it wont show the first record of the query...
any
  ideas why?

 Yes ... see the two lines quoted above.  Each time you call
 mysql_fetch_assoc you get another record.  The first one loads the
 first record, the second loads all the others.  Delete the first call
 and it should do what you want.

 --
 Tom

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



[PHP] Re: SMTP Authentication

2004-03-12 Thread Elliot J. Balanza
The thing is... if you are sending the mail from within your server why do
you need to authentificate you are yourself?

Vamp.

Beauford [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
 Hi,

 How would I set up PHP to use SMTP authentication when I send an email.
For
 example, in MS Outlook I have authentication set to use the same settings
as
 my incoming mail. I have searched around but haven't found anything that
 deals with this.

 Thanks

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



[PHP] Re: SMTP Authentication

2004-03-12 Thread Manuel Lemos
Hello,

On 03/13/2004 12:54 AM, Beauford wrote:
How would I set up PHP to use SMTP authentication when I send an email. For
example, in MS Outlook I have authentication set to use the same settings as
my incoming mail. I have searched around but haven't found anything that
deals with this.
The mail function does not support authentication. You may want to try 
this class that comes with a wrapper function named smtp_mail(). It 
emulates the mail() function but lets you specify the authentication 
credentials:

http://www.phpclasses.org/mimemessage

You also need this:

http://www.phpclasses.org/smtpclass

--

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


[PHP] Apache Config: php_value auto_prepend_file auto_append_file

2004-03-12 Thread Chris Wagner
hi,

i'm running a server with Fedora Core 1.  this is using Apache 2.0.48
and PHP 4.3.4.

i have my http server root at /var/www/html/.  i have some virtual hosts
setup.

i've just installed phpMyAdmin 2.5.6.  my problem lies within the
auto_prepend_file and auto_append_file directives provided by PHP.  i
have no default prepended or appended files, but have these directives
set up for each virtual host.  so, the section of my httpd.conf file
that takes care of this, looks like so:

Directory /var/www/html/virtual_host1
  php_value auto_prepend_file /var/www/html/virtual_host1/header.php
  php_value auto_append_file /var/www/html/virtual_host1/footer.php
/Directory

Directory /var/www/html/virtual_host2
  php_value auto_prepend_file /var/www/html/virtual_host2/header.php
  php_value auto_append_file /var/www/html/virtual_host2/footer.php
/Directory


now, i have no header or footer defined for phpMyAdmin, which lies under
/var/www/html/phpMyAdmin/.  but what happens, is that the header and
footer from my 1st virtual host are randomly included, making phpMyAdmin
look hideous, and often making it not work because it needs to place
information in the HTML Header.  whether or not these files are included
seems to be quite random, tho, as it does not happen all the time.  i
could log into phpMyAdmin just fine, browse through a few tables, and
then it will begin including the header and footer.  another thing i've
noticed though, is that these files never get included in the Fedora
Core Apache Test Page, which lies under /var/www/html/.

i think this looks like a bug in either PHP or Apache...  any ideas?

thanks!

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



Re: [PHP] Apache Config: php_value auto_prepend_file auto_append_file

2004-03-12 Thread Rasmus Lerdorf
Yeah, probably a config leak in the Apache2 sapi module.  There is a
reason we don't suggest using PHP with Apache2 yet.  Use Apache1 and I bet
you won't have any problems.

-Rasmus

On Sat, 13 Mar 2004, Chris Wagner wrote:

 hi,

 i'm running a server with Fedora Core 1.  this is using Apache 2.0.48
 and PHP 4.3.4.

 i have my http server root at /var/www/html/.  i have some virtual hosts
 setup.

 i've just installed phpMyAdmin 2.5.6.  my problem lies within the
 auto_prepend_file and auto_append_file directives provided by PHP.  i
 have no default prepended or appended files, but have these directives
 set up for each virtual host.  so, the section of my httpd.conf file
 that takes care of this, looks like so:

 Directory /var/www/html/virtual_host1
   php_value auto_prepend_file /var/www/html/virtual_host1/header.php
   php_value auto_append_file /var/www/html/virtual_host1/footer.php
 /Directory

 Directory /var/www/html/virtual_host2
   php_value auto_prepend_file /var/www/html/virtual_host2/header.php
   php_value auto_append_file /var/www/html/virtual_host2/footer.php
 /Directory


 now, i have no header or footer defined for phpMyAdmin, which lies under
 /var/www/html/phpMyAdmin/.  but what happens, is that the header and
 footer from my 1st virtual host are randomly included, making phpMyAdmin
 look hideous, and often making it not work because it needs to place
 information in the HTML Header.  whether or not these files are included
 seems to be quite random, tho, as it does not happen all the time.  i
 could log into phpMyAdmin just fine, browse through a few tables, and
 then it will begin including the header and footer.  another thing i've
 noticed though, is that these files never get included in the Fedora
 Core Apache Test Page, which lies under /var/www/html/.

 i think this looks like a bug in either PHP or Apache...  any ideas?

 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-general Digest 13 Mar 2004 06:24:31 -0000 Issue 2643

2004-03-12 Thread php-general-digest-help

php-general Digest 13 Mar 2004 06:24:31 - Issue 2643

Topics (messages 180273 through 180315):

An extension to CREATE zips??
180273 by: Brian J. Celenza

Re: XSS Vulnerabilities and strip_tags
180274 by: Andre Cerqueira

Re: STrange Problem
180275 by: PHP
180276 by: Richard Davey
180277 by: trlists.clayst.com
180278 by: PHP
180279 by: Richard Davey
180280 by: trlists.clayst.com
180281 by: Richard Davey
180282 by: Richard Davey
180284 by: PHP
180285 by: Richard Davey
180286 by: PHP
180287 by: PHP
180288 by: Richard Davey
180289 by: trlists.clayst.com

Re: Get nice variables from POST
180283 by: Jaskirat Singh

creating thumbnails
180290 by: Maxi Yedid
180291 by: Jay Blanchard
180292 by: Brad Pauly

Adding php to the include_path in the php.ini???
180293 by: Scott Fletcher
180299 by: Jason Wong

Re: Help with arrays
180294 by: Elliot J. Balanza

Character Question
180295 by: David Westbrooks
180296 by: Pablo Gosse
180300 by: Filip de Waard

New Problem with Arrays won't show the first record of a query.
180297 by: Elliot J. Balanza
180304 by: Rasmus Lerdorf
180309 by: trlists.clayst.com
180311 by: Elliot J. Balanza

Servlet/PHP integration
180298 by: dba user
180302 by: Vail, Warren
180303 by: dba user

test
180301 by: JAMES OXFORD

ereg problem
180305 by: Newman Weekly.
180307 by: Newman Weekly.

SESSIONS SESSIONS SESSIONS
180306 by: Alberto García Gómez
180308 by: Jason Davidson

SMTP Authentication
180310 by: Beauford
180312 by: Elliot J. Balanza
180313 by: Manuel Lemos

Apache Config: php_value auto_prepend_file  auto_append_file
180314 by: Chris Wagner
180315 by: Rasmus Lerdorf

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---
Is there function library capable of creating zip files and adding files to
a zip archive under the windows/apache platform? After some extensive
browsing I can only turn up read-only access functions.

Thank you,
Brian
---End Message---
---BeginMessage---
i didnt know what XSS was, just read it on webopedia.com now, maybe i 
got the wrong idea...

strip_tags should prevent a kind of explotation, but maybe its behavior 
is not exactly what you want...
see also htmlentities (http://www.php.net/htmlentities)

you need to ask yourself how the environment that you are using will 
interpret things
if you are sending SELECT ... FROM ... WHERE field1='. 
$_POST['field1'] .', if $_POST['field1'] is:
0' OR field2=0 AND ''='

the resulting string would be:
SELECT ... FROM ... WHERE field1='0' OR field2=0 AND ''=''
and you probably dont want people making queries as they like hehe

dont let ppl upload files and save them as .php or any other extension 
that would trigger a special behavior on the server that they shouldnt 
be able to

remember you can never trust input data...

[EMAIL PROTECTED] wrote:
Is the general wisdom that using strip_tags on input is sufficient to 
protect against XSS vulnerabilities from that input?  I have been doing 
some reading on it but haven't found anything that suggests a 
vulnerability that removing the tags in this way would not cure.

Are there multi-level encodings that can get past strip_tags?

I probably should also be doing a urldecode before strip_tags to get 
around any hex encodings, or does strip_tags handle that?

Thanks for any info,

--
Tom
---End Message---
---BeginMessage---

OK, I do get the following error.
1044: Access denied for user: '@localhost' to database 'mydatabase'

Even though I specify the user in mysql_connect, for some reason,
mysql_select_db is trying to user a blank user,
Any Ideas?



Hi,
I am using RH9, Mysql 3.23.58, PHP 4.2.2, apache2.0

 mysql_select_db(mydatabase,$connect_id)

allways fails.

I can use $connect_id = mysql_connect(localhost,apache); (YES, I do
have this line before the mysql_select_db);
just fine.
I can run querys against the database with no problems, but for some
reason,

mysql_select_db(mydatabase,$connect_id)

will allways return false, and I don't see any errors anywhere in any log.
Why can I not select the database with this, but have no problems using the
database with every other mysql function?
---End Message---
---BeginMessage---
Hello PHP,

Friday, March 12, 2004, 6:25:09 PM, you wrote:

P OK, I do get the following error.
P 1044: Access denied for user: '@localhost' to database 'mydatabase'

P Even though I specify the user in mysql_connect, for some reason,
P mysql_select_db is trying to user a blank user,
P 

RE: [PHP] Apache Config: php_value auto_prepend_file auto_append_file

2004-03-12 Thread electroteque
I've prob asked this before, when will it be possible to be able to use
Apache2 ? I assumed as you said before it was because it was the
extensions but are we saying now that libraries that php are compiled on
are too not thread safe ?


-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 13, 2004 5:25 PM
To: Chris Wagner
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Apache Config: php_value auto_prepend_file 
auto_append_file


Yeah, probably a config leak in the Apache2 sapi module.  There is a
reason we don't suggest using PHP with Apache2 yet.  Use Apache1 and I bet
you won't have any problems.

-Rasmus

On Sat, 13 Mar 2004, Chris Wagner wrote:

 hi,

 i'm running a server with Fedora Core 1.  this is using Apache 2.0.48
 and PHP 4.3.4.

 i have my http server root at /var/www/html/.  i have some virtual hosts
 setup.

 i've just installed phpMyAdmin 2.5.6.  my problem lies within the
 auto_prepend_file and auto_append_file directives provided by PHP.  i
 have no default prepended or appended files, but have these directives
 set up for each virtual host.  so, the section of my httpd.conf file
 that takes care of this, looks like so:

 Directory /var/www/html/virtual_host1
   php_value auto_prepend_file /var/www/html/virtual_host1/header.php
   php_value auto_append_file /var/www/html/virtual_host1/footer.php
 /Directory

 Directory /var/www/html/virtual_host2
   php_value auto_prepend_file /var/www/html/virtual_host2/header.php
   php_value auto_append_file /var/www/html/virtual_host2/footer.php
 /Directory


 now, i have no header or footer defined for phpMyAdmin, which lies under
 /var/www/html/phpMyAdmin/.  but what happens, is that the header and
 footer from my 1st virtual host are randomly included, making phpMyAdmin
 look hideous, and often making it not work because it needs to place
 information in the HTML Header.  whether or not these files are included
 seems to be quite random, tho, as it does not happen all the time.  i
 could log into phpMyAdmin just fine, browse through a few tables, and
 then it will begin including the header and footer.  another thing i've
 noticed though, is that these files never get included in the Fedora
 Core Apache Test Page, which lies under /var/www/html/.

 i think this looks like a bug in either PHP or Apache...  any ideas?

 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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Dumb

2004-03-12 Thread Burhan Khalid
PHP wrote:
Thanks, that is what I figured.

I really don't get rpm's, it seems you are stuck with whatever the packager
felt like putting in the rpm.
Want to add a library? Like zlib for example? then you have to re-compile it
yourself anyways.
They seem completely useless to me for anything but a very basic program
with no real compile options.
Well, you can always compile from source.

Or choose a distribution that doesn't use RPMs (like Debian, FreeBSD, 
Gentoo, et. al.)

[ trimmed the rest ]

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


[PHP] variable passing

2004-03-12 Thread Martin S
I have this in equip-lend-index.php and want to pass the variable 
$equipment back to the same page:

PRINT 	td valign=\top\Equipment: form 
action=\$USERPREFIX/equip-lend-index.php\ method=\POST\ 
enctype=\text/plain\;
PRINT 	input type=\radio\ name=\equipment\ value=\computer\ / 
Computers;
PRINT 	input type=\radio\ name=\equipment\ value=\phone\/ Phones;
PRINT 	input name=\Select\ value=\select\ type=\submit\ /;
PRINT 	/formbr /;

Hitting Select (submit button) doesn't pass the value of $equipment back 
to the page. What am I doing wrong?

/M.

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


Re: [PHP] variable passing

2004-03-12 Thread Jason Davidson
what is the code your using to try and retrieve the var.. are you using
$_REQUEST['equipment'];

jason
Martin S [EMAIL PROTECTED] wrote:
 
 I have this in equip-lend-index.php and want to pass the variable 
 $equipment back to the same page:
 
 PRINTtd valign=\top\Equipment: form 
 action=\$USERPREFIX/equip-lend-index.php\ method=\POST\ 
 enctype=\text/plain\;
 PRINTinput type=\radio\ name=\equipment\ value=\computer\ / 
 Computers;
 PRINTinput type=\radio\ name=\equipment\ value=\phone\/ Phones;
 PRINTinput name=\Select\ value=\select\ type=\submit\ /;
 PRINT/formbr /;
 
 Hitting Select (submit button) doesn't pass the value of $equipment back 
 to the page. What am I doing wrong?
 
 /M.
 
 -- 
 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