php-general Digest 20 Nov 2005 00:58:55 -0000 Issue 3804

2005-11-19 Thread php-general-digest-help

php-general Digest 20 Nov 2005 00:58:55 - Issue 3804

Topics (messages 226125 through 226138):

Compile a stored code with php
226125 by: Khorosh Irani
226128 by: Roman Ivanov

POST headers empty when using SSLProxyEngine
226126 by: floeff.arcor.de

Re: echo
226127 by: Chris Shiflett
226129 by: Robert Cummings
226130 by: Anas Mughal

Re: DomDocument::GetElementById - a workaround with external DTD
226131 by: Erik Franzén

Êг¡ÓªÏú²ß»®°¸×ÊÁÏ600
226132 by: aixsohvbaq9

Darwin Streaming Server and PHP
226133 by: Graham Anderson

Re: how can I CALL a PHP script from different TEXT LINKS with 
differentPARAMETERS?
226134 by: xkorakidis
226135 by: xkorakidis

Re: problem in create new diretory..
226136 by: James Benson

Problem with the fwrite function (not as simple as it sounds though)
226137 by: £ukasz Hejnak
226138 by: £ukasz Hejnak

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:
php-general@lists.php.net


--
---BeginMessage---
Hello
How I can compile a php code that is stored in a database when the programm
is running?
Thanks
---End Message---
---BeginMessage---

Khorosh Irani wrote:

Hello
How I can compile a php code that is stored in a database when the programm
is running?
Thanks


eval
---End Message---
---BeginMessage---
Hello,

inside a SSL host, I use the SSLProxyEngine to connect encrypted to another 
server:

SSLProxyEngine on
ProxyPass /server2 https://server.intranet/mysite
ProxyPassReverse /server2 https://server.intranet/mysite

There lies a PHP script for file uploads. When I connect to 
https://server.intranet/mysite directly, file uploads do work just fine. 
However, when I connect through https://mysite.com/server2, the POST headers 
submitted by the file upload form are completely empty.

Using mod_rewrite instead of mod_proxy doesn't help either. I run Apache 2.0.55 
on both servers.

When using a non-SSL proxy (i.e. connecting to server.intranet with HTTP in 
stead of HTTPS), it works fine.

Is this a well-known bug or is it my mistake?

Thanks
Florian

Machen Sie aus 14 Cent spielend bis zu 100 Euro!
Die neue Gaming-Area von Arcor - über 50 Onlinespiele im Angebot.
http://www.arcor.de/rd/emf-gaming-1
---End Message---
---BeginMessage---

Alex Alfonso wrote:

Can you please tell me how to make a space in php. I know that br
is a new line and p is a new paragraph. But I just can't figure
out what an earth a space is. Eg
?php
echo Television viewers who turned to; 
echo I need a space here;

echo $_POST['word1'];
?
Can you please tell me what a space is.


A space is just a space. PHP isn't special in this regard.

How did you get that space between Television and viewers? :-)

By the way, you need to at least use htmlentities() whenever you output 
variables like that. As it is, your code demonstrates a cross-site 
scripting (XSS) vulnerability.


Hope that helps.

Chris

--
Chris Shiflett
Brain Bulb, The PHP Consultancy
http://brainbulb.com/
---End Message---
---BeginMessage---
On Sat, 2005-11-19 at 03:55, Raz wrote:
 Jeez!  You'd hate to work on a project with me then! All those cycles
 I'd waste! Har har ;)

I don't think it really matters these days anyways :) I imagine the
compile caches optimize strings... but I could be wrong.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'
---End Message---
---BeginMessage---
Try this:


?php
echo Television viewers who turned to  . $_POST['word1'];
?


--
Anas Mughal




On 11/19/05, Alex Alfonso [EMAIL PROTECTED] wrote:

 Can you please tell me how to make a space in php. I know that br is a
 new line and p is a new paragraph. But I just can't figure out what an
 earth a space is. Eg
 ?php
 echo Television viewers who turned to;
 echo I need a space here;
 echo $_POST['word1'];
 ?
 Can you please tell me what a space is.

 Alex Alfonso
 [EMAIL PROTECTED]




--
Anas Mughal
---End Message---
---BeginMessage---

I totally missed that explanation on w3c.

Thanxs, now it works

/Erik

Rob wrote:

Erik Franzén wrote:


I did a typo in the threads post.

The dtd is:

!ELEMENT Document ANY
!ELEMENT CMAES_Model_DbSection ANY
!ATTLIST CMAES_Model_DbSection S_iSectionId ID #IMPLIED

but it gives the warning 

[PHP] echo

2005-11-19 Thread Alex Alfonso
Can you please tell me how to make a space in php. I know that br is a
new line and p is a new paragraph. But I just can't figure out what an
earth a space is. Eg
?php
echo Television viewers who turned to; 
echo I need a space here;
echo $_POST['word1'];
?
Can you please tell me what a space is.
 
Alex Alfonso
[EMAIL PROTECTED]


Re: [PHP] echo

2005-11-19 Thread Raz
Try nbsp;

On 19/11/05, Alex Alfonso [EMAIL PROTECTED] wrote:
 Can you please tell me how to make a space in php. I know that br is a
 new line and p is a new paragraph. But I just can't figure out what an
 earth a space is. Eg
 ?php
 echo Television viewers who turned to;
 echo I need a space here;
 echo $_POST['word1'];
 ?
 Can you please tell me what a space is.

 Alex Alfonso
 [EMAIL PROTECTED]



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



Re: [PHP] echo

2005-11-19 Thread Raz
Or  

On 19/11/05, Raz [EMAIL PROTECTED] wrote:
 Try nbsp;

 On 19/11/05, Alex Alfonso [EMAIL PROTECTED] wrote:
  Can you please tell me how to make a space in php. I know that br is a
  new line and p is a new paragraph. But I just can't figure out what an
  earth a space is. Eg
  ?php
  echo Television viewers who turned to;
  echo I need a space here;
  echo $_POST['word1'];
  ?
  Can you please tell me what a space is.
 
  Alex Alfonso
  [EMAIL PROTECTED]
 
 


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



Re: [PHP] echo

2005-11-19 Thread Robert Cummings
On Sat, 2005-11-19 at 03:35, Raz wrote:
 Or  

Oh no, don't interpolate your space... that's just plain wasteful of
cycles.

*lol*

Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] echo

2005-11-19 Thread Raz
Jeez!  You'd hate to work on a project with me then! All those cycles
I'd waste! Har har ;)

On 19/11/05, Robert Cummings [EMAIL PROTECTED] wrote:
 On Sat, 2005-11-19 at 03:35, Raz wrote:
  Or  

 Oh no, don't interpolate your space... that's just plain wasteful of
 cycles.

 *lol*

 Rob.
 --
 ..
 | InterJinn Application Framework - http://www.interjinn.com |
 ::
 | An application and templating framework for PHP. Boasting  |
 | a powerful, scalable system for accessing system services  |
 | such as forms, properties, sessions, and caches. InterJinn |
 | also provides an extremely flexible architecture for   |
 | creating re-usable components quickly and easily.  |
 `'



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



[PHP] Re: DomDocument::GetElementById - a workaround with external DTD

2005-11-19 Thread Erik Franzén

I did a typo in the threads post.

The dtd is:

!ELEMENT Document ANY
!ELEMENT CMAES_Model_DbSection ANY
!ATTLIST CMAES_Model_DbSection S_iSectionId ID #IMPLIED

but it gives the warning when DomDocument::validate() is called:

Warning:  Syntax of value for attribute S_iSectionId of 
CMAES_Model_DbSection is not valid in script on line 23


However getElementById is working...

/Erik

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



[PHP] Re: DomDocument::GetElementById - a workaround with external DTD

2005-11-19 Thread Rob

Erik Franzén wrote:

I did a typo in the threads post.

The dtd is:

!ELEMENT Document ANY
!ELEMENT CMAES_Model_DbSection ANY
!ATTLIST CMAES_Model_DbSection S_iSectionId ID #IMPLIED

but it gives the warning when DomDocument::validate() is called:

Warning:  Syntax of value for attribute S_iSectionId of 
CMAES_Model_DbSection is not valid in script on line 23


See the validity constraints for an ID in the XML specs: 
http://www.w3.org/TR/2004/REC-xml-20040204/#id


Values of IDs must conform to the following syntax to be valid:
(Letter | '_' | ':') (NameChar)*

Yours start with a numeric which is why it doesn't validate.

Rob

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



[PHP] Compile a stored code with php

2005-11-19 Thread Khorosh Irani
Hello
How I can compile a php code that is stored in a database when the programm
is running?
Thanks


[PHP] POST headers empty when using SSLProxyEngine

2005-11-19 Thread floeff
Hello,

inside a SSL host, I use the SSLProxyEngine to connect encrypted to another 
server:

SSLProxyEngine on
ProxyPass /server2 https://server.intranet/mysite
ProxyPassReverse /server2 https://server.intranet/mysite

There lies a PHP script for file uploads. When I connect to 
https://server.intranet/mysite directly, file uploads do work just fine. 
However, when I connect through https://mysite.com/server2, the POST headers 
submitted by the file upload form are completely empty.

Using mod_rewrite instead of mod_proxy doesn't help either. I run Apache 2.0.55 
on both servers.

When using a non-SSL proxy (i.e. connecting to server.intranet with HTTP in 
stead of HTTPS), it works fine.

Is this a well-known bug or is it my mistake?

Thanks
Florian

Machen Sie aus 14 Cent spielend bis zu 100 Euro!
Die neue Gaming-Area von Arcor - über 50 Onlinespiele im Angebot.
http://www.arcor.de/rd/emf-gaming-1

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



Re: [PHP] echo

2005-11-19 Thread Chris Shiflett

Alex Alfonso wrote:

Can you please tell me how to make a space in php. I know that br
is a new line and p is a new paragraph. But I just can't figure
out what an earth a space is. Eg
?php
echo Television viewers who turned to; 
echo I need a space here;

echo $_POST['word1'];
?
Can you please tell me what a space is.


A space is just a space. PHP isn't special in this regard.

How did you get that space between Television and viewers? :-)

By the way, you need to at least use htmlentities() whenever you output 
variables like that. As it is, your code demonstrates a cross-site 
scripting (XSS) vulnerability.


Hope that helps.

Chris

--
Chris Shiflett
Brain Bulb, The PHP Consultancy
http://brainbulb.com/

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



[PHP] Re: Compile a stored code with php

2005-11-19 Thread Roman Ivanov

Khorosh Irani wrote:

Hello
How I can compile a php code that is stored in a database when the programm
is running?
Thanks


eval

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



Re: [PHP] echo

2005-11-19 Thread Robert Cummings
On Sat, 2005-11-19 at 03:55, Raz wrote:
 Jeez!  You'd hate to work on a project with me then! All those cycles
 I'd waste! Har har ;)

I don't think it really matters these days anyways :) I imagine the
compile caches optimize strings... but I could be wrong.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] echo

2005-11-19 Thread Anas Mughal
Try this:


?php
echo Television viewers who turned to  . $_POST['word1'];
?


--
Anas Mughal




On 11/19/05, Alex Alfonso [EMAIL PROTECTED] wrote:

 Can you please tell me how to make a space in php. I know that br is a
 new line and p is a new paragraph. But I just can't figure out what an
 earth a space is. Eg
 ?php
 echo Television viewers who turned to;
 echo I need a space here;
 echo $_POST['word1'];
 ?
 Can you please tell me what a space is.

 Alex Alfonso
 [EMAIL PROTECTED]




--
Anas Mughal


[PHP] Re: DomDocument::GetElementById - a workaround with external DTD

2005-11-19 Thread Erik Franzén

I totally missed that explanation on w3c.

Thanxs, now it works

/Erik

Rob wrote:

Erik Franzén wrote:


I did a typo in the threads post.

The dtd is:

!ELEMENT Document ANY
!ELEMENT CMAES_Model_DbSection ANY
!ATTLIST CMAES_Model_DbSection S_iSectionId ID #IMPLIED

but it gives the warning when DomDocument::validate() is called:

Warning:  Syntax of value for attribute S_iSectionId of 
CMAES_Model_DbSection is not valid in script on line 23



See the validity constraints for an ID in the XML specs: 
http://www.w3.org/TR/2004/REC-xml-20040204/#id


Values of IDs must conform to the following syntax to be valid:
(Letter | '_' | ':') (NameChar)*

Yours start with a numeric which is why it doesn't validate.

Rob



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



[PHP] Darwin Streaming Server and PHP

2005-11-19 Thread Graham Anderson

Has anyone used PHP to communicate with Darwin Streaming server ?

if so, how can you get the number of connected users and other   
related info.

Does not seem to be a lot of info on this out there

anyone been down this road ?
g

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



Re: AW: [PHP] how can I CALL a PHP script from different TEXT LINKS with differentPARAMETERS?

2005-11-19 Thread xkorakidis
Webmaster, thanks very much but I think it would be safer to do that by
post, not by get. Furthermore, if I use indivudual files
(searchProductInsertId.php, searchMemberInsertId.php...), I think it
is easy: in each link of the menu I can type:
a href=searchProductInsertId.phpSearch/a,
a href=searchMemberInsertId.phpSearch/a etc.
But, due to the fact that the html part of each SearchInsertId page
doesn't have  many differences between various search pages (in first
case will show a message type a productId to find and will be
connected with searchProduct.php, in second case will show a message
type a memberId to find and will be connected with searchMember.php,
and so on), I thought to make a searchSomethingWithId page, where the
text and post php page will differentiate dependetly on what user had
clicked on menu. So I think that the problem I have, is what exactly
should be writen on each Search, Add of menu so as to help the
searchSomethingWithId page to understand what search or add was
clicked, and secondly, what should be written on searchSomethingWithId
page so as to call the appropriate search or add php page.
I have some code about sessions and global values, I would preffer a
solution involving global values if it is safe. I used in past forms and
buttons to send information to php page but now I would like to use text
links instead of buttons.

I hope I helped you to understand and give me some help :)
Thaks a lot!
Korakidis Christos

Webmaster wrote:
 Hi,
 i hope I got you right.
 
 You can send data to the next php file by HTTP-GET.
 Simply add a ? behind the link and then variablename=value.
 Example   ./jumpto.php?to=searchProduct
 
 In the jumpto.php you would ask the Global Array for Get Variables for the
 entry and then decide what to do.
 
 Example:
 
 sf($_GET[to] == searchProduct){
   header(Location: ./searchProduct.php);
 }
 
 Or if you have a lot of locations to jump to you could do that by case.
 
 switch($_GET[to]){
   case seachProduct:
   header(Location: ./searchProduct.php);
   break;
   case seachMember:
   header(Location: ./searchMember.php);
   break;
 }
 
 I hope that helped.
 
 Greetings
 Mirco Blitz

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



Re: [PHP] how can I CALL a PHP script from different TEXT LINKS with differentPARAMETERS?

2005-11-19 Thread xkorakidis
Ahmed thanks for your comments,
the situation is that before calling searchMember.php or
searchProduct.php or other, I need to give to user an interface where
a message like insert the Product/Member/Order Id, then when he
inserts and presses find the appropriate searchSomething.php page is
called, depending on what whe had selected to search for.
Of course I can make 3 individual pages (SearchProductIsertId.php,
SearchMemberInsertId.php, SearchOrderInsertId.php), where each page
will call another page (e.g SearchOrderInsertId.php -
SearchOrder.php). This seems easier but if a change is needed in
SearchSomethingInsertId.php, I'll have to change all the 3 previous
pages. Thus I thougt it would be better to make only one page for all
searches.
What is the common choice of experienced php devs in case of creating an
administrative interface for various tables (e.g. products, members,
orders etc)?

Thanks,
Christos Korakidis

ahmed wrote:
 On 11/19/05, Webmaster [EMAIL PROTECTED] wrote:
You can send data to the next php file by HTTP-GET.
Simply add a ? behind the link and then variablename=value.
Example   ./jumpto.php?to=searchProduct
 
 Well i think it was about the code inside the search/add/edit pages
 not how to reach them.
 If i understood correctly, you're trying to reduce the amount of code
 to write by applying a pice of common code on your objects
 (product/member/order) while adding specific functionality using a
 switche specifed as a paramter (?object=Product/Member/Order)... It
 just all depends on how common are these operations that needed to
 be applied in each case.. so you knows that better
 
 -ahmed
 
 
 --
 bahmed/b

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



[PHP] Re: problem in create new diretory..

2005-11-19 Thread James Benson

try 0777 instead of 777


http://php.net/chmod





ganu ullu wrote:

Hello all,
I have created a new dir, with php code .. which is like that

function mkDirE($dir,$dirmode=777)
{
if (!empty($dir))
{
if (!file_exists(./microsite/.$dir))
{
preg_match_all('/([^\/]*)\/?/i', $dir,$atmp);
$base=;
foreach ($atmp[0] as $key=$val)
{
$base=$base.$val;
if(!file_exists(./microsite/.$base)){
 if (!mkdir(./microsite/.$base,777))
{
echo Error: Cannot create .$base;
return 2;
}
//echo Inside mk;
touch(./microsite/.$base./index.php);
$source = ./microsite/index.php;
$destination = ./microsite/.$base./index.php;
$copy_file = copy($source,$destination);
}
}
}
else
if (!is_dir($dir))
{
//echo Error: .$dir. exists;
return Error: .$dir. already exists;
}
}
return 0;
}
-
this will create a new folder in my root folder,
Locally every thing is working fine
but when I upload the files then in my live server dir is creating
but with the permission 410 drx--t

can any body help me ... wt is the problem 

thnx...



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



[PHP] Problem with the fwrite function (not as simple as it sounds though)

2005-11-19 Thread Łukasz Hejnak


Hello,
First of all sorry for my english, trying my best :]

The story is: I'm running a small webserver and to monitor the amount of 
people going trough my pages, I've made a simple counter (storing the 
data in a text file), no matter the details, the important thing is that 
it WORKED just the way I wanted it to. Till yesterday evening.
Today I noticed that all of the counters, that were modyfied since 
yesterday, have been blanked. I started looking trough the logs and 
found a large amount of

 PHP Warning:  fread(): Length parameter must be greater than 0.
which was the expected behaviour when reading an empty file.
After a while of checking, I got to the fact that something's wrong with 
the fwrite() function.

I've writen a 'test' script only to see if I can write files.
When writing to the /tmp dir, all went fine, but when I tried to write 
to any of the other directories within my $WWWroot the result was an 
empty file.

This is the script:

$data=some data;
$file=/wwwroot/file
$handle=fopen($file,w);
fwrite($handle,$data);
fflush($handle);
fclose($handle);

And as written above, the output was only an empty  file /wwwroot/file 
nothing more.
I thought about premissions, but after setting the wwwroot a+rwx, 
setting the owner and group as the same as the apache server works under 
I got the idea that's not it.

I reinstalled the apache and php.
Now I'm using httpd-2.1.9 and php-4.4.0 (as a module) but the problem is 
still there, before I was using httpd-2.1.8, but as I said, the problem 
appeared out of nowhere, when the server was just running on it's own, 
without upgrades, patches, config changes, or anything other.
In fact all it was doing trough the night was serving the websites and 
receiving mail.


I runned out of ideas. The logs don't show anything related to this. I 
tried to enable all debug logging, but despite the fact that I'm 
receiving now 3 times more info on everything else, there's nothing on 
the fwrite() attempt or related.


Can anybody help?
If any more data is required on my side, I will gladly cooperate to get 
the thing solved.


--
Best wishes
Łukasz Hejnak

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



Re: [PHP] Problem with the fwrite function (not as simple as it sounds though)

2005-11-19 Thread Łukasz Hejnak

Hello again, some extra info on my case:
the fwrite is completely fine, when fopen is in 'a' mode!
Thus leading to a temporary workaround like this:

$file = /wwwroot/file
$countt = explode(., fread(fopen($file,r), filesize($file)));
$count=$countt[1];
$count++;
$handle=fopen($file,a);
ftruncate($handle, 1);
fwrite($handle,$file);
fclose($handle);

Now having a file with content in the form:
.15
makes it possible to use the above as a workaround..
but still I need to find out what's the problem here. The counter isn't 
exactly the only thing I use fwrite for..


The clue I got is, non-empty files are ok to be written in (appended), 
empty on the other hand, are totaly uncool for that.

So using a ftruncate($handle,0); is just as I'd use fopen($file,w);
(gives the same result).

--
Best wishes
Still hoping for Your help
Łukasz Hejnak

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



[PHP] Re: echo

2005-11-19 Thread Oliver Grätz
Alex Alfonso schrieb:
 echo I need a space here;

echo space;

*g*

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



Re: [PHP] Re: Server Client Architecture, best parctice

2005-11-19 Thread Philip Hallstrom
Reading this, a question arose me: is it possible to read a shared memory 
area with php, supposing than both programs are in the same machine? does php 
support ipc? that would be greatly useful.



yes.

http://us3.php.net/manual/en/ref.sem.php




Mariano.



James Benson wrote:

Each has its own benefits, if on a shared server then a database would be 
the most secure I think, if its a dedicated server then tmpfs or just plain 
old files will probably be the best, it also depends on various other 
factors like, server hardware and bandwith, only you can select the best 
option for your particular setup.



James





Yaswanth Narvaneni wrote:


Hi!

I would like to know what does the community think of the best
architecture for server client communication and why? That is, if
there is a server in C++ (say a game server) and the PHP has to 'read'
data 'from' the server then what is the best form of communication?

a) Shared Memory : Server opens the shared memory in write and the PHP
scripts open it in read and gets the data
b) TMPFS (just like shared memory): Server opens a file in tmpfs in
write and PHP in read
c) Databases: Server Updates a table in the DB and client reads from the 
table

d) Files: Same as TMPFS

Regards,
Yaswanth

--
In theory there is no difference between theory and practice.
In practice there is. -- Fortune Cookie







--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.3/173 - Release Date: 16/11/2005

--
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: AW: [PHP] how can I CALL a PHP script from different TEXT LINKS with differentPARAMETERS?

2005-11-19 Thread Jasper Bryant-Greene

xkorakidis wrote:

Webmaster, thanks very much but I think it would be safer to do that by
post, not by get. Furthermore, if I use indivudual files


It is a fallacy to ever tell someone that POST is safer than GET. They 
both transmit data in plaintext and it should not be assumed that either 
is inherently safer than the other, as this simply gives others a false 
sense of security.


The difference between POST and GET lies in the semantics -- POST 
represents something changing on the server, e.g. updating a database 
field, and allows the browser to warn the user if they try to refresh. 
GET represents nothing of importance changing on the server, e.g. 
performing a search on the database, and can safely be repeated.


SSL/TLS is the best option if you wish to transmit sensitive data.

--
Jasper Bryant-Greene
General Manager
Album Limited

+64 21 708 334
[EMAIL PROTECTED]

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



AW: AW: [PHP] how can I CALL a PHP script from different TEXT LINKSwith differentPARAMETERS?

2005-11-19 Thread Mirco Blitz
HI,

I totaly agree to Jaspers answer.

That’s why I use ONE jumpto script and GET.

I usually encrypt the given Values I give over to the script and decrypt
them on recive. That way nearly nobody can assume wich values are really
given to the script.

If you want to make it rocket safe, generate a random string that you place
in a session variable for crypting and decrypting. By that way the value is
different on every startup and you can be ure that you have made it when
decrypting. If someone try's to use xsripting and try's to fool your script,
latest the case structure yould not work, cause no plausible data is
recived.

But who would like to xscript on a jump page, it can't harm really. 

Greetings
Mirco

-Ursprüngliche Nachricht-
Von: Jasper Bryant-Greene [mailto:[EMAIL PROTECTED] 
Gesendet: Sonntag, 20. November 2005 04:12
An: xkorakidis
Cc: php-general@lists.php.net
Betreff: Re: AW: [PHP] how can I CALL a PHP script from different TEXT
LINKSwith differentPARAMETERS?

xkorakidis wrote:
 Webmaster, thanks very much but I think it would be safer to do that by
 post, not by get. Furthermore, if I use indivudual files

It is a fallacy to ever tell someone that POST is safer than GET. They 
both transmit data in plaintext and it should not be assumed that either 
is inherently safer than the other, as this simply gives others a false 
sense of security.

The difference between POST and GET lies in the semantics -- POST 
represents something changing on the server, e.g. updating a database 
field, and allows the browser to warn the user if they try to refresh. 
GET represents nothing of importance changing on the server, e.g. 
performing a search on the database, and can safely be repeated.

SSL/TLS is the best option if you wish to transmit sensitive data.

-- 
Jasper Bryant-Greene
General Manager
Album Limited

+64 21 708 334
[EMAIL PROTECTED]

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

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



AW: [PHP] how can I CALL a PHP script from different TEXT LINKS withdifferentPARAMETERS?

2005-11-19 Thread Mirco Blitz
HI,

If I may say something to all you have posted.

You are thinking to complex. Try to use as less files and solve most by
making yourself functions or classes that do your work.

I My experience, getting a step back in complexity and develp really thought
over functions will easy work work further and further.

Probably my last post will give you some Idea what I mean.

Greetings 
Mirco (aka Webmaster)

-Ursprüngliche Nachricht-
Von: xkorakidis [mailto:[EMAIL PROTECTED] 
Gesendet: Samstag, 19. November 2005 20:28
An: php-general@lists.php.net
Betreff: Re: [PHP] how can I CALL a PHP script from different TEXT LINKS
withdifferentPARAMETERS?

Ahmed thanks for your comments,
the situation is that before calling searchMember.php or
searchProduct.php or other, I need to give to user an interface where
a message like insert the Product/Member/Order Id, then when he
inserts and presses find the appropriate searchSomething.php page is
called, depending on what whe had selected to search for.
Of course I can make 3 individual pages (SearchProductIsertId.php,
SearchMemberInsertId.php, SearchOrderInsertId.php), where each page
will call another page (e.g SearchOrderInsertId.php -
SearchOrder.php). This seems easier but if a change is needed in
SearchSomethingInsertId.php, I'll have to change all the 3 previous
pages. Thus I thougt it would be better to make only one page for all
searches.
What is the common choice of experienced php devs in case of creating an
administrative interface for various tables (e.g. products, members,
orders etc)?

Thanks,
Christos Korakidis

ahmed wrote:
 On 11/19/05, Webmaster [EMAIL PROTECTED] wrote:
You can send data to the next php file by HTTP-GET.
Simply add a ? behind the link and then variablename=value.
Example   ./jumpto.php?to=searchProduct
 
 Well i think it was about the code inside the search/add/edit pages
 not how to reach them.
 If i understood correctly, you're trying to reduce the amount of code
 to write by applying a pice of common code on your objects
 (product/member/order) while adding specific functionality using a
 switche specifed as a paramter (?object=Product/Member/Order)... It
 just all depends on how common are these operations that needed to
 be applied in each case.. so you knows that better
 
 -ahmed
 
 
 --
 bahmed/b

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



AW: [PHP] POST headers empty when using SSLProxyEngine

2005-11-19 Thread Mirco Blitz
Hi, 

I had a simmalar problem myself and didn't find a solutions.
As far as I fond out the ssl_proxy module simply does not route POST. It
just routes the link, wich means GET should work.

My solutions would be that I bypass the proxy for file transfer.

I you find another solutions I would be glad to know how.
 
Greetings
Mirco 

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Gesendet: Samstag, 19. November 2005 14:14
An: php-general@lists.php.net
Betreff: [PHP] POST headers empty when using SSLProxyEngine

Hello,

inside a SSL host, I use the SSLProxyEngine to connect encrypted to another
server:

SSLProxyEngine on
ProxyPass /server2 https://server.intranet/mysite
ProxyPassReverse /server2 https://server.intranet/mysite

There lies a PHP script for file uploads. When I connect to
https://server.intranet/mysite directly, file uploads do work just fine.
However, when I connect through https://mysite.com/server2, the POST headers
submitted by the file upload form are completely empty.

Using mod_rewrite instead of mod_proxy doesn't help either. I run Apache
2.0.55 on both servers.

When using a non-SSL proxy (i.e. connecting to server.intranet with HTTP in
stead of HTTPS), it works fine.

Is this a well-known bug or is it my mistake?

Thanks
Florian

Machen Sie aus 14 Cent spielend bis zu 100 Euro!
Die neue Gaming-Area von Arcor - über 50 Onlinespiele im Angebot.
http://www.arcor.de/rd/emf-gaming-1

-- 
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: AW: AW: [PHP] how can I CALL a PHP script from different TEXT LINKSwith differentPARAMETERS?

2005-11-19 Thread xkorakidis
Thanks so much Mirco, but I would appritiate that very much if I had
some examples. I'm not so keen in php, so some things seem to be complex
for me. I downloaded OSCommerce but the script pages aren't so simple
for beginning...
So if you have something (code/url of examples) about this type of
encryption-decryption and that type of programming you describe in next
msg (classes, functions etc) plz send me. The only way I work until now
is to call a php script page wich does an individual work. Guess that is
the jumpto script?
Thanks!

Mirco Blitz wrote:
 HI,
 
 I totaly agree to Jaspers answer.
 
 That’s why I use ONE jumpto script and GET.
 
 I usually encrypt the given Values I give over to the script and decrypt
 them on recive. That way nearly nobody can assume wich values are really
 given to the script.
 
 If you want to make it rocket safe, generate a random string that you place
 in a session variable for crypting and decrypting. By that way the value is
 different on every startup and you can be ure that you have made it when
 decrypting. If someone try's to use xsripting and try's to fool your script,
 latest the case structure yould not work, cause no plausible data is
 recived.
 
 But who would like to xscript on a jump page, it can't harm really. 
 
 Greetings
 Mirco
 
 -Ursprüngliche Nachricht-
 Von: Jasper Bryant-Greene [mailto:[EMAIL PROTECTED] 
 Gesendet: Sonntag, 20. November 2005 04:12
 An: xkorakidis
 Cc: php-general@lists.php.net
 Betreff: Re: AW: [PHP] how can I CALL a PHP script from different TEXT
 LINKSwith differentPARAMETERS?
 
 xkorakidis wrote:
Webmaster, thanks very much but I think it would be safer to do that by
post, not by get. Furthermore, if I use indivudual files
 
 It is a fallacy to ever tell someone that POST is safer than GET. They 
 both transmit data in plaintext and it should not be assumed that either 
 is inherently safer than the other, as this simply gives others a false 
 sense of security.
 
 The difference between POST and GET lies in the semantics -- POST 
 represents something changing on the server, e.g. updating a database 
 field, and allows the browser to warn the user if they try to refresh. 
 GET represents nothing of importance changing on the server, e.g. 
 performing a search on the database, and can safely be repeated.
 
 SSL/TLS is the best option if you wish to transmit sensitive data.
 

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



[PHP] showing in pages selecting result?

2005-11-19 Thread xkorakidis
Hi,
How can I present into pages the result of sql select? (e.g. pages of 10
records)

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