php-windows Digest 15 Jul 2003 20:15:21 -0000 Issue 1824

Topics (messages 20792 through 20800):

Re: Back button error
        20792 by: Cristian MARIN

Re: Need some help please
        20793 by: sven

Installing /enabling Pear:DB
        20794 by: Mark Clarkstone
        20795 by: Thai Thanh Ha
        20798 by: Mark Clarkstone

Re: Problem getting phpMyAdmin to work on localhost
        20796 by: Richard White

Re: Sessions
        20797 by: Robert Hawke

Newbie Q
        20799 by: Gabriel_k

sockets with telnet
        20800 by: Gareth Thomas

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]


----------------------------------------------------------------------
--- Begin Message ---
The Get method is less secure because it will encode all the vars into the
URL so after the submit your link will look like this:
http://www.mysite.com/formresponse.php?id=3&name=Gigi&firstname=alexandru

Do not submit in this way the forms containing very important data like
username, passwords, or others because it will travel as URL encoded. The
post method will negotiate with the server and send the infos into the
negotiation time. Both of the method are insecure, if you need security you
should use the SSL, but the GET method is less secure then the POST.

Anyway the difference between them is the way the data is sended to the
server, the GET method cannot submit more then 65535 characters into the URL
and you cannot submit files. There are no other differences (after my
knowledge)

Hope it helps you,


--
-------------------------------------------------
Cristian MARIN - Developer
InterAKT Online (www.interakt.ro)
Tel:         +4021 312.53.12
Tel/Fax:  +4021 312.51.91
[EMAIL PROTECTED]
"Harpreet" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Cristian,

You said by using the method in a form as  Get in place of Post it allows me
to use the back button without getting the error message:
Warning: Page has Expired The page you requested was created using
 information you submitted in a form. This page is no longer available.
As a security precaution, Internet Explorer does not automatically
resubmit your information for you.

I changed the post to a GET and it seems to work just right. Do I loose
anything by using a get in place of a POST. How r they both different.
Please help.

Thanks





"Cristian MARIN" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> This is not an error, this is a security issue:
> Your form has passed the form variable thru 'post' method and when you are
> hitting back button or reloading with a JScript the history page you see
the
> message because the IE do not re-submit automatically the form because is
a
> security leak.
>
> If you really don't want to see the message appearing you have to specify
in
> the form the "<post method='get' action='... >" and this will
automatically
> submit the form once again.
>
> --
> -------------------------------------------------
> Cristian MARIN - Developer
> InterAKT Online (www.interakt.ro)
> Tel:         +4021 312.53.12
> Tel/Fax:  +4021 312.51.91
> [EMAIL PROTECTED]
> "Harpreet" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]




--- End Message ---
--- Begin Message ---
hi dean,

i hope you know what 'news.php?area=add&action=edit' means. if not:

- the site 'news.php' is called
- the vars 'area' and 'action' are defined via 'get'-method

-> so in your script you got the values of $area and $action (or better
$HTTP_GET_VARS['area'] or $_GET['area'] if register_globals = off). in your
script news.php you just need to do something with this vars. (i.e. you
switch() on the value and call your subscripts.)

there are many concepts on how to structure the code. you can put all your
functions in a file and include it in your script. or you can use classes
and define all your methods for this class. i would start collecting all the
functions of my scripts (what should it do) and from there i would see,
what's best.

ciao SVEN

Dean Hayes wrote:
> Hey,
>
> Well i am a newbie to scripting really i have only started learning
> PHP about 5 months ago and so far i seem to be going well i have just
> completed a MySQL news board that has a load of functions what i need
> to know is the hole news board is in alot of different scripts like
> site_setup.php add_news.php delete_news.php and so on and so on what
> i want to know is what is the best way to add all of the scripts into
> one file say news.php and call it by a link like news.php?area=add or
> news.php?area=add&action=edit in all the books and tut's i have that
> was not part of them but it seems to be a big part of a good script
> can anyone help me with this problem???
>
>
> Dean "The Insane Guy" Hayes
> Mystical Web Designs
> http://www.mystical-sector.com
>
> <-- I design and i redesign but still i never designed true beauty
> like you -->
>
> _________________________________________________________________
> Hotmail is now available on Australian mobile phones. Go to
> http://ninemsn.com.au/mobilecentral/signup.asp



--- End Message ---
--- Begin Message ---
Can any one Help Me install Pear DB?

I haven't got a clue

Thanks



--- End Message ---
--- Begin Message ---
 If you're using PHP 4.3.2 on Windows and connected to the Internet, run
php/go-pear.bat in a command line window. It will guide you through the
process.

 Regards,
 Thai
 

-----Original Message-----
From: Mark Clarkstone [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 15, 2003 4:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Installing /enabling Pear:DB


Can any one Help Me install Pear DB?

I haven't got a clue

Thanks



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

--- End Message ---
--- Begin Message ---
Thanks!


"Thai Thanh Ha" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
>  If you're using PHP 4.3.2 on Windows and connected to the Internet, run
> php/go-pear.bat in a command line window. It will guide you through the
> process.
>
>  Regards,
>  Thai
>
>
> -----Original Message-----
> From: Mark Clarkstone [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 15, 2003 4:24 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Installing /enabling Pear:DB
>
>
> Can any one Help Me install Pear DB?
>
> I haven't got a clue
>
> Thanks
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message ---
"Shena Delian O'Brien" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> What's your:
>
> $cfg['PmaAbsoluteUri']
> $cfg['Servers'][$i]['host']
>
> ? Should be something like :
>
> $cfg['Servers'][$i]['host'] = 'http://localhost/phpMyAdmin';
> $cfg['Servers'][$i]['host'] = 'localhost';
>
> Post other config entries that you've changed...? What authentication
> method are you using, etc? Sounds like maybe just maybe your
> authentication isn't working...

Hi Shena,

Just in case it made a difference, I upgraded to V2.5.2 of phpMyAdmin.

My entries (ie. those I've changed) are:-

$cfg['PmaAbsoluteUri'] = 'http://127.0.0.1/phpMyAdmin-2.5.2-rc2/';
$cfg['Servers'][$i]['host']          = 'localhost';
$cfg['Servers'][$i]['controluser']   = 'root';
$cfg['Servers'][$i]['controlpass']   = '...';
$cfg['Servers'][$i]['auth_type']     = 'config';
$cfg['Servers'][$i]['user']          = 'root';
$cfg['Servers'][$i]['password']      = '...';
$cfg['Servers'][$i]['pmadb']         = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'PMA_bookmark';
$cfg['Servers'][$i]['relation']      = 'PMA_relation';
$cfg['Servers'][$i]['table_info']    = 'PMA_table_info'
$cfg['Servers'][$i]['table_coords']  = 'PMA_table_coords'
$cfg['Servers'][$i]['pdf_pages']     = 'PMA_pdf_pages';
$cfg['Servers'][$i]['column_info']   = 'PMA_column_info';
$cfg['Servers'][$i]['history']       = 'PMA_history';

http://127.0.0.1/ is configured in Apache to be development directory on C:
(ie. C:\...\...\development)

The {phpmyadmin} directory is thus
C:\...\...\development\phpmyadmin

Apache is working, PHP is working and MySQL is working.   phpMyAdmin is
working too, with the exception of this feature.

On phpMyAdmin screens, I see:-
"Error
The additional Features for working with linked Tables have been
deactivated. To find out why click here."


Any ideas on the cause of the problem?

PS:  I get the same results running phpMyAdmin in Netscape.

Thanks in advance,
Richard













--- End Message ---
--- Begin Message ---
For easier programming i'm using sessions with TRANSSID.
but actually all big open source scripts use cookies only. they don't even
create sessions

"Miha Nedok" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
>
> I'm developing web apps written in PHP for quite a long time.
> I would like to know your preferred way using sessions ( cookie or TRANS
> SID ). I'm using Cookies. I would like to hear some pro et contras. :)
>
> -Mike
>



--- End Message ---
--- Begin Message ---
How can I find out (as a string) in what dir my php script is run?

/Gabbah



--- End Message ---
--- Begin Message ---
Hi,

I am trying to create a basic telnet client using sockets to connet to a
linux box. I have written some sockets code previously with a server script
that I developed myself and that worked fine. The problem I am getting is
with Telnet (port 23) after making the socket connection successfully all I
am able to read back is garbage. What I would like to do is go through an
automated login process into the Linux box, issue some OS commands and exit.

Does anyone have any ideas as to what the problem might be? Has anyone done
this successfully.

Here is my basic test code:


$socket = socket_create (AF_INET, SOCK_STREAM, getprotobyname("TCP"));
if ($socket < 0) {
    echo "socket() failed: reason: " . socket_strerror (socket_last_error())
. "\n";
echo('failed');
} else {
    "socket() successful: \n";
}

echo "Attempting to connect to '$address' on port '$service_port'...";
$result = socket_connect ($socket, $address, $service_port);
if ($result < 0) {
    echo "connect() failed.\nReason: ($result) " . socket_strerror($result)
. "\n";
} else {
    echo "OK.\n";
}
if ([EMAIL PROTECTED]($socket,SOL_SOCKET,SO_REUSEADDR,1)) {
              echo "socket_setopt() failed: reason:
".socket_strerror(socket_last_error($sock))."\n";
              exit;
       }

$aresult = socket_bind( $socket, "192.168.0.80", 23 );

echo "Reading response:\n\n";
$out = socket_read ($socket, 2048,PHP_BINARY_READ);
    echo $out;


echo "Closing socket...";
socket_close ($socket);



--- End Message ---

Reply via email to