|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general Digest 3 May 2003 16:28:56 -0000 Issue 2035
php-general-digest-help
lists.php.net
Date: Sat May 03 2003 - 11:28:56 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php-general Digest 3 May 2003 16:28:56 -0000 Issue 2035
Topics (messages 146229 through 146282):
Re: Archive Link
146229 by: Evan Nemerson
146273 by: Justin French
146278 by: Randum Ian
Re: IDE for php
146230 by: Evan Nemerson
146250 by: Chris Hewitt
146271 by: PHP News
146272 by: PHP News
Week Number
146231 by: Matt Palermo
146233 by: Jason Wong
146235 by: John W. Holmes
146236 by: Matt Palermo
146237 by: Matt Palermo
146238 by: Matt Palermo
content management
146232 by: chris taylor
146261 by: Chris Hewitt
146262 by: dan rossi
100% dynamic php driven web pages??
146234 by: Prince
146270 by: Justin French
File chooser
146239 by: Guillaume
146240 by: Jason Wong
146241 by: Guillaume
146242 by: Guillaume
146243 by: Jason Wong
146276 by: Justin French
File Field
146244 by: Shaun
146245 by: Shaun
146248 by: Pierrick LE GALL
146274 by: Justin French
Re: Using register_globals=on with $_SESSION['var']?
146246 by: Jason Wong
146259 by: Andre Dubuc
Re: Retrieving web pages
146247 by: Ernest E Vogelsinger
146280 by: Jeff Schwartz
Re: how to exit loop early?
146249 by: Chris Hewitt
Simple (Q) how to put globals off WITHOUT touching the .ini
146251 by: Ryan A
146256 by: Jason Wong
How do I Access Multiple Select in a Form?
146252 by: Daniel R. Anderson
146253 by: Daniel R. Anderson
146254 by: MIKE YRABEDRA
146257 by: Jason Wong
Downloading a file
146255 by: Shaun
146258 by: Daniel R. Anderson
146260 by: dan rossi
FTP DIRECTORY
146263 by: Zanzamarr
remove a key from an array
146264 by: dan rossi
146265 by: Ernest E Vogelsinger
146266 by: dan rossi
146267 by: Chris Hewitt
146275 by: John W. Holmes
Re: PHP Trouble
146268 by: -Silence-
Jason - > Re: [PHP] Simple (Q) how to put globals off WITHOUT....
146269 by: Ryan A
Will $_GET throw an error? (no problem just doubt)
146277 by: Ryan A
146282 by: John W. Holmes
FTP and absolute path
146279 by: Jason Paschal
Getting computer name and/or login
146281 by: Joseph Szobody
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
- -1
Unfotunately, I don't think it would make a difference... If people aren't
willing to search the web for info, they won't be willing to search marc.
Besides, if we append anything to the footer, it should be a statement about
register globals being off...
On Friday 02 May 2003 08:09 am, Richard Baskett wrote:
> Seriously, I think it would be a good idea to include the archive address
> in the footer of this list. Every single message has a footer appended
> onto the end of it, it is really simple to do with most list servers. Some
> of us have been on this list forever and a day and of course we know where
> the archives are, but some people are new or just plain lazy and don't want
> to go search.. let's make it easy for them and us, so all we have to do is
> click on a link that would be included on each and every single message
> sent through this list.
>
> Ideas? thoughts?
>
> Rick
>
> "Work like you don't need the money. Dance like no one is watching. And
> love like you've never been hurt." - Mark Twain
>
> > From: "Ryan A" <ryan
jumac.com>
> > Date: Fri, 2 May 2003 15:12:05 +0200
> > To: <php-general
lists.php.net>
> > Subject: Re: [PHP] next page records
> >
> > Hey Jason,
> > I would if I knew where it was, can you give me the address to the
> > archives please?
> > Thanks,
> > -Ryan
> >
> >
> >
> > ----- Original Message -----
> > From: "Jason Wong" <php-general
gremlins.biz>
> > To: <php-general
lists.php.net>
> > Sent: Friday, May 02, 2003 3:09 PM
> > Subject: Re: [PHP] next page records
> >
> >> On Friday 02 May 2003 20:00, Ryan A wrote:
> >>> I have made a little front end for the "admin" to see all the records
> >>> in the database..till now everything is working fine but when the
> >>> records
> >
> > are
> >
> >>> over 20 theres a problem most probably because of the "limit" in
> >>> MySql...does anybody know how that "next page" feature works?
> >>>
> >>> eg:
> >>> if there are more than 20 records in the database there should be a
> >>> link below that says "next page" (if there are less than 20 records no
> >>> link should be shown or the link should be "disabled") and when the
> >>> client clicks on it he gets the next 20 records plus there should be a
> >
> > "previous
> >
> >>> page" link etc etc
> >>>
> >>> I have seen this on many sites (including google) and I am pretty sure
> >
> > its
> >
> >>> done with "count" in mySql but am getting lost somewhere in the
> >>> logic...
> >>>
> >>> Kindly reply with a small code example if possible or somewhere where I
> >
> > can
> >
> >>> read up on it.
> >>
> >> This kind of question gets asked every week or so. Search the php-db
> >
> > archives.
> >
> >> --
> >> 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
> >> ------------------------------------------
> >> /*
> >> As long as the answer is right, who cares if the question is wrong?
> >> */
> >>
> >>
> >> --
> >> 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
- --
God is love, Love is blind, Ray Charles is blind... Therefore, Ray Charles is
God
- -Unknown
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE+s0cE/rncFku1MdIRAlZPAKCHhBuiIZBtALXs3EvtMoD6yKL40wCeIMdK
zCQpHIEly+VVQ8HwA2PSIS8=
=+ERZ
-----END PGP SIGNATURE-----
attached mail follows:
on 03/05/03 12:27 PM, Gavin Nouwens (gnouwens
zip.com.au) wrote:
> Would certainly cut down on a lot of the repetitive, simple questions!
>
> Maybe even put it up at the top of the e-mail so people *definitely* see
> it :)
It won't (IMO) make much of an impact... and this sort of thing has been
discussed to death on this list before too (search the archives haha), but
seriously, lazy people are always going to be lazy, and the majority of
people who post obvious, repetitive, unresearched questions are more than
likely:
a) aware of the manual
b) aware that a google would help
c) aware of the archive, or would easily see it whilst searching google for
"PHP mailing list archive"
... but they're after a quick answer, so they go straight to the list.
It's sure to help in some small way, but I wouldn't expect big results.
Justin
attached mail follows:
Justin,
Although you make some very valid comments I feel I have to disagree. I
needed to find out how to display the "Page Last Modified" on a page but
couldn't remember how. Rather than send an email to the list and wait
until someone tells me the answer I fired up the MARC Email page which I
had saved in my Favourites and typed that in, seconds later I got my
answer. If I didn't know the address I would have had to go onto the PHP
website, find the link then search for it. If that was the case I would
MUCH rather have a link on an email I could just click. It would help
people to use the archives more which is what they are there for.
However I am prepared to agree to disagree as it seems some people are
prepared to answer the "Newbie" questions.
Ian.
-----Original Message-----
From: Justin French [mailto:justin
indent.com.au]
Sent: 03 May 2003 15:28
To: Gavin Nouwens; 'Miles Thompson'; 'Richard Baskett'; 'PHP General'
Subject: Re: [PHP] Archive Link
on 03/05/03 12:27 PM, Gavin Nouwens (gnouwens
zip.com.au) wrote:
> Would certainly cut down on a lot of the repetitive, simple questions!
>
> Maybe even put it up at the top of the e-mail so people *definitely*
see
> it :)
It won't (IMO) make much of an impact... and this sort of thing has been
discussed to death on this list before too (search the archives haha),
but
seriously, lazy people are always going to be lazy, and the majority of
people who post obvious, repetitive, unresearched questions are more
than
likely:
a) aware of the manual
b) aware that a google would help
c) aware of the archive, or would easily see it whilst searching google
for
"PHP mailing list archive"
... but they're after a quick answer, so they go straight to the list.
It's sure to help in some small way, but I wouldn't expect big results.
Justin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
emacs + php-mode!!! Kinda steep learning curve- keyboard shortcuts are
different than what you're used to, but once you get used to it you can't go
back. It's like mouse gestures in Opera... a little odd at first, but now
other browsers (okay, other applications too) seem so... inferior.
Plus, you can use it wherever you want- extremely portable, and odds are if
you SSH into your server you remotely too. And it's free (beer & speech).
On Friday 02 May 2003 09:18 am, Mario Soto wrote:
> Hello every one.
>
> I'm lookign for a good IDE for developing php scripts. I'm tired of the
> colors of front page and notepad. But there is a problem. I'm out of money,
> and I don't have much to buy an expensive php IDE, so I wonder if somebody
> know for a free or low cost IDE that don't stuck in the midddle of the way.
>
> For any help, I'm thanked.
>
>
> Mario Soto
> mario_s
amigo.net.gt
> -.-.-.-
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE+s0kj/rncFku1MdIRAkKxAJwJ1gUIzvSZ/OjRVrlSiWVeMwyvFgCfa+6h
dpNO/KG+nOCGrdOvCZhD+HE=
=+tJy
-----END PGP SIGNATURE-----
attached mail follows:
Mario Soto wrote:
>
>I'm lookign for a good IDE for developing php scripts. I'm tired of the colors of front page and notepad. But there is a problem. I'm out of money, and I don't have much to buy an expensive php IDE, so I wonder if somebody know for a free or low cost IDE that don't stuck in the midddle of the way.
>
You will also find several discussions on this in the archives. Looking
there may give you more options as this sort of question comes up fairly
often.
HTH
Chris
attached mail follows:
I use Maguma Studio (www.maguma.com). They have a very nice IDE to write php
scripts with all the bells and whistles (and their Light version is free!!).
Arthur Toscano
"Mario Soto" <mario_s
amigo.net.gt> wrote in message
news:000501c310c6$f11bb600$8570fea9
mario...
Hello every one.
I'm lookign for a good IDE for developing php scripts. I'm tired of the
colors of front page and notepad. But there is a problem. I'm out of money,
and I don't have much to buy an expensive php IDE, so I wonder if somebody
know for a free or low cost IDE that don't stuck in the midddle of the way.
For any help, I'm thanked.
Mario Soto
mario_s
amigo.net.gt
-.-.-.-
attached mail follows:
I use Maguma Studio (www.maguma.com). They have a very nice IDE to write php
scripts with all the bells and whistles (and their Light version is free!!).
Arthur Toscano
"Mario Soto" <mario_s
amigo.net.gt> wrote in message
news:000501c310c6$f11bb600$8570fea9
mario...
Hello every one.
I'm lookign for a good IDE for developing php scripts. I'm tired of the
colors of front page and notepad. But there is a problem. I'm out of money,
and I don't have much to buy an expensive php IDE, so I wonder if somebody
know for a free or low cost IDE that don't stuck in the midddle of the way.
For any help, I'm thanked.
Mario Soto
mario_s
amigo.net.gt
-.-.-.-
attached mail follows:
Does anyone know if there is a function where I can feed it the day,
month, and year parameters, and it will give me the week number of the
year (like week 1-52)? Please let me know. Thanks.
Matt
attached mail follows:
On Saturday 03 May 2003 13:00, Matt Palermo wrote:
> Does anyone know if there is a function where I can feed it the day,
> month, and year parameters, and it will give me the week number of the
> year (like week 1-52)? Please let me know. Thanks.
manual > Date and Time functions
--
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
------------------------------------------
/*
"Why waste negative entropy on comments, when you could use the same
entropy to create bugs instead?"
-- Steve Elias
*/
attached mail follows:
> Does anyone know if there is a function where I can feed it the day,
> month, and year parameters, and it will give me the week number of the
> year (like week 1-52)? Please let me know. Thanks.
Echo date('W',mktime(0,0,0,$month,$day,$year));
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
attached mail follows:
I looked through the manual for something like this, but I only saw it
available for the current date. I want it to work for any date, where I
send it the day, month, and year.
-----Original Message-----
From: Jason Wong [mailto:php-general
gremlins.biz]
Sent: Saturday, May 03, 2003 1:05 AM
To: php-general
lists.php.net
Subject: Re: [PHP] Week Number
On Saturday 03 May 2003 13:00, Matt Palermo wrote:
> Does anyone know if there is a function where I can feed it the day,
> month, and year parameters, and it will give me the week number of the
> year (like week 1-52)? Please let me know. Thanks.
manual > Date and Time functions
--
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
------------------------------------------
/*
"Why waste negative entropy on comments, when you could use the same
entropy to create bugs instead?"
-- Steve Elias
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
When trying to find the day of the week, I used this:
$weekday=date('l',mktime(0,0,0,$Month,$Day,$Year));
and I tested it out for 11/23/2004, and it gave me "Thursday" and it
supposed to be "Tuesday." Anyone got any idea why?
Thanks,
Matt
-----Original Message-----
From: John W. Holmes [mailto:holmes072000
charter.net]
Sent: Saturday, May 03, 2003 1:08 AM
To: 'Matt Palermo'; php-general
lists.php.net
Subject: RE: [PHP] Week Number
> Does anyone know if there is a function where I can feed it the day,
> month, and year parameters, and it will give me the week number of the
> year (like week 1-52)? Please let me know. Thanks.
Echo date('W',mktime(0,0,0,$month,$day,$year));
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Nevermind... Sorry about that. I made an error.
-----Original Message-----
From: Matt Palermo [mailto:mpalermo
vt.edu]
Sent: Saturday, May 03, 2003 1:58 AM
To: holmes072000
charter.net; php-general
lists.php.net
Subject: RE: [PHP] Week Number
When trying to find the day of the week, I used this:
$weekday=date('l',mktime(0,0,0,$Month,$Day,$Year));
and I tested it out for 11/23/2004, and it gave me "Thursday" and it
supposed to be "Tuesday." Anyone got any idea why?
Thanks,
Matt
-----Original Message-----
From: John W. Holmes [mailto:holmes072000
charter.net]
Sent: Saturday, May 03, 2003 1:08 AM
To: 'Matt Palermo'; php-general
lists.php.net
Subject: RE: [PHP] Week Number
> Does anyone know if there is a function where I can feed it the day,
> month, and year parameters, and it will give me the week number of the
> year (like week 1-52)? Please let me know. Thanks.
Echo date('W',mktime(0,0,0,$month,$day,$year));
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
--
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
attached mail follows:
hi everyone,
I'm fairly new to php and i'm looking for a good content management system
for a dedicated hosting site, just wondering if anyone knows any good coding
or scripts to do this? preferably after something with a WYSIWYG editor...
Thanks
Chris
attached mail follows:
chris taylor wrote:
>hi everyone,
>
>I'm fairly new to php and i'm looking for a good content management system
>for a dedicated hosting site, just wondering if anyone knows any good coding
>or scripts to do this? preferably after something with a WYSIWYG editor...
>
This comes up fairly frequently. You will find quite a lot of
information on this in the archives. These are at:
http://marc.theaimsgroup.com/?l=php-general
HTH
Chris
attached mail follows:
something like this ?
http://www.electroteque.org/demo/wysiwyg/
-----Original Message-----
From: Chris Hewitt [mailto:g0pae
manordat.demon.co.uk]
Sent: Saturday, May 03, 2003 10:49 PM
To: chris taylor
Cc: php-general
lists.php.net
Subject: Re: [PHP] content management
chris taylor wrote:
>hi everyone,
>
>I'm fairly new to php and i'm looking for a good content management system
>for a dedicated hosting site, just wondering if anyone knows any good
coding
>or scripts to do this? preferably after something with a WYSIWYG editor...
>
This comes up fairly frequently. You will find quite a lot of
information on this in the archives. These are at:
http://marc.theaimsgroup.com/?l=php-general
HTH
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
hi..
is it a good idea or should i say safe for me to create a php driver file that will have say 100 links on it and ever one of those links will give vars to the php source file and then the php source file processes them or whatever and then give the results to a web page (html) to possibly create up to 100 different pages out of only 3 files?
i have the 3 files:
main.php //the file with links on it
members_show.php //php file to process links from main.php
//members_show.htm //sthe page that will be used for the 100 page creation
the .html file is a template sort of thing so every page will have the same format/css on it...
or does anybody think it should be done different ?
attached mail follows:
let's say you have two files -- my_CD_list.php is a list of CD's in your
collection, for argument's sake... these could be got out of a database, or
whatever. each cd title would be a link (show_CD.php)to show more details of
that CD (track listing, catalogue number, cover scan, etc)
-- my_CD_list.php --
The Beatles - <a href="show_CD?id=1">Yellow Submarine</a><br />
Helmet - <a href="show_CD?id=2">Betty</a><br />
Nine Inch Nails - <a href="show_CD?id=3">Remixes</a><br />
--------------------
... show_CD.php could then show different content through a single template
(one HTML design, one CSS design, one layout), based on the id=X in the
URL... this id might work with images, include files, other HTML, or even
poulling stuff out of a database:
-- show_CD.php --
<?
$sql = "SELECT * FROM my_cd_collection WHERE id={$_GET['id']}";
$res = mysql_query($sql);
$row = mysql_fetch_array($res);
echo "{$myrow['title']} by {$myrow['artist']}<br />";
echo "{$myrow['catnumber']} by {$myrow['year']}<br />";
<?include("tracklisting_{$_GET['id']}.txt")?><br />
<img src="images/cover_<?=$_GET['id']?>.jpg" /><br />
?>
... so far that's only two files.... why do you need the 3rd?
Justin
on 03/05/03 4:16 PM, Prince (friendly
kaltelnet.net) wrote:
> hi..
>
> is it a good idea or should i say safe for me to create a php driver file that
> will have say 100 links on it and ever one of those links will give vars to
> the php source file and then the php source file processes them or whatever
> and then give the results to a web page (html) to possibly create up to 100
> different pages out of only 3 files?
> i have the 3 files:
> main.php //the file with links on it
> members_show.php //php file to process links from main.php
> //members_show.htm //sthe page that will be used for the 100 page creation
>
>
> the .html file is a template sort of thing so every page will have the same
> format/css on it...
>
> or does anybody think it should be done different ?
>
>
attached mail follows:
Hi,
To help user to choose a file to be sent (through FTP) to the server,
I want a filechooser on my page
<input type="file" ...> just returns a simple filename into $_FILES.
What I need is the full path to be able to retrieve and send the file.
Which technique should I use ?
Thanks for your help
Guillaume
attached mail follows:
On Saturday 03 May 2003 15:49, Guillaume wrote:
> To help user to choose a file to be sent (through FTP) to the server,
>
> I want a filechooser on my page
>
> <input type="file" ...> just returns a simple filename into $_FILES.
> What I need is the full path to be able to retrieve and send the file.
>
> Which technique should I use ?
Either you're confused or I'm confused.
PHP plays no part in client-side FTP.
PHP plays no part in choosing files for HTTP uploads.
So what is it that you wanted to do?
--
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
------------------------------------------
/*
Save the whales. Collect the whole set.
*/
attached mail follows:
I want the client to upload a file from the client's machine to the
server (using FTP protocol)
I want to help the client with a file chooser
Guillaume
attached mail follows:
I want the client to upload a file from the client's machine to the
server (using FTP protocol)
I want to help the client with a file chooser
Guillaume
attached mail follows:
On Saturday 03 May 2003 16:24, Guillaume wrote:
> I want the client to upload a file from the client's machine to the
> server (using FTP protocol)
> I want to help the client with a file chooser
I don't see how PHP can play a part. The method of choosing a file would
depend on the ftp-client that the client is using.
--
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
------------------------------------------
/*
If you analyse anything, you destroy it.
-- Arthur Miller
*/
attached mail follows:
on 03/05/03 7:24 PM, Guillaume (g.jullien
free.fr) wrote:
> I want the client to upload a file from the client's machine to the
> server (using FTP protocol)
> I want to help the client with a file chooser
You are confused. PHP/Web browser based file uploads are NOT related to
FTP.
The $_FILES array you talked about is to do with file uploads done through a
web browser, however, there is no way for you to know what path their file
came from, that's private stuff.
All you get is the file on the server in the $_FILES array. You them have
to copy it out of the temp directory, and move it to somewhere on your
websever.
For sample code on file uploads, check the PHP manual:
http://www.php.net/manual/en/features.file-upload.php
Justin
attached mail follows:
Hi,
Please could someone tell me how I can check if a file field is empty, the
following doesn't seem to work:
attached mail follows:
Hi,
Please could someone tell me how I can check if a file field is empty, the
following doesn't seem to work:
if(isset($_POST[document]) == false)
Thanks for your help
attached mail follows:
"Shaun" <shaun
mania.plus.com> writes:
> Hi,
Hi
> Please could someone tell me how I can check if a file field is empty, the
> following doesn't seem to work:
>
> if(isset($_POST[document]) == false)
OK, if you have this in your HTML code :
<input name="picture" type="file" value="" />
then you should use :
if ( !isset( $_FILES['picture'] ) )
Hope it helps
--
Pierrick LE GALL | http://www.z0rglub.com
<pierrick
z0rglub.com> | http://www.phpwebgallery.net
attached mail follows:
on 03/05/03 7:40 PM, Shaun (shaun
mania.plus.com) wrote:
> Please could someone tell me how I can check if a file field is empty, the
> following doesn't seem to work:
Your posted code did not work, or was blank.
You can perhaps:
a) check the size of the file
b) load the contents of the file into a string and check it that way
Justin
attached mail follows:
On Saturday 03 May 2003 10:20, Andre Dubuc wrote:
> I designed my site with register_globals="off" and used $_POST['var'] or
> $_SESSION['var'] throughout. However, I am thinking of switching my IP, and
> the new IP has register_globals set to 'on'.
>
> My question: what security issues should I be concerned about if I left it
> the way it is, and use $_POST['var'] or $_SESSION['var'] throughout with
> register_globals="on"?
>
> I would greatly apprciate any input, advice, or warnings about my proposed
> course of action.
By initialising variables you'll minimise the risk of malicious people
injecting variables when you have register_globals enabled.
--
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
------------------------------------------
/*
Make me look like LINDA RONSTADT again!!
*/
attached mail follows:
Thanks Jason,
When you say 'minimise the risk' - you mean it would still be possible to
inject variables using globals on and say, $_SESSION['username']? All
$_SESSION['xxxx'] are initialized and validated, and all form input/output is
done through SSL. I don't understand how that could be accomplished by a
malicious person. Could you explain a bit?
Tia,
Andre
On Saturday 03 May 2003 04:59 am, Jason Wong wrote:
> On Saturday 03 May 2003 10:20, Andre Dubuc wrote:
> > I designed my site with register_globals="off" and used $_POST['var'] or
> > $_SESSION['var'] throughout. However, I am thinking of switching my IP,
> > and the new IP has register_globals set to 'on'.
> >
> > My question: what security issues should I be concerned about if I left
> > it the way it is, and use $_POST['var'] or $_SESSION['var'] throughout
> > with register_globals="on"?
> >
> > I would greatly apprciate any input, advice, or warnings about my
> > proposed course of action.
>
> By initialising variables you'll minimise the risk of malicious people
> injecting variables when you have register_globals enabled.
>
> --
> 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
> ------------------------------------------
> /*
> Make me look like LINDA RONSTADT again!!
> */
attached mail follows:
At 23:31 02.05.2003, Mark Douglas said:
--------------------[snip]--------------------
>I'm trying to figure out a way of retrieving the contents of web pages with
>PHP. Currently I'm using the sockets example from php's site -
>http://www.php.net/manual/en/ref.sockets.php - I've modified the "one-shot
>HTTP client" so that instead of just a head request it does a get. However,
>with this method I get the headers as well as the page content. Help either
>in stripping the headers, or using a different method to load page contents
>would be greatly appreciated. Note that I don't want to just display the
>contents, I want to be able to store it in a variable, or ultimately, a BLOB
>column in a MySQL column.
--------------------[snip]--------------------
You may simply fopen() any remote URL, if allow_url_fopen is enabled on
your server (see http://www.php.net/manual/en/function.fopen.php for more
information). This will you get the page contents without the headers.
You may also use cURL to retrieve a page, also via https. This gives you a
finer granularity over your request.
If you need to strip the headers look for the first occurrence of "\n\n" in
the response. Before are the headers, after that is the response content.
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
attached mail follows:
Mark -
I use cURL for that: http://www.php.net/manual/en/ref.curl.php
http://curl.haxx.se
Jeff
>I'm trying to figure out a way of retrieving the contents of web pages with
>PHP. Currently I'm using the sockets example from php's site -
>http://www.php.net/manual/en/ref.sockets.php - I've modified the "one-shot
>HTTP client" so that instead of just a head request it does a get. However,
>with this method I get the headers as well as the page content. Help either
>in stripping the headers, or using a different method to load page contents
>would be greatly appreciated. Note that I don't want to just display the
>contents, I want to be able to store it in a variable, or ultimately, a BLOB
>column in a MySQL column.
---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
attached mail follows:
Chris Boget wrote:
>>I have a few scenario's where if a condition is met I want it to go to the
>>end of a while statement, but not exit the while statement (i.e. just force
>>it to go to the next item in the while statement / loop).
>>
>
>break;
>
>Chris
>
I would suggest you consider changing the condition in the while loop to
add this in. Its cleaner coding.
HTH
Chris
attached mail follows:
Hi,
I have (hopefully) converted my script so it will work with register globals
off too, I will never know till i test it but my host has register globals
on and they wont touch the php.ini file for me...
Is there any "proper" way of putting register globals off without touching
the php.ini file?
I got this on one website:
(put a .htaccess file in the directory you are working with)
.htaccess:
php_flag register_globals Off
on another website:
put this right on top of your pages:
ini_set('register_globals','off');
Which is more effective?
Cheers,
-Ryan
attached mail follows:
On Saturday 03 May 2003 19:28, Ryan A wrote:
> I have (hopefully) converted my script so it will work with register
> globals off too, I will never know till i test it but my host has register
> globals on and they wont touch the php.ini file for me...
>
> Is there any "proper" way of putting register globals off without touching
> the php.ini file?
>
> I got this on one website:
> (put a .htaccess file in the directory you are working with)
> .htaccess:
> php_flag register_globals Off
>
> on another website:
> put this right on top of your pages:
> ini_set('register_globals','off');
>
> Which is more effective?
The former because the latter would not have the desired effect.
--
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
------------------------------------------
/*
Adopted kids are such a pain -- you have to teach them how to look like you
...
-- Gilda Radner
*/
attached mail follows:
I've got a form with a SELECT, but when I use echo POST to view the
contents all I get is the last option selected.
i.e.:
<FORM ...blah blah>
<SELECT NAME='something' SIZE=1 MULTPILE>
<OPTION VALUE='1'>option 1
<OPTION VALUE='2'>option 2
<OPTION VALUE='3'>option 3
...
<OPTION VALUE='n'>option n
<INPUT TYPE=SUBMIT VALUE='Submit!'>
</SELECT>
</FORM>
If I submitted that with options 1, 2, and n selected I would only get:
$_POST['something'] == 'n';
Any ideas?
attached mail follows:
Please excuse me for being dumb. Although googling for "FORMS PHP"
finds nothing googling for "FORMS PHP MULTIPLE" yields:
http://www.php.net/manual/en/faq.html.php#faq.html.arrays
Once again, I apologize for the stupidity. Please excuse this as a lack
of caffination. Damn those addictive alkaloids! :-)
-Dan Anderson
attached mail follows:
on 5/3/03 7:35 AM, Daniel R. Anderson at dan
mathjunkies.com wrote:
> I've got a form with a SELECT, but when I use echo POST to view the
> contents all I get is the last option selected.
For checkboxes I use
<input type="checkbox" multiple name="downloads[]" ...
<input type="checkbox" multiple name="downloads[]" ...
<input type="checkbox" multiple name="downloads[]" ...
I suppose you could do the same with select.
+--------------------------------------------+
Mike Yrabedra (President)
323 Incorporated
Home of MacDock, MacAgent and MacSurfshop
+--------------------------------------------+
W: http://www.323inc.com/
P: 770.382.1195
F: 734.448.5164
E: mike
323inc.com
I: ichatmacdock
+--------------------------------------------+
"Whatever you do, work at it with all your heart,
as working for the Lord, not for men."
~Colossians 3:23 <{{{><
+--------------------------------------------+
attached mail follows:
On Saturday 03 May 2003 19:35, Daniel R. Anderson wrote:
> I've got a form with a SELECT, but when I use echo POST to view the
> contents all I get is the last option selected.
>
> i.e.:
>
> <FORM ...blah blah>
> <SELECT NAME='something' SIZE=1 MULTPILE>
> <OPTION VALUE='1'>option 1
> <OPTION VALUE='2'>option 2
> <OPTION VALUE='3'>option 3
> ...
> <OPTION VALUE='n'>option n
>
> <INPUT TYPE=SUBMIT VALUE='Submit!'>
> </SELECT>
> </FORM>
>
> If I submitted that with options 1, 2, and n selected I would only get:
>
> $_POST['something'] == 'n';
manual > Variables > Variables from outside PHP
--
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
------------------------------------------
/*
Charity, n.:
A thing that begins at home and usually stays there.
*/
attached mail follows:
Hi,
I have the following link on my page:
<p>click <a href="/files/test.txt">here</a> to view the document</p>
When I click on this link it opens the file in the same window, how can I
make sure that the link opens a dialog box asking me if I want to download
the file?
Thanks for your help
attached mail follows:
I forget the exact specifications off my head, but you can write a PHP
script to send out a header that basically says download this file and
save as _____. Check out header() for more info (The type to just
download is octel/stream i /think/)
-Dan Anderson
On Sat, 2003-05-03 at 07:52, shaun wrote:
> Hi,
>
> I have the following link on my page:
>
> <p>click <a href="/files/test.txt">here</a> to view the document</p>
>
> When I click on this link it opens the file in the same window, how can I
> make sure that the link opens a dialog box asking me if I want to download
> the file?
>
> Thanks for your help
>
>
>
attached mail follows:
Header('Content-Type: application/octet-stream');
Header('Content-disposition: attachment; filename='.$filename);
-----Original Message-----
From: Daniel R. Anderson [mailto:dan
mathjunkies.com]
Sent: Saturday, May 03, 2003 10:17 PM
To: shaun
Cc: php-general
lists.php.net
Subject: Re: [PHP] Downloading a file
I forget the exact specifications off my head, but you can write a PHP
script to send out a header that basically says download this file and
save as _____. Check out header() for more info (The type to just
download is octel/stream i /think/)
-Dan Anderson
On Sat, 2003-05-03 at 07:52, shaun wrote:
> Hi,
>
> I have the following link on my page:
>
> <p>click <a href="/files/test.txt">here</a> to view the document</p>
>
> When I click on this link it opens the file in the same window, how can I
> make sure that the link opens a dialog box asking me if I want to download
> the file?
>
> Thanks for your help
>
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
I have this script to the connession to a site but in the options it lists also the dirs....
what could I do?
<?Php
$ftp_server = $_POST['host'];
$ftp_user_name = $_POST['nome_utente'];
$ftp_user_pass = $_POST['password'];
$conn_id = ftp_connect($ftp_server);
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
if ((!$conn_id) || (!$login_result)) {
echo "La connessione FTP è fallita!";
echo "Tentativo di connessione a $ftp_server per l'utente $ftp_user_name";
die;
} else {
echo "Connesso a $ftp_server, utente $ftp_user_name";
}
$cartella = ftp_pwd($conn_id);
if ($cartella = "/"){
echo "<br />
Sei nella cartella : Home<br /><br />";
}else{
echo "<br />
Sei nella cartella : $cartella<br />";
}
$list=ftp_nlist($conn_id, "$cartella");
$i=0;
echo "<form action=\"\" method=\"\">
<select>
";
do{
echo "<option>";
echo $list[$i], "</option>"; $i++;
}while($list[$i]);
echo "
</select>
</form>";
?>
attached mail follows:
hi guys i have a quick question , in my error handling i have given it an
option to return post vars in a session variable when i am triggering an
error to return back to the form with the error message , anyway from there
i can loop through the session variable and return back to the form the
values , anyway i would like to remove the password values out of this i was
wonderinf how i could remove these keys from the post array ?
attached mail follows:
At 16:52 03.05.2003, dan rossi said:
--------------------[snip]--------------------
>hi guys i have a quick question , in my error handling i have given it an
>option to return post vars in a session variable when i am triggering an
>error to return back to the form with the error message , anyway from there
>i can loop through the session variable and return back to the form the
>values , anyway i would like to remove the password values out of this i was
>wonderinf how i could remove these keys from the post array ?
--------------------[snip]--------------------
unset($arrayvar[$keyvar]);
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
attached mail follows:
just tried it unset($_POST['password']) didnt work :\
-----Original Message-----
From: Ernest E Vogelsinger [mailto:ernest
vogelsinger.at]
Sent: Saturday, May 03, 2003 11:56 PM
To: dan rossi
Cc: Php-General
Subject: Re: [PHP] remove a key from an array
At 16:52 03.05.2003, dan rossi said:
--------------------[snip]--------------------
>hi guys i have a quick question , in my error handling i have given it an
>option to return post vars in a session variable when i am triggering an
>error to return back to the form with the error message , anyway from there
>i can loop through the session variable and return back to the form the
>values , anyway i would like to remove the password values out of this i
was
>wonderinf how i could remove these keys from the post array ?
--------------------[snip]--------------------
unset($arrayvar[$keyvar]);
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
dan rossi wrote:
>just tried it unset($_POST['password']) didnt work :\
>
The $_POST array is a superglobal type, not a normal user defined type
of array. As far as I'm aware its read-only too, so I don't know that
you will be able to unset it.
Well, I have been known to be wrong.....
Regards
Chris
attached mail follows:
> just tried it unset($_POST['password']) didnt work :\
Did you say you put it in the session?
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
> At 16:52 03.05.2003, dan rossi said:
> --------------------[snip]--------------------
> >hi guys i have a quick question , in my error handling i have given
it an
> >option to return post vars in a session variable when i am triggering
an
> >error to return back to the form with the error message , anyway from
> there
> >i can loop through the session variable and return back to the form
the
> >values , anyway i would like to remove the password values out of
this i
> was
> >wonderinf how i could remove these keys from the post array ?
> --------------------[snip]--------------------
>
> unset($arrayvar[$keyvar]);
attached mail follows:
-----Original Message-----
From: Gabor Hojtsy [mailto:gabor
hojtsy.hu]
Sent: Saturday, 3 May 2003 10:25 PM
To: lostsilence
gmx.net
Cc: webmaster
php.net
Subject: Re: PHP Trouble
> Hi, sorry to bother you but I have recently downloaded PHP installs
> from your site. I am new to PHP but not Programming. I currently am
> running Win2kPro with IIS. I have installed the PHP executable and
> cannot seem to run any scripts. Could you please help me out. I have
> read the documentation on the site and still cannot get it working.
>
> Win2kPro
> IIS installed - The website works. I have tested it
> PHP executable installed.
Please ask support questions at php-general
lists.php.net
Goba
attached mail follows:
Hi,
I seem to be having a bit of a problem, can you give me the _exact_ text
that goes into the htaccess file please?
also will it protect the entire directory that the .htaccess file is in AND
the directories under that or will I have to put more .htaccess files there?
my directory structure is like this
--files (.htaccess goes here right?)
---inc
---admin
----admin2
Kindly reply.
Cheers,
-Ryan
----- Original Message -----
From: "Jason Wong" <php-general
gremlins.biz>
To: <php-general
lists.php.net>
Sent: Saturday, May 03, 2003 1:54 PM
Subject: Re: [PHP] Simple (Q) how to put globals off WITHOUT touching the
.ini
> On Saturday 03 May 2003 19:28, Ryan A wrote:
>
> > I have (hopefully) converted my script so it will work with register
> > globals off too, I will never know till i test it but my host has
register
> > globals on and they wont touch the php.ini file for me...
> >
> > Is there any "proper" way of putting register globals off without
touching
> > the php.ini file?
> >
> > I got this on one website:
> > (put a .htaccess file in the directory you are working with)
> > .htaccess:
> > php_flag register_globals Off
> >
> > on another website:
> > put this right on top of your pages:
> > ini_set('register_globals','off');
> >
> > Which is more effective?
>
> The former because the latter would not have the desired effect.
>
> --
> 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
> ------------------------------------------
> /*
> Adopted kids are such a pain -- you have to teach them how to look like
you
> ...
> -- Gilda Radner
> */
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
Hi,
I am converting my script to work if register globals are off...I have a
simple question
I have some variables that may or may not be sent from the server namely
$key (and)
$hash
if one is sent the other wont be...so my question is if i declare both like
so:
$key = $_GET['key'];
$hash = $_GET['hash'];
but what happens when only one is sent and not the other? will i get an
error/warning or.....?
kindly reply.
Cheers,
-Ryan
attached mail follows:
> I am converting my script to work if register globals are off...I have
a
> simple question
>
> I have some variables that may or may not be sent from the server
namely
> $key (and)
> $hash
> if one is sent the other wont be...so my question is if i declare
both
> like
> so:
> $key = $_GET['key'];
> $hash = $_GET['hash'];
> but what happens when only one is sent and not the other? will i get
an
> error/warning or.....?
You'll get a Warning about "undefined index" for the one that doesn't
exist.
---John W. Holmes...
PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/
attached mail follows:
Q: is there a function that i'm overlooking that will get me the absolute
path of the FTP base directory?
Trying to build a simple web-base FTP client for my own personal use. (I
know there are tons already out there, but I still want to make my own.
Using the ftp_pwd function, i get "/", and that's expected.
$pwd = ftp_pwd($cn); //$pwd is equal to "/" upon connection
I'd like to get the directory listing, but if I use opendir($pwd), php is
trying to open the server root directory and i get an "open_basedir
restriction in effect" error. so i tried concatenating
ini_get('open_basedir') with $pwd, but the open_basedir is set to something
like this "/data/httpd/vhosts/site.com/httpdocs:/tmp". (it's not my server,
so i can't control these settings).
and neither path in the open_basedir setting is the FTP root. i know what
the FTP root directory is, i just want to get it programmatically, and
hopefully without having to parse ini settings or whatnot, so the script
remains flexible regardless of which server it sits on.
is there a function that i'm overlooking that will get me the absolute path
of the FTP base directory?
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus
attached mail follows:
Folks,
I'm looking to get a user's computer name and/or login name. This is for an internal app, all computers would be on the local network with the server.
I'm able to get the computer name by extracting it from tracert:
exec("tracert " . $REMOTE_ADDR,$result);
preg_match("/Tracing route to (.*) /",$result[1],$name);
echo "Your computer name is: <b>" . strtolower($name[1]) . "</b>";
However this only works on Win. My linux box won't give me a computer name (using traceroute). Anyone know of a way I could do this in linux?
Secondly, and I'm not sure this is even possible, can I somehow get the login name of a user?
Joseph
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]