|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Fri Jul 05 2002 - 11:44:46 CDT
php-general Digest 5 Jul 2002 16:44:46 -0000 Issue 1446
Topics (messages 105565 through 105684):
Re: PHP with MYSQL help with timeout/max execution time error
105565 by: Alberto Serra
105568 by: Andrew Braund
Re: opening pdf file in new window with a POST operation
105566 by: Peter James
105567 by: Tom Rogers
105579 by: Miguel Cruz
105677 by: Pete James
Re: MySQL backups?
105569 by: Justin French
105574 by: Miguel Cruz
How to cast objects in arrays.
105570 by: Anas Mughal
105571 by: Martin Towell
105573 by: Alberto Serra
Re: Calander with highlighting
105572 by: George Nicolae
Re: Does Location: headers constantly
105575 by: Miguel Cruz
105679 by: Analysis & Solutions
HTTPS vs. HTTP ?
105576 by: Jason Caldwell
105578 by: Miguel Cruz
105580 by: Philip Olson
105585 by: Alberto Serra
105600 by: Jason Caldwell
105626 by: colin mcdonald
Re: eregi problems
105577 by: Miguel Cruz
Re: Programmer's Browser
105581 by: Miguel Cruz
concat question
105582 by: Matthew K. Gold
105584 by: Miguel Cruz
105589 by: joakim.andersson.cybercom.se
Re: resizing images comming out of blobs
105583 by: joakim.andersson.cybercom.se
105608 by: Dan Koken
105615 by: joakim.andersson.cybercom.se
Re: MySQL news database structure
105586 by: Miguel Cruz
Print Question
105587 by: Chris Kay
105619 by: Kondwani Spike Mkandawire
105625 by: colin mcdonald
how to resort results of a query
105588 by: Matthew K. Gold
105620 by: Chris Hewitt
105637 by: Matthew K. Gold
105663 by: Chris Hewitt
include errors
105590 by: Jean-François GAZET
105592 by: hugh danaher
105595 by: Jean-François GAZET
png image doesn't show
105591 by: hugh danaher
105612 by: joakim.andersson.cybercom.se
105634 by: James E Hicks III
Re: Handling of constants in strings
105593 by: Uwe Birkenhain
Re: How to pass unknown number of variables to a function?
105594 by: Uwe Birkenhain
Upgrading everything
105596 by: César Aracena
105597 by: Richard Black
105599 by: César Aracena
PHP Automatic Backup
105598 by: César Aracena
105601 by: Latex Master
105604 by: Alberto Serra
Is there an easy way to divid up HTTP_USER_AGENT?
105602 by: JJ Harrison
105603 by: Alberto Serra
105660 by: JJ Harrison
105661 by: John Legg
105665 by: Chris Garaffa
105673 by: Alberto Serra
Multiple text using echo
105605 by: Craig
105606 by: Tommy Claasens - Q Data KZN
105607 by: John Legg
105611 by: Neil Freeman
105613 by: Neil Freeman
Removing the #!/usr... from cgi output?
105609 by: David Brannlund
105617 by: colin mcdonald
105624 by: David Brannlund
105628 by: colin mcdonald
Trouble with Pspell: "Unable to load the 'aspell' module"
105610 by: David Brannlund
How to use transparent png in createfrompng?
105614 by: Victor Spång Arthursson
105616 by: joakim.andersson.cybercom.se
Little optimisation question
105618 by: Latex Master
105630 by: Alberto Serra
105668 by: Jason Wong
Re: Uninitialized string offset
105621 by: Chris Hewitt
105623 by: Danny Shepherd
Re: [PHP-DB] Re: resizing images comming out of blobs
105622 by: Camelia Enderby
php form with textarea
105627 by: adi
105629 by: colin mcdonald
test
105631 by: Erik Hegreberg
textarea new line
105632 by: adi
105633 by: colin mcdonald
105635 by: PHPCoder
105636 by: PHPCoder
105646 by: Michiel Lange
Re: IIS unexpected error
105638 by: Scott Fletcher
Re: Problem With ora_do
105639 by: Grimes, Dean
$_SESSION (still doesn't work)
105640 by: Scott Fletcher
_() undefined in 4.2.1
105641 by: Andy Woolley
105651 by: Andy Woolley
$_COOKIE
105642 by: Scott Fletcher
105649 by: Alberto Serra
105652 by: Scott Fletcher
105664 by: Alberto Serra
105684 by: Scott Fletcher
Maybe not the right place, but...
105643 by: Alberto Serra
105644 by: Latex Master
105645 by: Andy Woolley
$_SESSION troubles
105647 by: Michiel Lange
105671 by: Michiel Lange
Re: textarea new line+mysql update
105648 by: adi
105650 by: colin mcdonald
function for size of array
105653 by: Scott Fletcher
105654 by: Terence Kearns
105655 by: Terence Kearns
105656 by: Scott Fletcher
105657 by: Terence Kearns
105662 by: Cal Evans
105666 by: Jason Wong
105675 by: Neil Freeman
105681 by: Scott Fletcher
105683 by: Larry Rosenman
help with session_decode in PHP 4.20 (fairly urgent)
105658 by: Simon Troup
Re: gc_probability: requests tallied per server or domain?
105659 by: Johnson, Kirk
./configure with register_globals turned on?
105667 by: Scott Fletcher
105669 by: Larry Rosenman
PHP for AIX.5.1
105670 by: A Jeyaraj
105674 by: Scott Fletcher
105676 by: Michiel Lange
105678 by: Scott Fletcher
Re: Using fsockopen
105672 by: Scott Fletcher
to remove html tags from a string.
105680 by: Anil Garg
localhost - passing variables
105682 by: Tony Tzankoff
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:
Police Trainee wrote:
> i have a mysql table with approximately 9800 rows and
> i attempt to use PHP to display the entire table onto
> a web page. after a few minutes, the page outputs an
> error indicating maximum execution time of 60 seconds
> exceeded in ./libraries/display_tbl.lib. I attempted
> to load mysqld with mysqld -O net_write_timeout=300,
> however, the value for that variable seems to stay at
> 60 and does not change to 300. i do not know if this
> is the source or cause of the problem though as
> execution time does not sound the same as a write
> timeout.
As an immediate thought, I'd say you should limit the number of rows you
want to show and make it a step by step consultation. Something like 100
rows per page. This has little to do with the timeout problem (10.000
rows should not really take that much time anyway) but it's a user-side
consideration. All that stuff is going to make a HUGE page and just kill
their browsers, besides, it will take time to deliver that much to a
remote user.
Now let's see the timeout. AFAIK Apache comes with a 30 seconds limit,
so the 60 second thing sounds weird enough. Can you tell me what's your
system like?
And now to the database. Would you tell us what's the table like and
what sort of query are you running against it? Afraid it's hard to
answer your question without that stuff :)
Alberto
Kiev
--
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
![]()
LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......
attached mail follows:
> Police Trainee wrote: > > i have a mysql table with approximately 9800 rows and > > i attempt to use PHP to display the entire table onto > > a web page. after a few minutes, the page outputs an > > error indicating maximum execution time of 60 seconds > > exceeded in ./libraries/display_tbl.lib. I attempted > > to load mysqld with mysqld -O net_write_timeout=300, > > however, the value for that variable seems to stay at > > 60 and does not change to 300. i do not know if this > > is the source or cause of the problem though as > > execution time does not sound the same as a write > > timeout.
is PHP timing out? try ini_set("max_execution_time","300"); // or set_time_limit(300)
Regards Andrew Braund
attached mail follows:
----- Original Message -----
From: "Richard Lynch" <rich
phpbootcamp.com>
Newsgroups: php.general
To: <php-general
lists.php.net>
Sent: Thursday, July 04, 2002 3:28 PM
Subject: Re: opening pdf file in new window with a POST operation
> ><form action="https://my.server/reports.php" method="post" > >target="_blank"> > ><input type=submit value='Show PDF'> > ></form> > ><form action="https://my.server/reports.php" method="get" > >target="_blank"> > ><input type=submit value='Show PDF'> > ></form> > > > >These forms are identical with the exception of the post/get methods. > > > >A PDF file is being dynamically generated and displayed in a pop-up. > > > >The GET method form works fine, while the POST method (which is what I > >need to use) pops up a message about the page containing both secure and > >nonsecure data. > > > >WTF? > > Well, the new browser window opens, but you're loading a PDF, not HTML, so > it's not really getting any data at all. The data it's not getting isn't > secure, by definition, since there's nothing there.
I'm not sure that I understand what you're saying here... I'm loading a php file, that is creating the pdf on-the-fly. This php file is the one receiving the POST data, not the window - or do I not understand?
BTW... This example is not how the application works. It's just a test that I used to narrow down the problem, and recreate in a controlled situation. The real application needs to have the pdf file pop up in a separate window using POST vars, which, in the application, is done using Javascript - but I digress...
How is the POST data not 'secure' but the GET data is? How is it not secure 'by definition'? There's nothing where? Please expand.
Thanks for you response, Pete.
attached mail follows:
Hi get data is insecure by nature so the whole page is insecure and no warnings, as soon as you post you invoke the security. You probably have a url on your page that is coming from an insecure server (http:// instead of https://) Tom
At 11:01 PM 4/07/2002 -0600, Peter James wrote:
>----- Original Message -----
>From: "Richard Lynch" <rich
phpbootcamp.com>
>Newsgroups: php.general
>To: <php-general
lists.php.net>
>Sent: Thursday, July 04, 2002 3:28 PM
>Subject: Re: opening pdf file in new window with a POST operation
>
>
> > ><form action="https://my.server/reports.php" method="post"
> > >target="_blank">
> > ><input type=submit value='Show PDF'>
> > ></form>
> > ><form action="https://my.server/reports.php" method="get"
> > >target="_blank">
> > ><input type=submit value='Show PDF'>
> > ></form>
> > >
> > >These forms are identical with the exception of the post/get methods.
> > >
> > >A PDF file is being dynamically generated and displayed in a pop-up.
> > >
> > >The GET method form works fine, while the POST method (which is what I
> > >need to use) pops up a message about the page containing both secure and
> > >nonsecure data.
> > >
> > >WTF?
> >
> > Well, the new browser window opens, but you're loading a PDF, not HTML, so
> > it's not really getting any data at all. The data it's not getting isn't
> > secure, by definition, since there's nothing there.
>
>I'm not sure that I understand what you're saying here... I'm loading a php
>file, that is creating the pdf on-the-fly. This php file is the one
>receiving the POST data, not the window - or do I not understand?
>
>BTW... This example is not how the application works. It's just a test that
>I used to narrow down the problem, and recreate in a controlled situation.
>The real application needs to have the pdf file pop up in a separate window
>using POST vars, which, in the application, is done using Javascript - but I
>digress...
>
>How is the POST data not 'secure' but the GET data is? How is it not secure
>'by definition'? There's nothing where? Please expand.
>
>Thanks for you response,
>Pete.
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
On Fri, 5 Jul 2002, Tom Rogers wrote: > get data is insecure by nature so the whole page is insecure and no > warnings, as soon as you post you invoke the security. You probably have a > url on your page that is coming from an insecure server (http:// instead > of https://)
Both GET and POST data are encrypted when sending a request to a https:// URL.
miguel
attached mail follows:
Tom Rogers wrote: > > Hi > get data is insecure by nature so the whole page is insecure and no > warnings, as soon as you post you invoke the security. You probably have a > url on your page that is coming from an insecure server (http:// instead > of https://) > Tom
Believe me when I say that there are no insecure links, or parts of my page coming from such... everything refers to https://, and besides it's a PDF with no links, and it is fully generated on a secure application server... and if there were insecure links, they would invoke warnings on the GET as well...
This problem is going to drive me to the bottle...
Thanks, P.
attached mail follows:
Or phpMyAdmin(.org i think), a free php based mysql database management GUI.
By the way, this would have been better asked on a MySQL mailing list.
Justin French -------------------- Creative Director http://Indent.com.au --------------------
on 05/07/02 1:01 PM, Alberto Serra (albertoserra
gala.net) wrote:
> Pag wrote: >> >> Like you all probably know from a previous post, i am designing a >> website using MySQL, well, redesigning anyway. So i do all the >> database'ing stuff, fill the tables with news, content, etc, what if i >> eventually have to change hosts? How can i move my data from one side to >> another? Or even make a backup on my computer at home. I dont think we >> loose all information when we have to move, right? >> >> Pag >> (www.pagongski.com) >> >> >> > > look for mysqlphpadmin. Is what you need. > > Alberto > Kiev
attached mail follows:
On Fri, 5 Jul 2002, Pag wrote: > Like you all probably know from a previous post, i am designing a > website using MySQL, well, redesigning anyway. So i do all the > database'ing stuff, fill the tables with news, content, etc, what if i > eventually have to change hosts? How can i move my data from one side to > another? Or even make a backup on my computer at home. I dont think we > loose all information when we have to move, right?
This isn't a PHP question.
mysqldump + rsync + mysql
miguel
attached mail follows:
I have a function getRow() that returns a new instance of an object called IvActivity. I insert this new instance into $list. I need to call getTitle method on each of the inserted objects. However, I keep on getting parse error on the line that does the casting. Please help.
$i = 0; while ($row = mysql_fetch_array($mysql_result)) { $instance = $this->getRow($row); $list[$i] = $intance; $i++; }
// ...
foreach ($list as $item) { $act = (IvActivity) $item; echo "item: " . $act->getTitle(); }
(I also tried simple for loop with $list[$i] logic. Unf, I am not able to cast those objects either.)
__________________________________________________ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com
attached mail follows:
don't try to cast... it should just return an object of type IvActivity assuming $this->getRow($row) returns an object of type IvActivity in the first place
-----Original Message-----
From: Anas Mughal [mailto:anasmughal
yahoo.com]
Sent: Friday, July 05, 2002 4:18 PM
To: php-general
lists.php.net
Subject: [PHP] How to cast objects in arrays.
I have a function getRow() that returns a new instance of an object called IvActivity. I insert this new instance into $list. I need to call getTitle method on each of the inserted objects. However, I keep on getting parse error on the line that does the casting. Please help.
$i = 0; while ($row = mysql_fetch_array($mysql_result)) { $instance = $this->getRow($row); $list[$i] = $intance; $i++; }
// ...
foreach ($list as $item) { $act = (IvActivity) $item; echo "item: " . $act->getTitle(); }
(I also tried simple for loop with $list[$i] logic. Unf, I am not able to cast those objects either.)
__________________________________________________ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Anas Mughal wrote: > I have a function getRow() that returns a new instance > of an object called IvActivity. I insert this new > instance into $list. I need to call getTitle method on > each of the inserted objects. However, I keep on > getting parse error on the line that does the casting.
> $i = 0; > while ($row = mysql_fetch_array($mysql_result)) { > $instance = $this->getRow($row); > $list[$i] = $intance; > $i++; > }
I take this is just a typo in your example.
$list[$i] = $intance;
should really be:
$list[$i] = &$instance;
by not using the ampersand you pass a COPY of the object and not the object you built. Maybe it doesn't do any harm in your application, but it tends to be dangerous.
> foreach ($list as $item) { > $act = (IvActivity) $item; > echo "item: " . $act->getTitle(); > }
this may just be:
foreach ($list as $item) { echo "item: " . $item->getTitle(); }
Because you said that: > getRow() returns a new instance of an object called IvActivity.
Watch out for copies again. I am not sure whether this will execute the object instead of a fresh copy. Again, this might mean nothing in your context.
Alberto Kiev
--
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
![]()
LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......
attached mail follows:
Take a look at http://www.bucharest-accommodation.ro/flat_univstudio.php .That is what you want?
--Best regards, George Nicolae IT Manager ___________________ PaginiWeb.com - Professional Web Design www.PaginiWeb.com
"Peter" <php
vfsa.com.au> wrote in message news:DPEPKCNEFOKBCNNANCIPEEGNCEAA.php
vfsa.com.au... > > > > > >I absolutely don't see why you can't code it yourself. There are > >calendar functions for PHP (see the manual), and you can change the > >color per user with php (use a switch to set a variable with the color). > >I don't see what's so complicated about it. > > > Your right would be fairly easy .. how ever I was seeing if I'd be reinventing the wheel by doing this thats all :) > > Cheers >
attached mail follows:
On Thu, 4 Jul 2002, Analysis & Solutions wrote: > But, the thing is, I'm under the impression that PHP (and/or Apache?) > doesn't send anything else from your script once a Location header is > sent. I just confirmed this with two different tests.
Interesting. What tests did you perform?
Given this PHP file:
<? header('Location: page2.php'); echo "This is the text after the location header.\n"; ?>
I get these results:
% telnet localhost 80 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET /loc.php
HTTP/1.1 302 Found Date: Fri, 05 Jul 2002 06:54:22 GMT Server: Apache/1.3.26 (Unix) X-Powered-By: PHP/4.2.1 Location: page2.php Connection: close Content-Type: text/html
This is the text after the location header. Connection closed by foreign host.
miguel
attached mail follows:
On Fri, Jul 05, 2002 at 01:56:58AM -0500, Miguel Cruz wrote: > > Interesting. What tests did you perform?
I used similar things, including a file('test.php') statement in another php script and using GET from the command line.
telnet is a good test, but I didn't have it available at the time.
--Dan
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
sqlsolution.info | layoutsolution.info | formsolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
attached mail follows:
Is there a way I can programmatically switch between HTTPS and HTTP... I use a lot of INCLUDE's instead of HEADER("Location: ...");
Can I use HEADER in another way (without redirecting) to activate HTTPS or HTTP for any given page?
Thanks. Jason
attached mail follows:
On Thu, 4 Jul 2002, Jason Caldwell wrote: > Is there a way I can programmatically switch between HTTPS and HTTP... I use > a lot of INCLUDE's instead of HEADER("Location: ..."); > > Can I use HEADER in another way (without redirecting) to activate HTTPS or > HTTP for any given page?
Nope. The protocol is determined by the client when it makes its request. Once your code is running, it's too late. At that point you can only redirect to a https:// URL, which leads the client to generate a new request.
miguel
attached mail follows:
On a related note, if https then the predefined variable HTTPS will exist. $_SERVER['HTTPS'] will equal 'on'.
Regards, Philip Olson
On Fri, 5 Jul 2002, Miguel Cruz wrote:
> On Thu, 4 Jul 2002, Jason Caldwell wrote: > > Is there a way I can programmatically switch between HTTPS and HTTP... I use > > a lot of INCLUDE's instead of HEADER("Location: ..."); > > > > Can I use HEADER in another way (without redirecting) to activate HTTPS or > > HTTP for any given page? > > Nope. The protocol is determined by the client when it makes its request. > Once your code is running, it's too late. At that point you can only > redirect to a https:// URL, which leads the client to generate a new > request. > > miguel > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
>>Is there a way I can programmatically switch between HTTPS and HTTP... I use >>a lot of INCLUDE's instead of HEADER("Location: ..."); >> >>Can I use HEADER in another way (without redirecting) to activate HTTPS or >>HTTP for any given page?
It depends on the nature of the data involved. If javascript works you can avoid having a submit button and use a normal button with a function on the onclick event. The function will either send GET data to HTTP or HTTPS, depending on actual data content.
But that also means all data needed to make such a decision shall be available in the client scope, in the form of javascript source. It can turn out to be quite an unsecure way to call for security LOLOL
But maybe it's just a stupid checkbox and in that case you can just do it like this.
Alberto Kiev
--
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
![]()
LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......
attached mail follows:
I'm a little confused about how HTTPS actually works when you call it via a FORM tag or HEADER("Location: ...")
This may sound like a stupid question -- but it was never explained to me, so...
I have my users fill out (for example) FORM A -- this form has basic non-secure info. Then they press SUBMIT, now on FORM B, I want them to fill out their payment information.
Now, I notice that when I go to web sites and fill out payment information, I see the little lock icon at the bottom of my browser, and the https://yadadada in the URL field... however, I'm unclear about something...
If I call FORM B with HTTPS will my blank FORM B transmit to the user encrypted, and will I have to call HTTPS again for my PHP CC Processing App?
In other words, what's taking place when I call a form or page with HTTPS? Is it that the data only gets encrypted on a SUBMIT ?
Dunno if my question makes much sense .. but I guess I'd like to know if it's even required for me to call FORM B in a secure state (for the users CC data to be SENT encrypted), but instead just call the process attached to the FORM (submit button) on FORM B in HTTPS ?? Does that make sense?
Jason
"Miguel Cruz" <mnc
stoic.net> wrote in message
news:Pine.LNX.4.44.0207050210560.27898-100000
stoic.net...
> On Thu, 4 Jul 2002, Jason Caldwell wrote:
> > Is there a way I can programmatically switch between HTTPS and HTTP... I
use
> > a lot of INCLUDE's instead of HEADER("Location: ...");
> >
> > Can I use HEADER in another way (without redirecting) to activate HTTPS
or
> > HTTP for any given page?
>
> Nope. The protocol is determined by the client when it makes its request.
> Once your code is running, it's too late. At that point you can only
> redirect to a https:// URL, which leads the client to generate a new
> request.
>
> miguel
>
attached mail follows:
I'll try to explain:
If you have a form at a http URL and the action of the form is to a https URL, then the data from the form is submitted to the new URL in an encrypted format.
hope that helps, colin
Jason Caldwell wrote:
> I'm a little confused about how HTTPS actually works when you call it via a
> FORM tag or HEADER("Location: ...")
>
> This may sound like a stupid question -- but it was never explained to me,
> so...
>
> I have my users fill out (for example) FORM A -- this form has basic
> non-secure info. Then they press SUBMIT, now on FORM B, I want them to fill
> out their payment information.
>
> Now, I notice that when I go to web sites and fill out payment information,
> I see the little lock icon at the bottom of my browser, and the
> https://yadadada in the URL field... however, I'm unclear about something...
>
> If I call FORM B with HTTPS will my blank FORM B transmit to the user
> encrypted, and will I have to call HTTPS again for my PHP CC Processing App?
>
> In other words, what's taking place when I call a form or page with HTTPS?
> Is it that the data only gets encrypted on a SUBMIT ?
>
> Dunno if my question makes much sense .. but I guess I'd like to know if
> it's even required for me to call FORM B in a secure state (for the users CC
> data to be SENT encrypted), but instead just call the process attached to
> the FORM (submit button) on FORM B in HTTPS ?? Does that make sense?
>
> Jason
>
> "Miguel Cruz" <mnc
stoic.net> wrote in message
> news:Pine.LNX.4.44.0207050210560.27898-100000
stoic.net...
>
>>On Thu, 4 Jul 2002, Jason Caldwell wrote:
>>
>>>Is there a way I can programmatically switch between HTTPS and HTTP... I
>>
> use
>
>>>a lot of INCLUDE's instead of HEADER("Location: ...");
>>>
>>>Can I use HEADER in another way (without redirecting) to activate HTTPS
>>
> or
>
>>>HTTP for any given page?
>>
>>Nope. The protocol is determined by the client when it makes its request.
>>Once your code is running, it's too late. At that point you can only
>>redirect to a https:// URL, which leads the client to generate a new
>>request.
>>
attached mail follows:
On Thu, 4 Jul 2002, dan radom wrote:
> I've got a form that's posted to a php page where I'm attempting to validate a field contains a valid email address. The eregi below seems to be totally ignored...
>
> if (eregi("^[a-z0-9\._-]+
[a-z0-9\._-]+$", $emp_email)) {
> echo "<center>please enter a valid email address</center>";
> exit;
> }
>
> $emp_email is being posted to the form. Any ideas why this is being ignored?
Wow, I would be annoyed if I used your site, as it rules out perfectly valid email addresses of a format I'd be likely to provide to a web site.
Clue 1: Far more characters are valid before the
sign.
Clue 2: The underscore (_) is not valid after the
sign.
Why randomly make up guesses about what a valid email address might be? RFC 822 is no secret, and there are secondary references under every virtual rock.
As for your ereg problem itself, it's returning true on a so-called valid address, so you'd be getting the opposite results of what you expect. Switch your if around or add a ! before the eregi call.
miguel
attached mail follows:
On Tue, 2 Jul 2002, Richard Lynch wrote: > Any recommendations for a GPL (read: free) "Programmer's Browser" which > will allow me to surf "normally" but cache pages and their headers and > let me view the damn things?
'links' is pretty cool. Hit | (vertical bar) to see the headers from the current page, or \ (backslash) to see the source.
I usually use it in textmode in an xterm which allows me to surf with the mouse but doesn't slow me down with graphic images.
http://atrey.karlin.mff.cuni.cz/~clock/twibright/links/
miguel
attached mail follows:
Hi,
I'm having trouble including a concat column in my php. Here's the line I've tried to use:
$query = "Select CourseNumber, CourseTitle, concat(ProfFName, /" /", ProfLName), InstitName, DiscName, Format from course, disc, instit, prof where course.DiscID = disc.DiscID and course.InstitID = instit.InstitID and course.ProfID = prof.ProfID order by CourseTitle";
I think it has something to do with the double quotes and the escape characters I'm using...I'm able to show ProfFName and ProfLName separately...
Thanks in advance for your help.
best,
Matt
attached mail follows:
On Fri, 5 Jul 2002, Matthew K. Gold wrote: > I'm having trouble including a concat column in my php. Here's the line > I've tried to use: > > $query = "Select CourseNumber, CourseTitle, concat(ProfFName, /" /", > ProfLName), InstitName, DiscName, Format from course, disc, instit, prof > where course.DiscID = disc.DiscID and course.InstitID = instit.InstitID and > course.ProfID = prof.ProfID order by CourseTitle"; > > I think it has something to do with the double quotes and the escape > characters I'm using...I'm able to show ProfFName and ProfLName > separately...
You need to use backslashes ( \ ) and not regular slashes ( / ) to escape quotes.
miguel
attached mail follows:
This will work if it is a space you want between the two fields. concat(ProfFName, ' ', ProfLName)
/Joakim
> -----Original Message-----
> From: Miguel Cruz [mailto:mnc
stoic.net]
> Sent: Friday, July 05, 2002 9:28 AM
> To: Matthew K. Gold
> Cc: php-general
lists.php.net
> Subject: Re: [PHP] concat question
>
>
> On Fri, 5 Jul 2002, Matthew K. Gold wrote:
> > I'm having trouble including a concat column in my php.
> Here's the line
> > I've tried to use:
> >
> > $query = "Select CourseNumber, CourseTitle, concat(ProfFName, /" /",
> > ProfLName), InstitName, DiscName, Format from course, disc,
> instit, prof
> > where course.DiscID = disc.DiscID and course.InstitID =
> instit.InstitID and
> > course.ProfID = prof.ProfID order by CourseTitle";
> >
> > I think it has something to do with the double quotes and the escape
> > characters I'm using...I'm able to show ProfFName and ProfLName
> > separately...
>
> You need to use backslashes ( \ ) and not regular slashes ( /
> ) to escape
> quotes.
>
> miguel
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
I think http://www.php.net/manual/en/function.imagecreatefromstring.php is your friend here... Requires GD of course.
/Joakim
> -----Original Message-----
> From: andy [mailto:news.letters
gmx.de]
> Sent: Thursday, July 04, 2002 6:25 PM
> To: php-general
lists.php.net; php-db
lists.php.net
> Subject: [PHP] resizing images comming out of blobs
>
>
> Hi there,
>
> I am wondering how to resize an image which is stored in a
> mysql blob field.
>
> With files this workes just fine, but how to do this with the
> image comming
> from blob? Has anybody done this already?
>
> Thank you for any help on that,
>
> andy
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
Andy, Yes I do it all the time. In this example, I do this with a window that has buttons across the top of a image representing size from 1 to 10. Depending on the button they select they get a image displayed from small to large.
Here is a snip of code that displays the sized images. ---------------------------- The button name is $s. They select from 1 to 10, but can be any increment. $hi = $s * 100; // size in 100 pixels. (but can be any increment) echo " <TABLE BORDER='15' CELLPADDING='0' CELLSPACING='0'><TR><TD> <image src='ft_image.php?imno=$image_num' BORDER=0 ALIGN='TOP' height=$hi></TD></TR></TABLE> ";
Note: in the 'image src' you give it a program name, not the image, and pass some way for it to read the image from the DB. In this case the program is ft_image.php and it passes imno.
To didplay the photo in ft_image.php, execute the following:
header("Content-type: image/jpeg"); print(mysql_result($result, 0, "photo_image"));
photo_image is name of blob field from the DB --------------------------------- HTH.. Good luck.. Dan.
=========================================================== Andy wrote: > Hi there, > > I am wondering how to resize an image which is stored in a mysql blob field. > > With files this workes just fine, but how to do this with the image comming > from blob? Has anybody done this already? > > Thank you for any help on that, > > andy > >
attached mail follows:
Please note that this will not work as expected! First of all you don't actually echo the vars to <img src...>. They should be ...imno=<?php echo $image_num ?>... Secondly the correct tag is <img src...> Third. Changing the height (or width) value in the image tag lets the client do all the work. The full image is still downloaded and then scaled by the client. Imagine <img src="mybigpic.jpg" width="100" height="100"> with an image that is 10000x10000 px and say 1MB in size. Poor modem users have to wait 5 minutes to see a thumbnail...
If you have the possibility (ie. PHP and GD on the server) the best thing to do is to scale the image on the server before it is sent to the client. Even better, scale the image when it is uploaded to the server.
/Joakim
> -----Original Message-----
> From: Dan Koken [mailto:dkokenge
netscape.net]
> Sent: Friday, July 05, 2002 12:19 PM
> To: php-general
lists.php.net; php-db
lists.php.net
> Subject: [PHP] Re: resizing images comming out of blobs
>
>
> Andy,
> Yes I do it all the time. In this example, I do this with a
> window that
> has buttons across the top of a image representing size from 1 to 10.
> Depending on the button they select they get a image displayed from
> small to large.
>
> Here is a snip of code that displays the sized images.
> ----------------------------
> The button name is $s. They select from 1 to 10, but can be
> any increment.
> $hi = $s * 100; // size in 100 pixels. (but can be any
> increment)
> echo "
> <TABLE BORDER='15' CELLPADDING='0' CELLSPACING='0'><TR><TD>
> <image src='ft_image.php?imno=$image_num' BORDER=0 ALIGN='TOP'
> height=$hi></TD></TR></TABLE>
> ";
>
> Note: in the 'image src' you give it a program name, not the
> image, and
> pass some way for it to read the image from the DB. In this case the
> program is ft_image.php and it passes imno.
>
> To didplay the photo in ft_image.php, execute the following:
>
> header("Content-type: image/jpeg");
> print(mysql_result($result, 0, "photo_image"));
>
> photo_image is name of blob field from the DB
> ---------------------------------
> HTH.. Good luck.. Dan.
>
> ===========================================================
> Andy wrote:
> > Hi there,
> >
> > I am wondering how to resize an image which is stored in a
> mysql blob field.
> >
> > With files this workes just fine, but how to do this with
> the image comming
> > from blob? Has anybody done this already?
> >
> > Thank you for any help on that,
> >
> > andy
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
On Fri, 5 Jul 2002, Pag wrote: > Table 1 (news) > ------------------------------ > ID > Date > Author > Title > News Text > > Table 2 (comments) > -------------------------------- > ID > News ID (to which news it belongs to) > Date > Author > Comment text > > Everytime i want to show the comments on some news article, i have to do > a query to the whole table 2, selecting the entries that have the "news > ID" equal to the ID of the news i want. It works but is this ok for > when i have hundreds of news/comments later on? Wont it slow down > things? Is there an easier way for this news/comments script?
You're doing it the right way. Make sure that news ID is a key in the comments table:
alter table contents add key(news_id);
and then this query will be VERY fast. That's the whole point.
If your authors are drawn from a limited pool (i.e., registered users) then you probably want to have a table for them too rather than storing any of the author's information inside the comments table.
miguel
attached mail follows:
Question I have is....
I want to run a print job of 200+ invoices
I have a javascript code to open a print dialog box and Then go to next invoice and do the loop..
Problem I am having is that I want it to pause if the ok button on the dialog Box is not pressed..
When I run the script it fly's throught and brings up a heap of printer Dialog boxes which causes me to ctrl+alt+del...
Anyway or pausing the script untill ok is pressed?
Thanks in advance..
------------------------------------------------------------------------
--- Chris Kay Technical Support - Techex Communications Website: www.techex.com.au Email: chris.kaytechex.net.au Telephone: 1300 88 111 2 - Fax: (02) 9970 5788 Address: Suite 13, 5 Vuko Place, Warriewood, NSW 2102 Platinum Channel Partner of the Year - Request DSL - Broadband for Business ------------------------------------------------------------------------ ---
attached mail follows:
"Chris Kay" <Chris.Kay
techex.com.au> wrote in message
news:E00ACB0129A4C748B02A744610798CE50652B3
headoffice-fs.techex.net.au...
>Question I have is....
>I want to run a print job of 200+ invoices >I have a javascript code to open a print dialog box and >Then go to next invoice and do the loop.. >Problem I am having is that I want it to pause if the ok button on the >dialog >Box is not pressed.. >When I run the script it fly's throught and brings up a heap of printer >Dialog boxes which causes me to ctrl+alt+del... >Anyway or pausing the script untill ok is pressed? >Thanks in advance..
Is your question involving how to go about this in PHP... From the above it sounds like you are coding in JavaScript and this is a PHP forum... If it is to do with php there should be responses swarming the group after you clarify the exact issue or what is lacking in your script from a php perspective... I am not too proficient in the use of JavaScript... I have used it and found that it slows my pages down...
...Correct me if I am wrong... I may not have completely understood the problem... ------------------------------------------------------------------------
--- Chris Kay Technical Support - Techex Communications Website: www.techex.com.au Email: chris.kaytechex.net.au Telephone: 1300 88 111 2 - Fax: (02) 9970 5788 Address: Suite 13, 5 Vuko Place, Warriewood, NSW 2102 Platinum Channel Partner of the Year - Request DSL - Broadband for Business ------------------------------------------------------------------------ ---
attached mail follows:
not sure about that ... not really a javascript expert since I'm on the php mailing list.
Chris Kay wrote: > Question I have is.... > > I want to run a print job of 200+ invoices > > I have a javascript code to open a print dialog box and > Then go to next invoice and do the loop.. > > Problem I am having is that I want it to pause if the ok button on the > dialog > Box is not pressed.. > > When I run the script it fly's throught and brings up a heap of printer > Dialog boxes which causes me to ctrl+alt+del... > > Anyway or pausing the script untill ok is pressed? > > Thanks in advance.. >
attached mail follows:
Hi,
How can I set things up so that a user can resort the results of a query?
Also, how can I make certain columns into links? I'm making a site that will list college courses. When users decide to browse listings by discipline, or college, I'd like the titles of the courses to be links to fuller descriptions of those courses. But I'm not sure how to do that.
thanks in advance for your help.
best,
Matt
attached mail follows:
Matthew,
Its a new query unless you want to sort using php routines. For a small amount of data this is fine but for large amounts there is a performance hit. Your choice as to the balance with the amount of data you have.
Where I have a lot of data, extracted from a very large amount of data, I store my results in a new, temporary, table that has each field indexed. I make the column headings on my html page into links that extract the data from the temporary table, ordered by that column. As its multi-user, I have a field in the temporary table with the username so that each user gets their own data (its first part of the indices too).
Hope this helps Chris
Matthew K. Gold wrote:
>Hi, > >How can I set things up so that a user can resort the results of a query? > >Also, how can I make certain columns into links? I'm making a site that >will list college courses. When users decide to browse listings by >discipline, or college, I'd like the titles of the courses to be links to >fuller descriptions of those courses. But I'm >not sure how to do that. > >thanks in advance for your help. > >best, > >Matt > > >
attached mail follows:
Thanks very much for your response, Chris--it sounds like that's exactly what I need to do.
I'm sorry to trouble you further, but if you have a second, can you give me some advice on how to store results in a temporary table with the columns indexed? I'm very new to PHP, and I'm not sure how to go about it.
Thanks in advance.
best,
Matt
----- Original Message -----
From: Chris Hewitt <g0pae
manordat.demon.co.uk>
To: Matthew K. Gold <mgold1
gc.cuny.edu>
Cc: <php-general
lists.php.net>
Sent: Friday, July 05, 2002 7:34 AM
Subject: Re: [PHP] how to resort results of a query
> Matthew, > > Its a new query unless you want to sort using php routines. For a small > amount of data this is fine but for large amounts there is a performance > hit. Your choice as to the balance with the amount of data you have. > > Where I have a lot of data, extracted from a very large amount of data, > I store my results in a new, temporary, table that has each field > indexed. I make the column headings on my html page into links that > extract the data from the temporary table, ordered by that column. As > its multi-user, I have a field in the temporary table with the username > so that each user gets their own data (its first part of the indices too). > > Hope this helps > Chris > > Matthew K. Gold wrote: > > >Hi, > > > >How can I set things up so that a user can resort the results of a query? > > > >Also, how can I make certain columns into links? I'm making a site that > >will list college courses. When users decide to browse listings by > >discipline, or college, I'd like the titles of the courses to be links to > >fuller descriptions of those courses. But I'm > >not sure how to do that. > > > >thanks in advance for your help. > > > >best, > > > >Matt > > > > > > >
attached mail follows:
Matthew,
Apologies to others that this is now quite OT, let's make this the last of this thread. If I may suggest that this is now about pure sql techniques and nothing to do with php.
What I did was to create a table (not temporary as it happens) with fields containing all the fields that you want to display e.g.: CREATE TABLE searchdata ( username varchar(30), course varchar2(80), discipline varchar2(40), college varchar2(60)); CREATE INDEX course ON searchdata (username, course); CREATE INDEX discipline ON searchdata (username, discipline); CREATE INDEX college ON searchdata (username, college); The username field is either the name the user is logged in as or some unique identifier you give to that user.
When you get the main sql statement, copy all the fields into searchdata. When you display the fields on your form, make each of the headings of the table you display the data in a url to this same form but with an "orderby" parameter. So e.g. the "course" column title is a url ending in "orderby=course". Now when the form is called with the orderby parameter, instead of getting the data from the main table, get it from searchdata with an sql statement which includes the relevant "order by" clause. You need to arrange for the data to be deleted when it is finished with, I leave that to you, each case will differ.
I do not claim that this is the best way, but it is the way I used.
Hope it helps.
Chris
Matthew K. Gold wrote:
>I'm sorry to trouble you further, but if you have a second, can you give me >some advice on how to store results in a temporary table with the columns >indexed? I'm very new to PHP, and I'm not sure how to go about it. >
attached mail follows:
Hi,
i work on Win98, apache 1.3.24/PHP4.2.1. I include a PHP file (867 lines) witch contains functions :
include("include/fonctions.php");
This previous code is inserted in the upper frame and the left frame. But sometimes, i've got errors like :
Parse error: parse error, unexpected '.' in d:\www\include\fonctions.php on line 431
and
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE in d:\www\include\fonctions.php on line 275
Error line can be 206,325,186...
I refresh the page (F5) and all is right. It is sure that this included script contains no errors.
attached mail follows:
try,
include("fonctions.php");
Hugh
----- Original Message -----
From: "Jean-François GAZET" <gregoire
webjeff.org>
To: <php-general
lists.php.net>
Sent: Friday, July 05, 2002 12:57 AM
Subject: [PHP] include errors
> Hi, > > i work on Win98, apache 1.3.24/PHP4.2.1. > I include a PHP file (867 lines) witch contains functions : > > include("include/fonctions.php"); > > This previous code is inserted in the upper frame and the left frame. > But sometimes, i've got errors like : > > Parse error: parse error, unexpected '.' in d:\www\include\fonctions.php on > line 431 > > and > > Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE in > d:\www\include\fonctions.php on line 275 > > Error line can be 206,325,186... > > I refresh the page (F5) and all is right. > It is sure that this included script contains no errors. > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
> try, > include("fonctions.php"); > Hugh
thanks but the file is in the directory "include" and it works fine. But 1 refresh on 10 gives errors... :((
> ----- Original Message -----
> From: "Jean-François GAZET" <gregoire
webjeff.org>
> To: <php-general
lists.php.net>
> Sent: Friday, July 05, 2002 12:57 AM
> Subject: [PHP] include errors
>
>
> > Hi,
> >
> > i work on Win98, apache 1.3.24/PHP4.2.1.
> > I include a PHP file (867 lines) witch contains functions :
> >
> > include("include/fonctions.php");
> >
> > This previous code is inserted in the upper frame and the left frame.
> > But sometimes, i've got errors like :
> >
> > Parse error: parse error, unexpected '.' in d:\www\include\fonctions.php
> on
> > line 431
> >
> > and
> >
> > Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE in
> > d:\www\include\fonctions.php on line 275
> >
> > Error line can be 206,325,186...
> >
> > I refresh the page (F5) and all is right.
> > It is sure that this included script contains no errors.
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
attached mail follows:
Hello all,
I have been trying to modify the working of one of my pages which prints a png graph. What I had was an included file named "graphit.php" which creates a png file. I used the function imagepng($image,'temp.png') to create an image and then used <img src=temp.png> to have the image printed on the page. This worked well enough when only one user (me) was using the page, but I want more. In reading the imagepng() info in the manual, it states that I can output the raw image stream to the browser by leaving off the file name option. I've done this, but get nada! How should this be done? One of the notes (and it's in German) implies that I can call "graphit.php" using something like
<img src=graphit.php> to get the image output. Unfortunately, I get nothing except the red X indicating a missing image.
Any and all help is greatly appreciated.
Hugh
attached mail follows:
Hi,
Do you output the right headers before you output the imagestream? Header("Content-type: image/png");
If this doesn't help you have to post your code (graphit.php) here so we can look at it.
/Joakim
> -----Original Message-----
> From: hugh danaher [mailto:hdanaher
earthlink.net]
> Sent: Friday, July 05, 2002 10:05 AM
> To: php
> Subject: [PHP] png image doesn't show
>
>
> Hello all,
>
> I have been trying to modify the working of one of my pages
> which prints a png graph. What I had was an included file
> named "graphit.php" which creates a png file. I used the function
> imagepng($image,'temp.png') to create an image and then used
> <img src=temp.png> to have the image printed on the page.
> This worked well enough when only one user (me) was using the
> page, but I want more. In reading the imagepng() info in the
> manual, it states that I can output the raw image stream to
> the browser by leaving off the file name option. I've done
> this, but get nada! How should this be done?
> One of the notes (and it's in German) implies that I can call
> "graphit.php" using something like
>
> <img src=graphit.php> to get the image output.
> Unfortunately, I get nothing except the red X indicating a
> missing image.
>
> Any and all help is greatly appreciated.
>
> Hugh
>
>
>
>
attached mail follows:
> > ><img src=graphit.php> to get the image output. Unfortunately, I get nothing except the red X indicating a missing image. > > > You probably need to send the correct header at the top of your graphit.php to indicate to the browser that you are sending it a file with a content type of image/png . graphit.php should do two things; First send the header, Second send the PNG data.
-- James E Hicks III Noland Company 2700 Warwick Blvd Newport News, VA 23607 757-928-9000 ext 435 jameshicksnoland.com
attached mail follows:
Miguel Cruz schrieb in Nachricht ... >On Tue, 2 Jul 2002, Uwe Birkenhain wrote: >> A question - since english is not my first language - what do you mean with >> >It's not all that common to bury constants in strings >> >> Is something bad about it? > >I think so. It would slow parsing down to a crawl and create a host of >ambiguities if every letter that ever appeared in a string had to be >compared against the list of defined constants (after all, you might have >a constant called 'a'). With normal variables, it only has to worry about >it when there's a $ before it or {} around it, which is much simpler. > >miguel
Yeah, you are right about that!
But since you have to take the constant out of the string (with {} or ". .") it shouldn't be a problem to use constants. Correct?
Uwe
attached mail follows:
Thank's for the help everybody!
I used something different (a little like this nice one from Terence (thank you!) but with JS:
I named my form 'test' and included a hidden field 'collector'. At the checkboxes the name is the value I need. The box, when checked, gets the value 1.
In the boxtags I added: onclick=add_values($name) where name is the value I want.
Then I wrote this little script: $js = "<script type=text/javascript> function add_values(val) { document.test.'collector'.value += val; document.test.'collector'.value += \",\"; } </script>";
It produces a comma separated list in the field 'collector' whith only the checked values. When sending the form, only this field is transmitted. This is just what I wanted and it works fine.
Uwe
Terence Kearns schrieb in Nachricht
<20020704110229.8D5E17091F
www.fastmail.fm>...
>This is a nice easy one :)
>
>It couldn't be simpler.
>
>Just put empty square brackets (as used in arrays) in front of your
>checkbox name.
>The example below assumes you have PHP 4.1 or greater (which uses
>$_POST to contain form posted data)
>notice how name="ck[]"
>
>
><html>
><head>
> <title>Untitled</title>
></head>
>
><body>
><?php
> if(count($_POST)) {
> foreach ($_POST["ck"] as $varval) {
> print("<div>".$varval."</div>");
> }
> }
>?>
>
><form action="test.php" method="post">
>
>
><input type="checkbox" name="ck[]" value="val1"><br>
><input type="checkbox" name="ck[]" value="val2"><br>
><input type="checkbox" name="ck[]" value="val3"><br>
><input type="checkbox" name="ck[]" value="val4"><br>
><input type="checkbox" name="ck[]" value="val5"><br>
><input type="submit">
></form>
>
>
></body>
></html>
>
>
>in earlier versions of PHP, $_POST["ck"] would be equal to $ck
>(although, the former is safer)
>
>
>On Thu, 4 Jul 2002 10:52:37 +0200, "Uwe Birkenhain"
><uwe.birkenhain
berlin.de> said:
>> Hi everybody on this rainy morning!
>>
>> My problem:
>> I give the user a form with a list of options with checkboxes.
>> The list is long and not predictable - the values change always.
>> I want to put the checked values (or all, that doesn't matter) in an
>> array,
>> to pass it to my function.
>>
>> How can I write those keys and values in an array?
>>
>> I suppose it will be best done with JS - but since I don't know JS ...
>> Has anybody a ready solution?
>>
>> Thank's a lot!
>>
>> Uwe
>>
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>[TK]
attached mail follows:
Hi all.
I am upgrading the hole thing in my local “developing” computer. I’m
using the PHPTriad package… Has anyone upgraded it before? I went to the
PHPTriad but it’s no longer supported. I already took PHP to the 4.2.1
version with no problems at all. How can I upgrade Apache, MySQL,
PHPMyAdmin and Perl?
One more thing… Which is best? MySQL 3.23.51 or MySQL-MAX and what are
the differences?
By the way, I’m using WinXP Professional and NOW running PHP with CGI.
Thanks in advance,
<mailto:webmaster
icaam.com.ar> Cesar Aracena
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621
PS. If some newbie like me wants to do this, I’ll be glad to tell you
how to spend those 45 second upgrading PHP… Very hard ;-)
attached mail follows:
MySQL-MAX contains support for InnoDB tables, which let you do transactions. That's about the only difference. They don't put it in the default installation files, because there is a slight performance hit, most folk don't use transactions anyway.
It's in the MySQL manual how to switch over - I did it on an XP machine a couple of weeks ago, and it's very straightforward.
HTH,
Richy
==========================================
Richard Black
Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com
Tel: 0141 435 3504
Email: rblack
datavisibility.co.uk
-----Original Message-----
From: César Aracena [mailto:icaam
icaam.com.ar]
Sent: 05 July 2002 09:37
To: PHP General List; PHP DB List; MySQL General
Subject: [PHP] Upgrading everything
Hi all.
I am upgrading the hole thing in my local “developing” computer. I’m
using the PHPTriad package… Has anyone upgraded it before? I went to the
PHPTriad but it’s no longer supported. I already took PHP to the 4.2.1
version with no problems at all. How can I upgrade Apache, MySQL,
PHPMyAdmin and Perl?
One more thing… Which is best? MySQL 3.23.51 or MySQL-MAX and what are
the differences?
By the way, I’m using WinXP Professional and NOW running PHP with CGI.
Thanks in advance,
<mailto:webmaster
icaam.com.ar> Cesar Aracena
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621
PS. If some newbie like me wants to do this, I’ll be glad to tell you
how to spend those 45 second upgrading PHP… Very hard ;-)
attached mail follows:
Thanks. That's one problem solved. I remember reading in a PHP book, in the chapter where they explain the differences between MySQL and other DB's, about MySQL having one defect as it wouldn't tell PHP that the transaction was or wasn't completed successfully (truncated)... Is this what was solved? Because it would kick ass.
Thanks,
C.
> -----Original Message-----
> From: Richard Black [mailto:rblack
datavisibility.co.uk]
> Sent: Friday, July 05, 2002 5:44 AM
> To: 'César Aracena'; 'PHP General List'; 'PHP DB List'
> Subject: RE: [PHP] Upgrading everything
>
> MySQL-MAX contains support for InnoDB tables, which let you do
> transactions. That's about the only difference. They don't put it in
the
> default installation files, because there is a slight performance hit,
> most folk don't use transactions anyway.
>
> It's in the MySQL manual how to switch over - I did it on an XP
machine
> a couple of weeks ago, and it's very straightforward.
>
> HTH,
>
> Richy
> ==========================================
> Richard Black
> Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com
> Tel: 0141 435 3504
> Email: rblack
datavisibility.co.uk
>
> -----Original Message-----
> From: César Aracena [mailto:icaam
icaam.com.ar]
> Sent: 05 July 2002 09:37
> To: PHP General List; PHP DB List; MySQL General
> Subject: [PHP] Upgrading everything
>
>
> Hi all.
>
> I am upgrading the hole thing in my local “developing” computer. I’m
> using the PHPTriad package… Has anyone upgraded it before? I went to
the
> PHPTriad but it’s no longer supported. I already took PHP to the 4.2.1
> version with no problems at all. How can I upgrade Apache, MySQL,
> PHPMyAdmin and Perl?
>
> One more thing… Which is best? MySQL 3.23.51 or MySQL-MAX and what are
> the differences?
>
> By the way, I’m using WinXP Professional and NOW running PHP with CGI.
>
> Thanks in advance,
>
> <mailto:webmaster
icaam.com.ar> Cesar Aracena
> CE / MCSE+I
> Neuquen, Argentina
> +54.299.6356688
> +54.299.4466621
>
> PS. If some newbie like me wants to do this, I’ll be glad to tell you
> how to spend those 45 second upgrading PHP… Very hard ;-)
attached mail follows:
Hi all.
I was reading the post by Pag called “MySQL backups” and I have the same
question, but not the shell access. It came to my mind, that if will be
very useful for me, and probably for many of us newbie’s, to be able to
build an automated PHP system that could make backups by itself at a
specified time… let’s say maybe every morning at 6 am, by transferring
or uploading the MySQL files to another server. I noticed that this
could be done in PHPNuke, by clicking at “Backup Files”. ¿Is it possible
to build this kind of unattended scripts with PHP or will it always
require a magical “click” from the administrator?
I guess that it shouldn’t be possible, but it’s worth a shot.
Thanks in advance,
Cesar Aracena <mailto:webmaster
icaam.com.ar>
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621
attached mail follows:
Hello César, PHP, As for your question the answer is yes. At this point of time I'm working on it also. The main idea is set of a few scripts. One for dumping Database with data to a file, second one is creating a tar archive, and third one using fopen to put on FTP server some where:) It works. but I'm to lazy to complete it. :)
Friday, July 5, 2002, 12:51:17 PM, you wrote:
CA> Hi all.
CA> I was reading the post by Pag called “MySQL backups” and I have the same
CA> question, but not the shell access. It came to my mind, that if will be
CA> very useful for me, and probably for many of us newbie’s, to be able to
CA> build an automated PHP system that could make backups by itself at a
CA> specified time… let’s say maybe every morning at 6 am, by transferring
CA> or uploading the MySQL files to another server. I noticed that this
CA> could be done in PHPNuke, by clicking at “Backup Files”. ¿Is it possible
CA> to build this kind of unattended scripts with PHP or will it always
CA> require a magical “click” from the administrator?
CA> I guess that it shouldn’t be possible, but it’s worth a shot.
CA> Thanks in advance,
CA> Cesar Aracena <mailto:webmaster
icaam.com.ar>
CA> CE / MCSE+I
CA> Neuquen, Argentina
CA> +54.299.6356688
CA> +54.299.4466621
-- Best regards, Latex mailto:freemansubmission.org.ru
attached mail follows:
César Aracena wrote: > Hi all. > > I was reading the post by Pag called “MySQL backups” and I have the same > question, but not the shell access. It came to my mind, that if will be > very useful for me, and probably for many of us newbie’s, to be able to > build an automated PHP system that could make backups by itself at a > specified time… let’s say maybe every morning at 6 am, by transferring > or uploading the MySQL files to another server. I noticed that this > could be done in PHPNuke, by clicking at “Backup Files”. ¿Is it possible > to build this kind of unattended scripts with PHP or will it always > require a magical “click” from the administrator? > > I guess that it shouldn’t be possible, but it’s worth a shot.
Ola!
Nope, not possible. You need to set something in chron function in order to do that, which is impossible without a *good* shell access. And nobody in his mind would let such privileges to remote users.
All you can do is to extract the backup functions from whatever PHP manager you choose, build a script with them, then have a local machine calling the script at regular time intervals. But this also requires that your local machine will be connected at the time this call happens.
Alberto Kiev
--
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
![]()
LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......
attached mail follows:
Is there an easy way to divide up $_SERVER['HTTP_USER_AGENT'] or do I have to use regular expressions(Which I have little experiance with)?
If I have to do it the hard way does someone have a script?
-- JJ Harrison webmastertececo.com www.tececo.com
attached mail follows:
JJ Harrison wrote: > Is there an easy way to divide up $_SERVER['HTTP_USER_AGENT'] or do I have > to use regular expressions(Which I have little experiance with)?
Why would you want to use that? People write in their HTTP_USER_AGENT whatever they want to, and many times you'll find there a set of 4 letter words instead of the info you look for. There is a nice add-on for Mozilla to make that trick even easier.
Alberto Kiev
--
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
![]()
LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......
attached mail follows:
Because!
Also the audiance that will probably see the site will highly likely not have the knowledge or intention to change the user agent var. So my Q remains.
To add to my original Q is there seperate vars for browser and OS?
JJ Harrison
webmaster
tececo.com
www.tececo.com
"Alberto Serra" <albertoserra
gala.net> wrote in message
news:3D256C1C.5080800
gala.net...
> JJ Harrison wrote:
> > Is there an easy way to divide up $_SERVER['HTTP_USER_AGENT'] or do I
have
> > to use regular expressions(Which I have little experiance with)?
>
> Why would you want to use that? People write in their HTTP_USER_AGENT
> whatever they want to, and many times you'll find there a set of 4
> letter words instead of the info you look for. There is a nice add-on
> for Mozilla to make that trick even easier.
>
> Alberto
> Kiev
>
>
> --
>
>
>
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
>
> LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
> lOrD i'M sHiNiNg...
> YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
> tHe TeSt, YeS iT iS
> ThE tEsT, yEs It Is
> tHe TeSt, YeS iT iS
> ThE tEsT, yEs It Is.......
>
attached mail follows:
Hi
As far as I can see you need to manipulate HTTP_USER_AGENT yourself. Here is an example that I used to determine if the browser is MSIE and if so what version it is. What are you trying to determine? A specific browser?
if (strStr($HTTP_USER_AGENT, "MSIE")) { $agent_array = split(";", $HTTP_USER_AGENT);
$ie_version = subStr($agent_array[1], 6,7); }
Regards
John
----- Original Message -----
From: "JJ Harrison" <webmaster
tececo.com>
To: <php-general
lists.php.net>
Sent: Friday, July 05, 2002 3:25 PM
Subject: Re: [PHP] Is there an easy way to divid up HTTP_USER_AGENT?
> Because!
>
> Also the audiance that will probably see the site will highly likely not
> have the knowledge or intention to change the user agent var. So my Q
> remains.
>
> To add to my original Q is there seperate vars for browser and OS?
>
> JJ Harrison
> webmaster
tececo.com
> www.tececo.com
>
> "Alberto Serra" <albertoserra
gala.net> wrote in message
> news:3D256C1C.5080800
gala.net...
> > JJ Harrison wrote:
> > > Is there an easy way to divide up $_SERVER['HTTP_USER_AGENT'] or do I
> have
> > > to use regular expressions(Which I have little experiance with)?
> >
> > Why would you want to use that? People write in their HTTP_USER_AGENT
> > whatever they want to, and many times you'll find there a set of 4
> > letter words instead of the info you look for. There is a nice add-on
> > for Mozilla to make that trick even easier.
> >
> > Alberto
> > Kiev
> >
> >
> > --
> >
> >
> >
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
> >
> > LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
> > lOrD i'M sHiNiNg...
> > YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
> > tHe TeSt, YeS iT iS
> > ThE tEsT, yEs It Is
> > tHe TeSt, YeS iT iS
> > ThE tEsT, yEs It Is.......
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
JJ,
I don't know of an *easy* way, but this script (with regex's ) isn't too bad; you can figure it out with a little bit of research. /* begin script ereg("^([[:alpha:]]+)/([[:digit:]\.]+)( .*)$", $HTTP_USER_AGENT, $match); $Browser_Name=$match[1]; $Browser_Version=$match[2]; $Browser_Description=$match[3]; If(eregi("msie", $Browser_Description)) eregi("MSIE ([[:digit:]\.]+);, $Browser_Description, $match); $Browser_Name="MSIE"; $Browser_Version = $match[1]; } // end script */ So now, you have a script which gets the Name, Version and Description, and also looks to specify MSIE as the browser. Read up on Regular Expressions, and you can modify this for any browser/version combo. (adopted from Listing 16.3 in Core PHP Programming by Leon Atkinson)
-- Chris Garaffa #!/usr/local/lib/php $contact_info["Name"] = "Chris Garaffa"; $contact_info["Email"] = "aquaxoptonline.net"; $contact_info["Work"] = "cgaraffa
creativeaim.com"; $contact_info["cell"] = "203.803.9066";
He who calles himself "JJ Harrison" (from <webmaster
tececo.com>) wrote on 7/5/02 10:25 AM:
> Because! > > Also the audiance that will probably see the site will highly likely not > have the knowledge or intention to change the user agent var. So my Q > remains. > > To add to my original Q is there seperate vars for browser and OS?
attached mail follows:
ðÒÉ×ÅÔ!
> Because!
LOLOL okay. You can use this javascript stuff, it's more accurate and does not get fooled by the rubbish people write in their user_agents
// This function attempts to determine visitor's spoken language // //////////////////////////////////////////////////////////////////// function browser_language() { if (navigator.appName == 'Netscape') var language = navigator.language; else var language = navigator.browserLanguage;
return language; }
// This function states whether browser is java_enabled // //////////////////////////////////////////////////////////////////// function java_enabled() { // Find whether java is here if (navigator.javaEnabled() == 1) return "Y"; else return "N"; }
// This function states whether browser is font smoothing capable // //////////////////////////////////////////////////////////////////// function fontSmoothing_enabled() { // Find whether fonts smoothing available if (window.screen.fontSmoothingEnabled == true) return "Y"; else return "N"; }
// This function is used to generate the SRC parameter for the iframe // in order to pass it all estracted parameters on clients workstation // without using cookies // //////////////////////////////////////////////////////////////////// function launch() { window.onerror=null;
document.location = "somescript.php?"+ "language="+ browser_language() +"&"+ "screen="+ window.screen.width+"x"+window.screen.height +"&"+ "screenavailable="+ window.screen.availWidth+"x"+window.screen.availHeight +"&"+ "colours="+ window.screen.colorDepth +"&"+ "fonts_smoothing="+ fontSmoothing_enabled() +"&"+ "java="+ java_enabled() +"&"+ "browser="+ navigator.appName +"&"+ "version="+ navigator.appVersion +"&"+ "mozilla="+ navigator.appCodeName +"&"+ "os="+ navigator.platform +"&"+ "ref="+ document.referrer;
ÐÏËÁ áÌØÂÅÒÔÏ ëÉÅ×
--
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
![]()
LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......
attached mail follows:
Is there a way i can use php to echo text x amounts of times based on a condition
for example
if $foo = 2 echo $fido * 2
attached mail follows:
Hi try this
if ($foo ==2) { for ($bar = 0;$bar < $foo;$bar++) { echo $fido; } }
-----Original Message-----
From: Craig [mailto:craig
sitedesign.net]
Sent: Fri, 05 Jul 2002 12:09
To: php-general
lists.php.net
Subject: [PHP] Multiple text using echo
Is there a way i can use php to echo text x amounts of times based on a condition
for example
if $foo = 2 echo $fido * 2
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Hi Craig
You could just do:
****
$text_to_print =3D "Some text<br>"; $amount_of_times =3D 10;
for ($index=3D0; $index<$amount_of_times; $index++) print $text_to_print;
****
Is that what you are after?
Regards
John
> -----Original Message-----
> From: Craig [mailto:craig
sitedesign.net]
> Sent: Fri, 05 Jul 2002 12:09
> To: php-general
lists.php.net
> Subject: [PHP] Multiple text using echo
>
>
> Is there a way i can use php to echo text x amounts of times based on a
> condition
>
> for example
>
> if $foo = 2
> echo $fido * 2
>
>
>
>
> --
> 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:
How about str_repeat() ?
eg: echo str_repeat("-=", 10);
Craig wrote: > ************************************************************************** > This Message Was Virus Checked With : SAVI 3.59 May 2002 > Last Updated 3rd July 2002 > ************************************************************************** > > Is there a way i can use php to echo text x amounts of times based on a > condition > > for example > > if $foo = 2 > echo $fido * 2 > > > >
-- ---------------------------- Work: neil.freemanasa.co.uk Home: neil
curvedvision.com
Web: www.curvedvision.com ----------------------------
attached mail follows:
define("TIMES_TO_REPEAT", 2);
if ($foo == TIMES_TO_REPEAT) echo str_repeat($fido, TIMES_TO_REPEAT);
Craig wrote: > ************************************************************************** > This Message Was Virus Checked With : SAVI 3.59 May 2002 > Last Updated 3rd July 2002 > ************************************************************************** > > Is there a way i can use php to echo text x amounts of times based on a > condition > > for example > > if $foo = 2 > echo $fido * 2 > > > >
-- ---------------------------- Work: neil.freemanasa.co.uk Home: neil
curvedvision.com
Web: www.curvedvision.com ----------------------------
attached mail follows:
Hi everyone,
When I run PHP as CGI, it outputs the #!... line to the browser. Is there a way around this?
Example:
#!/usr/local/bin/php <?php print "foo"; ?>
becomes
#!/usr/local/bin/php foo
in the browser.
Thanks, David
attached mail follows:
Did you try it without that line at all?
I'm pretty sure you can setup apache (you are using apache right?) to use /usr/.../bin/php for all files with the extension .php
colin
David Brannlund wrote: > Example: > > #!/usr/local/bin/php > <?php > print "foo"; > ?> > > becomes > > #!/usr/local/bin/php > foo
attached mail follows:
Got it to work! I removed that line and configured apache to serve certain filetypes through php cgi. (I have the php module installed, so i had to come up with a new ext.)
But there should be some way to write the script with #!.. and not get it printed out anyway. Ah, well...
Thanks.
David Brannlund
"Colin McDonald" <colin
tomoye.com> wrote in message
news:3D258357.7030203
tomoye.com...
> Did you try it without that line at all?
>
> I'm pretty sure you can setup apache (you are using apache right?) to
> use /usr/.../bin/php for all files with the extension .php
>
> colin
>
> David Brannlund wrote:
> > Example:
> >
> > #!/usr/local/bin/php
> > <?php
> > print "foo";
> > ?>
> >
> > becomes
> >
> > #!/usr/local/bin/php
> > foo
>
attached mail follows:
I think you can make the AddType location specific
ie: in /home/httpd/html/cgi-bin all files ending in .php will be cgi php everywhere else /home/httpd/html/ will be php module
the line at the top tells the parser which program should execute the code in the file ... so I think you don't add the AddType in apache and maybe something different?
David Brannlund wrote:
> Got it to work! I removed that line and configured apache to serve certain
> filetypes through php cgi. (I have the php module installed, so i had to
> come up with a new ext.)
>
> But there should be some way to write the script with #!.. and not get it
> printed out anyway. Ah, well...
>
> Thanks.
>
> David Brannlund
>
>
> "Colin McDonald" <colin
tomoye.com> wrote in message
> news:3D258357.7030203
tomoye.com...
>
>>Did you try it without that line at all?
>>
>>I'm pretty sure you can setup apache (you are using apache right?) to
>>use /usr/.../bin/php for all files with the extension .php
>>
>>colin
>>
>>David Brannlund wrote:
>>
>>>Example:
>>>
>>> #!/usr/local/bin/php
>>> <?php
>>> print "foo";
>>> ?>
>>>
>>>becomes
>>>
>>> #!/usr/local/bin/php
>>> foo
>>
>
>
attached mail follows:
Hi,
I'm having trouble getting the Pspell support to work in PHP 4.1.2. It works fine when I run PHP as CGI, but when I run it as an apache module, I get the error message:
Warning: PSPELL couldn't open the dictionary. reason: Unable to load the "aspell" module.
It compiles correct and I get access to all pspell functions, but when I try to load a dictionary, I get the above error.
Configuration CGI: ./configure --with-mysql --with-gd --with-ttf --with-zlib --with-pspell --prefix=/usr/local/php4/
Configuration Module: same as above, but with --with-apxs, as well.
Has anyone experienced the same problem?
Thanks, David
attached mail follows:
Hi!
I'm having problems with createfrompng…
I do the following:
1 Creates a new image
2 Fill it with black
3 copy an jpg on to it
4 write some text
5 tries to use copyimageresized to put a transparent png over the whole image…
It's in point 5 it goes wrong, because of some reason the png loses its transparens and becomes a white square instead of the nice transparent picture it was from the beginning…
What have I done wrong or is it simply impossible to perform what i want?
Sincerely
Victor
attached mail follows:
Have you tried imagecopyresampled instead? Maybe it solves your problem. It's a long-shot. Requires GD 2.x
/Joakim
> -----Original Message-----
> From: Victor Spång Arthursson [mailto:scooterbabe
mac.com]
> Sent: Friday, July 05, 2002 1:03 PM
> To: php-general
lists.php.net
> Subject: [PHP] How to use transparent png in createfrompng?
>
>
> Hi!
>
> I'm having problems with createfrompng…
>
> I do the following:
>
> 1 Creates a new image
>
> 2 Fill it with black
>
> 3 copy an jpg on to it
>
> 4 write some text
>
> 5 tries to use copyimageresized to put a transparent png over
> the whole
> image…
>
> It's in point 5 it goes wrong, because of some reason the png
> loses its
> transparens and becomes a white square instead of the nice
> transparent
> picture it was from the beginning…
>
> What have I done wrong or is it simply impossible to perform
> what i want?
>
> Sincerely
>
> Victor
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
Hello php-general,
I've recently faced big optimization issues. Here is mine situation:
I make connection to NNTP server and fetch headers from the news group lets say bla.bla.bla. Connection made ok. Next Php tryes to put everything into the array. It's okey if number of headers are lower then let's say 100. But if number of headers get greater then 100, it's a pain in the ass. I have to wait for 90-100 seconds till the operation completes. (I'm talking here about large value news groups). So I have faced that I need to optimize it somehow. At this point of time i've got only idea is to put all the headers in the database. But not sure how to update database frequently. Any ideas even fantastic ones are welcome.
-- Best regards, Latex mailto:freemansubmission.org.ru
attached mail follows:
Latex Master wrote:
> I make connection to NNTP server and fetch headers from the news group > lets say bla.bla.bla. Connection made ok. Next Php tryes to put > everything into the array. It's okey if number of headers are lower > then let's say 100. But if number of headers get greater then 100, > it's a pain in the ass. I have to wait for 90-100 seconds till the > operation completes. (I'm talking here about large value news groups). > So I have faced that I need to optimize it somehow. > At this point of time i've got only idea is to put all the headers in > the database. But not sure how to update database frequently. Any > ideas even fantastic ones are welcome. >
ÐÒÉ×ÅÔ!
well, I never used an NNTP server, so I might say something stupid, but... What you do is get the headers in some chunks, right? One by one or something like that... so just make a table that has a timestamp column (plus the stuff you need to store the headers).
Any time you execute a cycle like this: 1) compute a new timestamp 2) clear from the database table anything older then current timestamp 3) load the new headers directly (one read from NNTP -> one db insert) 4) use your table as a normal array
Does that solve the problem?
ÐÏËÁ áÌØÂÅÒÔÏ ËÉÅ×
--
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
![]()
LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......
attached mail follows:
On Friday 05 July 2002 19:37, Latex Master wrote: > Hello php-general, > > I've recently faced big optimization issues. Here is mine > situation: > > I make connection to NNTP server and fetch headers from the news group > lets say bla.bla.bla. Connection made ok. Next Php tryes to put > everything into the array. It's okey if number of headers are lower > then let's say 100. But if number of headers get greater then 100, > it's a pain in the ass. I have to wait for 90-100 seconds till the > operation completes. (I'm talking here about large value news groups). > So I have faced that I need to optimize it somehow. > At this point of time i've got only idea is to put all the headers in > the database. But not sure how to update database frequently. Any > ideas even fantastic ones are welcome.
There is at least one php-based newsreader out there, look at how they do it.
-- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* ... Logically incoherent, semantically incomprehensible, and legally ... impeccable! */
attached mail follows:
Uri,
Sounds like the error reporting is set to E_ALL on the new php version and was set at a lower level before. The error indicates that the variable has not specfically been assigned a value before being used.
HTH Chris
Uri Even-Chen wrote:
>After upgrading to Red Hat Linux 7.3 (which also includes a new PHP >version), I saw this warning (Uninitialized string offset) on my apache >error log files. It refers to a line which was perfectly legal before: > > if >(isset($GLOBALS['SPEEDY_GLOBAL_VARS']['CURRENT_USER']['UserName'])) > >I always use isset to check if a variable is defined. Do you know why I >get this warning? >
attached mail follows:
You'll have to check each part of the array with isset in order to get rid of this warning
e.g
if ((isset($GLOBALS['SPEEDY_GLOBAL_VARS'])) && (isset($GLOBALS['SPEEDY_GLOBAL_VARS']['CURRENT_USER'])) && (isset($GLOBALS['SPEEDY_GLOBAL_VARS']]['CURRENT_USER']['UserName'])))
Of course, you can get rid of the first isset if you're absolutely sure that $GLOBALS['SPEEDY_GLOBAL_VARS'] will always be set, but I'd leave it in there, just in case.
HTH
Danny.
----- Original Message -----
From: "Chris Hewitt" <g0pae
manordat.demon.co.uk>
To: "Uri Even-Chen" <webmaster
speedy.co.il>
Cc: <php-general
lists.php.net>
Sent: Friday, July 05, 2002 12:17 PM
Subject: Re: [PHP] Uninitialized string offset
> Uri, > > Sounds like the error reporting is set to E_ALL on the new php version > and was set at a lower level before. The error indicates that the > variable has not specfically been assigned a value before being used.
> > if > >(isset($GLOBALS['SPEEDY_GLOBAL_VARS']['CURRENT_USER']['UserName'])) > > > >I always use isset to check if a variable is defined. Do you know why I > >get this warning?
attached mail follows:
Hi Dan, I don't know about resizing it from blob, I usually store the image on the server and just the file name in the database . But I use something like this for resizing:
$size = GetImageSize($filenum); $im_in = ImageCreateFromJpeg($filenum); $h1=$h; //were $h is the height that you want the image to have. The same you can specify a width and calculate the height. $w1=$h1/($size[1]/$size[0]); $im_out = ImageCreate($w1,$h1); ImageCopyResized($im_out,$im_in,0,0,0,0,$w1,$h1,$size[0],$size[1]); ImageJpeg($im_out,$filenum); ImageDestroy($im_in); ImageDestroy($im_out);
You will need to have the GD Library installed with your php. Hope it helps, Cami
----- Original Message -----
From: "Dan Koken" <dkokenge
netscape.net>
To: <php-general
lists.php.net>; <php-db
lists.php.net>
Sent: Friday, July 05, 2002 11:19 AM
Subject: [PHP-DB] Re: resizing images comming out of blobs
> Andy, > Yes I do it all the time. In this example, I do this with a window that > has buttons across the top of a image representing size from 1 to 10. > Depending on the button they select they get a image displayed from > small to large. > > Here is a snip of code that displays the sized images. > ---------------------------- > The button name is $s. They select from 1 to 10, but can be any increment. > $hi = $s * 100; // size in 100 pixels. (but can be any increment) > echo " > <TABLE BORDER='15' CELLPADDING='0' CELLSPACING='0'><TR><TD> > <image src='ft_image.php?imno=$image_num' BORDER=0 ALIGN='TOP' > height=$hi></TD></TR></TABLE> > "; > > Note: in the 'image src' you give it a program name, not the image, and > pass some way for it to read the image from the DB. In this case the > program is ft_image.php and it passes imno. > > To didplay the photo in ft_image.php, execute the following: > > header("Content-type: image/jpeg"); > print(mysql_result($result, 0, "photo_image")); > > photo_image is name of blob field from the DB > --------------------------------- > HTH.. Good luck.. Dan. > > =========================================================== > Andy wrote: > > Hi there, > > > > I am wondering how to resize an image which is stored in a mysql blob field. > > > > With files this workes just fine, but how to do this with the image comming > > from blob? Has anybody done this already? > > > > Thank you for any help on that, > > > > andy > > > > > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
I have a php file with two textarea and one button; i want when i press button, value from textarea2 is filled in textarea1. can u help me?
my try is:
//file1.php .... if ($action == "change") { $arie1=$arie2; } .... echo "<textarea name='arie1' cols='50' rows='3'>$arie1</textarea>"; echo "<form action=file1.php?&action=change method=post>\n"; echo "<textarea name='arie2' cols='50' rows='3'>$arie2</textarea>"; echo "<input type='submit' name='submit' value='save'>"; ...
attached mail follows:
looks like it should work. try echoing $action and make sure that it's the value you want. you may want to try $_POST['action']
Adi wrote: > I have a php file with two textarea and one button; i want when i press button, value from textarea2 is filled in textarea1. > can u help me? > > my try is: > > //file1.php > .... > if ($action == "change") { > $arie1=$arie2; > } > .... > echo "<textarea name='arie1' cols='50' rows='3'>$arie1</textarea>"; > echo "<form action=file1.php?&action=change method=post>\n"; > echo "<textarea name='arie2' cols='50' rows='3'>$arie2</textarea>"; > echo "<input type='submit' name='submit' value='save'>"; > ... > >
attached mail follows:
test
attached mail follows:
i want to add in textarea a string with new line tag in it. how to do that?
my try: $string="-line1n\ -line2 n\-line3"; echo "<br><textarea name='aria' cols='50' rows='2'>$string</textarea>";
but i see a single line instead of: -line1 -line2 -line3
tx in advance for any help
attached mail follows:
use \n Adi wrote: > i want to add in textarea a string with new line tag in it. how to do that? > > my try: > $string="-line1n\ -line2 n\-line3"; > echo "<br><textarea name='aria' cols='50' rows='2'>$string</textarea>"; > > but i see a single line instead of: > -line1 > -line2 > -line3 > > tx in advance for any help >
attached mail follows:
When you echo, you are adding to HTML, so you need <br> for new lines not \n. There is a function called nl2br that converts the nl into br's for you, so do this;
$string="-line1n\ -line2 n\-line3";
$string = nl2br($string);
echo "<br><textarea name='aria' cols='50' rows='2'>$string</textarea>";
adi wrote:
>i want to add in textarea a string with new line tag in it. how to do that? > >my try: >$string="-line1n\ -line2 n\-line3"; >echo "<br><textarea name='aria' cols='50' rows='2'>$string</textarea>"; > >but i see a single line instead of: >-line1 >-line2 >-line3 > >tx in advance for any help >
attached mail follows:
Sorry, you DO need nl's, but it's \n not n\
PHPCoder wrote:
> When you echo, you are adding to HTML, so you need <br> for new lines > not \n. There is a function called nl2br that converts the nl into > br's for you, so do this; > > $string="-line1n\ -line2 n\-line3"; > > $string = nl2br($string); > > echo "<br><textarea name='aria' cols='50' rows='2'>$string</textarea>"; > > > > > adi wrote: > >> i want to add in textarea a string with new line tag in it. how to do >> that? >> >> my try: >> $string="-line1n\ -line2 n\-line3"; >> echo "<br><textarea name='aria' cols='50' rows='2'>$string</textarea>"; >> >> but i see a single line instead of: >> -line1 >> -line2 >> -line3 >> >> tx in advance for any help >> > > >
attached mail follows:
I'd say $string="-line1\n -line2\n-line3" Newlines are \n, not n\ ...
"Adi" <adipublic
home.ro> schreef in bericht
news:014b01c22424$5f999b00$9600a8c0
ady...
i want to add in textarea a string with new line tag in it. how to do that?
my try: $string="-line1n\ -line2 n\-line3"; echo "<br><textarea name='aria' cols='50' rows='2'>$string</textarea>";
but i see a single line instead of: -line1 -line2 -line3
tx in advance for any help
attached mail follows:
It would be a good idea to switch to Apache. I had the php script and IIS. The problem with IIS is the virus, so MS provide some patches, include the IIS lockdown. When I activated the IIS Lockdown, it prevent some PHP code from working. It became too much for me so I had to switch to Apache.
"Richard Lynch" <rich
phpbootcamp.com> wrote in message
news:20020704233150.WCK8262.rwcrmhc52.attbi.com
[192.168.1.103]...
> >I am setting up PHP on WinXP Pro with IIS 5.1.
> >
> >I tried to start the IIS server and I get an "Unexpected error 0x8ffe2740
> >occured." error.
> >Anyone know how to resolve this problem?
>
> Try searching http://bugs.php.net and the archives for that hex value.
>
> Or just switch to Apache http://apache.org :-)
>
> --
> Like Music? http://l-i-e.com/artists.htm
>
attached mail follows:
Here is a little test program.
<?php
/* SQL> select emp_id, emp_name from employee;
dgrimes Dean Grimes
35 rows selected.
This is a select using SQLPLUS to select all of the employees. There were a lot of other names, I just removed them from the list.
SQL> select emp_id, emp_name from employee where emp_id = 'dgrimes';
dgrimes Dean Grimes
This is a select using SQLPLUS that specifies the WHERE clause. It too works properly.
I did not include the code to process using ora_open, ora_pars and ora_exec. But it does work just fine with or without a WHERE clause.
*/
error_reporting(15); $dbconnect = ora_logon('ops$dgrimes','changemenow');
// Select with WHERE clause // $sql = "SELECT * FROM employee WHERE emp_id = 'dgrimes'";
// Select without WHERE clause $sql = "SELECT * FROM employee";
$cur = ora_do($dbconnect,$sql);
// Uncomment this block to see results of WHERE CLAUSE. It gets No Data Found" /* ora_fetch_into($cur,$results,ORA_FETCHINTO_NULLS|ORA_FETCHINTO_ASSOC); echo ora_errorcode($cur); echo ora_error($cur); exit; */ // Comment the above block to see results of select without WHERE CLAUSE
while (ora_fetch_into($cur,$results,ORA_FETCHINTO_NULLS|ORA_FETCHINTO_ASSOC)) { // print_r($results); // echo "<br>\n"; while (list($k,$v) = each($results)) echo "Key=".$k." Val=".$v."<br>\n"; }
?>
-----Original Message-----
From: Richard Lynch [mailto:rich
phpbootcamp.com]
Sent: Wednesday, July 03, 2002 3:51 PM
To: php-general
lists.php.net
Subject: [PHP] Re: Problem With ora_do
>I'm having a weird problem with ora_do. It works fine as long as I don't >have a "WHERE" clause in the query. For example: > >select * from table_name > >works just fine but .... > >select * from table_name where col_name = value > >returns nothing. > >However, if I use ora_open, ora_parse and ora_exec everything works fine. >I'm running on Compaq Tru64 ver 5.1. I compiled PHP with gcc 3.1. I'm not >getting any errors or warnings and nothing is being logged in the Apache >logs. I guess it's not a big deal since I have been able to work around it, >but it would be nice to know what the problem is.
Show us real source code...
Nothing in what you say seems 'wrong', but who knows?
Wild Guesses:
You're not seeing any errors because you're not *ASKING* to see any errors. You have to specifically request error messages to be displayed or logged somewhere.
You are doing something like: $x = 2; $query = "select * from table_name where col_name = x"; And, oddly enough, there are none with 'x' even though there are lots with 2... So, there's no problem with the query, it's just not the query you intended. Try printing out your query, and paste it into the Oracle command-line thingie (sql-dba?)
-- Like Music? http://l-i-e.com/artists.htm-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
For the $_SESSION or session_start(), some of hte demostration I tried for the array, including the odbc_fetch_into. They just don't work since it work with the non-array but not the array. So, it is probably a bug in PHP. So, I will have to search the PHP bug database and file a bug or update the bug. So, everybody, thanks for your best shot here! As for the website, I'm going to have to take out the odbc_fetch_into and use the odbc_result and manually assign each variable to the $_SESSION. Not a pretty picture, yes, I know! Eventually, I will forget to update them later on. Thanks for your best shot.
Thanks, FletchSOD
attached mail follows:
Hi All,
I'm trying to install IMP and I'm getting the error:-
"Fatal error: Call to undefined function: _() in blah blah."
I know that _() is the same as gettext() and I'm sure it used to work.
Anyone know where it went or what setting I have to change in php.ini to bring it back. Sorry if I'm re-iterating things but trying to search for _() is not having the desired effect in google.
Cheers in advance Andy Woolley. Milonic Solutions Ltd
attached mail follows:
It's OK, I've found out that I have to include --with-gettext in the configure line.
Cheers anyway -- Andy.
----- Original Message -----
From: "Andy Woolley" <andy
milonic.com>
To: <php-general
lists.php.net>
Sent: Friday, July 05, 2002 2:43 PM
Subject: [PHP] _() undefined in 4.2.1
> Hi All, > > I'm trying to install IMP and I'm getting the error:- > > "Fatal error: Call to undefined function: _() in blah blah." > > I know that _() is the same as gettext() and I'm sure it used to work. > > Anyone know where it went or what setting I have to change in php.ini to > bring it back. Sorry if I'm re-iterating things but trying to search for _() > is not having the desired effect in google. > > Cheers in advance > Andy Woolley. > Milonic Solutions Ltd > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
I have a question! Since the $_COOKIE is on the server side, not on the client side. So, will the use of hte $_COOKIE be affected when the user's browser disabled the cookie? I do not know how the $_COOKIE on the server side work or get the information from.
Thanks, FletchSOD
attached mail follows:
Scott Fletcher wrote: > I have a question! Since the $_COOKIE is on the server side, not on the > client side. So, will the use of hte $_COOKIE be affected when the user's > browser disabled the cookie? I do not know how the $_COOKIE on the server > side work or get the information from. > > Thanks, > FletchSOD > > >
ðÒÉ×ÅÔ!
Yes, that's the problem with cookies :( In case they get disabled, or just manually canceled) $_COOKIE will not contain anything at all. Which is why I don't like cookies.
áÌØÂÅÒÔÏ ëÉÅ×
--
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
![]()
LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......
attached mail follows:
That is what I thought so! Thanks!
To me, the $_COOKIE seem to get data from the browser in some way. Correct me if I'm wrong. Something like a communication between cookie.
Thanks, FletchSOD
"Alberto Serra" <albertoserra
gala.net> wrote in message
news:3D25A66A.8090904
gala.net...
> Scott Fletcher wrote:
> > I have a question! Since the $_COOKIE is on the server side, not on the
> > client side. So, will the use of hte $_COOKIE be affected when the
user's
> > browser disabled the cookie? I do not know how the $_COOKIE on the
server
> > side work or get the information from.
> >
> > Thanks,
> > FletchSOD
> >
> >
> >
>
> ðÒÉ×ÅÔ!
>
> Yes, that's the problem with cookies :( In case they get disabled, or
> just manually canceled) $_COOKIE will not contain anything at all. Which
> is why I don't like cookies.
>
> áÌØÂÅÒÔÏ
> ëÉÅ×
>
> --
>
>
>
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
>
> LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
> lOrD i'M sHiNiNg...
> YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
> tHe TeSt, YeS iT iS
> ThE tEsT, yEs It Is
> tHe TeSt, YeS iT iS
> ThE tEsT, yEs It Is.......
>
attached mail follows:
Scott Fletcher wrote: > That is what I thought so! Thanks! > > To me, the $_COOKIE seem to get data from the browser in some way. Correct > me if I'm wrong. Something like a communication between cookie. > > Thanks, > FletchSOD
ðÒÉ×ÅÔ!
Yes, that's the way it works. Once you do a setcookie() on the server you actually issue a sort of "delayed command" for the client, if you pardon me the expression :) In short, when you print out your HTML you also tell the client to save some data in its disk (or RAM when you use session cookies).
This data will be presented back later to you with the next URL request. It is NOT saved on the server, it is just a sort of automatic add-on that you will have on all links pointing to you until the cookie expires. It will be presented to those URLs you specify when building the cookie (usually you will want to limit their action to some subdirectory to avoid having back data out of context).
Sounds very nice, but... But the trouble is that in doing so you issue a command to a machine of which you know almost nothing. Most of all, you don't know whether it's capable of executing your order. Or willing to, since users may disable cookies.
Sort of blind date, but the girl may actually not show up later... 99% she will, but you should not count on it.
ðÏËÁ áÌØÂÅÒÔÏ ëÉÅ×
>
> "Alberto Serra" <albertoserra
gala.net> wrote in message
> news:3D25A66A.8090904
gala.net...
>
>>Scott Fletcher wrote:
>>
>>>I have a question! Since the $_COOKIE is on the server side, not on the
>>>client side. So, will the use of hte $_COOKIE be affected when the
>>
> user's
>
>>>browser disabled the cookie? I do not know how the $_COOKIE on the
>>
> server
>
>>>side work or get the information from.
>>>
>>>Thanks,
>>> FletchSOD
>>>
>>>
>>>
>>
>>ðÒÉ×ÅÔ!
>>
>>Yes, that's the problem with cookies :( In case they get disabled, or
>>just manually canceled) $_COOKIE will not contain anything at all. Which
>>is why I don't like cookies.
>>
>>áÌØÂÅÒÔÏ
>>ëÉÅ×
>>
>>--
>>
>>
>>
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
>>
>>LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
>>lOrD i'M sHiNiNg...
>>YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
>>tHe TeSt, YeS iT iS
>>ThE tEsT, yEs It Is
>>tHe TeSt, YeS iT iS
>>ThE tEsT, yEs It Is.......
>>
>
>
>
>
--
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
![]()
LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......
attached mail follows:
Not a problem! I noticed the "PHPSESSID" only showed up on $_COOKIE and nothing else. I dont' want to use the $_COOKIE, so I may either assign it to $_SESSION or $GLOBALS.
FletchSOD
"Alberto Serra" <albertoserra
gala.net> wrote in message
news:3D25B1C7.8030603
gala.net...
> Scott Fletcher wrote:
> > That is what I thought so! Thanks!
> >
> > To me, the $_COOKIE seem to get data from the browser in some way.
Correct
> > me if I'm wrong. Something like a communication between cookie.
> >
> > Thanks,
> > FletchSOD
>
> ðÒÉ×ÅÔ!
>
> Yes, that's the way it works. Once you do a setcookie() on the server
> you actually issue a sort of "delayed command" for the client, if you
> pardon me the expression :) In short, when you print out your HTML you
> also tell the client to save some data in its disk (or RAM when you use
> session cookies).
>
> This data will be presented back later to you with the next URL request.
> It is NOT saved on the server, it is just a sort of automatic add-on
> that you will have on all links pointing to you until the cookie
> expires. It will be presented to those URLs you specify when building
> the cookie (usually you will want to limit their action to some
> subdirectory to avoid having back data out of context).
>
> Sounds very nice, but... But the trouble is that in doing so you issue a
> command to a machine of which you know almost nothing. Most of all, you
> don't know whether it's capable of executing your order. Or willing to,
> since users may disable cookies.
>
> Sort of blind date, but the girl may actually not show up later... 99%
> she will, but you should not count on it.
>
> ðÏËÁ
> áÌØÂÅÒÔÏ
> ëÉÅ×
>
>
> >
> > "Alberto Serra" <albertoserra
gala.net> wrote in message
> > news:3D25A66A.8090904
gala.net...
> >
> >>Scott Fletcher wrote:
> >>
> >>>I have a question! Since the $_COOKIE is on the server side, not on
the
> >>>client side. So, will the use of hte $_COOKIE be affected when the
> >>
> > user's
> >
> >>>browser disabled the cookie? I do not know how the $_COOKIE on the
> >>
> > server
> >
> >>>side work or get the information from.
> >>>
> >>>Thanks,
> >>> FletchSOD
> >>>
> >>>
> >>>
> >>
> >>ðÒÉ×ÅÔ!
> >>
> >>Yes, that's the problem with cookies :( In case they get disabled, or
> >>just manually canceled) $_COOKIE will not contain anything at all. Which
> >>is why I don't like cookies.
> >>
> >>áÌØÂÅÒÔÏ
> >>ëÉÅ×
> >>
> >>--
> >>
> >>
> >>
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
> >>
> >>LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
> >>lOrD i'M sHiNiNg...
> >>YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
> >>tHe TeSt, YeS iT iS
> >>ThE tEsT, yEs It Is
> >>tHe TeSt, YeS iT iS
> >>ThE tEsT, yEs It Is.......
> >>
> >
> >
> >
> >
>
>
>
> --
>
>
>
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
>
> LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
> lOrD i'M sHiNiNg...
> YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
> tHe TeSt, YeS iT iS
> ThE tEsT, yEs It Is
> tHe TeSt, YeS iT iS
> ThE tEsT, yEs It Is.......
>
attached mail follows:
ðÒÉ×ÅÔ!
Does anybody know which is the lenght limit for the parameter string when GETting an URL? If there is a limit at all, of course.
áÌØÂÅÒÔÏ ëÉÅ×
--
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
![]()
LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? lOrD i'M sHiNiNg... YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE tHe TeSt, YeS iT iS ThE tEsT, yEs It Is tHe TeSt, YeS iT iS ThE tEsT, yEs It Is.......
attached mail follows:
Hello Alberto, 255 charasters Friday, July 5, 2002, 5:43:40 PM, you wrote:
AS> ðÒÉ×ÅÔ!
AS> Does anybody know which is the lenght limit for the parameter string AS> when GETting an URL? If there is a limit at all, of course.
AS> áÌØÂÅÒÔÏ AS> ëÉÅ×
AS> --
AS>
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
AS> LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu? AS> lOrD i'M sHiNiNg... AS> YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE AS> tHe TeSt, YeS iT iS AS> ThE tEsT, yEs It Is AS> tHe TeSt, YeS iT iS AS> ThE tEsT, yEs It Is.......
-- Best regards, Latex mailto:freemansubmission.org.ru
attached mail follows:
>> Maybe not the right place, but...
Probably not but what the heck.
IE has a cap of 2K.
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q208427
Netscape exceeds 2k but I've never tested out how much.
Cheers Andy Woolley. Milonic Solutions Ltd
----- Original Message -----
From: "Alberto Serra" <albertoserra
gala.net>
Cc: <php-general
lists.php.net>
Sent: Friday, July 05, 2002 2:43 PM
Subject: [PHP] Maybe not the right place, but...
> ðÒÉ×ÅÔ!
>
> Does anybody know which is the lenght limit for the parameter string
> when GETting an URL? If there is a limit at all, of course.
>
> áÌØÂÅÒÔÏ
> ëÉÅ×
>
>
> --
>
>
>
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
-_=}{=_-
>
> LoRd, CaN yOu HeAr Me, LiKe I'm HeArInG yOu?
> lOrD i'M sHiNiNg...
> YoU kNoW I AlMoSt LoSt My MiNd, BuT nOw I'm HoMe AnD fReE
> tHe TeSt, YeS iT iS
> ThE tEsT, yEs It Is
> tHe TeSt, YeS iT iS
> ThE tEsT, yEs It Is.......
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Hello hello,
I have this strange thing with a sort of login procedure (still working it out, but it will work eventually) On the first page, you log in (username + password) Then we come to 'login.php' where I have this header 1 <?php 2 session_start(); 3 $loginname=$_POST["loginname"]; 4 $loginpw=$_POST["loginpw"]; 5 session_register('loginname'); 6 session_register('loginpw'); 7 ?>
This works, I can use $loginname and $loginpw
Somewhere on that page I have added a few buttons, and one of those buttons is functional (the others have to be written yet) But here I have this header: 1 <?php 2 session_start(); 3 $loginname=$_SESSION['loginname']; 4 $loginpw=$_SESSION['loginpw']; 5 /* session_register('loginname'); 6 session_register('loginpw'); -- commented out, it did not add something seemingly */ 7 ?>
The strange thing is that if I do (hey, it's just for testing what's happening): print("loginname = $loginname<br>\n"); print("loginpw=$loginpw<br>\n");
both loginname and loginpw contain the same information, which is the true information of $loginpw what am I doing wrong here?
attached mail follows:
oww... should have added a few things as information... It's friday and one tends to forget such things then... I'm on Slackware 8.1, PHP 4.2.1, Apache 1.3.24
maybe that helps a bit...
"Michiel Lange" <mil
actuera.nl> schreef in bericht
news:20020705131324.21213.qmail
pb1.pair.com...
> Hello hello,
>
> I have this strange thing with a sort of login procedure (still working it
> out, but it will work eventually)
> On the first page, you log in (username + password)
> Then we come to 'login.php' where I have this header
> 1 <?php
> 2 session_start();
> 3 $loginname=$_POST["loginname"];
> 4 $loginpw=$_POST["loginpw"];
> 5 session_register('loginname');
> 6 session_register('loginpw');
> 7 ?>
>
> This works, I can use $loginname and $loginpw
>
> Somewhere on that page I have added a few buttons, and one of those
buttons
> is functional (the others have to be written yet)
> But here I have this header:
> 1 <?php
> 2 session_start();
> 3 $loginname=$_SESSION['loginname'];
> 4 $loginpw=$_SESSION['loginpw'];
> 5 /* session_register('loginname');
> 6 session_register('loginpw'); -- commented out, it did not
> add something seemingly */
> 7 ?>
>
> The strange thing is that if I do (hey, it's just for testing what's
> happening):
> print("loginname = $loginname<br>\n");
> print("loginpw=$loginpw<br>\n");
>
> both loginname and loginpw contain the same information, which is the true
> information of $loginpw
> what am I doing wrong here?
>
>
attached mail follows:
tx, it's working now but i still have a problem: i want to insert into mysql database value $string: $result2 = db_query("update table1 set column1= '$string' where ID = '$IDcurent'") or db_die(); When i try to view in text area the new value from column1, the newlines disappear!
ps.column 1 have type "text" or "varchar(100)" Is a problem of type?
tx again adi
----- Original Message -----
From: "Henning Sittler" <Henning
inscriber.com>
To: "'adi'" <adipublic
home.ro>
Sent: Friday, July 05, 2002 4:05 PM
Subject: RE: [PHP] textarea new line
> $string="-line1\n -line2 \n-line3";
>
> \n
>
> Henning Sittler
> www.inscriber.com
>
>
>
> -----Original Message-----
> From: adi [mailto:adipublic
home.ro]
> Sent: Friday, July 05, 2002 9:04 AM
> To: php-general
> Subject: [PHP] textarea new line
>
>
> i want to add in textarea a string with new line tag in it. how to do
that?
>
> my try:
> $string="-line1n\ -line2 n\-line3";
> echo "<br><textarea name='aria' cols='50' rows='2'>$string</textarea>";
>
> but i see a single line instead of:
> -line1
> -line2
> -line3
>
> tx in advance for any help
>
attached mail follows:
use addslashes
"update table1 set column1= '".addslashes($string)."' where ID = '$IDcurent'"
Adi wrote:
> tx, it's working now
> but i still have a problem:
> i want to insert into mysql database value $string:
> $result2 = db_query("update table1 set column1= '$string' where ID =
> '$IDcurent'") or db_die();
> When i try to view in text area the new value from column1, the newlines
> disappear!
>
> ps.column 1 have type "text" or "varchar(100)"
> Is a problem of type?
>
> tx again
> adi
>
>
> ----- Original Message -----
> From: "Henning Sittler" <Henning
inscriber.com>
> To: "'adi'" <adipublic
home.ro>
> Sent: Friday, July 05, 2002 4:05 PM
> Subject: RE: [PHP] textarea new line
>
>
>
>>$string="-line1\n -line2 \n-line3";
>>
>>\n
>>
>>Henning Sittler
>>www.inscriber.com
>>
>>
>>
>>-----Original Message-----
>>From: adi [mailto:adipublic
home.ro]
>>Sent: Friday, July 05, 2002 9:04 AM
>>To: php-general
>>Subject: [PHP] textarea new line
>>
>>
>>i want to add in textarea a string with new line tag in it. how to do
>
> that?
>
>>my try:
>>$string="-line1n\ -line2 n\-line3";
>>echo "<br><textarea name='aria' cols='50' rows='2'>$string</textarea>";
>>
>>but i see a single line instead of:
>>-line1
>>-line2
>>-line3
>>
>>tx in advance for any help
>>
>
>
attached mail follows:
Is there PHP function that would get the total array count.
ie --snip-- $array[0] = "zero"; $array[1] = "one"; $array[2] = "two";
$array_count = <function to get the array count> --snip--
And I would get 3 as an answer.
Thanks, FletchSOD
attached mail follows:
cout($array)
Scott Fletcher wrote:
>Is there PHP function that would get the total array count. > >ie >--snip-- >$array[0] = "zero"; >$array[1] = "one"; >$array[2] = "two"; > >$array_count = <function to get the array count> >--snip-- > >And I would get 3 as an answer. > >Thanks, > FletchSOD > > > > >
attached mail follows:
count($array);
Scott Fletcher wrote:
>Is there PHP function that would get the total array count. > >ie >--snip-- >$array[0] = "zero"; >$array[1] = "one"; >$array[2] = "two"; > >$array_count = <function to get the array count> >--snip-- > >And I would get 3 as an answer. > >Thanks, > FletchSOD > > > > >
attached mail follows:
Ah! Thanks! By the way, it's "count()" with a "n". :-)
"Terence Kearns" <tkearns
fastmail.fm> wrote in message
news:3D25A9CE.7040809
fastmail.fm...
> cout($array)
>
> Scott Fletcher wrote:
>
> >Is there PHP function that would get the total array count.
> >
> >ie
> >--snip--
> >$array[0] = "zero";
> >$array[1] = "one";
> >$array[2] = "two";
> >
> >$array_count = <function to get the array count>
> >--snip--
> >
> >And I would get 3 as an answer.
> >
> >Thanks,
> > FletchSOD
> >
> >
> >
> >
> >
>
>
>
attached mail follows:
Scott Fletcher wrote:
>Is there PHP function that would get the total array count. > >ie >--snip-- >$array[0] = "zero"; >$array[1] = "one"; >$array[2] = "two"; > >$array_count = <function to get the array count> >--snip-- > >And I would get 3 as an answer. > >Thanks, > FletchSOD > > > > > count($array);
attached mail follows:
size_of() (insert obligatory RTFM comment here) =C=
* * Cal Evans * The Virtual CIO * http://www.calevans.com *
-----Original Message-----
From: Scott Fletcher [mailto:scott
abcoa.com]
Sent: Friday, July 05, 2002 9:16 AM
To: php-general
lists.php.net
Subject: [PHP] function for size of array
Is there PHP function that would get the total array count.
ie --snip-- $array[0] = "zero"; $array[1] = "one"; $array[2] = "two";
$array_count = <function to get the array count> --snip--
And I would get 3 as an answer.
Thanks, FletchSOD
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
On Friday 05 July 2002 22:20, Scott Fletcher wrote: > Ah! Thanks! By the way, it's "count()" with a "n". :-)
That was to trick you into RTFM! Hey you were lucky that the 'o' wasn't left out instead :)
-- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* The shortest distance between two points is under construction. -- Noelie Alito */
attached mail follows:
LOL - nice one Jason :)
Jason Wong wrote: > ************************************************************************** > This Message Was Virus Checked With : SAVI 3.59 May 2002 > Last Updated 3rd July 2002 > ************************************************************************** > > On Friday 05 July 2002 22:20, Scott Fletcher wrote: > >>Ah! Thanks! By the way, it's "count()" with a "n". :-) > > > That was to trick you into RTFM! Hey you were lucky that the 'o' wasn't left > out instead :) >
-- ---------------------------- Work: neil.freemanasa.co.uk Home: neil
curvedvision.com
Web: www.curvedvision.com ----------------------------
attached mail follows:
What is RTFM??
"Jason Wong" <php-general
gremlins.com.hk> wrote in message
news:200207052258.19337.php-general
gremlins.com.hk...
> On Friday 05 July 2002 22:20, Scott Fletcher wrote:
> > Ah! Thanks! By the way, it's "count()" with a "n". :-)
>
> That was to trick you into RTFM! Hey you were lucky that the 'o' wasn't
left
> out instead :)
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> The shortest distance between two points is under construction.
> -- Noelie Alito
> */
>
attached mail follows:
On Fri, 2002-07-05 at 11:45, Scott Fletcher wrote: > What is RTFM?? Read The Fine Manual
> "Jason Wong" <php-general
gremlins.com.hk> wrote in message
> news:200207052258.19337.php-general
gremlins.com.hk...
> > On Friday 05 July 2002 22:20, Scott Fletcher wrote:
> > > Ah! Thanks! By the way, it's "count()" with a "n". :-)
> >
> > That was to trick you into RTFM! Hey you were lucky that the 'o' wasn't
> left
> > out instead :)
> >
> > --
> > Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> > Open Source Software Systems Integrators
> > * Web Design & Hosting * Internet & Intranet Applications Development *
> >
> > /*
> > The shortest distance between two points is under construction.
> > -- Noelie Alito
> > */
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
-- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: lerlerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
attached mail follows:
My web host has just upgraded to PHP 4.20. My MySQL database is full of session_encoded fields, but since the upgrade I can no longer session_decode them.
After doing phpinfo I find the following settings ...
register_argc_argv on on register_globals on on
I've been through the manual regarding predefined variables but must be missing the point somewhere.
How do I get the session_encoded fields back as useable variables?
Thanks
Zim
attached mail follows:
> On Tue, 2 Jul 2002, Johnson, Kirk wrote: > > Is the number of requests (used for garbage collection), tallied on a per > > server basis, or on a per domain basis?
> Pretty fair bet it's a per-server basis. > > miguel
Thanks, miguel. That would be my guess, too. If both of us guessed the same thing, then we must be right. Right?!? ;)
Kirk
attached mail follows:
What is the configure option that will turn on the register_globals? This is for ./configure option in UNIX / LINUX.
Thanks, FletchSOD
attached mail follows:
On Fri, 2002-07-05 at 10:04, Scott Fletcher wrote: > What is the configure option that will turn on the register_globals? This > is for ./configure option in UNIX / LINUX. It's in php.ini. Look at the phpinfo() output, and modify to include the register_globals=ON, then restart Apache (assuming it's in an apache module).
-- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: lerlerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
attached mail follows:
Hi all,
I like to know where i can get the PHP download for the AIX.5.1
Pl, let me know the information.
Regards, Jey
_________________________________________________________ There is always a better job for you at Monsterindia.com. Go now http://monsterindia.rediff.com/jobs
attached mail follows:
Go to PHP website, http://www.php.net and at the top, you'll see the download hyperlink. Click on that. Then use the tar.gz file under the title, "Complete Source Code". This is what I use with AIX. If you use the RPM to install other softwares, then you'll have to make sure the ./configure option can find the files. It is a matter of using hte environment variables and file paths. I had end up going back to AIX 4.3.3 because AIX 5.x use alot of Operating System archecture change.
FletchSOD
"A Jeyaraj" <jeyaraj_a
rediffmail.com> wrote in message
news:20020705150434.5475.qmail
webmail30.rediffmail.com...
> Hi all,
>
> I like to know where i can get the
> PHP download for the AIX.5.1
>
> Pl, let me know the information.
>
> Regards,
> Jey
>
>
> _________________________________________________________
> There is always a better job for you at Monsterindia.com.
> Go now http://monsterindia.rediff.com/jobs
>
attached mail follows:
That is because AIX 5.1 uses a linux kernel. That implies alot of changes for the architecture... However, I think you should be able to compile for 5.1, but you'll need the required libraries which have to be compiled and installed as well... which implies that you need the development stuff like gcc/gmake (I thought gmake was used, from the top of my head)
"Scott Fletcher" <scott
abcoa.com> schreef in bericht
news:20020705151958.56049.qmail
pb1.pair.com...
> Go to PHP website, http://www.php.net and at the top, you'll see the
> download hyperlink. Click on that. Then use the tar.gz file under the
> title, "Complete Source Code". This is what I use with AIX. If you use
the
> RPM to install other softwares, then you'll have to make sure the
> ./configure option can find the files. It is a matter of using hte
> environment variables and file paths. I had end up going back to AIX
4.3.3
> because AIX 5.x use alot of Operating System archecture change.
>
> FletchSOD
>
> "A Jeyaraj" <jeyaraj_a
rediffmail.com> wrote in message
> news:20020705150434.5475.qmail
webmail30.rediffmail.com...
> > Hi all,
> >
> > I like to know where i can get the
> > PHP download for the AIX.5.1
> >
> > Pl, let me know the information.
> >
> > Regards,
> > Jey
> >
> >
> > _________________________________________________________
> > There is always a better job for you at Monsterindia.com.
> > Go now http://monsterindia.rediff.com/jobs
> >
>
>
attached mail follows:
Yea, it use the Linux Kernel. I had to download RPM stuffs from IBM. It can not be from Red Hat or any other. IBM take the source code and put it into RPM. IBM kept making error message about some RPMs, so that is why I went back to non-linux kernal AIX.
"Michiel Lange" <mil
actuera.nl> wrote in message
news:20020705154535.79317.qmail
pb1.pair.com...
> That is because AIX 5.1 uses a linux kernel. That implies alot of changes
> for the architecture...
> However, I think you should be able to compile for 5.1, but you'll need
the
> required libraries which have to be compiled and installed as well...
which
> implies that you need the development stuff like gcc/gmake (I thought
gmake
> was used, from the top of my head)
>
>
> "Scott Fletcher" <scott
abcoa.com> schreef in bericht
> news:20020705151958.56049.qmail
pb1.pair.com...
> > Go to PHP website, http://www.php.net and at the top, you'll see the
> > download hyperlink. Click on that. Then use the tar.gz file under the
> > title, "Complete Source Code". This is what I use with AIX. If you use
> the
> > RPM to install other softwares, then you'll have to make sure the
> > ./configure option can find the files. It is a matter of using hte
> > environment variables and file paths. I had end up going back to AIX
> 4.3.3
> > because AIX 5.x use alot of Operating System archecture change.
> >
> > FletchSOD
> >
> > "A Jeyaraj" <jeyaraj_a
rediffmail.com> wrote in message
> > news:20020705150434.5475.qmail
webmail30.rediffmail.com...
> > > Hi all,
> > >
> > > I like to know where i can get the
> > > PHP download for the AIX.5.1
> > >
> > > Pl, let me know the information.
> > >
> > > Regards,
> > > Jey
> > >
> > >
> > > _________________________________________________________
> > > There is always a better job for you at Monsterindia.com.
> > > Go now http://monsterindia.rediff.com/jobs
> > >
> >
> >
>
>
attached mail follows:
Here's the simple script that will do the trick! This is what I use with Equifax before I start using cURL. You can substitute the "HOSTNAME", "HOSTPORT" for something else.
--clip-- <? $errno = 0; $errstr= "";
$socket = fsockopen(HOSTNAME,HOSTPORT,&$errno,&$errstr,30); if(!$socket || $errno) { logAction($errno,$errstr); echo "Could Not Connect to Equifax !!!!<br>"; return 0; }
$senddata = $headerstr; $senddata .= $sendstr; $senddatalen = strlen($senddata);
fwrite($socket,sprintf("%06d",$senddatalen),6); fwrite($socket,$senddata,$senddatalen);
list($code,$inqdata) = getResponse($socket);
if(!$code) { logAction(-2,"Break Up\n"); echo "Error Communicating With Equifax !!!!<br>"; fclose($socket); return 0; }
fclose($socket); ?> --clip--
"Richard Lynch" <rich
phpbootcamp.com> wrote in message
news:20020704233139.WAM8262.rwcrmhc52.attbi.com
[192.168.1.103]...
> >I want to issue an fsockopen command to pass a POST data set to a remote
> >server script.
>
> If you do a Google for "posttohost and 'Rasmus Lerdorf'" you'll find one
> already written for you... :-)
>
> >I understand the pricipals behind fsockopen, but I cannot figure out the
> >string I need to pass to POST the data - I will be emulating the output
> >from a <Form> element.
>
> You would need to read a whole lot of HTTP RFC's to be sure you have it
> correct.
>
> Fortunately, Rasmus read all of those already :-)
>
> >In addition, how do I detect a successful operation? before closing the
socket?.
>
> Yeah, the server will send back something if it worked/failed...
>
> --
> Like Music? http://l-i-e.com/artists.htm
>
attached mail follows:
Hi, How to do whats written in the commented line(//) in the code below:
<?php $term = ".<B>test</b>"; if(stristr($term,"<") && stristr($term,">") && !stristr($term,"<br>") && !stristr($term,"<p>") ){ printf("its html tag"); // here i want to remove the html tags from $term and then print it.(here it should print '.test') } else{ printf("not a html tag."); } ?> Thanx and regards anil
attached mail follows:
Is it possible to pass variables in PHP on the localhost server? Is there some kind of setting or something that I need? I am new to this and am not sure how to go about this. When I upload to a server, the script I have works just fine; but when I work on it locally, it does not work. Please help while I am still technically sane. Thanks. :oP
Tony Tzankoff http://www.tzankoff.com ========================================
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]