php-general Digest 9 Nov 2002 13:57:57 -0000 Issue 1694
Topics (messages 123529 through 123575):
Re: RE
123529 by: Charles Wiltgen
mkdir()
123530 by: Edward Peloke
123531 by: Marco Tabini
Need MENTOR for Fantasy football project
123532 by: Karl James
123534 by: Karl James
123542 by: Charles Wiltgen
123543 by: Kevin Myrick
123545 by: Karl James
123551 by: Jason Wong
123552 by: Karl James
123553 by: Jason Wong
123555 by: Karl James
123564 by: . Edwin
Re: Do I need the closing ?> tag
123533 by: David McArthur
php header function...
123535 by: Brad Apps
123537 by: Marco Tabini
Re: Unable to execute c++ .exe file from php
123536 by: Ladan Pickering
Re: For ... <= max($myArray) vs For ... <= $max
123538 by: Daevid Vincent
Re: Unable to execute c++ .exe file from php - Resolved
123539 by: Ladan Pickering
extension can't be found
123540 by: liug
Windows XP Session Issues
123541 by: Jason
123546 by: . Darwin
123547 by: Karl James
Viewing jpegs problem
123544 by: Andre Dubuc
Re: DHTML and PHP
123548 by: Jason Wong
W3C and PHP
123549 by: conbud
123557 by: Khalid El-Kary
123558 by: Rasmus Lerdorf
123560 by: conbud
Securing PHP Code with GET | POST | SESSIONS or other things
123550 by: Creighton Brown
123556 by: Paul Nicholson
123567 by: . Edwin
calculate bytes in string
123554 by: Ian Newlands
123562 by: Jason Wong
123563 by: . Edwin
MySQL and PHP math problem...
123559 by: Peter
123572 by: . Edwin
upload whole direcotry using ftp functions
123561 by: electroteque
Help with form
123565 by: Karl James
123568 by: Paul Roberts
123570 by: . Edwin
Re: Form posted from Microsoft Internet Explorer.
123566 by: Karl James
HTTP POST FILE UPLOAD HELP - REVISITED
123569 by: . Darwin
123571 by: Jason Wong
How can I start up a new and recompiled version of source PHP???
123573 by: info.t-host.de
123574 by: . Edwin
Re: Installation Kit
123575 by: . Edwin
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Karl James wrote...
> Is there anyone online that can help me with a project
> For a fantasy football league
> Im trying to create a page where users login
> And then can either trade there players or claim
> Free agents of the free agent list and add them to there team
> And I want to have it happen in a real time scenario
There are several helpful people on the list, but you have to ask specific
questions. If you want someone to do it for you, then you should give folks
an idea what what you're willing to pay per hour or for the entire project.
-- Charles Wiltgen
--- End Message ---
--- Begin Message ---
I have been using the mkdir function sucessfully on my windows test machine, but when
I uploaded my pages to my hosting server (which is linux) I get a permission error
when the mkdir function is called. I know I can create directories because I can do
it fine when I am using ws-ftp uploading pages...any ideas? Here is the mkdir call..
mkdir("$uname",0777);
Thanks,
Eddie
--- End Message ---
--- Begin Message ---
The problem is that your webserver is not running as "you"...it's
running under a common user (probably nobody or apache) and that user
does not--and cannot--have access to your folder for security reasons.
You can try creating the directory through ftp via PHP.
Marco
--
------------
php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers
On Fri, 2002-11-08 at 21:11, Edward Peloke wrote:
> I have been using the mkdir function sucessfully on my windows test machine, but
>when I uploaded my pages to my hosting server (which is linux) I get a permission
>error when the mkdir function is called. I know I can create directories because I
>can do it fine when I am using ws-ftp uploading pages...any ideas? Here is the mkdir
>call..
>
> mkdir("$uname",0777);
>
> Thanks,
> Eddie
--- End Message ---
--- Begin Message ---
Ok here is what I need help with
I need help with how to set up the layout of this project
1st I know I need a create account page for owners to create
there username and password.
Then once they successfully filled in the form they are logged in
And taken to the Team choice page..
Then once you click that you are taken two your team page.
Their you can view all team stats, Roster, and Schedules
For NFL and Fantasy Team Schedule
Then you would have links on your team page
That would be like
Claim
Drop
Trade
Submit starters
Claim
Would take you to a page that showed you all of the available players,
with there stats and bye week.
You would then choose your player by checking the box to the right of
the total stats column.
Once you hit claim is one of the hard parts for me.
The player claim after selecting him and hitting saved. Will have a
decision of being added to the roster or denied added to roster, there
are three ways that are denied. 1.over roster size 2. over salary cap
3. after deadline.
If over Roster size you are take to Roster to drop player to get under
rosters size
Then take back to the page to claim player then hit claim on player and
save and the transaction is completed. This is the same thing for the
salary cap if decision is
Under $40.000.00.
This is a major problem for me. Im not sure how to link all of this
together.
I Can create normal pages and tables and forms. But the paths and php
code I need
Help with..
Drop
You can always just drop a player and his name would appear on the free
agent list in real time fashion.
I want all this to be done I Real time fashion and also I want emails
sent to me as they were done. And completed.
Trades
Trades can happen the same way has the rules 1 2 3 for claim players
They have to meet all criteria.
But the interface I want side by side teams and owners be able to choose
the players and hit check and save..
If met all criteria it happens and I get email. Then you see the players
traded on there new Teams.
Submit starters
Can be a table with check boxes and hit save total players aloud to
start we can determine when site is made
Then once you hit save you are back at you team page. But it has to be
in before you league deadline.
Once starters are submitted I want owners to be able to go to a page to
view all starters that all owners did for that week.
And I need to have all these issues done in real time.
And my database is setup in mysql
Would any want to help me with this please get with me asap
I need to be able to talk to you thru the end and make sure I do shit
right.
I want to do all the work, just need a teacher. Please any help would be
greatly appreciated.
Please email back
Sincerely Karl James
--- End Message ---
--- Begin Message ---
-----Original Message-----
From: Karl James [mailto:karl.james@;verizon.net]
Sent: Friday, November 08, 2002 9:35 AM
To: [EMAIL PROTECTED]
Cc: 'Karl James'
Subject: Need MENTOR for Fantasy football project
Ok here is what I need help with
I need help with how to set up the layout of this project
1st I know I need a create account page for owners to create
there username and password.
Then once they successfully filled in the form they are logged in
And taken to the Team choice page..
Then once you click that you are taken two your team page.
Their you can view all team stats, Roster, and Schedules
For NFL and Fantasy Team Schedule
Then you would have links on your team page
That would be like
Claim
Drop
Trade
Submit starters
Claim
Would take you to a page that showed you all of the available players,
with there stats and bye week.
You would then choose your player by checking the box to the right of
the total stats column.
Once you hit claim is one of the hard parts for me.
The player claim after selecting him and hitting saved. Will have a
decision of being added to the roster or denied added to roster, there
are three ways that are denied. 1.over roster size 2. over salary cap
3. after deadline.
If over Roster size you are take to Roster to drop player to get under
rosters size
Then take back to the page to claim player then hit claim on player and
save and the transaction is completed. This is the same thing for the
salary cap if decision is
Under $40.000.00.
This is a major problem for me. Im not sure how to link all of this
together.
I Can create normal pages and tables and forms. But the paths and php
code I need
Help with..
Drop
You can always just drop a player and his name would appear on the free
agent list in real time fashion.
I want all this to be done I Real time fashion and also I want emails
sent to me as they were done. And completed.
Trades
Trades can happen the same way has the rules 1 2 3 for claim players
They have to meet all criteria.
But the interface I want side by side teams and owners be able to choose
the players and hit check and save..
If met all criteria it happens and I get email. Then you see the players
traded on there new Teams.
Submit starters
Can be a table with check boxes and hit save total players aloud to
start we can determine when site is made
Then once you hit save you are back at you team page. But it has to be
in before you league deadline.
Once starters are submitted I want owners to be able to go to a page to
view all starters that all owners did for that week.
And I need to have all these issues done in real time.
And my database is setup in mysql
Would any want to help me with this please get with me asap
I need to be able to talk to you thru the end and make sure I do it
Right
I want to do all the work, just need a teacher. Please any help would be
greatly appreciated.
Please email back
Sincerely Karl James
--- End Message ---
--- Begin Message ---
Karl James wrote...
> Would any want to help me with this please get with me asap I need to be able
> to talk to you thru the end and make sure I do shit right. I want to do all
> the work, just need a teacher.
As they say, "Just Do It". Ask specific, PHP-related questions as you have
them. If you don't know anything about using PHP and MySQL, buy one of the
many fine books available on the subject. Or, you could just pay someone
to do it for you.
-- Charles Wiltgen
--- End Message ---
--- Begin Message ---
Charles Wiltgen once said...
> many fine books available on the subject
If your looking for a book Karl, I would suggest PHP
Advanced by Larry Ullman.
Very easy to follow, very quick to help you figure out
things.
Takes a small amount of knowledge to learn, probably
should know some programming.
Thought that might help
--- Charles Wiltgen <[EMAIL PROTECTED]> wrote:
> Karl James wrote...
>
> > Would any want to help me with this please get
> with me asap I need to be able
> > to talk to you thru the end and make sure I do
> shit right. I want to do all
> > the work, just need a teacher.
>
> As they say, "Just Do It". Ask specific,
> PHP-related questions as you have
> them. If you don't know anything about using PHP
> and MySQL, buy one of the
> many fine books available on the subject. Or, you
> could just pay someone
> to do it for you.
>
> -- Charles Wiltgen
>
>
> --
> 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
[EMAIL PROTECTED]
"Screw you guys, I'm going home."-Eric Cartman, South Park
Ultimatealchemy Dotcom!
__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2
--- End Message ---
--- Begin Message ---
I have the php bible 4 book but it
Doesn’t tell you how to do things all the way
And still leaves with lots of questions.
-----Original Message-----
From: Charles Wiltgen [mailto:lists@;wiltgen.net]
Sent: Friday, November 08, 2002 9:03 PM
To: List ˆ PHP General
Subject: Re: [PHP] Need MENTOR for Fantasy football project
Karl James wrote...
> Would any want to help me with this please get with me asap I need to
be able
> to talk to you thru the end and make sure I do shit right. I want to
do all
> the work, just need a teacher.
As they say, "Just Do It". Ask specific, PHP-related questions as you
have
them. If you don't know anything about using PHP and MySQL, buy one of
the
many fine books available on the subject. Or, you could just pay
someone
to do it for you.
-- Charles Wiltgen
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
On Saturday 09 November 2002 04:33, Karl James wrote:
> I have the php bible 4 book but it
> Doesn’t tell you how to do things all the way
> And still leaves with lots of questions.
Questions such as? If you have fairly specific questions then they are usually
answered quite quickly on this list.
Open-ended requests such as yours, as you've found out for yourself, are
usually ignored.
Honestly it looks as if you're trying to do something beyond your current
capabilities and you don't even know where to begin.
If this is a commercial project just save yourself some grief and pay someone
to do it for you.
Otherwise start small. Try the many tutorials that are available on the web,
learn about how to connect/retrieve/display information from a database, how
to perform user authentication etc. Once you've broadened your knowledge you
may be able to see where the pieces fit together and then you can start your
project.
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Innovation is hard to schedule.
-- Dan Fylstra
*/
--- End Message ---
--- Begin Message ---
Jason, I am trying small with forms, reading php
But I have so many questions that books cant answer sometimes
Thus the reason I need a guide...
Would you be able to help me with that?
-----Original Message-----
From: Jason Wong [mailto:php-general@;gremlins.com.hk]
Sent: Friday, November 08, 2002 10:14 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Need MENTOR for Fantasy football project
On Saturday 09 November 2002 04:33, Karl James wrote:
> I have the php bible 4 book but it
> Doesn't tell you how to do things all the way
> And still leaves with lots of questions.
Questions such as? If you have fairly specific questions then they are
usually
answered quite quickly on this list.
Open-ended requests such as yours, as you've found out for yourself, are
usually ignored.
Honestly it looks as if you're trying to do something beyond your
current
capabilities and you don't even know where to begin.
If this is a commercial project just save yourself some grief and pay
someone
to do it for you.
Otherwise start small. Try the many tutorials that are available on the
web,
learn about how to connect/retrieve/display information from a database,
how
to perform user authentication etc. Once you've broadened your knowledge
you
may be able to see where the pieces fit together and then you can start
your
project.
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Innovation is hard to schedule.
-- Dan Fylstra
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
On Saturday 09 November 2002 05:19, Karl James wrote:
> Jason, I am trying small with forms, reading php
> But I have so many questions that books cant answer sometimes
> Thus the reason I need a guide...
> Would you be able to help me with that?
Why not just post your question(s) here and let everybody help you?
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
You can now buy more gates with less specifications than at any other time
in history.
-- Kenneth Parker
*/
--- End Message ---
--- Begin Message ---
Well the problem is I have a lot of questions..
Since im a noobie...sorry I will try to post it
-----Original Message-----
From: Jason Wong [mailto:php-general@;gremlins.com.hk]
Sent: Friday, November 08, 2002 10:21 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Need MENTOR for Fantasy football project
On Saturday 09 November 2002 05:19, Karl James wrote:
> Jason, I am trying small with forms, reading php
> But I have so many questions that books cant answer sometimes
> Thus the reason I need a guide...
> Would you be able to help me with that?
Why not just post your question(s) here and let everybody help you?
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
You can now buy more gates with less specifications than at any other
time
in history.
-- Kenneth Parker
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
"Karl James" <[EMAIL PROTECTED]> wrote:
> I have the php bible 4 book but it
> Doesn’t tell you how to do things all the way
Well, I don't think there's a book that would tell you how to do things
"all the way". Besides, if there is, programming wouldn't be fun anymore ;)
Start from small things--I'm sure you'll be glad that you did...
> And still leaves with lots of questions.
Bring 'em in one by one--I'm sure there's a lot of people here who will
be willing to help esp. if you throw in specific questions :)
- E
--------------------------------------------------
"Rome wasn't built in a day alone."
--- End Message ---
--- Begin Message ---
"Sterling Hughes" <[EMAIL PROTECTED]> wrote in message
news:20021109011938.GB14712@;bumblebury.com...
> I definitely think that _you_ should do it.
> But this is not the proper place for these questions, ask them on
> [EMAIL PROTECTED]
Sorry for the inappropriate cross-posting Sterling. I was explicitly
looking for answers from people with inside knowlegde about the direction
development on the scanner is likely to go. I'm a little confused by your
answer: I take it you think I'm relatively safe leaving off the ?>. Did I
get your meaning correctly?
"Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote in message
news:5.1.1.6.2.20021109021843.00ca9a60@;mail.vogelsinger.at...
> The least I can say that it's bad style... it's not documented, and
> therefore any tag should be closed.
>
> Most ascii editors can be configured to discard trailing whitespaces; and
> PHP will even ignore a newline character following immediately a closing
tag:
I agree it's bad style - feels kinda like leaving off </html>. On the other
hand, I've got a situation where it's very easy for any of a number of
developers to break binary output in an unobvious way by editing quite
unrelated files (related only by a big tree of common includes). I'm
looking for a practical solution.
I can configure *my* editor (though it might take me some time to learn how
to do this in emacs). When dealing with a team of people, each with his own
religious convictions re text editor of choice, it's difficult enough to get
everyone to use spaces instead of tabs.
I know this is undocumented (I spent a lot of time reading archives of these
groups before posting). I have a hunch, though, that this is the kind of
fundamental behavior of the scanner that's not gonna change any time soon.
If it does, I hope it will break catastophically rather than mysteriously.
"David McArthur" <[EMAIL PROTECTED]> wrote in message
news:20021108221952.59058.qmail@;pb1.pair.com...
> PHP 4.2.2 (linux) doesn't seem to mind if I leave off the closing ?> tag
at
> the end of a file. Is the ?> assumed at EOF?
>
> I have PHP that outputs binary and along the way I include() a lot of php
> scripts. I'm constantly having problems when I leave a little whitespace
at
> the end of some script after the ?> which screws up the output binary.
> First time this happened it took me hours to figure out the cause.
>
> What does everyone think about just leaving off the ?> as a solution to
> this? It works for me now, but would any PHP developer care to
> prognosticate on the liklihood this might change in future?
--- End Message ---
--- Begin Message ---
Hey,
Got a problem using the header function on a file upload page to redirect
the user back to a web page. Here's the code:
#!/usr/bin/php -q
<?php
$filedest = "/home/$directory";
if (copy($clientfile,"$filedest/$clientfile_name"))
header("Location: http://www.webfusion.net.au...");
else
print("Error");
Any ideas on how i would get this to work. The error which shows is
Warning: Cannot add header information - headers already sent....
Thanks in advance.
--- End Message ---
--- Begin Message ---
Try removing all leading spaces between the shebang and the beginning of
the script:
#!/usr/bin/php -q
<?php
Marco
--
------------
php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers
On Fri, 2002-11-08 at 21:55, Brad Apps wrote:
> Hey,
>
>
>
> Got a problem using the header function on a file upload page to redirect
> the user back to a web page. Here's the code:
>
>
>
> #!/usr/bin/php -q
>
>
>
> <?php
>
>
>
> $filedest = "/home/$directory";
>
>
>
> if (copy($clientfile,"$filedest/$clientfile_name"))
>
>
>
> header("Location: http://www.webfusion.net.au...");
>
>
>
> else
>
>
>
> print("Error");
>
>
>
> Any ideas on how i would get this to work. The error which shows is
> Warning: Cannot add header information - headers already sent....
>
>
>
> Thanks in advance.
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Thanks Ernest for your suggestion.
I tried you idea with forward and backward slashes and
nothing seem
to change. I still see the return_var of 128. PHP is
trying to tell me what
the problem was, but I am unable to find what 128
means. Any idea as
where the the "return_var" for the "system" and "exec"
commands are defined?
Thanks
--- Ernest E Vogelsinger <[EMAIL PROTECTED]>
wrote:
> At 00:00 09.11.2002, Ladan Pickering said:
> --------------------[snip]--------------------
> >When I look at the program (hello.exe) under
> cygwin.
> >I see that the "x" bit is set for all. As far as I
> can
> >tell anyone is permitted to execute this program.
> --------------------[snip]--------------------
>
> Make your command like this
>
> c:/abc/hello.exe 2>&1
>
> to see if some error is given... might be a problem
> with environment space?
>
>
> --
> >O Ernest E. Vogelsinger
> (\) ICQ #13394035
> ^ http://www.vogelsinger.at/
>
>
__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2
--- End Message ---
--- Begin Message ---
> From: Kjartan Mannes [mailto:kjartan@;zind.net]
>
> Friday, November 8, 2002, 12:13:01 PM, Daevid Vincent wrote:
> > $max = max($myArray);
> > for( $x = 1; $x <= $length; $x++ ) {}
>
> > -- OR --
>
> > for( $x = 1; $x <= max($myArray); $x++ ) {}
>
> > My gut instinct tells me since PHP is interpreted, that the
> top one is
> > the better way to go, but with the Zend Optimizer, I don't
> know if PHP handles them the same way or not?
>
> The first one is faster, but it depends on the site of the
> array and how often you call the loop. I prefer doing it like
> this though:
>
> for($x = 1, $max = count($myArray); $x <= $max; $x++ ) {}
Just a little point-out that I used max() not count() because I need to
loop on the *largest value* in the array, not how many *elements* are
actually in the array. But the logic is still sound, and it is true that
calling a function is sub-optimal it seems, even though my array doesn't
change in any way when the for loop is called. PHP still calls the max()
or count() function each time anyways. So alas, I have to create another
variable that serves one single purpose and has a very finite lifespan.
;-)
> For some good optimization (and other) tips check out:
> http://phplens.com/lens/php-book/optimizing-debugging-php.php
> http://www.lerdorf.com/tips.pdf
Thanx for the pointers. I'll check 'em out.
d
--- End Message ---
--- Begin Message ---
Thanks all for taking the time to help me out. I
finally got the problem resolved. It appears that PHP
was trying to use cygwin1.dll and could not find it.
I am not sure why; I didn't think I even need
cygwin to run php w/ Apache. Once I put a copy of
cygwin1.dll in my system32 directory, my c++
.exe file started running.
Hope this helps someone else. If someone knows why
PHP needs any cygwin dlls, I would be interested in
knowing the reason.
"Ladan Pickering" <[EMAIL PROTECTED]> wrote in
message
news:20021109025418.61843.qmail@;web11708.mail.yahoo.com...
> Thanks Ernest for your suggestion.
> I tried you idea with forward and backward slashes
and
> nothing seem
> to change. I still see the return_var of 128. PHP is
> trying to tell me what
> the problem was, but I am unable to find what 128
> means. Any idea as
> where the the "return_var" for the "system" and
"exec"
> commands are defined?
>
> Thanks
>
> --- Ernest E Vogelsinger <[EMAIL PROTECTED]>
> wrote:
> > At 00:00 09.11.2002, Ladan Pickering said:
> > --------------------[snip]--------------------
> > >When I look at the program (hello.exe) under
> > cygwin.
> > >I see that the "x" bit is set for all. As far as
I
> > can
> > >tell anyone is permitted to execute this program.
> > --------------------[snip]--------------------
> >
> > Make your command like this
> >
> > c:/abc/hello.exe 2>&1
> >
> > to see if some error is given... might be a
problem
> > with environment space?
> >
> >
__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2
--- End Message ---
--- Begin Message ---
it seems my last post failed, let me try again:
I just compiled/installed apache/php4.2.3 with postgres
support. the default php.ini-dist is used. I added
extension=pgsql.so
but when I start apache, error_log shows it can't find
pgsql.so.
after some trial and error, I found the following line in
the default php.ini causes the problem:
extension_dir = ./
if I comment this line out, apache can load pgsql.so fine.
I also tried to change to
extension_dir = /usr/local/lib/php/extensions/no-debug-non-zts-20020429
this also solves the problem.
My question is: is the default value in php.ini incorrect
or am I doing something wrong?
Thanks!
Frank
--- End Message ---
--- Begin Message ---
I've been noticing that with Windows XP session variables migrate between
open browser windows, where in other versions of Windows the session
variables are kept within the browser window that they were initialized in.
The problem with this is that it seems like my website gets confused by
this, and thus people are unable to properly use some of the functionality.
I was wondering if anyone else has encountered problems like this, and if
so, how they managed to solve the issue.
Jason Cathcart
President - Acanthus Media Inc.
BSc. Computer Information Systems
403.710.0378
www.acanthusmedia.ca
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Jason,
I'm running Windows XP with Apache and PHP 4.2.0. I never experienced such a
problem with XP and sessions. I did, however, have to change the session
path in the php.ini file for the sessions to save to the correct temporary
directory. Maybe you have overlooked that?
> -----Original Message-----
> From: Jason [mailto:bio@;biohazardous.org]
> Sent: Friday, November 08, 2002 10:18 PM
> To: Php-General
> Subject: [PHP] Windows XP Session Issues
>
>
>
> I've been noticing that with Windows XP session variables migrate between
>
> open browser windows, where in other versions of Windows the session
>
> variables are kept within the browser window that they were
> initialized in.
>
> The problem with this is that it seems like my website gets confused by
>
> this, and thus people are unable to properly use some of the
> functionality.
>
> I was wondering if anyone else has encountered problems like this, and if
>
> so, how they managed to solve the issue.
>
>
>
> Jason Cathcart
> President - Acanthus Media Inc.
> BSc. Computer Information Systems
> 403.710.0378
> www.acanthusmedia.ca
> [EMAIL PROTECTED]
>
>
>
--- End Message ---
--- Begin Message ---
Is there anyone online that can help me with the project I posted?
I need some one to guide me thru this?
Karl
--- End Message ---
--- Begin Message ---
While testing my site with various browsers, I've run into a viewing problem
in IE6 and Mac/IE5.1.
In IE6, all I see is a line (which would be the base of the picture), while
in Mac/IE the output is 1" wide x 4" high and highly distorted. (that's why
I set height to 'auto' - to allow for varying heights).
I'm wondering:
Is my code at fault:
<?php
/* lotsa code here */
$_SESSION['px'] = "1";
session_write_close();
. . .
. . . <td align='left'><img src='/pix/{$_SESSION['rpix']}' width='120'
height='auto'></a></td> . . . ";
/* Is an 'alt=??' necessary in there? */
?>
Or is it a browser issue?
The code works well with Opera 6.01, Mozilla 0.98, and Konqueror 2.2.2
Any help where to look would be greatly appreciated.
Tia,
Andre
--- End Message ---
--- Begin Message ---
On Saturday 09 November 2002 08:35, John Meyer wrote:
> I want to get the top layer to appear right on top of where the other two
> are. How do I do this?
>
> <div id="More<?=$row["UserID"]?>" style="visibility: visible;
> zIndex:1"><a
> href="javascript:show('Layer<?=$row["UserID"]?>');show('layerhide<?=$row["U
Nothing to do with php, try asking on a DHTML list.
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
One has to look out for engineers -- they begin with sewing machines
and end up with the atomic bomb.
-- Marcel Pagnol
*/
--- End Message ---
--- Begin Message ---
Hi,
In some of my URLs I have to pass variables through the URL like
nav.php?page=about§ion=linux - when i do this and then scan my site for
W3C validation I get this
Line 40, column 28:
... <a href="nav.php?page=about§ion=Linux"><font color="#256 ...
^
Error: unknown entity "section"
How could I acomplish the same results and not trigger an error with W3C,
is there a way to do it with out having to start sessions on every hit to
that page ?
-Lee
--- End Message ---
--- Begin Message ---
hi,
just use & instead
<a href="mypage.php?name=khalid&age=d"></a>
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
--- End Message ---
--- Begin Message ---
and in your php.ini file add:
arg_separator.output = "&"
On Sat, 9 Nov 2002, Khalid El-Kary wrote:
> hi,
> just use & instead
> <a href="mypage.php?name=khalid&age=d"></a>
>
>
>
>
>
> _________________________________________________________________
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Hey
I did what both of you all said to do
href="nav.php?page=about&section=Linux"
and my arg_separator.output is ok but Im stilling getting that same error
with W3C, my page is executing ok and was before, but I cant get it W3C HTML
4.01 valid with that error.
-Lee
"Conbud" <[EMAIL PROTECTED]> wrote in message
news:20021109061217.3242.qmail@;pb1.pair.com...
> Hi,
> In some of my URLs I have to pass variables through the URL like
> nav.php?page=about§ion=linux - when i do this and then scan my site
for
> W3C validation I get this
> Line 40, column 28:
> ... <a href="nav.php?page=about§ion=Linux"><font color="#256 ...
> ^
> Error: unknown entity "section"
>
> How could I acomplish the same results and not trigger an error with W3C,
> is there a way to do it with out having to start sessions on every hit to
> that page ?
>
> -Lee
>
>
>
--- End Message ---
--- Begin Message ---
I want to know recommendations securing GET | POST | SESSIONS or other data
in WebPages.
One site I may be developing for the local govt has the need to take and
receive data from a database and data will be past with GET | POST |
SESSIONS.
Any recommendations regarding this would be welcome.
The server is a national web host, one of two I may be using... both of
which are reasonably secure.
--- End Message ---
--- Begin Message ---
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Never trust data from the client...always filter it(I use an lib to do that)!
Make sure register_globals is off or code accordingly.
HTH!
~Paul
On Saturday 09 November 2002 01:12 am, Creighton Brown wrote:
> I want to know recommendations securing GET | POST | SESSIONS or other data
> in WebPages.
>
> One site I may be developing for the local govt has the need to take and
> receive data from a database and data will be past with GET | POST |
> SESSIONS.
>
> Any recommendations regarding this would be welcome.
>
> The server is a national web host, one of two I may be using... both of
> which are reasonably secure.
- --
~Paul Nicholson
Design Specialist @ WebPower Design
"The web....the way you want it!"
[EMAIL PROTECTED]
www.webpowerdesign.net
"It said uses Windows 98 or better, so I loaded Linux!"
Registered Linux User #183202 using Register Linux System # 81891
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9zKhPDyXNIUN3+UQRAm22AJ0RTHn6agukzCxSLEQv2g2p+BoZtgCfU5qI
B0wL2RD7frx6CVDOk+UIOIk=
=5jop
-----END PGP SIGNATURE-----
--- End Message ---
--- Begin Message ---
And, you can add to this
> Never trust data from the client...always filter it(I use an lib to do
that)!
> Make sure register_globals is off or code accordingly.
Make sure that you're using SSL (https).
Also, (maybe not directly related though...) if possible, separate your web
server from your database server. And also, you might want to create
different database users for different purposes (i.e. one user can ONLY
select, another ONLY for updating, etc.). You can even forget about a user
that can delete data--you can always do it yourself offline or at least not
via the web server.
HTH,
- E
--- End Message ---
--- Begin Message ---
Does anyone know of a function, or a method to calculate how many bytes are
in a string? Similar to the filesize file system function.
Any help would be appreciated.
Regards,
Ian Newlands
--- End Message ---
--- Begin Message ---
On Saturday 09 November 2002 14:22, Ian Newlands wrote:
> Does anyone know of a function, or a method to calculate how many bytes are
> in a string? Similar to the filesize file system function.
>
> Any help would be appreciated.
Assuming 1 character = 1 byte, then strlen().
--- End Message ---
--- Begin Message ---
Or,
"Jason Wong" <[EMAIL PROTECTED]> wrote:
> On Saturday 09 November 2002 14:22, Ian Newlands wrote:
> > Does anyone know of a function, or a method to calculate how many bytes
are
> > in a string? Similar to the filesize file system function.
> >
> > Any help would be appreciated.
>
> Assuming 1 character = 1 byte, then strlen().
>
Just write the string to a file first then check the filesize. This should
work (I think)
even if you're dealing with multi-byte characters wherein 1 character = 2
bytes
(or more?).
There's mb_strlen() but I don't think it'll be useful though...
- E
--- End Message ---
--- Begin Message ---
I have a database that stores a value of the type double. I do a SUM()
query on the column and return save the value to a variable called,
'$amount' which I divide into a fixed value (5000) . The math works out
fine when $amount < 1000. However, when $amount > 1000, then the decimal
places are wrong.
// successful query, now fetch the data.
$row = mysql_fetch_row($result);
if (!$row) {
return (-1);
}
$dollar = $row[0];
$tmp = ($dollar)/((double)5000);
echo $tmp;
return ($dollar);
$amount = 1,104.40
the result of echo, $tmp is displayed as '0.0002'. What's wrong here? The
problem only occurs when the value is greater than a 1,000? Could the ','
messed the computation up somehow? I did another computation
$a = 1000
$b = 5000
$c = $a/$b;
Thanks,
-Peter
$c does equal '0.2' which is correct.
$amount
--- End Message ---
--- Begin Message ---
Hello,
(B
(B"Peter" <[EMAIL PROTECTED]> wrote in message
(B[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
(B
(B...[snip]...
(B
(B> the result of echo, $tmp is displayed as '0.0002'. What's wrong here?
(BThe
(B> problem only occurs when the value is greater than a 1,000? Could the ','
(B> messed the computation up somehow?
(B
(BI think so because
(B
(B 1/5000 = 0.0002
(B
(B(Only the number *before* the ',' is being used.)
(B
(BTry taking away the ',' then by using str_replace() and calculate again.
(B
(B- E
--- End Message ---
--- Begin Message ---
hi i was wondering if there was anyway to upload a whole directory using the
php ftp functions rather than single files ??
--- End Message ---
--- Begin Message ---
http://www.ultimatefootballleague.com/Create_Account.htm
Im Trying to create this form so that this will give you access to login
Team action page
Where you can do the add/drops Trades and submit starters..
SO what im trying to do on this form is have the results mailed to me
in my in box and be able to view
All the user imported on the form in my email body that I rec, but when
I test this code out.
It only provides a postdata.att
With nonthing in the email body.
Any help with this would be greatly appreciated.
Can some one do a view source and help me out.
Please forgive my ignorance if I did something wrong
As im starting from the beginning and trying to learn forms and php
together
Thanks for your understanding.
Sincerely
Karl James "The_Saint" irc tag
--- End Message ---
--- Begin Message ---
why don't you submit it to a php script (instead of using the mailto ) and get mail()
to email it to you, you could also process it and save the info somewhere.
Paul Roberts
[EMAIL PROTECTED]
++++++++++++++++++++++++
----- Original Message -----
From: "Karl James" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 09, 2002 12:44 AM
Subject: [PHP] Help with form
http://www.ultimatefootballleague.com/Create_Account.htm
Im Trying to create this form so that this will give you access to login
Team action page
Where you can do the add/drops Trades and submit starters..
SO what im trying to do on this form is have the results mailed to me
in my in box and be able to view
All the user imported on the form in my email body that I rec, but when
I test this code out.
It only provides a postdata.att
With nonthing in the email body.
Any help with this would be greatly appreciated.
Can some one do a view source and help me out.
Please forgive my ignorance if I did something wrong
As im starting from the beginning and trying to learn forms and php
together
Thanks for your understanding.
Sincerely
Karl James "The_Saint" irc tag
--- End Message ---
--- Begin Message ---
Hello,
"Karl James" <[EMAIL PROTECTED]> wrote:
> http://www.ultimatefootballleague.com/Create_Account.htm
>
> Im Trying to create this form so that this will give you access to login
> Team action page
> Where you can do the add/drops Trades and submit starters..
I suggest you try something simpler.
> SO what im trying to do on this form is have the results mailed to me
> in my in box and be able to view
> All the user imported on the form in my email body that I rec, but when
> I test this code out.
> It only provides a postdata.att
> With nonthing in the email body.
Why don't you try something like this first. Create a form that
1. When a visitor clicks on "Submit", the entered data would be echoed to
the browser.
Simply googling for "forms php", I found an interesting tutorial:
http://www.phpfreaks.com/phpmanual/page/tutorial.forms.html
Try it first or the others in the results page. (I didn't really read it but
it looks good.) Then,
2. After that you might want to learn how to validate the data entered--you
don't want any bad/malicious data being sent to you or to your server, no?
(Again, you can google for this or even search the archives how to do it.)
3. THEN, perhaps you can learn how to send mail using forms. You might want
to do some reading first in the manual:
http://www.php.net/manual/en/ref.mail.php
> Any help with this would be greatly appreciated.
HTH,
- E
--- End Message ---
--- Begin Message ---
This is I get regarding the
Email sent from my form
http://www.ultimatefootballleague.com/Create_Account.htm
-----Original Message-----
From: Karl James [mailto:karl.james@;verizon.net]
Sent: Friday, November 08, 2002 4:46 PM
To: [EMAIL PROTECTED]
Subject: Form posted from Microsoft Internet Explorer.
--- End Message ---
--- Begin Message ---
Sorry about that guys, here is a bit more info that might be useful:
I forgot to tell you that I'm working on a Windows XP box with full rights,
which means the default temporary directory is C:\WINDOWS\Temp and there are
no limitations on what I can and cannot access on the system (running as
system administrator). I did change that default to C:\PHP\tmp_uploads. I
ran this script with the default temp directory as well, same result.
I tried the code at http://www.php.net/manual/sk/features.file-upload.php
and listed the results of the test below. I simplified the code a little,
and here it is:
--------------[clip
start]--------------------------------------------------------------------
<?php
if ($submit) {
if (is_uploaded_file($_FILES['userfile']['tmp_name'])) {
echo "The temporary file exists";
} else {
echo "Possible file upload attack.";
}
echo "<br> Filename: " . $_FILES['userfile']['name']
. "<br> Mime-Type: " . $_FILES['userfile']['type']
. "<br> File Size: " . $_FILES['userfile']['size'] . " bytes"
. "<br> Temporary File Name: " . $_FILES['userfile']['tmp_name']
. "<br> Error: " . $_FILES['userfile']['error'];
} else {
?>
<form enctype="multipart/form-data" action="img_upload.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
Send this file: <input name="userfile" type="file">
<input type="submit" name="submit" value="submit">
</form>
<?php } ?>
--------------[clip
end]--------------------------------------------------------------------
Here is what's happening:
2. When the submit button is pushed, the files are uploaded through the form
but the temporary file is never created on the system. I did a search on the
entire C: drive for the temporary file that should have been created, but
it's not there.
Here is the data received after the file is supposedly uploaded with a GIF
image:
The temporary file exists
Filename: icon_processing.gif
Mime-Type: image/gif
File Size: 408 bytes
Temporary File Name: C:/PHP/tmp_uploads\php93.tmp
Error: 0
Here is the data received after the file is supposedly uploaded with a JPG
image:
The temporary file exists
Filename: Sunset.jpg
Mime-Type: image/pjpeg
File Size: 71189 bytes
Temporary File Name: C:/PHP/tmp_uploads\php95.tmp
Error: 0
NOTE: The error code 0 means that there was no error uploading the file.
THE QUESTION: Shouldn't PHP automatically create a temporary file of the
uploaded image? Is there something I'm missing in the php.ini settings?
If you have any other questions that might help you further your probe into
this problem, please let me know. Thanks...
- Darwin
--------------[old
message]--------------------------------------------------------------------
> Ok, I have a problem with my file upload. When I upload a file, say $img,
> only $img is available and when I echo $img to the screen it gives the
full
> path of the temporary image "supposedly" created by PHP. Echoing
> $_FILE['img']['tmp_name'], or any of the other $_FILE array elements,
> doesn't give anything. There is no array of information for the uploaded
> file, possibly because of the following problem I'm having:
>
> Another weird thing is that no temporary file is even created on the
server
> (I did a system search on the C: drive of the windows box I'm using). Here
> is the info from my php.ini file:
>
> --------------------------------------------------------------------------
--
> ---
>
> ;;;;;;;;;;;;;;;;
> ; File Uploads ;
> ;;;;;;;;;;;;;;;;
>
> ; Whether to allow HTTP file uploads.
> file_uploads = On
>
> ; Temporary directory for HTTP uploaded files (will use system default if
> not
> ; specified).
> upload_tmp_dir = C:\PHP\tmp_uploads
>
> ; Maximum allowed size for uploaded files.
> upload_max_filesize = 6M
>
> --------------------------------------------------------------------------
--
> ----
>
> I even changed the upload_tmp_dir setting to the default and it still
didn't
> create a temporary file of the image on the server. GD is definately
> installed and enabled according to phpinfo() -- although GD has nothing to
> do with this. I'm uploading *.jpg/*.jpeg files only. register_globals is
on
> (I am aware of the risks). So what could be wrong? Is there another
setting
> in the php.ini file that I need to worry about that is not set by default?
> I've pondered and tested this long enough and I'm beyond frustration,
> someone please help me with some suggestions to get me through this...
>
> Thanks,
> - Darwin
--- End Message ---
--- Begin Message ---
On Saturday 09 November 2002 18:39, [EMAIL PROTECTED] wrote:
> Sorry about that guys, here is a bit more info that might be useful:
>
> I forgot to tell you that I'm working on a Windows XP box with full rights,
> which means the default temporary directory is C:\WINDOWS\Temp and there
> are no limitations on what I can and cannot access on the system (running
> as system administrator). I did change that default to C:\PHP\tmp_uploads.
> I ran this script with the default temp directory as well, same result.
Assuming that you webserver really does have access to write to those
directories then ...
[snip 'simplified' code]
> Here is what's happening:
>
> 2. When the submit button is pushed, the files are uploaded through the
> form but the temporary file is never created on the system. I did a search
> on the entire C: drive for the temporary file that should have been
> created, but it's not there.
... you didn't read the manual like I suggested. Because otherwise you'll know
that "the file will be deleted from the temporary directory at the end of the
request if it has not been moved away or renamed."
If you didn't 'simplify' the example and removed the all important copy() or
move_uploaded_file() then you would have had something that worked!
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Mount St. Helens should have used earth control.
*/
--- End Message ---
--- Begin Message ---
Hello PHP-ppl,
please help me with an easy question.
I want to recompile my sorce-installation from tarball, because I forgot an essential
flag, the --enable-ftp flag:
./configure ..... --enable-ftp .... --other-flags
Orderly I erased the config.cache file, the make distclean
After running
./configure -- ....
make
make install
How can I start up this new and recompiled version of PHP???
Oliver Etzel
lowcost domains
lowcost serverhousing www.t-host.de
--- End Message ---
--- Begin Message ---
By restarting your web server?
- E
<[EMAIL PROTECTED]> wrote:
[snip]
> How can I start up this new and recompiled version of PHP???
[/snip]
--- End Message ---
--- Begin Message ---
"Stephen" <[EMAIL PROTECTED]> wrote:
> I've always had trouble doing that. Is there like a tutorial or anything
on
> how to setup PHP and MySQL?
Simple. Google for "setup PHP and MySQL".
- E
...[snip]...
--- End Message ---