|
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-help_at_lists.php.net
Date: Mon Jan 13 2003 - 19:33:14 CST
php-general Digest 14 Jan 2003 01:33:14 -0000 Issue 1821
Topics (messages 131432 through 131497):
Re: Problem with Search Engine Friendly URLs under PHP & Wi ndows XP
131432 by: Ford, Mike [LSS]
Re: Need some help in "exec"-attack
131433 by: Alex Ciurea
Re: stupid question (Back Function)
131434 by: David T-G
Re: session_destroy problem
131435 by: Scott Fletcher
131447 by: Tamas Arpad
131449 by: Scott Fletcher
Re: Why T_error?
131436 by: Ford, Mike [LSS]
Re: SESSION variable to pass login ID
131437 by: Ford, Mike [LSS]
Re: Pre-built CMS - Anyone recommend one?
131438 by: Tros
131440 by: Kevin Myrick
Re: Encrypt in Javascript and Decrypt in PHP????
131439 by: Scott Fletcher
Re: Change Date
131441 by: Chris Boget
131446 by: Jan Mikes
131450 by: Tom Rogers
Re: Sessions 'funny' and Zone Alarm Pro 3
131442 by: Mike Mannakee
session storage
131443 by: Mat Harris
131445 by: 1LT John W. Holmes
Re: Windows - PHP.INI
131444 by: John Nichel
form box question
131448 by: Anthony Ritter
131452 by: Ford, Mike [LSS]
131455 by: chip.wiegand.simrad.com
131456 by: Anthony Ritter
131462 by: Chris Hewitt
Re: Permission Denied
131451 by: Stephen
131470 by: Stephen
131486 by: Anthony Ritter
imap_open failure
131453 by: Jeff Schwartz
question about 'register_globals' setting
131454 by: Don
131461 by: Chris Hewitt
131463 by: Don
131464 by: Chris Hewitt
131490 by: Rasmus Lerdorf
131491 by: Rasmus Lerdorf
Re: occasional mcrypt problems
131457 by: J Smith
[Call for Papers] Int'l PHP Conference 2003 Spring Edition, Amsterdam
131458 by: Bjrn Schotte
include_files message question
131459 by: Allen Byington
benchmarking used memory
131460 by: peio popov
question on Header(location
131465 by: Don
131466 by: Jason Wong
131476 by: Joseph W. Goff
portabily including files
131467 by: Tyler BIRD
Re: "document contained no data"
131468 by: Chris Shiflett
problems to get image informations form local harddrive using "getimagesize"
131469 by: harald.mohring.gmx.de
GD help
131471 by: RClark
Write Image to Cache
131472 by: Stephen
131479 by: Timothy Hitchens \(HiTCHO\)
Re: Does PHP's imap_utf7_en/decode compatible with Microsoft Outlook Express?
131473 by: Jesse Cablek
Small Business Suggestion ???
131474 by: Daniel Negron/KBE
Re: attachment problem
131475 by: Lars Olsson
131478 by: Timothy Hitchens \(HiTCHO\)
131483 by: Lars Olsson
131484 by: Lars Olsson
Looking for advice on a non-profit site development
131477 by: White Wolf
131487 by: Michael Sweeney
dumb time question
131480 by: Pag
131481 by: Tim Ward
Trapping PHP errors
131482 by: Pieter Claerhout
131492 by: Michael Sims
131493 by: Robert Samuel White
pass by reference
131485 by: Pupeno
131494 by: Tom Rogers
131495 by: Pupeno
Weird Errors
131488 by: Mike Bowers
Error in variable when looping
131489 by: menezesd
131496 by: Rick Emery
forms
131497 by: cj
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:
> -----Original Message-----
> From: Gerard Samuel [mailto:gsam
trini0.org]
> Sent: 11 January 2003 15:48
>
> Jonathan Chum wrote:
>
> >I'm following various tutorials online that uses the
> PATH_INFO to do this,
>
> As far as I know, this technique doesn't work under windows...
As far as I know it does, because I'm doing it! (However, I *am* using
Windows NT4 and a rather old version of PHP.)
My Windows environment is a test-bed for a Sun Solaris environment using the
same version of PHP, and scripts transfer unchanged and work flawlessly in
both environments.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford
lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
Oh, I get it Jason,
it's okay the idea of mysqldump
Now i see it's more efficient mysqldump rather than my stupid thought.
10x alot,
Alexoiul
----- Original Message -----
From: "Jason Wong" <php-general
gremlins.biz>
To: <php-general
lists.php.net>
Sent: Monday, January 13, 2003 3:27 PM
Subject: Re: [PHP] Need some help in "exec"-attack
> On Monday 13 January 2003 21:13, Alex Ciurea wrote:
> > Hi,
> >
> > I think I've solved the problem
> >
> > group owner of the dest_dir must be apache !!!
>
> NB if mysql is running whilst you're copying the files then you could end
up
> with incorrect backups.
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> Q: How many marketing people does it take to change a lightbulb?
> A: I'll have to get back to you on that.
> */
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Remon, et al --
...and then Remon Redika said...
%
% hi everyone,
Hi!
%
% It's Possible We used Php Scripting to Back the client Browser
Well, yes and no. There was just a new 'crumb' class released (see
http://www.phpclasses.org/browse.html/package/934.html
for more) which will let you track where you've been. You can then put
up a 'back' link to your last page for the user, or otherwise direct it;
although the user's browser history will actually only be going forward,
you'll get the forward and back that you need.
HTH & HAND
:-D
-- David T-G * There is too much animal courage in (play) davidtgjustpickone.org * society and not sufficient moral courage. (work) davidtgwork
justpickone.org -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD)
iD8DBQE+IsBiGb7uCXufRwARAl57AJ9ubuYVDN6P/ZHCp5Ar0vj6294NRACdEybI lzoEjy4Ihx55HLFiMAmUuII= =10eJ -----END PGP SIGNATURE-----
attached mail follows:
Let us know how it goes... The unload event had been tried also. The javascript have been running for a while but the network communication is a bit tricky, it haven't worked well.
"V " <sts
mail.xubion.hu> wrote in message
news:004701c2b90d$5de0c440$0700a8c0
sp...
> > Yes, the JavaScript code can run before the browser is closed but it
would
> > not be finish running because the browser closing had been executed.
> > Someone had tried it before and struggled with it. But that is a good
> > advice, thanks for jumping in.
> I really doubt that browsers doesn't run the code that is in unload event
of
> the page because the window is closed. That would be a very bad thing.
Isn't
> it what the unload event is for? I mean to run code when the page is
> unloaded, it doesn't matter if the window is being closed or the user is
> going to another page. I think the browser should finish all the opened
> window's unload code and only after that close the application really.
> I made a quick test for it:
> <html>
> <head>
> <script language=javascript>
> function wait(msec){
> var enter_date = new Date();
> var enter_time = enter_date.getTime();
>
> var leave_date = new Date();
> var leave_time = leave_date.getTime();
>
> while (enter_time + msec > leave_time)
> {
> leave_date = new Date();
> leave_time = leave_date.getTime();
> }
> alert('unload test');
> }
> </script>
> </head>
>
> <body onunload="wait(5000)">
> unload test
> </body>
> </html
>
> It works fine for me in ie6 and mozila 0.9.6, it shows the alert message
> after about 5 seconds.
>
> Arpi
>
>
>
attached mail follows:
On Monday 13 January 2003 15:14, Scott Fletcher wrote: > Let us know how it goes... The unload event had been tried also. The > javascript have been running for a while but the network communication is a > bit tricky, it haven't worked well. Sorry, maybe I missed or forgot the original problem. If I remember right the problem is that the session must be deleted if the visitor closes the browser. I think it can be done with the method that "ugly sex" sites use for opening ads when their window is closed. An example: <body onunload="window.open('/destroysession.php?SID=....')"> I know it's not a 100% reliable sollution, but in javascript what is that? This way you can make a request that'll destroy the session and sends javascript code that immediately closes the window. It works for me in opera but not in mozilla :(( Maybe there's another sollution, the idea is to somehow send a a request when the onunload event happens (I'm sure you already knew this Scott). I tried to search in google for how to make http request but didn't find anything really useful in a few minutes, of course that doesn't mean that it can't work at all. Good luck with it Larry! Arpi
attached mail follows:
It's no problem. We're all very interesting in finding out what can work.
Maybe I can help with one of this problem. The Gecko browser does have the option of blocking the opening of hte unrequest window which is maybe why yours doesn't work in Mozilla. Just wondeirng...
"Tamas Arpad" <sts
mail.xubion.hu> wrote in message
news:200301131759.50369.sts
mail.xubion.hu...
On Monday 13 January 2003 15:14, Scott Fletcher wrote:
> Let us know how it goes... The unload event had been tried also. The
> javascript have been running for a while but the network communication is
a
> bit tricky, it haven't worked well.
Sorry, maybe I missed or forgot the original problem. If I remember right
the
problem is that the session must be deleted if the visitor closes the
browser. I think it can be done with the method that "ugly sex" sites use
for
opening ads when their window is closed.
An example:
<body onunload="window.open('/destroysession.php?SID=....')">
I know it's not a 100% reliable sollution, but in javascript what is that?
This way you can make a request that'll destroy the session and sends
javascript code that immediately closes the window.
It works for me in opera but not in mozilla :((
Maybe there's another sollution, the idea is to somehow send a a request
when
the onunload event happens (I'm sure you already knew this Scott). I tried
to
search in google for how to make http request but didn't find anything
really
useful in a few minutes, of course that doesn't mean that it can't work at
all.
Good luck with it Larry!
Arpi
attached mail follows:
> -----Original Message-----
> From: Stephen [mailto:webmaster
melchior.us]
> Sent: 10 January 2003 21:04
>
> I, once I found out that register_globals isn't always one,
> have always done HTTP variables as like $_SESSION for session
> and $_POST for form vars through post. Why, if you have
> register_globals off does it return T_error?
Why does *what* return T-error?
If this is an error message, please cut-and-paste the exact error message, and the relevant section of code indicating which line is the one on which the error occurs.
> Should I jsut > replace my old ways with $HTTP_SESSION_VARS for sessions and > $HTTP_POST_VARS for posted form vars from now on or what?
Probably not. The $_* versions are the newer ones, and you should use them if you have a recent enough version of PHP -- but if your PHP is older than 4.1.0 (in which case: why?), you will need to use the $HTTP_*_VARS versions.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford
lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
> -----Original Message-----
> From: Nova [mailto:nova
zhisoft.com]
> Sent: 12 January 2003 20:04
>
> This statement doesnt look right to me.
>
> if(isset($_POST['userid']) && isset($_POST['pword'])){
> $_SESSION['user'] = $_POST['userid'];
> $_SESSION['password'] = $_POST['pword'];
> }
Nowt wong wi' that!
> > the if should be: > > if ((statement)&&(statement))
That's not true! The syntax of "if" is:
if (expression) statement;
and one possible expression is:
expression && expression
so this is a valid if condition:
if (expression && expression)
Now, you *may* need additional parentheses around the expressions if they contain lower-priority operators than &&, but they are not required.
Also: a statement is *not* an expression, so the if condition can never include statements!
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford
lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
I use Ovidentia ( http://www.ovidentia.org ). You can test it ( and others ) here: http://www.opensourcecms.com/index.php
Tros
"Nick Wilson" <nick
tioka.com> wrote in message
news:20030112193110.GA18443
tioka.com...
> Hi all,
>
> I'm looking for a *free*, pre-built CMS with PHP/MySQL.
>
> I've looked at ezpublish but I'm having trouble installing.
>
> Criteria:
>
> * Must have SE friendly urls (example.com/4/34/)
> * Must allow different 'sections' for articles
> * Must be easy to fix templates for the html/css
>
> Anyone make a recommendation?
>
> Many thanks...
>
> --
> Nick Wilson // www.tioka.com
>
>
>
attached mail follows:
I would recommend phpWebSite
http://phpwebsite.appstate.edu .
The newest version coming out is very promising, and uses the PEAR libraries. It is XML compliant. Better than the NUKE clones, etc.
Kevin Myrick
www.ultimatealchemy.com <- about to be phpWebSite
based.
www.techrebels.com <- phpWebSite based
--- Tros <trosalba
tiscali.fr> wrote:
> I use Ovidentia ( http://www.ovidentia.org ).
> You can test it ( and others ) here:
> http://www.opensourcecms.com/index.php
>
> Tros
>
> "Nick Wilson" <nick
tioka.com> wrote in message
> news:20030112193110.GA18443
tioka.com...
> > Hi all,
> >
> > I'm looking for a *free*, pre-built CMS with
> PHP/MySQL.
> >
> > I've looked at ezpublish but I'm having trouble
> installing.
> >
> > Criteria:
> >
> > * Must have SE friendly urls (example.com/4/34/)
> > * Must allow different 'sections' for articles
> > * Must be easy to fix templates for the html/css
> >
> > Anyone make a recommendation?
> >
> > Many thanks...
> >
> > --
> > Nick Wilson // www.tioka.com
> >
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
=====
Kevin Myrick
/etc/KevX45
http://www.ultimatealchemy.com
webmaster
ultimatealchemy.com
"Screw you guys, I'm going home."-Eric Cartman, South Park
Ultimatealchemy Dotcom!
__________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com
attached mail follows:
Yea, the hacker would guess a random number in html & javascript but the hacker have no way of putting it into php on the server-side. So, we get two different random number and a invalid match.
"Marek Kilimajer" <kilimajer
webglobe.sk> wrote in message
news:3E228A71.8020203
webglobe.sk...
> This has been solved - the extra characters are stored in session,
> otherwise attacker can repeat it too. Password can be stored on
> the server using one way has - on the client the script hashes
> twice, first to get hashed password, then together with random
> string
>
> Gerald Timothy Quimpo wrote:
>
> >On Saturday 11 January 2003 12:12 am, Scott Fletcher wrote:
> >
> >
> >>The only thing that is important to me is that the password get
> >>encrypted before transmitting across the internet.
> >>
> >>
> >
> >from other posts further in the thread it looks like you aren't
> >ready to use https. that's too bad. that would really be the
> >right solution.
> >
> >but since you must hash, one problem with hashing is, it is still
> >necessary to have the hash vary from one invocation to another.
> >otherwise, if the hash is the same every time the user logs in
> >(i.e., if all you do is take the password and run it through md5),
> >then anyone who can sniff the hash will be able to replay a login.
> >
> >unfortunately, if you want the hash to be different from one
> >invocation to the next, then the password cannot be stored
> >on the server as a one-way hash. instead, it would be either
> >plaintext or encrypted on the server. this way, when you
> >want to send the hash over the internet, instead of just hashing
> >the password, you can generate a few extra characters. append
> >(or prepend) the characters to the password. then hash the
> >whole thing.
> >
> >then, when you send the hash over, send the extra characters
> >too. on the server side, you would then take the password from
> >the database (or wherever), decrypt it (if it's encrypted), append
> >or prepend the extra characters, hash the whole thing, and
> >compare the hashes.
> >
> >tiger
> >
> >
> >
>
attached mail follows:
> How can I find time stamp for example 125 next days.
$oneDay = ( 60 * 60 * 24 ); $timeStamp = date( "U" ) + ( $oneDay * 125 );
> or 03:30 hours next?
$oneHour = ( 60 * 60 ); $timeStamp = date( "U" ) + ( $oneHour * 3.5 );
This is just one of the many different ways it can be done.
Chris
attached mail follows:
<?php
/* for getting a future or past timestamp use mktime(void) function that returns current unix timestamp in seconds
get next mins, hours, days.... */
function count_date($w,$num){ switch($w){ case "m": //minutes return ($num)*(60); break; case "h": //hours return ($num)*(60*60); break; case "d": //days return ($num)*(60*60*24); default: // current time return 0; break; } }
$MyDate = date("d. m. Y H:i:s", mktime()+count_date("d",125)); echo $MyDate;
?>
hope it'll help
.mtg.
----- Original Message -----
From: "Chris Boget" <chris
wild.net>
To: "Naqashzade, Sadeq" <ss
yazd.info>
Cc: "PHP General" <php-general
lists.php.net>
Sent: Monday, January 13, 2003 3:59 PM
Subject: Re: [PHP] Re: Change Date
> > How can I find time stamp for example 125 next days. > > $oneDay = ( 60 * 60 * 24 ); > $timeStamp = date( "U" ) + ( $oneDay * 125 ); > > > or 03:30 hours next? > > $oneHour = ( 60 * 60 ); > $timeStamp = date( "U" ) + ( $oneHour * 3.5 ); > > This is just one of the many different ways it can be done. > > Chris > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
attached mail follows:
Hi,
Sunday, January 11, 2004, 10:42:01 PM, you wrote: NS> Hi, NS> How can I find time stamp for example 125 next days. or 03:30 hours next?
NS> Regards, NS> S. Naqashzade NS> PS: Sorry for my bad english :-(
The simplest way is with strtotime() for example
$stamp = strtotime("+ 125 days");
-- regards, Tom
attached mail follows:
It does sound like you're right. Like ZA is perhaps allowing the user's request to go twice. This is akin to people who double click on links because that's what they're used to doing on windows icons. However, it seems a bit odd how it selects to do it. It seems that if it did it twice on every call, one would expect the count to go immediately to 2 rather than start at one. Or does the session only begin after that first item is clicked?
Have you tested this on several machines?
Mike
"Neil Stirton" <neil
stirton.com> wrote in message
news:HNEBLEEEOHINMGJAFOPLGECCCBAA.neil
stirton.com...
> Hi,
>
> I've started developing a shopping cart and was just testing and found
> that I get strange results when Zone Alarm's Cookie Control is set to
> anything other than "Off".
>
> If anything, I would expect the shopping cart to forget its contents
> between pages but instead I am getting weird results.
>
>
> (I have many other files/classes being called from this test.php file)
>
> test.php
> --------
> <html>
> <head>
>
> <?php
> // I include all my necessary files/functions (none of which require the
> session
> // to already be started)
>
> session_start();
> if ( !isset( $_SESSION[ 'cart' ] ) ) {
> $_SESSION[ 'cart' ] = new Cart();
> }
>
> ?>
>
> </head>
> <body>
>
>
> <?php
> $f_id = isset( $_POST[ 'f_id' ] ) ? $_POST[ 'f_id' ] : 1;
> $f_price = isset( $_POST[ 'f_price' ] ) ? $_POST[ 'f_price' ] : 0;
> $f_qty = isset( $_POST[ 'f_qty' ] ) ? $_POST[ 'f_qty' ] : 1;
> $f_desc = isset( $_POST[ 'f_desc' ] ) ? $_POST[ 'f_desc' ] : '';
>
> // Form action
> $f_act = isset( $_POST[ 'f_act' ] ) ? $_POST[ 'f_act' ] : '';
>
> if ( $f_act == 'add' ) {
> $_SESSION[ 'cart' ] -> add_item( $f_id, $f_qty, $f_desc, $f_price, '' );
> } elseif ( $f_act == 'remove' ) {
> $_SESSION[ 'cart' ] -> remove_item( $f_id );
> } elseif ( $f_act == 'update' ) {
> $_SESSION[ 'cart' ] -> update_item( $f_id, $f_qty, $f_price, false );
> } else {
> echo '<pre>';
> print_r ($_SESSION);
> echo '</pre>';
> }
>
> ?>
>
>
> <form action="<?php echo $_SERVER[ 'PHP_SELF' ]; ?>" method="post">
> <input type="hidden" name="f_price" value="10.00" />
> Product = CD
> <input type="hidden" name="f_desc" value="CD" />
> <input type="hidden" name="f_id" value="1" />
> Qty:<input type="text" name="f_qty" size="3" maxlength="4" value="1" />
> <input type="submit" name="f_act" value="add" class="button" />
> <input type="submit" name="f_act" value="remove" class="button" />
> <input type="submit" name="f_act" value="update" class="button" />
> </form>
>
>
> <?php
> echo '<pre>';
> print_r ($_SESSION);
> echo '</pre>';
>
> ?>
> </body>
> </html>
>
> --------------------------------------------------------------
>
> This script obviously calls itself (not sure if that is part of the
> problem?)
>
>
> Scenario (with ZA cookie control set to Medium)
> -----------------------------------------------
>
> Leave the quantity set to 1 and click add, the session then shows that
there
> is one item in the cart.
>
> Click add again and there are 3 items in the cart.
> Click again and there are 5 items.
>
> If I now change the quantity to say 10, there will be 16 items (the 5 that
> were
> there a minute ago plus the 10 plus what appears to be the value that
> quantity
> was previously set to i.e. 1.
>
> Thus if I then go and set the quantity to 5, it will take the previous
value
> (10)
> plus the new value (5) and add it to the cart (16), giving 31.
>
>
> Turning ZA OFF and all works as expected.
>
> Since my cart is a serious of objects/arrays, I changed the following to
try
> and track
> down the problem.
>
> Changed:
> --------
> session_start();
> if ( !isset( $_SESSION[ 'cart' ] ) ) {
> $_SESSION[ 'cart' ] = new Cart();
> }
>
> ?>
>
>
> To:
> ---
> session_start();
> if ( !isset( $_SESSION[ 'cart' ] ) ) {
> $_SESSION[ 'cart' ] = new Cart();
> $_SESSION[ 'count' ] = 0;
> }
>
> $_SESSION[ 'count' ]++;
> echo $_SESSION[ 'count' ];
> ?>
>
>
> The count variable was also going up in the same fashion as the cart items
> which makes me think that the page itself is being called several times
> before
> being displayed.
>
>
> I'm tearing my hair out here and I can't leave it as is and the cart has
to
> go into production and I can't have people buying 31 items when they
wanted
> 3 :)
>
> Anyone any suggestions at all.
>
>
> Regards,
>
> Neil Stiron
>
attached mail follows:
i am writing a shopping site for training (just out of interest).
When a user clicks "add to basket" i want to check whether an item with that id is already in my session ($ALCOHOLE["items"]), if so, redirect them the the view_cart page, if not then append it to the $ALCOHOLE["items"] array as $key => $value pairs.
I have played around with all sorts of loops and sorts all day but still cannot get it sorted. Can anyone suggest where I am going wrong or has anyone got a better method they would care to suggest?
cheers.
attached mail follows:
> i am writing a shopping site for training (just out of interest). > > When a user clicks "add to basket" i want to check whether an item with > that id is already in my session ($ALCOHOLE["items"]), if so, redirect > them the the view_cart page, if not then append it to the > $ALCOHOLE["items"] array as $key => $value pairs. > > I have played around with all sorts of loops and sorts all day but still > cannot get it sorted. Can anyone suggest where I am going wrong or has > anyone got a better method they would care to suggest?
Couldn't you use in_array() on your $ALCOHOLE array so see if your "item" is in it?
If it is, then use header() to redirect, or append the value.
What's the format of your "item" variable and maybe we can help more.
---John Holmes...
attached mail follows:
.htaccess isn't a Linux only thing...it's an Apache thing. Just put a file named .htaccess in the document root of the site you want to prepend the file too. Inside the file, put this....
php_value auto_prepend_file "/path/to/included/file.php"
Naqashzade, Sadeq wrote: > Hi, > I'm using Win2K Prof. and installed Apache 1.3.2 as my web server plus PHP > 4.0.6 as module. > I have several sie on my computer. for one of them I need to include certain > file before any thing. I know that there is auto_prepend_file in php.ini but > this will run for all of my sites :-( > Is there any way? > I know that in Linux I must be able to use .httaccess but do not know how? > and in Windows I do not know at all. > > Any one can help me? > > Tnx > Sadeq > > >
-- By-Tor.com It's all about the Rush http://www.by-tor.com
attached mail follows:
Hi, I'm testing the following form on:
MS Win98 / IE 5.5 / PHP 4.0 / Apache and it works fine.
However...when I publish the
.php file
and the
data.txt file
on the ISP's MS IIS server, I get undeclared variables and indexes when the form page loads.
The script follows.
Any help would be greatly appreciated. Thank you. Tony Ritter .....................................................................
// form.php
<html> <head> <style> body {background-color:beige; body { scrollbar-base-color: #FCF6DC; scrollbar-face-color: #E3DBB5; scrollbar-track-color: #FCF6DC; scrollbar-arrow-color: #000; scrollbar-highlight-color: #fff; scrollbar-3dlight-color: #7B6D29; scrollbar-shadow-color: #7B6D29; scrollbar-darkshadow-color: #E3DBB5; } border:5px solid black; } textarea {border:1pt solid red; background-color:white; color:black;
}
textarea p{font-size:12px;
}
table {border:1pt solid black; width:700px; font-size:10px; background-color:#E3DBB5; color:#7B6D29; }
input {border:1pt solid solid red; background-color:white; color:black;}
.submit { background-color:#800000; color:white;}
p {font-family:arial; font-size:12px; }
hr { color:#800000;
}
A:link:{text-decoration:none; color:#7B6D29;} A:visited:{text-decoration:none; color:#7B6D29;} A:hover:{text-decoration:underline; color:green} </style> </head>
<body> <? function WriteToFile ($thecomments,$thename,$theemail) { $TheFile = "data.txt"; $Open = fopen ($TheFile, "a+"); if ($Open) { fwrite ($Open, "$thecomments\t$thename\t$theemail\n"); fclose ($Open); $Worked = TRUE; } else { $Worked = FALSE; } return $Worked; } function ReadTheFile() { $TheFile="data.txt"; $Open=fopen($TheFile,"r"); if ($Open) {
print("<hr>");
print("<P><i>Some of the messages have been:</i>\n");
$Data=file($TheFile); for($n=0; $n<count($Data); $n++) { $getline=explode("\t",$Data[$n]); print("<table>");
print("<tr>"); print("<td><P>$getline[0]</P></TD>\n"); print("</tr>"); print("<tr>"); print("<TD><P>$getline[1]</P></TD>\n"); print("</tr>"); print("<tr>"); print("<TD><a href=mailto:$getline[2]><P>$getline[2]</P></a>\n"); print("</tr>"); print("</P>"); print("</table>");
} //end for loop fclose($Open);
} //end if else { print("Unable to read data.txt"); } } //end function
function createform() {
print("<form action=\"form.php\" method=post>\n"); print("<P>So...How did <b><u>you</u></b> like EagleFest 2003?:<BR> <textarea name=\"comments\" rows=3 cols=85></textarea> <br><br>\n"); print("Your name: <input type=text name=\"yourname\" size=30>\n"); print("Your e-mail: <input type=text name=\"youremail\" size=30>\n"); print("<input type=hidden name=\"beensubmitted\" value=\"TRUE\">\n"); print("<input type=submit name=\"submit\" <span class=\"submit\" value=\"click to submit\">\n"); print("</form>\n");
}
function handleform() { global $comments; global $yourname; global $youremail; $comments=stripslashes($comments); $yourname=stripslashes($yourname); $youremail=stripslashes($youremail); $callfunction=WriteToFile($comments,$yourname,$youremail); if($callfunction) {
print("<p align=\"center\"> </p>"); print("<p align=\"center\"> </p>"); print("<p align=\"center\"> </p>"); print("<p align=\"center\"> </p>"); print("<p align=\"center\"> </p>"); print("<P align=\"center\"><font size=3 color=\"#800000\"><B>Thank you for your comments about EagleFest 2003.</text></B></font></P>");
}//end if else { print("Your submission was not processed."); } //end else }
if($beensubmitted) { handleform(); } else { createform(); ReadTheFile(); } ?> </body> </html> .......................................................
attached mail follows:
> -----Original Message-----
> From: Anthony Ritter [mailto:tony
gonefishingguideservice.com]
> Sent: 13 January 2003 17:07
> I'm testing the following form on:
>
> MS Win98 / IE 5.5 / PHP 4.0 / Apache and it works fine.
>
> However...when I publish the
>
> .php file
>
> and the
>
> data.txt file
>
> on the ISP's MS IIS server, I get undeclared variables and
> indexes when the
> form page loads.
This is more than likely a disparity between the error_level settings on your local server and the ISP's server. There's a couple of things you can do about this:
(1) turn error_reporting up on your test server to E_ALL, and rewrite to eliminate all the warnings; this is technically probably the best solution, but the most work.
(2) put an error_reporting(E_ALL ^ E_NOTICE) at the start of all your scripts.
(3) persuade your ISP to turn down the default error reporting on their server -- there's really no reason to have notice-level messages turned on on a production site. (Personally, I'd say that a production site shouldn't send *any* PHP errors to the browser -- they should either be turned off completely, or sent to a logfile for you to peruse periodically.)
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford
lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
Just a suggestion - you might want to disable the ability to input html code in the messages, as a precautionary messure. I tested the script and was able to make a mess of the page after submitting.
-- Chip"Anthony Ritter" <tony
gonefishingguideservice.com> 01/13/2003 09:07 AM
To php-general
lists.php.net cc
bcc
Subject [PHP] form box question
Hi, I'm testing the following form on:
MS Win98 / IE 5.5 / PHP 4.0 / Apache and it works fine.
However...when I publish the
..php file
and the
data.txt file
on the ISP's MS IIS server, I get undeclared variables and indexes when the form page loads.
The script follows.
Any help would be greatly appreciated. Thank you. Tony Ritter ......................................................................
// form.php
<html> <head> <style> body {background-color:beige; body { scrollbar-base-color: #FCF6DC; scrollbar-face-color: #E3DBB5; scrollbar-track-color: #FCF6DC; scrollbar-arrow-color: #000; scrollbar-highlight-color: #fff; scrollbar-3dlight-color: #7B6D29; scrollbar-shadow-color: #7B6D29; scrollbar-darkshadow-color: #E3DBB5; } border:5px solid black; } textarea {border:1pt solid red; background-color:white; color:black;
}
textarea p{font-size:12px;
}
table {border:1pt solid black; width:700px; font-size:10px; background-color:#E3DBB5; color:#7B6D29; }
input {border:1pt solid solid red; background-color:white; color:black;}
..submit { background-color:#800000; color:white;}
p {font-family:arial; font-size:12px; }
hr { color:#800000;
}
A:link:{text-decoration:none; color:#7B6D29;} A:visited:{text-decoration:none; color:#7B6D29;} A:hover:{text-decoration:underline; color:green} </style> </head>
<body> <? function WriteToFile ($thecomments,$thename,$theemail) { $TheFile = "data.txt"; $Open = fopen ($TheFile, "a+"); if ($Open) { fwrite ($Open, "$thecomments\t$thename\t$theemail\n"); fclose ($Open); $Worked = TRUE; } else { $Worked = FALSE; } return $Worked; } function ReadTheFile() { $TheFile="data.txt"; $Open=fopen($TheFile,"r"); if ($Open) {
print("<hr>");
print("<P><i>Some of the messages have been:</i>\n");
$Data=file($TheFile); for($n=0; $n<count($Data); $n++) { $getline=explode("\t",$Data[$n]); print("<table>");
print("<tr>"); print("<td><P>$getline[0]</P></TD>\n"); print("</tr>"); print("<tr>"); print("<TD><P>$getline[1]</P></TD>\n"); print("</tr>"); print("<tr>"); print("<TD><a href=mailto:$getline[2]><P>$getline[2]</P></a>\n"); print("</tr>"); print("</P>"); print("</table>");
} //end for loop fclose($Open);
} //end if else { print("Unable to read data.txt"); } } //end function
function createform() {
print("<form action=\"form.php\" method=post>\n"); print("<P>So...How did <b><u>you</u></b> like EagleFest 2003?:<BR> <textarea name=\"comments\" rows=3 cols=85></textarea> <br><br>\n"); print("Your name: <input type=text name=\"yourname\" size=30>\n"); print("Your e-mail: <input type=text name=\"youremail\" size=30>\n"); print("<input type=hidden name=\"beensubmitted\" value=\"TRUE\">\n"); print("<input type=submit name=\"submit\" <span class=\"submit\" value=\"click to submit\">\n"); print("</form>\n");
}
function handleform() { global $comments; global $yourname; global $youremail; $comments=stripslashes($comments); $yourname=stripslashes($yourname); $youremail=stripslashes($youremail); $callfunction=WriteToFile($comments,$yourname,$youremail); if($callfunction) {
print("<p align=\"center\"> </p>"); print("<p align=\"center\"> </p>"); print("<p align=\"center\"> </p>"); print("<p align=\"center\"> </p>"); print("<p align=\"center\"> </p>"); print("<P align=\"center\"><font size=3 color=\"#800000\"><B>Thank you for your comments about EagleFest 2003.</text></B></font></P>");
}//end if else { print("Your submission was not processed."); } //end else }
if($beensubmitted) { handleform(); } else { createform(); ReadTheFile(); } ?> </body> </html> ........................................................
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Thanks.
Any ideas after looking at the code why I'm having difficulty publishing the file to a MS IIS server with undeclared indexes and variables if it works on Apache server?
TR
attached mail follows:
Anthony Ritter wrote:
> >Any ideas after looking at the code why I'm having difficulty publishing the >file to a MS IIS server with undeclared indexes and variables if it works on >Apache server? > It will be the error reporting level being set differently between the two servers. The IIS one sounds as though it has E_NOTICE set. I feel its good practice to initialise variables before using them (then the warnings do not occur), but otherwise set error reporting to E_ALL ~E_NOTICE (from memory as I don't have a computer with php switched on at the moment). Its detailed in the manual.
HTH Chris
attached mail follows:
My Full system settings are IIS 6.1, Windows XP Professional, etc. I'll be publishing the script later and most will have CHMOD settings. Now I guess I need to know how to fix it on my test server and then what the CHMOD settings should be...
As for Sean's email, I just did those settings and I'll have the results later today. I'm only home for lunch, need to get back to school...
----- Original Message -----
From: "Timothy Hitchens (HiTCHO)" <hitcho
php.net>
To: "'Stephen'" <webmaster
melchior.us>; <hitcho
php.net>
Cc: "'PHP List'" <php-general
lists.php.net>
Sent: Sunday, January 12, 2003 11:05 PM
Subject: RE: [PHP] Permission Denied
: Who owns the htdocs root (I know it is Windows) when you right click you
: should should see sharing/security.
:
: Do you if not what OS Ver are you using?
:
:
:
: Timothy Hitchens (HiTCHO)
: Open Platform Consulting
: e-mail: tim
hitcho.com.au
:
: > -----Original Message-----
: > From: Stephen [mailto:webmaster
melchior.us]
: > Sent: Monday, 13 January 2003 1:36 PM
: > To: hitcho
php.net
: > Cc: PHP List
: > Subject: Re: [PHP] Permission Denied
: >
: >
: > Yes, I just added it but same error:
: >
: > Warning: mkdir(c:\inetpub\wwwroot\phpiw\packs\bob)
: > [function.mkdir]: Permission denied in
: > c:\inetpub\wwwroot\phpiw\classes\class.cp.php on line 28
: >
: > Here's the part where I try and make the folder:
: >
: > function do_dir($package) {
: > umask(0);
: > if(mkdir($this->currentfolder().'packs\\bob', 0777)) {
: > return true;
: > } else {
: > echo 'There is already a package by the name of
: > '.$package.'! Delete it and try again.<br><br>';
: > return false;
: > }
: > }
: >
: > Any ideas?
: > ----- Original Message -----
: > From: "Timothy Hitchens (HiTCHO)" <hitcho
php.net>
: > To: "'Stephen'" <webmaster
melchior.us>; <php-general
lists.php.net>
: > Sent: Sunday, January 12, 2003 6:33 PM
: > Subject: RE: [PHP] Permission Denied
: >
: >
: > : Did you use the umask(0) prior to the mkdir() in your script??
: > :
: > :
: > : Timothy Hitchens (HiTCHO)
: > : Open Platform Consulting
: > : e-mail: tim
hitcho.com.au
: > :
: > : > -----Original Message-----
: > : > From: Stephen [mailto:webmaster
melchior.us]
: > : > Sent: Monday, 13 January 2003 9:09 AM
: > : > To: php-general
lists.php.net
: > : > Subject: Re: [PHP] Permission Denied
: > : >
: > : >
: > : > Ok, I got it to make a directory as a absolute path but I'm
: > : > getting a "Permission Denied" error again. I'm running IIS so
: > : > I can't CHMOD and all the permission options are checked in
: > : > the options box.
: > : >
: > : >
: > : > ----- Original Message -----
: > : > From: "Jason Wong" <php-general
gremlins.biz>
: > : > To: <php-general
lists.php.net>
: > : > Sent: Sunday, January 12, 2003 4:03 AM
: > : > Subject: Re: [PHP] Permission Denied
: > : >
: > : >
: > : > : On Sunday 12 January 2003 10:10, Stephen wrote:
: > : > : > There's already a folder named packs but my problem was
: > : > not having the /
: > : > : > before it. One more question. How can I dynamically get
: > : > the path to the
: > : > : > current folder? Like your at
: > : > http://www.bob.com/joe/index.php and you want
: > : > : > to get the
: > : > http://www.bob.com/joe/ bit and do it dynamically?
: > : > :
: > : > : print_r($_SERVER) will show you which bits you can use.
: > : > :
: > : > : --
: > : > : Jason Wong -> Gremlins Associates -> www.gremlins.biz
: > : > : Open Source Software Systems Integrators
: > : > : * Web Design & Hosting * Internet & Intranet Applications
: > : > Development *
: > : > :
: > : > : /*
: > : > : I'll show you MY telex number if you show me YOURS ...
: > : > : */
: > : > :
: > : > :
: > : > : --
: > : > : PHP General Mailing List (http://www.php.net/)
: > : > : To unsubscribe, visit: http://www.php.net/unsub.php
: > : > :
: > : > :
: > : > :
: > : >
: > : >
: > : >
: > : > --
: > : > PHP General Mailing List (http://www.php.net/)
: > : > To unsubscribe, visit: http://www.php.net/unsub.php
: > : >
: > :
: > :
: > :
: >
: >
:
:
: --
: PHP General Mailing List (http://www.php.net/)
: To unsubscribe, visit: http://www.php.net/unsub.php
:
:
:
attached mail follows:
Ok, I finally just right clicked on my wwwroot folder and went to security. I allowed control to everyone on the network (just me and my brothers) and it works. Just one last question! What should the CHMOD settings be for when it goes online?
----- Original Message -----
From: "Sean Malloy" <sean
element.net.au>
To: "Stephen" <webmaster
melchior.us>; "PHP List"
<php-general
lists.php.net>
Sent: Sunday, January 12, 2003 10:40 PM
Subject: RE: [PHP] Permission Denied
: I'm assuming you are using IIS.
:
: If your harddrive is formatted using NTFS, you are going to have to add a
: new entry to the ACL list for the directory to let the IUSR_<machinename>
: account access the directory.
:
: There are plenty of readmes/articles on managing NTFS permissions. I don't
: have time to go into the details of how to do it, only to tell you that
that
: is what you have to do.
:
: BTW; By default Windows XP (If thats what you are using) enables Simple
: Sharing/File Permisisons. To turn that off
:
: in Windows Explorer;
:
: Tools | Folder Options | View | (Scroll Right Down to bottom) Use simple
: sharing <-- untick
:
:
: -----Original Message-----
: From: Stephen [mailto:webmaster
melchior.us]
: Sent: Monday, 13 January 2003 2:36 PM
: To: hitcho
php.net
: Cc: PHP List
: Subject: Re: [PHP] Permission Denied
:
:
: Yes, I just added it but same error:
:
: Warning: mkdir(c:\inetpub\wwwroot\phpiw\packs\bob) [function.mkdir]:
: Permission denied in c:\inetpub\wwwroot\phpiw\classes\class.cp.php on line
: 28
:
: Here's the part where I try and make the folder:
:
: function do_dir($package) {
: umask(0);
: if(mkdir($this->currentfolder().'packs\\bob', 0777)) {
: return true;
: } else {
: echo 'There is already a package by the name of '.$package.'! Delete
: it and try again.<br><br>';
: return false;
: }
: }
:
: Any ideas?
: ----- Original Message -----
: From: "Timothy Hitchens (HiTCHO)" <hitcho
php.net>
: To: "'Stephen'" <webmaster
melchior.us>; <php-general
lists.php.net>
: Sent: Sunday, January 12, 2003 6:33 PM
: Subject: RE: [PHP] Permission Denied
:
:
: : Did you use the umask(0) prior to the mkdir() in your script??
: :
: :
: : Timothy Hitchens (HiTCHO)
: : Open Platform Consulting
: : e-mail: tim
hitcho.com.au
: :
: : > -----Original Message-----
: : > From: Stephen [mailto:webmaster
melchior.us]
: : > Sent: Monday, 13 January 2003 9:09 AM
: : > To: php-general
lists.php.net
: : > Subject: Re: [PHP] Permission Denied
: : >
: : >
: : > Ok, I got it to make a directory as a absolute path but I'm
: : > getting a "Permission Denied" error again. I'm running IIS so
: : > I can't CHMOD and all the permission options are checked in
: : > the options box.
: : >
: : >
: : > ----- Original Message -----
: : > From: "Jason Wong" <php-general
gremlins.biz>
: : > To: <php-general
lists.php.net>
: : > Sent: Sunday, January 12, 2003 4:03 AM
: : > Subject: Re: [PHP] Permission Denied
: : >
: : >
: : > : On Sunday 12 January 2003 10:10, Stephen wrote:
: : > : > There's already a folder named packs but my problem was
: : > not having the /
: : > : > before it. One more question. How can I dynamically get
: : > the path to the
: : > : > current folder? Like your at
: : > http://www.bob.com/joe/index.php and you want
: : > : > to get the
: : > http://www.bob.com/joe/ bit and do it dynamically?
: : > :
: : > : print_r($_SERVER) will show you which bits you can use.
: : > :
: : > : --
: : > : Jason Wong -> Gremlins Associates -> www.gremlins.biz
: : > : Open Source Software Systems Integrators
: : > : * Web Design & Hosting * Internet & Intranet Applications
: : > Development *
: : > :
: : > : /*
: : > : I'll show you MY telex number if you show me YOURS ...
: : > : */
: : > :
: : > :
: : > : --
: : > : PHP General Mailing List (http://www.php.net/)
: : > : To unsubscribe, visit: http://www.php.net/unsub.php
: : > :
: : > :
: : > :
: : >
: : >
: : >
: : > --
: : > PHP General Mailing List (http://www.php.net/)
: : > To unsubscribe, visit: http://www.php.net/unsub.php
: : >
: :
: :
: :
:
:
:
: --
: PHP General Mailing List (http://www.php.net/)
: To unsubscribe, visit: http://www.php.net/unsub.php
:
:
: --
: PHP General Mailing List (http://www.php.net/)
: To unsubscribe, visit: http://www.php.net/unsub.php
:
:
attached mail follows:
Using MS Win98 / php 4:
Any ideas on how I can change my permssion settings on a file called data.txt so it can be read to and written to or do I have to take that up with my ISP.
I get the following after I submit a form: .................... Warning: fopen("data.txt", "a+") - Permission denied in d:\inetpub\www.blahblah.org\formtest.php on line 80 Your submission was not processed. ........................ Thank you for your time and help. TR
attached mail follows:
I'm using imap_open in PHP 4.3.0 to successfully access every pop server I've tried - except 1: "mail.fea.net". I know the mail server, port, login, and password are correct because I can successfully log into the pop server with both telnet and Outlook.
Here's the code:
if ($pop_inbox = imap_open("{".$mailserver."/$mailbox_type:$port/notls}",$login,$password)):
I've tried every variation of the code, such as using "notls" or not. In any event, I know the code works because I can log into every other pop server I've tried.
imap_last_error() returns: Can not authenticate to POP3 server
Has anyone else run into this? Is there a way to see more about the interaction between imap_open and the pop server?
Jeff
--------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now
attached mail follows:
Hi,
I'm using I.E. 6. I noticed that register_globals was set ON in my php.ini file so I changed it to OFF in as per the security warning. I've noticed a side effect. When I submit a form via POST and then go back from the results page, my form has been cleared, i.e.., as if the page has been reloaded. Is this a normal effect of setting register_globals OFF? Is there a way to continue caching?
Thanks, Don
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003
attached mail follows:
Don wrote:
> >I'm using I.E. 6. > Its not a browser thing, but a PHP thing.
> I noticed that register_globals was set ON in my php.ini file so I changed it to OFF in as per the security warning. I've noticed a side effect. When I submit a form via POST and then go back from the results page, my form has been cleared, i.e.., as if the page has been reloaded. Is this a normal effect of setting register_globals OFF? Is there a way to continue caching? > Yes, this is exactly what register_globals does. If you are using the recommended setting of off then you get at your variables with the new super-globals, that is: $myvar = $_POST['myvar']; // for POST data. $myvar = $_GET['myvar']; // for GET data. $myvar = $_REQUEST['myvar']; // for both POST and GET data.
Hope this helps.
Chris
attached mail follows:
> Don wrote: > > > > >I'm using I.E. 6. > > > Its not a browser thing, but a PHP thing. > > > I noticed that register_globals was set ON in my php.ini file so I changed it to OFF in as per the security warning. I've noticed a side effect. When I submit a form via POST and then go back from the results page, my form has been cleared, i.e.., as if the page has been reloaded. Is this a normal effect of setting register_globals OFF? Is there a way to continue caching? > > > Yes, this is exactly what register_globals does. If you are using the > recommended setting of off then you get at your variables with the new > super-globals, that is: > $myvar = $_POST['myvar']; // for POST data. > $myvar = $_GET['myvar']; // for GET data. > $myvar = $_REQUEST['myvar']; // for both POST and GET data. > > Hope this helps. > > Chris
Hi,
Thanks for your response but I don't think this is what I was asking; could be wrong though.
What I want to know is why is my initial HTML form is empty when I click on the back browser button. There is no PHP in my form, just straight HTML. I only use PHP to process the form, not to create it.
Order of events ---------------- Fill out form Click submit PHP processes script and returns confirmation page User clicks browser BACK button and returns to form Where have the user's entries vanished to?
Thanks, Don
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003
attached mail follows:
Don wrote:
> >Thanks for your response but I don't think this is what I was asking; could >be wrong though. > I re-read your post and, of course, you are right. I mis-read it! I have heard of this Back button and data missing and I'm sure its come up before, but I don't remember the answer. I can only suggest looking in the archives, I'm afraid.
Regards
Chris
attached mail follows:
> >Thanks for your response but I don't think this is what I was asking; could > >be wrong though. > > > I re-read your post and, of course, you are right. I mis-read it! I have > heard of this Back button and data missing and I'm sure its come up > before, but I don't remember the answer. I can only suggest looking in > the archives, I'm afraid.
This doesn't have anything to do with PHP. Whether or not a form will be populated or not after hitting the back button completely depends on whether or not the browser decided to cache that page or not. By default, a page served up by PHP will not be cached. You can make it cacheable by sending an appropriate cache-control header. However, in this case I think you said that the page was not even a PHP one, just static HTML in which case it should have gotten cached. Have a look at the HTTP headers the page generates.
-Rasmus
attached mail follows:
> I'm using I.E. 6. I noticed that register_globals was set ON in my > php.ini file so I changed it to OFF in as per the security warning. > I've noticed a side effect. When I submit a form via POST and then go > back from the results page, my form has been cleared, i.e.., as if the > page has been reloaded. Is this a normal effect of setting > register_globals OFF? Is there a way to continue caching?
This should in no way be related to register_globals.
-Rasmus
attached mail follows:
Try using a different block cipher mode. When encrypting with ECB, as you said, your plaintext must have a length that is a multiple of the blocksize for the cipher. If it's anything less, you're going to get some garbage at the end of the decrypted ciphertext. I believe that mcrypt uses zeroes padding for ECB mode.
You might want to try one of the other block cipher modes, like CBC or CFB. This will require that you use random IVs for each encryption, but it's much more secure than using ECB mode. Even though you create an IV in your code below, ECB mode ignores it -- if you encrypt the same plaintext multiple times using the same key, you'll end up with the same ciphertext. With random IVs and the proper mode, this wouldn't happen. This will require that you store the IV for each encryption along with the ciphertext, but that's fine, as storing the IV along with the ciphertext is not a security problem.
I'm not sure what mcrypt uses for padding on it's various block cipher modes, but it might help. It'll be more secure than ECB, at any rate.
J
Steve Yates wrote:
> Hello, > > I recently implemented a database using MySQL that is storing selected > fields encrypted. However on a very small number of records the decrypted > result is not correct for some fields, for example for this credit card > number: > > 9999-999999-9999Fhx > > It appears in fact the same way as the problem I first experienced, when > the database field was not big enough to store the encrypted text (which I > discovered takes a multiple of the blocksize, so it is usually bigger than > the original string). However the blocksize is 8 and to provide a safety > margin all the fields to be encrypted have 10 extra characters in them > (varchar fields). > > So far this happens on at most one field in a record, perhaps on less than > 5% of the records. At first I was thinking maybe the addslashes() was > adding text but MySQL should be stripping that out before entering it into > the database, right? Also I can't seem to duplicate this by entering the > same values in the form again. > > Any suggestions? Here is my encryption code: > > $hrkey = '$R^a$nd()M%'; // changed text > $td = mcrypt_module_open(MCRYPT_TRIPLEDES,'', MCRYPT_MODE_ECB, ''); > $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), 99999999999999); > //changed the number > $ks = mcrypt_enc_get_key_size ($td); > $key = substr(md5($hrkey), 0, $ks); > mcrypt_generic_init($td, $key, $iv); > $CreditCardNumber = addslashes(mcrypt_generic($td, > $_POST['Credit_Card_Number'])); > (...post to database here...) > mcrypt_module_close($td); > > Decryption code: > > function mydecrypt($enc) { > global $td; > return rtrim(mdecrypt_generic($td, $enc), "\0"); > } > > Thanks for any insight! > > - Steve Yates > - ASCII stupid question, get a stupid ANSI. > > ~ Taglines by Taglinator - www.srtware.com ~
attached mail follows:
Dear Sirs/ Madams, dear friends,
we are very pleased to announce the International PHP Conference 2003 - Spring Edition - in Amsterdam. The date for this event for PHP enthusiasts from all over the world will be May 8 and 9, 2003. The conference venue is the RAI conference center in Amsterdam.
Like the International PHP Conferences in Frankfurt this conference will offer a first class programme presented by the creme de la creme of the PHP community to an international audience of PHP enthusiasts. We are happy to ask you to submit your proposals for the session programme.
>>Organiser:
Software & Support Verlag
Kennedyallee 87
60596 Frankfurt am Main
Attn: Frank Stepan
Tel. +49 69 6300 89 29
Fax. +49 69 6300 89 89
eMail: fstepan
entwickler.com
>>The dates for the conference are: May, 8 and 9, 2003
>> conference location: RAI Amsterdam
>>The Topics: - General PHP - PHP & Business - PHP & Databases - PHP Design - PHP Extensions - PHP & XML - PHP-GTK
>>Call for Papers:
If you want to present your talks at this unique event, please submit your proposals to us.
The chair board consists of the following persons:
- [Head] Bjrn Schotte (editor in chief PHP Magazin) - Derick Rethans (editor in chief PHP Magazine) - Andrei Zmievski - Jani Taskinnen - Markus Wolff
Please submit your proposals at http://www.phpconference.de/kt/input/
Deadline for submitting the abstracts is January 31, 2003.
You will be informed whether your suggestions have been accepted or not until February 10, 2003.
All session contents will be published in a conference book after the conference. The slides and codes used for the session will be make available to the conference participants after the the conference. Guidelines for the conference book and slides etc. will be sent to you when your suggestions have been accepted by the Conference Board. Please note that we can only accept sessions proposals if contributions for the conference book as well as slides etc. are available by April 29, 2003.
>Structure of the Sessions: The sessions are 75 min. long (incl. discussion at the end of the lecture). It is possible to split a session in an "introduction" and a "continuing" part. The presentation language is English.
>Target groups: - project managers - software developers - IT managers - web designers and web administrators - PHP enthusiasts
Notice:
1. Travel expenses and lodging will be covered by us. Details on travel and
accomodation will be given if session is accepted.
2. Every speaker will have free access to all conference sessions.
3. Every speaker should present at least two sessions.
Those of you who want to present only one session, please contact the Conference
Board at chair03a
phpconference.de
4. The language for communication with the organiser and the chair is english.
>>Contact: Software & Support Verlag GmbH Frank Stepan Kennedyallee 87 60596 Frankfurt
phone: +49 69 6300 89 29 fax: +49 69 6300 89 89
-- ThinkPHP / rent-a-phpwizard bjoernthinkphp.de Sedanstrae 27 Tel: 0931 / 78 43 804 97082 Wrzburg Fax: 0931 / 78 43 795 http://www.thinkphp.de/ http://www.rent-a-phpwizard.de/
attached mail follows:
All
I've been trying to compile php4 to run under HP-UX 11 64 bit and I get errors on documents when trying to include files. As far as I can tell everything else works. The message only appears when I do an include with a soft path suh as:
require('includes/config.inc.php' );
I do not however, have any problems doing:
require('./includes/config.inc.php' );
The error I get is below. Can anyone tell me how to fix this or at least point me in the right direction?
*** Error Begins *** Fatal error: Failed opening required 'includes/config.inc.php' (include_path='/usr/local/lib/php') in /opt/apache/htdocs/admin/includes/auth.inc.php on line 24 *** Error Ends ***
Thanks
Allen
abyingt
qwest.com
attached mail follows:
Hi, I would like to know if there is way to measure how much memory a script uses during execution. Althought threre is no such function in the manual, in my opinion there must be some indication how much memory is used because of the memory_limit directive in the php.ini file. So if php is able to determine the maximum level it should be able and to give indication and for the actual.
Thanks in advance Peio Popov
----------------------------- Peio Popov - peio
cilaw.org icq# 117130734 http://www.cilaw.org
attached mail follows:
When I use ---> header("Location: http://www.somepage.com), it redirects to my page no problem. My question is, is there a PHP trick I can use to make it open in a new browser window?
I'm adverse to using JavaScript as some users may not have it turned on (odd I know but a reality still).
Thanks, Don
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003
attached mail follows:
On Tuesday 14 January 2003 03:33, Don wrote: > When I use ---> header("Location: http://www.somepage.com), it redirects to > my page no problem. My question is, is there a PHP trick I can use to make > it open in a new browser window?
No.
> I'm adverse to using JavaScript as some users may not have it turned on > (odd I know but a reality still).
Only javascript can open new a window.
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* Hotels are tired of getting ripped off. I checked into a hotel and they had towels from my house. -- Mark Guido */
attached mail follows:
No, I am afraid not. It will only send a redirection header to the same
page that you are on.
----- Original Message -----
From: "Don" <donpro
lclcan.com>
To: "php list" <php-general
lists.php.net>
Sent: Monday, January 13, 2003 1:33 PM
Subject: [PHP] question on Header(location
> When I use ---> header("Location: http://www.somepage.com), it redirects to > my page no problem. My question is, is there a PHP trick I can use to make > it open in a new browser window? > > I'm adverse to using JavaScript as some users may not have it turned on (odd > I know but a reality still). > > Thanks, > Don > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.443 / Virus Database: 248 - Release Date: 1/10/2003 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
I'm trying to include 'http://www.myserver.com/conted/me.inc'; portably on several mirrored servers like include '/conted/me.inc' , I was wondering if there was someway I could include files and have the implicity connect and down the load me.inc from the local server whatever server it happens to be on.
for example: on web1 box
include '/conted/me.inc'; works fine
for example on web2 box include 'conted/me.inc'; works fine
Tyler Bird UVSC - Continuing Education
attached mail follows:
--- Justin French <justin
indent.com.au> wrote:
> In NN7 Mac, the error is "the page contained no data".
> In IE5.x Mac, the error is along the lines of "host
> not found" or "could not access URL ...".
This is a bit off-topic, but I would suggest ignoring any error messages from IE. It will generally "hide" the real error and show you some generic page instead. This can be very misleading. Go with Netscape's assessment of the problem.
> I guess what I'm hoping for is some wild stabs in the > dark as to what the problem might be, and where I > might start looking.
There are a few different ways you can get a "document contained no data" message:
1. You have an endless loop somewhere in your code, so that under certain circumstances, the script never completes. 2. You have an endless loop in the form of protocol-level redirects (using header()), so that the Web client continues to make HTTP requests without ever receiving a 200 response. 3. The network connection is terminated. This can occur when the server crashes, among other things.
I can think of no other ways to receive this error (please, someone chime in if I have left one out). So, you can try to rule out possibilities one by one.
Endless loops in your code might be difficult to identify if the logical path through your code required to generate it is rare. Sometimes looking through your code with this in mind is the best way to find the problem.
Endless amounts of protocol-level redirects can be detected pretty easily. If you can reproduce it in any way, tcpdump or some other debugging tool can reveal the HTTP transactions. Short of this, many requests within a very small window of time from the same IP is a good indicator as well.
If the Web server crashes under certain circumstances to cause this error, this can be the most difficult to track down. Your best bet is to be able to at least reproduce the steps necessary to crash the server. If you believe it might be only demonstrable under load, you will want to test the application under heavy load to see if you can reproduce the error.
> - (occasionally) makes use of header() redirects
I would recommend looking at these first. Make sure there is no way for the client to enter into an endless loop of redirects.
Anyway, I hope that helps. Sometimes just knowing some common cases that result in the same error can help you identify the problem.
Good luck.
Chris
attached mail follows:
isn't it possible to get image informations from the local harddrive?
$fotoinfo=getimagesize("C:\\Files\\Temp\\Image.jpg");
if i use that code, the errormessage is always Unable to access c:\Files\Temp\Image.jpg getimagesize: unable to open file for reading
got anybody a solution?
attached mail follows:
Does anyone know if there is a newsgroup for help with GD commands?
Thanks, RC
attached mail follows:
I have a chat script that refreshes the chat thing about every 5 seconds. The problem with it is emoticons. Each refresh, it makes the images reload aswell which makes it do sort of a flicker. How could I write the image to cache to make this stop happening or is there another method that works better?
Thanks, Stephen Craton http://www.melchior.us
"What's the point in appearance if your true love, doesn't care about it?" -- http://www.melchior.us
attached mail follows:
Use the correct headers for no-cache see manual for starters: http://www.php.net/manual/en/function.header.php <http://www.php.net/>
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
-----Original Message-----
From: Stephen [mailto:webmaster
melchior.us]
Sent: Tuesday, 14 January 2003 6:50 AM
To: PHP List
Subject: [PHP] Write Image to Cache
I have a chat script that refreshes the chat thing about every 5 seconds. The problem with it is emoticons. Each refresh, it makes the images reload aswell which makes it do sort of a flicker. How could I write the image to cache to make this stop happening or is there another method that works better?
Thanks, Stephen Craton http://www.melchior.us "What's the point in appearance if your true love, doesn't care about it?" -- http://www.melchior.us
attached mail follows:
Hunte Swee [mailto:xuezs
tplic.com] scribbled;
> Hi all, > > It seems true that php's imap_utf7_en/decode does not compatible with > microsoft outlook express. We create imap folder(include chinese > chars) using IMP, all it ok in IMP problem, but when use OE > to connect to imap server, the folder can't be shown correctly. And > vice versa. > > So my problem is what is wrong? PHP or Outlook Express? >
I'd say Outlook Express (untested of course). The reason: I once helped a guy that could not send an email to one specific person, it was because of a Garman character in the persons name in his address book. Try creating an english IMAP folder and see if OE can read that?
-jesse
attached mail follows:
Does anyone have any good suggestions for small business software (PHP/MySQL) based ?
basically what I need to do is:
contact management work order forms invoicing
TIA
**DAN**
attached mail follows:
Yes, I've tried using the Content-Disposition header. It doesn't seem to work...here are the relevant parts of my code:
<snip> // Change Content-Type so that it matches the MIME-type of the part header('Content-Type: ' . $type . '/' . $subtype); // Check if there is a name for the part if (isset($name)) { header('Content-Disposition: inline; filename=' . $name); } else { header('Content-Disposition: inline'); } </snip>
I've tried printing $type, $subtype and $name and they all contain correct values...still no luck.
As per your suggestion I tried using wget -S to check the headers. Here are the results:
C:\WINDOWS\Profiles\Lasso\Skrivbordet>wget -S --spider
http://localhost/webmail/
attachment.php?mailbox=INBOX&msguid=279&part=2
--21:59:30--
http://localhost/webmail/attachment.php?mailbox=INBOX&msguid=279&p
art=2
=> `attachment.php
mailbox=INBOX&msguid=279&part=2'
Resolving localhost... done.
Connecting to localhost[127.0.0.1]:80... connected.
HTTP request sent, awaiting response...
1 HTTP/1.1 200 OK
2 Date: Mon, 13 Jan 2003 20:59:39 GMT
3 Server: Apache/1.3.27 (Win32) PHP/4.2.3
4 X-Powered-By: PHP/4.2.3
5 Set-Cookie: PHPSESSID=12ab68cb5cd7355b2a63b9007bda0221; path=/
6 Expires: Thu, 19 Nov 1981 08:52:00 GMT
7 Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
8 Pragma: no-cache 9 Keep-Alive: timeout=15, max=100 10 Connection: Keep-Alive 11 Content-Type: text/html 200 OK
I'm VERY confused about line 11! The type (for this particular request) should be image/bmp (Mozillas Page Info tab confirms this). Still, wget claims it is text/html...hm...strange...now what?
/Lars Olsson (lasso
lassoweb.nu)
Timothy Hitchens ) wrote:
> So you have tried as per the manual:
>
> header("Content-Disposition: attachment; filename=downloaded.pdf");
>
> I use this all the time without issue.. do you have a shell that you can
> use to "wget -S" and see if the correct headers are coming out??
>
>
>
> Timothy Hitchens (HiTCHO)
> Open Platform Consulting
> e-mail: tim
hitcho.com.au
attached mail follows:
What happens when you change the "inline" to attachment??
Also does this page have any errors in it... eg parsing ones that are causing PHP to take over the headers and error out??
Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: tim
hitcho.com.au
> -----Original Message-----
> From: Lars Olsson [mailto:lasso
lassoweb.nu]
> Sent: Tuesday, 14 January 2003 7:15 AM
> To: hitcho
php.net
> Cc: php-general
lists.php.net
> Subject: Re: [PHP] attachment problem
>
>
> Yes, I've tried using the Content-Disposition header. It
> doesn't seem to
> work...here are the relevant parts of my code:
>
> <snip>
> // Change Content-Type so that it matches the MIME-type of the part
> header('Content-Type: ' . $type . '/' . $subtype);
>
> // Check if there is a name for the part
> if (isset($name)) {
> header('Content-Disposition: inline; filename=' . $name);
> }
> else {
> header('Content-Disposition: inline');
> }
> </snip>
>
> I've tried printing $type, $subtype and $name and they all contain
> correct values...still no luck.
>
>
> As per your suggestion I tried using wget -S to check the
> headers. Here
> are the results:
>
> C:\WINDOWS\Profiles\Lasso\Skrivbordet>wget -S --spider
> http://localhost/webmail/
> attachment.php?mailbox=INBOX&msguid=279&part=2
> --21:59:30--
> http://localhost/webmail/attachment.php?mailbox=INBOX&msguid=279&p
> art=2
> => `attachment.php
mailbox=INBOX&msguid=279&part=2'
> Resolving localhost... done.
> Connecting to localhost[127.0.0.1]:80... connected.
> HTTP request sent, awaiting response...
> 1 HTTP/1.1 200 OK
> 2 Date: Mon, 13 Jan 2003 20:59:39 GMT
> 3 Server: Apache/1.3.27 (Win32) PHP/4.2.3
> 4 X-Powered-By: PHP/4.2.3
> 5 Set-Cookie: PHPSESSID=12ab68cb5cd7355b2a63b9007bda0221; path=/
> 6 Expires: Thu, 19 Nov 1981 08:52:00 GMT
> 7 Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
> pre-check=0
>
> 8 Pragma: no-cache
> 9 Keep-Alive: timeout=15, max=100
> 10 Connection: Keep-Alive
> 11 Content-Type: text/html
> 200 OK
>
>
> I'm VERY confused about line 11! The type (for this
> particular request)
> should be image/bmp (Mozillas Page Info tab confirms this).
> Still, wget
> claims it is text/html...hm...strange...now what?
>
>
> /Lars Olsson (lasso
lassoweb.nu)
>
>
>
> Timothy Hitchens ) wrote:
> > So you have tried as per the manual:
> >
> > header("Content-Disposition: attachment; filename=downloaded.pdf");
> >
> > I use this all the time without issue.. do you have a shell
> that you
> > can use to "wget -S" and see if the correct headers are coming out??
> >
> >
> >
> > Timothy Hitchens (HiTCHO)
> > Open Platform Consulting
> > e-mail: tim
hitcho.com.au
>
attached mail follows:
It doesn't matter whether I choose 'inline' or 'attachment', browser doesn't seem to care...but at least I found out why wget -S got me text/html instead of image/bmp. I had some session variables that messed things up, but I hacked it a bit and now wget -S is giving me the following headers:
C:\WINDOWS\Profiles\Lasso\Skrivbordet>wget -S --spider
http://localhost/webmail/
attachment.php?mailbox=INBOX&msguid=279&part=2
--00:19:19--
http://localhost/webmail/attachment.php?mailbox=INBOX&msguid=279&p
art=2
=> `attachment.php
mailbox=INBOX&msguid=279&part=2'
Resolving localhost... done.
Connecting to localhost[127.0.0.1]:80... connected.
HTTP request sent, awaiting response...
1 HTTP/1.1 200 OK
2 Date: Mon, 13 Jan 2003 23:19:27 GMT
3 Server: Apache/1.3.27 (Win32) PHP/4.2.3
4 X-Powered-By: PHP/4.2.3
5 Set-Cookie: PHPSESSID=e4025c8fb31d0de0b04c7aa0e3afc676; path=/
6 Expires: Thu, 19 Nov 1981 08:52:00 GMT
7 Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
8 Pragma: no-cache 9 Content-Disposition: inline; filename=tomtefan.bmp 10 Keep-Alive: timeout=15, max=100 11 Connection: Keep-Alive 12 Content-Type: image/bmp 200 OK
The Content-Type seems ok, and so does the Content-Disposition. Browser still suggests 'attachment.php' whenever I choose File->Save As...
Strange happenings indeed...
/Lars (lasso
lassoweb.nu)
Timothy Hitchens (HiTCHO) wrote:
>What happens when you change the "inline" to attachment??
>
>Also does this page have any errors in it... eg parsing ones that are
>causing PHP to take over the headers and error out??
>
>
>
>Timothy Hitchens (HiTCHO)
>Open Platform Consulting
>e-mail: tim
hitcho.com.au
>
>
attached mail follows:
Well, I'll be damned...don't know why, but suddenly everything seems to work! Guess some little gnome inside my computer finally decided it was time for me to get some sleep...
Many thanx for for your help, Timothy!
/Lars (lasso
lassoweb.nu)
Lars Olsson wrote:
> It doesn't matter whether I choose 'inline' or 'attachment', browser
> doesn't seem to care...but at least I found out why wget -S got me
> text/html instead of image/bmp. I had some session variables that messed
> things up, but I hacked it a bit and now wget -S is giving me the
> following headers:
>
> C:\WINDOWS\Profiles\Lasso\Skrivbordet>wget -S --spider
> http://localhost/webmail/
> attachment.php?mailbox=INBOX&msguid=279&part=2
> --00:19:19--
> http://localhost/webmail/attachment.php?mailbox=INBOX&msguid=279&p
> art=2
> => `attachment.php
mailbox=INBOX&msguid=279&part=2'
> Resolving localhost... done.
> Connecting to localhost[127.0.0.1]:80... connected.
> HTTP request sent, awaiting response...
> 1 HTTP/1.1 200 OK
> 2 Date: Mon, 13 Jan 2003 23:19:27 GMT
> 3 Server: Apache/1.3.27 (Win32) PHP/4.2.3
> 4 X-Powered-By: PHP/4.2.3
> 5 Set-Cookie: PHPSESSID=e4025c8fb31d0de0b04c7aa0e3afc676; path=/
> 6 Expires: Thu, 19 Nov 1981 08:52:00 GMT
> 7 Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
> pre-check=0
>
> 8 Pragma: no-cache
> 9 Content-Disposition: inline; filename=tomtefan.bmp
> 10 Keep-Alive: timeout=15, max=100
> 11 Connection: Keep-Alive
> 12 Content-Type: image/bmp
> 200 OK
>
> The Content-Type seems ok, and so does the Content-Disposition. Browser
> still suggests 'attachment.php' whenever I choose File->Save As...
>
> Strange happenings indeed...
>
> /Lars (lasso
lassoweb.nu)
>
>
>
> Timothy Hitchens (HiTCHO) wrote:
>
>> What happens when you change the "inline" to attachment??
>>
>> Also does this page have any errors in it... eg parsing ones that are
>> causing PHP to take over the headers and error out??
>>
>>
>>
>> Timothy Hitchens (HiTCHO)
>> Open Platform Consulting
>> e-mail: tim
hitcho.com.au
>>
>>
>
attached mail follows:
Hi All,
I am a C++ guy, who plans to do a site about C++ Idioms. I would like to make it into a community site with interactivity. I have concluded that PHP would be the right way to go. However I am "lazy". I would like first to be able to start doing the site using some sort of visual environment where I can concentrate mostly on the site and on the possible minimum on PHP itself.
What I am thinking of is a well searchable knowledge base with articles, which has a structure (let's say some standard sections). I plan to make it possible to comment on the different articles/its sections just like it can be done on the php.net site for the documentation.
For that kind of site I am looking for a sort of visual design environment, preferably free (since it is non-profit) and preferably something for which I do not need my own server.
If you have any hints how should I start, what should I use, please let me know!
Ps: I am not looking for a way of not knowing PHP and use it: but I am looking for a way to create a site ASAP, since I believe that what I plan to do serves a need.
--
White Wolf aka Attila
LMF
ICQ#: 26070936
http://wwp.icq.com/26070936
If I'm not online send mail.
NO USENET followups please.
SPAM is not welcome.
attached mail follows:
Check out phpnuke.org - content management system that seems to answer most of the criteria you've set out here.
..michael..
On Mon, 2003-01-13 at 13:46, White Wolf wrote: > Hi All, > > I am a C++ guy, who plans to do a site about C++ Idioms. I would like to > make it into a community site with interactivity. I have concluded that > PHP would be the right way to go. However I am "lazy". I would like first > to be able to start doing the site using some sort of visual environment > where I can concentrate mostly on the site and on the possible minimum on > PHP itself. > > What I am thinking of is a well searchable knowledge base with articles, > which has a structure (let's say some standard sections). I plan to make > it possible to comment on the different articles/its sections just like it > can be done on the php.net site for the documentation. > > For that kind of site I am looking for a sort of visual design environment, > preferably free (since it is non-profit) and preferably something for which > I do not need my own server. > > If you have any hints how should I start, what should I use, please let me > know! > > Ps: I am not looking for a way of not knowing PHP and use it: but I am > looking for a way to create a site ASAP, since I believe that what I plan > to do serves a need. > >
attached mail follows:
Ok, this is going to be laughable, but here goes. I am looking at code too much to get this one:
Have 2 text fields on a database called "hours" and "minutes". How can i get the current time (hour-minutes) in two digit format and apply it to the two variables? Everything i do only gets one digit when the minutes are between 00 and 10. I know its going to be stupid but anyway, could use your help, i cant see anything straight in this code anymore. :-P Sorry and thanks.
Pag
attached mail follows:
use the date() function, in this case date("i") and date("h") or date("H")
Tim Ward
http://www.chessish.com
mailto:timward
chessish.com
----- Original Message -----
From: Pag <dante
mail.telepac.pt>
To: <php-general
lists.php.net>
Sent: Monday, January 13, 2003 10:25 PM
Subject: [PHP] dumb time question
> > Ok, this is going to be laughable, but here goes. I am looking at code too > much to get this one: > > Have 2 text fields on a database called "hours" and "minutes". > How can i get the current time (hour-minutes) in two digit format and > apply it to the two variables? Everything i do only gets one digit when the > minutes are between 00 and 10. > I know its going to be stupid but anyway, could use your help, i cant see > anything straight in this code anymore. :-P > Sorry and thanks. > > Pag > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
attached mail follows:
Hi all,
is there a way to execute a custom function as soon as an error happens in PHP? I looked at the set_error_handler function, but it doesn't seem to trap all the errors. What I want to achieve is to execute a function that mails me the error everytime an error happens.
Cheers,
Pieter
attached mail follows:
On Tue, 14 Jan 2003 23:38:11 +0100, you wrote:
>Hi all, > >is there a way to execute a custom function as soon as an error happens in >PHP? I looked at the set_error_handler function, but it doesn't seem to trap >all the errors. What I want to achieve is to execute a function that mails >me the error everytime an error happens.
My site has a custom error handler (implemented via set_error_handler) which sends a nicely formatted email including all of the error details, a variable dump, the contents of the output buffer before the error occured, and the contents of a call to debug_backtrace, in addition to logging the error to a file. We've used it in some form or another for nearly a year now and it's been very helpful.
set_error_handler effectively traps every error you're likely to encounter with the exception of parse errors. And if you have a script with a parse error, you'll know it pretty quickly and likely won't need to be emailed, which means that for all intents and purposes, set_error_handler traps all errors.
Is there a specific problem you're having with set_error_handler, or a specific error that you were hoping your custom function would catch that is isn't?
attached mail follows:
Use the error_reporting function to define which errors you would like PHP to report to the error handler. If you want everything to be mailed to you, including warnings, use the E_ALL setting, though you may get a lot more "warnings" than you expect this way:
error_reporting(E_ALL);
function ErrorHandler($_ErrorNumber_, $_ErrorString_, $_ErrorFile_, $_ErrorLine_) { mail(...); }
set_error_handler("ErrorHandler");
attached mail follows:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I did a complex class that works with XML parsing and complex structured where I used references extensivly and now I'm surprised with:
Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of array_push(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer.
I can't modify the php.ini since I'm in a shared but the problem is deeper.
Why was it deprecated ? what replaced it ? is there any work arround ?
My 200 lines of code without references could take much, much longer and be
much, much more messy.
Any ideas ?
Thanks.
- --
Pupeno: pupeno
pupeno.com
http://www.pupeno.com
- ---
Help the hungry children of Argentina,
please go to (and make it your homepage):
http://www.porloschicos.com/servlet/PorLosChicos?comando=donar
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE+I02cLr8z5XzmSDQRAs/0AKCyf+UG0uZdbwG30WFU0UUNVWO7BwCgnCn5 2LmOOJi8uX+1dOqUfCTatSE= =5obN -----END PGP SIGNATURE-----
attached mail follows:
Hi,
Tuesday, January 14, 2003, 9:36:57 AM, you wrote: P> -----BEGIN PGP SIGNED MESSAGE----- P> Hash: SHA1
P> I did a complex class that works with XML parsing and complex structured where P> I used references extensivly and now I'm surprised with:
P> Warning: Call-time pass-by-reference has been deprecated - argument passed by P> value; If you would like to pass it by reference, modify the declaration of P> array_push(). If you would like to enable call-time pass-by-reference, you P> can set allow_call_time_pass_reference to true in your INI file. However, P> future versions may not support this any longer.
P> I can't modify the php.ini since I'm in a shared but the problem is deeper.
P> Why was it deprecated ? what replaced it ? is there any work arround ?
P> My 200 lines of code without references could take much, much longer and be
P> much, much more messy.
P> Any ideas ?
P> Thanks.
P> - --
P> Pupeno: pupeno
pupeno.com
P> http://www.pupeno.com
P> - ---
P> Help the hungry children of Argentina,
P> please go to (and make it your homepage):
P> http://www.porloschicos.com/servlet/PorLosChicos?comando=donar
P> -----BEGIN PGP SIGNATURE-----
P> Version: GnuPG v1.0.7 (GNU/Linux)
P> iD8DBQE+I02cLr8z5XzmSDQRAs/0AKCyf+UG0uZdbwG30WFU0UUNVWO7BwCgnCn5 P> 2LmOOJi8uX+1dOqUfCTatSE= P> =5obN P> -----END PGP SIGNATURE-----
I am sure array_push accepts the array as a reference so there is no need to use the & operator in the call. At least thats how it works in a simple class.....
-- regards, Tom
attached mail follows:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Monday 13 January 2003 20:01, Tom Rogers wrote:
> Hi,
>
> Tuesday, January 14, 2003, 9:36:57 AM, you wrote:
> P> -----BEGIN PGP SIGNED MESSAGE-----
> P> Hash: SHA1
>
> P> I did a complex class that works with XML parsing and complex structured
> where P> I used references extensivly and now I'm surprised with:
>
> P> Warning: Call-time pass-by-reference has been deprecated - argument
> passed by P> value; If you would like to pass it by reference, modify the
> declaration of P> array_push(). If you would like to enable call-time
> pass-by-reference, you P> can set allow_call_time_pass_reference to true in
> your INI file. However, P> future versions may not support this any longer.
>
> P> I can't modify the php.ini since I'm in a shared but the problem is
> deeper. P> Why was it deprecated ? what replaced it ? is there any work
> arround ? P> My 200 lines of code without references could take much, much
> longer and be P> much, much more messy.
> P> Any ideas ?
> P> Thanks.
> P> - --
> P> Pupeno: pupeno
pupeno.com
> P> http://www.pupeno.com
> P> - ---
> P> Help the hungry children of Argentina,
> P> please go to (and make it your homepage):
> P> http://www.porloschicos.com/servlet/PorLosChicos?comando=donar
> P> -----BEGIN PGP SIGNATURE-----
> P> Version: GnuPG v1.0.7 (GNU/Linux)
>
> P> iD8DBQE+I02cLr8z5XzmSDQRAs/0AKCyf+UG0uZdbwG30WFU0UUNVWO7BwCgnCn5
> P> 2LmOOJi8uX+1dOqUfCTatSE=
> P> =5obN
> P> -----END PGP SIGNATURE-----
>
> I am sure array_push accepts the array as a reference so there is no need
> to use the & operator in the call. At least thats how it works in a simple
> class.....
No, I mean, what you're pushing inside the array is a reference:
array_push($anArrayOfReferences, &$thisIsAVariable);
that doesn't work, but I replaced by
$anArrayOfReferences[count($anArrayOfReferences)] = &$thisIsAVariable;
Thanks :)
- --
Pupeno: pupeno
pupeno.com
http://www.pupeno.com
- ---
Help the hungry children of Argentina,
please go to (and make it your homepage):
http://www.porloschicos.com/servlet/PorLosChicos?comando=donar
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE+I2FvLr8z5XzmSDQRAjjOAKCm0pwkFAVC8vFfF2r8v/enZp4NhwCffIfV x0ipECbUUmn72eJbEw0eg60= =oFaa -----END PGP SIGNATURE-----
attached mail follows:
The errors aren't actually generadted inside the PHP but the problem im having makes no sense to me. The pages validate.php feed out: Please veify below that all your details are correct. If there are any errors, they will be lsited first. Error 1: Primary e-mail address was left blank. Error 2: Please specify whether or not your license has ever been revoked. Fatal Error: You did not agree to the terms listed. Errors were found in your submission. Please use your bowsers back button to go back and fix them. There were 4 errors found.
The problem lies within the fact that these errors are not actually being triggered. The errors are told to trigger if the field is left blank. The problem is are the field are not left blank. The form that feeds to the file is at http://www.skyfor.planetmodz.com/shsapp.html and the PHP script is http://www.skyfor.planetmodz.com/validate.php .. The text of both are too long to post in here. I checked myself to make sure the form fields line up. Could someone please try to see if they can figure out my error?
Thanks in advace,
Mike Bowers
PlanetModz Gaming Network Webmaster
webmaster
planetmodz.com
ViperWeb Hosting Server Manager
mbowers
viperwebconsulting.com
raptr24
att.net
All outgoing messages scanned for viruses
using Norton AV 2002
attached mail follows:
Hello friends,
I have made the following table of data and a button on every row to view the details. The code is working fine and the table is displayed with the buttons.
The problem I have is that the $SelectedItemNumber posted to the next page remains the same number no matter which row button I click. I have my relevant code below. Please help me. I know I am making a mistake somewhere but I cannot figure out where.
Quote :
while($row=mysql_fetch_array($result)){ Print " <tr> "; Print "<td width=\"12%\" align=\"center\" height=\"6\" bgcolor=\"#FFFFbf\"><font face=\"Tahoma\" color=\"#000000\">" ; Print "<b> <font size=\"2\" color=\"ff0000\"> $row[OrgName] </b></font>"; print "</font> </td>"; Print "<td width=\"12%\" align=\"center\" height=\"6\" bgcolor=\"#FFFFbf\"><font size=\"2\" face=\"Tahoma\" color=\"#000000\">" ; Print $row[OrgCountry]; print "</font> </td>"; Print "<td width=\"12%\" align=\"center\" height=\"6\" bgcolor=\"#FFFFbf\"><font size=\"2\" face=\"Tahoma\" color=\"#000000\">" ; Print $row[OrgNumber]; print "</font> </td>"; Print "<td width=\"12%\" align=\"center\" height=\"6\" bgcolor=\"#FFFFbf\"><font size=\"2\" face=\"Tahoma\" color=\"#000000\">" ; Print $row[Orgaddress]; print "</font> </td>"; Print "<td width=\"12%\" align=\"center\" height=\"6\" bgcolor=\"#FFFFbf\"><font size=\"2\" face=\"Tahoma\" color=\"#000000\">" ; Print $row[OrgChief]; print "</font> </td>"; Print "<td width=\"12%\" align=\"center\" height=\"6\" bgcolor=\"#b7b700\"><font size=\"2\" face=\"Tahoma\" color=\"#000000\">" ; Print"<INPUT TYPE=\"submit\" value=\"View details\" Name=\"Details\">"; print "</td>"; Print"<input type=\"hidden\" name=\"SelectedItemNumber\" value= $row[Id]"; Print "</tr>";} } ?>
Unquote
Thanks Denis
attached mail follows:
so where is $rowe set?
Show us code that calls this page
----- Original Message -----
From: "menezesd" <menezesd
singnet.com.sg>
To: <php-general
lists.php.net>
Sent: Monday, January 13, 2003 6:21 PM
Subject: [PHP] Error in variable when looping
Hello friends,
I have made the following table of data and a button on every row to view the details. The code is working fine and the table is displayed with the buttons.
The problem I have is that the $SelectedItemNumber posted to the next page remains the same number no matter which row button I click. I have my relevant code below. Please help me. I know I am making a mistake somewhere but I cannot figure out where.
Quote :
while($row=mysql_fetch_array($result)){
Print " <tr> "; Print "<td width=\"12%\" align=\"center\" height=\"6\" bgcolor=\"#FFFFbf\"><font face=\"Tahoma\" color=\"#000000\">" ; Print "<b> <font size=\"2\" color=\"ff0000\"> $row[OrgName] </b></font>"; print "</font> </td>"; Print "<td width=\"12%\" align=\"center\" height=\"6\" bgcolor=\"#FFFFbf\"><font size=\"2\" face=\"Tahoma\" color=\"#000000\">" ; Print $row[OrgCountry]; print "</font> </td>"; Print "<td width=\"12%\" align=\"center\" height=\"6\" bgcolor=\"#FFFFbf\"><font size=\"2\" face=\"Tahoma\" color=\"#000000\">" ; Print $row[OrgNumber]; print "</font> </td>"; Print "<td width=\"12%\" align=\"center\" height=\"6\" bgcolor=\"#FFFFbf\"><font size=\"2\" face=\"Tahoma\" color=\"#000000\">" ; Print $row[Orgaddress]; print "</font> </td>"; Print "<td width=\"12%\" align=\"center\" height=\"6\" bgcolor=\"#FFFFbf\"><font size=\"2\" face=\"Tahoma\" color=\"#000000\">" ; Print $row[OrgChief]; print "</font> </td>"; Print "<td width=\"12%\" align=\"center\" height=\"6\" bgcolor=\"#b7b700\"><font size=\"2\" face=\"Tahoma\" color=\"#000000\">" ; Print"<INPUT TYPE=\"submit\" value=\"View details\" Name=\"Details\">"; print "</td>"; Print"<input type=\"hidden\" name=\"SelectedItemNumber\" value= $row[Id]"; Print "</tr>";} } ?>
Unquote
Thanks Denis
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
G'day All Just a quick question This is really a html more than a php question.
Is it possible to have two buttons and have different actions for each button in the same form?
Thanks CJ
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]