OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 12 Dec 2003 06:06:59 -0000 Issue 2468

php-general-digest-helplists.php.net
Date: Fri Dec 12 2003 - 00:06:59 CST


php-general Digest 12 Dec 2003 06:06:59 -0000 Issue 2468

Topics (messages 172503 through 172549):

Re: url rewriting within sessions - confused newbie needs h elp
        172503 by: Peter Walter
        172507 by: Ford, Mike [LSS]
        172516 by: Peter Walter

Re: How to reduce CPU usage in a cycle? [ag]
        172504 by: Jas
        172506 by: Jas

Re: Palm OS Processor
        172505 by: David T-G
        172521 by: Galen
        172525 by: Daevid Vincent
        172527 by: Evan Nemerson

rss/rdf feed classes
        172508 by: Rolf Brusletto
        172510 by: Matt Matijevich
        172511 by: Daevid Vincent
        172515 by: Ray Hunter
        172518 by: Manuel Lemos
        172529 by: Rolf Brusletto
        172532 by: Manuel Lemos
        172534 by: Rolf Brusletto
        172541 by: daniel.electroteque.org

can tomcat server run PHP??
        172509 by: Sheawh

PHP-Mysql problem
        172512 by: Robin Kopetzky
        172513 by: Blake Schroeder
        172514 by: Ray Hunter

Re: XML Strategdy
        172517 by: Manuel Lemos

PHP Math Question
        172519 by: Mike D
        172523 by: Evan Nemerson
        172531 by: Eric Bolikowski
        172538 by: Bronislav Klučka
        172543 by: Website Managers.net
        172548 by: Rob Bryant

Re: PHP's MySQL Query Length Limit? (Long SQL failing!)
        172520 by: Galen

Re: Compiling...hellllp!
        172522 by: Evan Nemerson

php .htaccess autologin
        172524 by: ROBERT MCPEAK
        172526 by: Evan Nemerson
        172530 by: Jas
        172533 by: Justin Patrin

Re: (0t) SSH cp (copy help)
        172528 by: Evan Nemerson

Re: calling include inside a function?
        172535 by: Kristopher Spencer-Yates
        172540 by: Louie Miranda

How to use anchor with php post string to jump to a page???
        172536 by: Scott Fletcher
        172537 by: Bronislav Klučka

Session Link Problems
        172539 by: Steve Turner

Re: Php ftp client recommendations?
        172542 by: Raditha Dissanayake

why Imap_open delay ??
        172544 by: yt1

why "imap_open " delay a long time ?
        172545 by: yt1
        172546 by: Mike

passing arrays?
        172547 by: motorpsychkill
        172549 by: motorpsychkill

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


Mike,

Thanks for the additional explanation, and I understand the sequence of
events as you described. However, please bear with me a bit - the
results I am getting do not quite match your explanation. Let me clarify
what I am doing:

I have a page (index.php) which starts out by calling start_session(),
then emits some html code containing some form variables for search
criteria. After the form variables, I have a "submit" button that refers
to index.php. Following that, I have php logic that extracts the search
criteria (if set) from $HTTP_POST_VARS, performs a MySQL query, then
creates a table of results (if any); one of the table entries contains a
<a href= link to determine which row the user selected.

The first time I load the page, I assume the session is created by
start_session(), and the cookie is sent to the browser. When I click on
the "submit" button, the page is reloaded - I assume with the session
active - as per your explanation. According tho the documentation I have
read, the second time the page is loaded, start_session() will simply
reuse the existing session parameters. At this point, the browser should
already have the cookie - if it did not, I would not be able to retrieve
the session variables - but the url links in the table are still
rewritten. I do not understand why.

Being new to the "stateless" paradigm of web applications, and to php, I
feel a bit nervous about coding when I do not quite grasp what is going on.

Peter

Ford, Mike [LSS] wrote:

>On 11 December 2003 16:54, Peter Walter wrote:
>
>
>
>>Jason,
>>
>>Thanks for your help. It is a little clearer to me now.
>>However, I have
>>visited php sites that *claim* to be using session management
>>but where
>>the links do not have the session id appended, and there are no
>>variables being passed in the url for links. The url is always in the
>>form "www.somesite.com/index.php" or just "www.somesite.com".
>>In these
>>cases, how is the url rewriting being suppressed for the links on the
>>page? I simply want to understand the technique.
>>
>>
>
>If "url rewriting" (session.use_trans_sid) is enabled, and your browser is
>accepting cookies, then the sequence of events goes like this:
>
>1. First request to your site -- browser has no cookie set, so cannot send
>it.
>
>2. PHP responds with a page, including a header to set the PHPSESSID cookie;
>because, at this stage, PHP has no idea whether your browser will accept
>cookies, it also rewrites all URLs contained in the page to include a
>PHPSESSID= parameter.
>
>3. Your browser displays the page, and sets the cookie.
>
>4. You click a link to get the next page -- in addition to sending a request
>for the URL containing the PHPSESSID= parameter, your browser also sends the
>newly-set PHPSESSID cookie.
>
>5. PHP responds with the new page, but, because it has received the
>PHPSESSID cookie in the previous step it now knows your browser is accepting
>cookies and does not bother to do any URL rewriting.
>
>6. None of the URLs in the new page have the PHPSESSID= parameter appended
>-- transmission of the session id is now solely via the PHPSESSID cookie.
>
>Various things can influence this behaviour:
>
>- If your browser is not accepting cookies, URL rewriting will always occur
>and you will continue to see PHPSESSID= parameters appended.
>
>- If session.use_trans_sid is not set, PHP will do no URL rewriting but will
>attempt to use cookies (if enabled) -- if your browser doesn't accept
>cookies, sessions will fail to work (unless you manually append PHPSESSID=
>parameters where needed -- the SID built-in constant is provided for this).
>
>- If session.use_cookies is not set, PHP will not even attempt to use a
>cookie for the session id.
>
>- If session.use_only_cookies is set, PHP will use *only* cookies to store
>the session id -- again, if your browser is not accepting cookies, sessions
>will not work.
>
>As you can see, there are many ways of setting this up, with a few subtle
>nuances -- and some of the combinations don't actually make much sense
>(use_trans_sid=1 and use_only_cookies=1, for instance). Note that you *can*
>set it up so that PHP does no automatic PHPSESSID setting at all
>(use_trans_sid=0 and use_cookies=0) -- then it's up to you to manually
>append the PHPSESSID= parameter to all appropriate URLs.
>
>Cheers!
>
>Mike
>
>---------------------------------------------------------------------
>Mike Ford, Electronic Information Services Adviser,
>Learning Support Services, Learning & Information Services,
>JG125, James Graham Building, Leeds Metropolitan University,
>Beckett Park, LEEDS, LS6 3QS, United Kingdom
>Email: m.fordleedsmet.ac.uk
>Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
>
>

attached mail follows:


On 11 December 2003 18:01, Peter Walter wrote:

> Mike,
>
> Thanks for the additional explanation, and I understand the
> sequence of events as you described. However, please bear
> with me a bit - the results I am getting do not quite match
> your explanation. Let me clarify what I am doing:
>
> I have a page (index.php) which starts out by calling
> start_session(),

I hope you mean session_start().

> then emits some html code containing some
> form variables for search criteria. After the form variables,
> I have a "submit" button that refers to index.php. Following
> that, I have php logic that extracts the search criteria (if
> set) from $HTTP_POST_VARS, performs a MySQL query, then
> creates a table of results (if any); one of the table entries
> contains a <a href= link to determine which row the user selected.
>
> The first time I load the page, I assume the session is
> created by start_session(), and the cookie is sent to the
> browser. When I click on the "submit" button, the page is
> reloaded - I assume with the session active - as per your
> explanation. According tho the documentation I have read, the
> second time the page is loaded, start_session() will simply
> reuse the existing session parameters. At this point, the
> browser should already have the cookie - if it did not, I
> would not be able to retrieve the session variables

Well, you would, because PHP would use the value from the PHPSESSID= URL parameter.

> - but the
> url links in the table are still rewritten. I do not understand why.

My immediate reaction to this is that session.use_cookies must be set to 0 (or Off) in your php.ini (or equivalent). Have you checked this? If it looks correct, what does a phpinfo() page show?

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.fordleedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

attached mail follows:


Mike,

I hope you mean session_start().

Yes, I did. Getting a bit dyslexic nowadays.

Well, you would, because PHP would use the value from the PHPSESSID= URL parameter.

... except that on the second call, the url (as displayed by the
browser) does not contain the PHPSESSID parameter, yet I am still able
to retrieve the session variables correctly ...

My immediate reaction to this is that session.use_cookies must be set to 0 (or Off) in your php.ini (or equivalent). Have you checked this? If it looks correct, what does a phpinfo() page show?

php.ini contains the following settings:
[Session]
session.save_handler = files
session.save_path = /tmp
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_maxlifetime = 1440
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 1
url_rewriter.tags =
"a=href,area=href,frame=src,input=src,form=fakeentry"

In phpinfo(), the "local value" matches the "master value" for all
entries, and match the entries in php.ini.

I appreciate that this issue isn't a big deal - but I had hoped to
understand php well enough to tell the difference between a "bug" and a
"feature". If it would help, I could send you the url for the page?
(password protected)

Peter

Ford, Mike [LSS] wrote:

>On 11 December 2003 18:01, Peter Walter wrote:
>
>
>
>>Mike,
>>
>>Thanks for the additional explanation, and I understand the
>>sequence of events as you described. However, please bear
>>with me a bit - the results I am getting do not quite match
>>your explanation. Let me clarify what I am doing:
>>
>>I have a page (index.php) which starts out by calling
>>start_session(),
>>
>>
>
>I hope you mean session_start().
>
>
>
>> then emits some html code containing some
>>form variables for search criteria. After the form variables,
>>I have a "submit" button that refers to index.php. Following
>>that, I have php logic that extracts the search criteria (if
>>set) from $HTTP_POST_VARS, performs a MySQL query, then
>>creates a table of results (if any); one of the table entries
>>contains a <a href= link to determine which row the user selected.
>>
>>The first time I load the page, I assume the session is
>>created by start_session(), and the cookie is sent to the
>>browser. When I click on the "submit" button, the page is
>>reloaded - I assume with the session active - as per your
>>explanation. According tho the documentation I have read, the
>>second time the page is loaded, start_session() will simply
>>reuse the existing session parameters. At this point, the
>>browser should already have the cookie - if it did not, I
>>would not be able to retrieve the session variables
>>
>>
>
>Well, you would, because PHP would use the value from the PHPSESSID= URL parameter.
>
>
>
>> - but the
>>url links in the table are still rewritten. I do not understand why.
>>
>>
>
>My immediate reaction to this is that session.use_cookies must be set to 0 (or Off) in your php.ini (or equivalent). Have you checked this? If it looks correct, what does a phpinfo() page show?
>
>Cheers!
>
>Mike
>
>---------------------------------------------------------------------
>Mike Ford, Electronic Information Services Adviser,
>Learning Support Services, Learning & Information Services,
>JG125, James Graham Building, Leeds Metropolitan University,
>Beckett Park, LEEDS, LS6 3QS, United Kingdom
>Email: m.fordleedsmet.ac.uk
>Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
>
>
>

attached mail follows:


Well have you tried to define one function to include the for all
variables that require mt_rand()?
Jas

Brent Baisley wrote:

> Personally, I wouldn't worry about it unless it is actually interfering
> with other processes. The OS will give any process or thread 100% of the
> CPU if there is nothing else that needs the CPU. What does you context
> switching numbers look like? If there is a lot of context switching,
> then your processes or threads are getting kicked off the CPU before
> they can accomplish much. And that's a problem.
>
> The duration of your script is less than a second, so that's not really
> a long enough time have an affect on other parts of the system. Heck, it
> may even being completing within just a couple of time slices (the
> length of time the OS allows a process/thread to use the CPU).
>
> You could always adjust the priority level (nice value in Unix) of
> whatever PHP is running under (i.e. Apache). Although you should
> understand what you are doing if you are adjusting nice values.
>
>
> On Dec 11, 2003, at 10:03 AM, TauAlex wrote:
>
>> Hello!
>>
>> I'm having a problem with my php script on my linux web server. In that
>> script there is a cycle with some math calculations (about ~30 steps),
>> the
>> execution time is less 1 second, but the script loads the server CPU
>> up to
>> 90%...
>> I've optimized script already to the minimum math function, anyway, it
>> still
>> overloads the CPU.
>> How can I reduce the CPU load? It seems that usleep() does not help much,
>> especially in Windows (it's not supported).
>> How can I give system a portion of time in the end of each step (I don't
>> mind if it will increase the job time)? Is there a solution for both
>> Windows
>> and Linux?
>>

attached mail follows:


ex.
<?php
function rand($attack,$skills,$damage,$armor) {
$do = array($attack,$skills,$damage,$armor);
finish=false
while (!finish) {
        $do = mt_rand(mktime(microtime(1,100)); }
while($do = list($attack,$skills,$damage,$armor)) {
        calculate total damage for opponent }
}
?>
I read that the use of mt_rand will produce the same results each time
the page is called with a certain number... so I would recommend using
microtime in conjunction with your mt_rand calls to ensure true random
numbers.
By throwing your vars into an array and looping through it applying your
random points deduction then listing the contents of the array (with new
values) it might improve cpu performance but then again. I am still
fairly new to php.
Jas

Jas wrote:

> Well have you tried to define one function to include the for all
> variables that require mt_rand()?
> Jas
>
>
> Brent Baisley wrote:
>
>> Personally, I wouldn't worry about it unless it is actually
>> interfering with other processes. The OS will give any process or
>> thread 100% of the CPU if there is nothing else that needs the CPU.
>> What does you context switching numbers look like? If there is a lot
>> of context switching, then your processes or threads are getting
>> kicked off the CPU before they can accomplish much. And that's a problem.
>>
>> The duration of your script is less than a second, so that's not
>> really a long enough time have an affect on other parts of the system.
>> Heck, it may even being completing within just a couple of time slices
>> (the length of time the OS allows a process/thread to use the CPU).
>>
>> You could always adjust the priority level (nice value in Unix) of
>> whatever PHP is running under (i.e. Apache). Although you should
>> understand what you are doing if you are adjusting nice values.
>>
>>
>> On Dec 11, 2003, at 10:03 AM, TauAlex wrote:
>>
>>> Hello!
>>>
>>> I'm having a problem with my php script on my linux web server. In that
>>> script there is a cycle with some math calculations (about ~30
>>> steps), the
>>> execution time is less 1 second, but the script loads the server CPU
>>> up to
>>> 90%...
>>> I've optimized script already to the minimum math function, anyway,
>>> it still
>>> overloads the CPU.
>>> How can I reduce the CPU load? It seems that usleep() does not help
>>> much,
>>> especially in Windows (it's not supported).
>>> How can I give system a portion of time in the end of each step (I don't
>>> mind if it will increase the job time)? Is there a solution for both
>>> Windows
>>> and Linux?
>>>

attached mail follows:


Stephen --

...and then Stephen Craton said...
%
% Hello,

Hi!

%
% I was just wondering if there were such a program for Palm OS 4.1 that processes PHP code. Just wondering so that I can maybe make some complex calculator functions on it and use it for school work or whatever else may come my way. Thanks!

Since you can run Linux on a Palm, I'm quite confident that you could
compile PHP for it :-)

Surf around the palm lists a bit to learn about compiling for it and then
you should be able to apply that new knowledge to building php.

%
% Stephen Craton

HTH & HAND

:-D
--
David T-G * There is too much animal courage in
(play) davidtgjustpickone.org * society and not sufficient moral courage.
(work) davidtgworkjustpickone.org -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE/2LXRGb7uCXufRwARAnDLAKDnELuQiDXOLrG3UsP1arwz31j5tgCghGC0
P/zQBVxXeTK3DP6F/uXYJgw=
=t+RT
-----END PGP SIGNATURE-----

attached mail follows:


I would love one of these too! PHP programming in my pocket! And how
about a mini database for Palm OS also? (SQLite?)

Anybody know anything more about this?

I'm not finding much with Google that seems relevant for PHP running on
the Palm.

-Galen

On Dec 11, 2003, at 7:47 AM, Stephen Craton wrote:

> Hello,
>
> I was just wondering if there were such a program for Palm OS 4.1 that
> processes PHP code. Just wondering so that I can maybe make some
> complex calculator functions on it and use it for school work or
> whatever else may come my way. Thanks!
>
> Stephen Craton

attached mail follows:


Dunno about Palm, but you could get a Sharp Zaurus (which runs linux) and
put mysql, apache, php etc on there. It also has a Palm emulator...

Daevid Vincent
http://daevid.com
  

> -----Original Message-----
> From: Galen [mailto:phplistzinkconsulting.com]
> Sent: Thursday, December 11, 2003 12:37 PM
> To: Stephen Craton; php-generallists.php.net
> Subject: Re: [PHP] Palm OS Processor
>
> I would love one of these too! PHP programming in my pocket! And how
> about a mini database for Palm OS also? (SQLite?)
>
> Anybody know anything more about this?
>
> I'm not finding much with Google that seems relevant for PHP
> running on
> the Palm.
>
> -Galen
>
> On Dec 11, 2003, at 7:47 AM, Stephen Craton wrote:
>
> > Hello,
> >
> > I was just wondering if there were such a program for Palm
> OS 4.1 that
> > processes PHP code. Just wondering so that I can maybe make some
> > complex calculator functions on it and use it for school work or
> > whatever else may come my way. Thanks!
> >
> > Stephen Craton
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


On Thursday 11 December 2003 03:37 pm, Galen wrote:
> I would love one of these too! PHP programming in my pocket! And how
> about a mini database for Palm OS also? (SQLite?)
>
> Anybody know anything more about this?

GCC on Palm. Yumm.
http://sourceforge.net/projects/prc-tools/

>
> I'm not finding much with Google tha
>
> -Galen
>
> On Dec 11, 2003, at 7:47 AM, Stephen Craton wrote:
> > Hello,
> >
> > I was just wondering if there were such a program for Palm OS 4.1 that
> > processes PHP code. Just wondering so that I can maybe make some
> > complex calculator functions on it and use it for school work or
> > whatever else may come my way. Thanks!
> >
> > Stephen Craton

--
Evan Nemerson
evancoeus-group.com
http://coeusgroup.com/en

--
"Truth, like gold, is to be obtained not by its growth, but by washing away
from it all that is not gold. "

-Leo Nikolaevich Tolstoy

attached mail follows:


Hey all -

I'm looking for a class that returns a rss/rdf feed with each of the
items as an array, or suggestions on how to items into an array...

Tia,

Rolf Brusletto
rolfphpexamples.net
www.phpExamples.net

attached mail follows:


<snip>
I'm looking for a class that returns a rss/rdf feed with each of the
items as an array, or suggestions on how to items into an array...
</snip>

try google and freshmeat.net

You should be able to find plenty of examples and classes.

attached mail follows:


We have pretty good luck with http://www.fase4.com/rdf/

Daevid Vincent
http://daevid.com
  

> -----Original Message-----
> From: Matt Matijevich [mailto:matijevichalliancetechnologies.net]
> Sent: Thursday, December 11, 2003 10:46 AM
> To: php-generallists.php.net
> Subject: Re: [PHP] rss/rdf feed classes
>
> <snip>
> I'm looking for a class that returns a rss/rdf feed with each of the
> items as an array, or suggestions on how to items into an array...
> </snip>
>
> try google and freshmeat.net
>
> You should be able to find plenty of examples and classes.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


Check this out:

http://builder.com.com/5100-6374-5109834.html?tag=sc

--
Ray

On Thu, 2003-12-11 at 11:41, Rolf Brusletto wrote:
> Hey all -
>
> I'm looking for a class that returns a rss/rdf feed with each of the
> items as an array, or suggestions on how to items into an array...
>
> Tia,
>
> Rolf Brusletto
> rolfphpexamples.net
> www.phpExamples.net

attached mail follows:


Hello,

On 12/11/2003 04:41 PM, Rolf Brusletto wrote:
> I'm looking for a class that returns a rss/rdf feed with each of the
> items as an array, or suggestions on how to items into an array...

I am not sure if you want to generate or parse a RSS feed. Either way
you may want to look at it here where there are solutions for both tasks:

http://www.phpclasses.org/search.html?words=rss&go_search=1

--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

attached mail follows:


Manuel Lemos wrote:

> Hello,
>
> On 12/11/2003 04:41 PM, Rolf Brusletto wrote:
>
>> I'm looking for a class that returns a rss/rdf feed with each of the
>> items as an array, or suggestions on how to items into an array...
>
>
> I am not sure if you want to generate or parse a RSS feed. Either way
> you may want to look at it here where there are solutions for both tasks:
>
> http://www.phpclasses.org/search.html?words=rss&go_search=1
>
>
>
Manuel - Currently, I'm using class_RSS_feed.php... which I actually
pulled down (with some examples) from phpclasses.. But it dumps back
some formatted html, and what I would like is an associative array..
I've been looking through the class to see if there is different output
available.. but havent seen it yet... just got into the class though..

Thanks,

Rolf Brusletto
rolfphpexamples.net

attached mail follows:


Hello,

On 12/11/2003 07:39 PM, Rolf Brusletto wrote:
>>> I'm looking for a class that returns a rss/rdf feed with each of the
>>> items as an array, or suggestions on how to items into an array...
>>
>>
>>
>> I am not sure if you want to generate or parse a RSS feed. Either way
>> you may want to look at it here where there are solutions for both tasks:
>>
>> http://www.phpclasses.org/search.html?words=rss&go_search=1
>>
>>
>>
> Manuel - Currently, I'm using class_RSS_feed.php... which I actually
> pulled down (with some examples) from phpclasses.. But it dumps back
> some formatted html, and what I would like is an associative array..
> I've been looking through the class to see if there is different output
> available.. but havent seen it yet... just got into the class though..

I do not know that class. Maybe you want to ask its author or try some
other class in there.

--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

attached mail follows:


Manuel Lemos wrote:

> Hello,
>
> On 12/11/2003 07:39 PM, Rolf Brusletto wrote:
>
>>>> I'm looking for a class that returns a rss/rdf feed with each of
>>>> the items as an array, or suggestions on how to items into an array...
>>>
>>>
>>>
>>>
>>> I am not sure if you want to generate or parse a RSS feed. Either
>>> way you may want to look at it here where there are solutions for
>>> both tasks:
>>>
>>> http://www.phpclasses.org/search.html?words=rss&go_search=1
>>>
>>>
>>>
>> Manuel - Currently, I'm using class_RSS_feed.php... which I actually
>> pulled down (with some examples) from phpclasses.. But it dumps back
>> some formatted html, and what I would like is an associative array..
>> I've been looking through the class to see if there is different
>> output available.. but havent seen it yet... just got into the class
>> though..
>
>
> I do not know that class. Maybe you want to ask its author or try some
> other class in there.
>
>
Thanks for the correspondance Manuel.. It might be time to write a
class.. not a big deal.. just didn't wanna walk over someone elses work
and re-invent the wheel..

Thanks again,

Rolf Brusletto

attached mail follows:


May i ask what the difference is between rss and xml ? Also will these
classes generate it from the database ?
> Hello,
>
> On 12/11/2003 04:41 PM, Rolf Brusletto wrote:
>> I'm looking for a class that returns a rss/rdf feed with each of the
>> items as an array, or suggestions on how to items into an array...
>
> I am not sure if you want to generate or parse a RSS feed. Either way
> you may want to look at it here where there are solutions for both
> tasks:
>
> http://www.phpclasses.org/search.html?words=rss&go_search=1
>
>
>
> --
>
> Regards,
> Manuel Lemos
>
> Free ready to use OOP components written in PHP
> http://www.phpclasses.org/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

attached mail follows:


Can i run PHP using Apache tomcat server??

attached mail follows:


Good Afternoon!!

        I just installed RedHat Linux 9.0 with Apache/Php/MySql for a project. I
have Apache and PHP running. However, PHP does not have the Mysql module??
installed and this is the key to our project. Could someone point me in the
right direction to recompile PHP with proper MySql module included?? I am a
EXTREME newbie when it comes to compiling anything in Linux.

Robin 'Sparky' Kopetzky
Black Mesa Computers/Internet Service
Grants, NM 87020

attached mail follows:


This is a good tutorial and it starts off with installiing php and mysql

http://hotwired.lycos.com/webmonkey/programming/php/tutorials/tutorial4.html

Robin Kopetzky wrote:

>Good Afternoon!!
>
> I just installed RedHat Linux 9.0 with Apache/Php/MySql for a project. I
>have Apache and PHP running. However, PHP does not have the Mysql module??
>installed and this is the key to our project. Could someone point me in the
>right direction to recompile PHP with proper MySql module included?? I am a
>EXTREME newbie when it comes to compiling anything in Linux.
>
>Robin 'Sparky' Kopetzky
>Black Mesa Computers/Internet Service
>Grants, NM 87020
>
>
>

--

+-----------------+-----------------+----------------+
| Blake Schroeder | Owner/Developer | lhwd.net |
+--(http://www.lhwd.net)------------+--/3174026352\--+

attached mail follows:


> I just installed RedHat Linux 9.0 with Apache/Php/MySql for a project. I
> have Apache and PHP running. However, PHP does not have the Mysql module??
> installed and this is the key to our project. Could someone point me in the
> right direction to recompile PHP with proper MySql module included?? I am a
> EXTREME newbie when it comes to compiling anything in Linux.

Did you install apache/php/mysql as rpms?

If you did then all you need to do is install the php-mysql rpm.

--
Ray

attached mail follows:


Hello,

On 12/11/2003 12:57 PM, Mark Roberts wrote:
> I am about to embark on a project that requires me to access several mysql
> files (customer order entry), gather the information and output an XML
> formatted file that will be used as an input file to another accounting
> application.
>
> Question is this. As a seasoned developer, my natural instinct is to just
> write a script(s) to access all the information that I need and write the
> appropriate information out to the file. Is there a better way to do this?
> Is there some type of application that has been developed that will take a
> select statement as input and automatically generate XML output?

That depends on how you query your database. There are classes for what
you want that use different database API. Here you can find several of them:

http://www.phpclasses.org/browse.html/class/4.html

For generating generic XML with whatever data you retrieve, you may want
to try this class:

http://www.phpclasses.org/xmlwriter

--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

attached mail follows:


I'm am completely stumped on a seemingly simple math formula

I need to find a way to map a set of numbers up to 4 (e.g. 1,2,3,4 or 1,2)
to any number in a range of up to 10,000 (ideally, unlimited). Such that,

(e.g. 1,2,3,4)

1 is to 1
2 is to 2
3 is to 3
4 is to 4

5 is to 1
6 is to 2
7 is to 3
8 is to 4

9 is to 1
10 is to 2
11 is to 3
12 is to 4

13 is to 1
14 is to 2
15 is to 3
16 is to 4

And so on...

Is anyone good at math, that can throw me a bone?

Thanks y'all,
Mike D

....................................
Mike Dunlop
AWN, Inc.
// www.awn.com
[ e ] webmasterawn.com
[ p ] 323.606.4237

attached mail follows:


On Thursday 11 December 2003 03:33 pm, Mike D wrote:
> I'm am completely stumped on a seemingly simple math formula
>
> I need to find a way to map a set of numbers up to 4 (e.g. 1,2,3,4 or 1,2)
> to any number in a range of up to 10,000 (ideally, unlimited). Such that,
>
> (e.g. 1,2,3,4)
>
> 1 is to 1
> 2 is to 2
> 3 is to 3
> 4 is to 4
>
> 5 is to 1
> 6 is to 2
> 7 is to 3
> 8 is to 4
>
> 9 is to 1
> 10 is to 2
> 11 is to 3
> 12 is to 4
>
> 13 is to 1
> 14 is to 2
> 15 is to 3
> 16 is to 4
>
> And so on...
>
> Is anyone good at math, that can throw me a bone?

Modulus operator.

// untested
function map($n, $x) {
        return (($x-1) % $n)+1;
}

>
> Thanks y'all,
> Mike D
>
>
> ....................................
> Mike Dunlop
> AWN, Inc.
> // www.awn.com
> [ e ] webmasterawn.com
> [ p ] 323.606.4237

--
Evan Nemerson
evancoeus-group.com
http://coeusgroup.com/en

--
"The superior man is satisfied and composed; the mean man is always full of
distress."

-Confucious

attached mail follows:


"Mike D" <mikeawn.com> wrote in message news:BBFE14A9.107A2%mikeawn.com...
> I'm am completely stumped on a seemingly simple math formula
>
> I need to find a way to map a set of numbers up to 4 (e.g. 1,2,3,4 or 1,2)
> to any number in a range of up to 10,000 (ideally, unlimited). Such that,
>
> (e.g. 1,2,3,4)
>
> 1 is to 1
> 2 is to 2
> 3 is to 3
> 4 is to 4
>
> 5 is to 1
> 6 is to 2
> 7 is to 3
> 8 is to 4
>
> 9 is to 1
> 10 is to 2
> 11 is to 3
> 12 is to 4
>
> 13 is to 1
> 14 is to 2
> 15 is to 3
> 16 is to 4
>
> And so on...
>
> Is anyone good at math, that can throw me a bone?
>
> Thanks y'all,
> Mike D
>
>
> ....................................
> Mike Dunlop
> AWN, Inc.
> // www.awn.com
> [ e ] webmasterawn.com
> [ p ] 323.606.4237

Here is some simple code to solve that problem(if i have understood right):

<?php

for($i = 1, $j = 1; $i <= 10000; $i++, $j++){

 if($j == 5){
  $j = 1;
  print "\n<br>";
 }

 print "$i is to $j<br>\n";

}

?>

Eric

attached mail follows:


I do not know if I understand well, but what about

$group=$number % 4;
if ($group==0) $group=4;

Brona

> -----Original Message-----
> From: Eric Bolikowski [mailto:ericbroadpark.no]
> Sent: Thursday, December 11, 2003 10:53 PM
> To: php-generallists.php.net
> Subject: [PHP] Re: PHP Math Question
>
>
>
> "Mike D" <mikeawn.com> wrote in message
> news:BBFE14A9.107A2%mikeawn.com...
> > I'm am completely stumped on a seemingly simple math formula
> >
> > I need to find a way to map a set of numbers up to 4 (e.g.
> 1,2,3,4 or 1,2)
> > to any number in a range of up to 10,000 (ideally, unlimited).
> Such that,
> >
> > (e.g. 1,2,3,4)
> >
> > 1 is to 1
> > 2 is to 2
> > 3 is to 3
> > 4 is to 4
> >
> > 5 is to 1
> > 6 is to 2
> > 7 is to 3
> > 8 is to 4
> >
> > 9 is to 1
> > 10 is to 2
> > 11 is to 3
> > 12 is to 4
> >
> > 13 is to 1
> > 14 is to 2
> > 15 is to 3
> > 16 is to 4
> >
> > And so on...
> >
> > Is anyone good at math, that can throw me a bone?
> >
> > Thanks y'all,
> > Mike D
> >
> >
> > ....................................
> > Mike Dunlop
> > AWN, Inc.
> > // www.awn.com
> > [ e ] webmasterawn.com
> > [ p ] 323.606.4237
>
> Here is some simple code to solve that problem(if i have
> understood right):
>
> <?php
>
> for($i = 1, $j = 1; $i <= 10000; $i++, $j++){
>
> if($j == 5){
> $j = 1;
> print "\n<br>";
> }
>
> print "$i is to $j<br>\n";
>
> }
>
> ?>
>
> Eric
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


I like Eric's idea of showing the values and added a form to it so you can
select the number of items to show before running the script.

<?php
if(!$_POST["Submit"]) {
echo "<form method=post action=".$_SERVER["PHP_SELF"].">"
Maximum Number to Show: <input type=text name=i size=5 value=10000>
<input type=submit name=Submit value=Show>
</form>";
}

else {
for($i = 1, $j = 1; $i <= $_POST["i"]; $i++, $j++){

 if($j == 5){
  $j = 1;
  print "\n<br>";
 }

 print $i." is to ".$j."<br>\n";

} // end for

?>

Jim

----- Original Message -----
From: "Bronislav Klučka" <Bronislav.Kluckapro2-soft.com>
To: "Eric Bolikowski" <ericbroadpark.no>; <php-generallists.php.net>
Sent: Thursday, December 11, 2003 5:22 PM
Subject: RE: [PHP] Re: PHP Math Question

| I do not know if I understand well, but what about
|
| $group=$number % 4;
| if ($group==0) $group=4;
|
| Brona
|
| > -----Original Message-----
| > From: Eric Bolikowski [mailto:ericbroadpark.no]
| > Sent: Thursday, December 11, 2003 10:53 PM
| > To: php-generallists.php.net
| > Subject: [PHP] Re: PHP Math Question
| >
| >
| >
| > "Mike D" <mikeawn.com> wrote in message
| > news:BBFE14A9.107A2%mikeawn.com...
| > > I'm am completely stumped on a seemingly simple math formula
| > >
| > > I need to find a way to map a set of numbers up to 4 (e.g.
| > 1,2,3,4 or 1,2)
| > > to any number in a range of up to 10,000 (ideally, unlimited).
| > Such that,
| > >
| > > (e.g. 1,2,3,4)
| > >
| > > 1 is to 1
| > > 2 is to 2
| > > 3 is to 3
| > > 4 is to 4
| > >
| > > 5 is to 1
| > > 6 is to 2
| > > 7 is to 3
| > > 8 is to 4
| > >
| > > 9 is to 1
| > > 10 is to 2
| > > 11 is to 3
| > > 12 is to 4
| > >
| > > 13 is to 1
| > > 14 is to 2
| > > 15 is to 3
| > > 16 is to 4
| > >
| > > And so on...
| > >
| > > Is anyone good at math, that can throw me a bone?
| > >
| > > Thanks y'all,
| > > Mike D
| > >
| > >
| > > ....................................
| > > Mike Dunlop
| > > AWN, Inc.
| > > // www.awn.com
| > > [ e ] webmasterawn.com
| > > [ p ] 323.606.4237
| >
| > Here is some simple code to solve that problem(if i have
| > understood right):
| >
| > <?php
| >
| > for($i = 1, $j = 1; $i <= 10000; $i++, $j++){
| >
| > if($j == 5){
| > $j = 1;
| > print "\n<br>";
| > }
| >
| > print "$i is to $j<br>\n";
| >
| > }
| >
| > ?>
| >
| > Eric
| >
| > --
| > 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:


  "Mike D" <mikeawn.com> wrote in message
news:BBFE14A9.107A2%mikeawn.com...

>I'm am completely stumped on a seemingly simple math formula
>
>I need to find a way to map a set of numbers up to 4 (e.g. 1,2,3,4 or 1,2)
>to any number in a range of up to 10,000 (ideally, unlimited). Such that,
>
>(e.g. 1,2,3,4)
>
>1 is to 1
>2 is to 2
>3 is to 3
>4 is to 4
>
>5 is to 1
>6 is to 2
>7 is to 3
>8 is to 4
>
>9 is to 1
>10 is to 2
>11 is to 3
>12 is to 4
>
>13 is to 1
>14 is to 2
>15 is to 3
>16 is to 4

etc.

Here is an (untested) function that may work:

function map_four( $num )
{
     $map_val = $num % 4;
     if ($map_val) {
         return $map_val;
     } else {
         return 4;
     }
}

Basically, it looks like a modulus with 4, except that you want
multiples of four to return four instead of zero.

Unless, of course, I completely misunderstood the question. Which is not
uncommon as of late.

--
Rob

attached mail follows:


Yes, it's the max_allowed_packet size!

I already saw that variable and assumed it was related to packet length
- as in TCP/IP packet length - not query length.

It's all working now. Thanks!

-Galen

On Dec 11, 2003, at 2:36 AM, Rich Gray wrote:

>> I have a script that accepts large files (images) and inserts them
>> into
>> a MySQL table. The images are manipulated and whatnot, no problems at
>> all getting the image into a string and running addslashes() on it.
>> Then I go and use it with a mysql query. This is something I've coded
>> dozens of times, but now there's a twist. The files are bigger than
>> I've ever worked with. In theory, I didn't think there would be a
>> problem, but there is. When I try in insert a file of about 800K or
>> larger (9-10 MB is as large as I ever try to insert) the insert fails.
>> The query is written correctly AKAIK, but no data reaches the table
>> I'm
>> writing to.
>>
> [chop]
>
> Hi Galen
>
> I'd hazard a guess that it is probably your MySQL server settings that
> are
> cause of the problem - in particular check the max_allowed_packet_size
> (?? -
> you'll probably need to check this name as I haven't any docs to hand
> at the
> moment) setting in your my.ini file...
>
> HTH
> Cheers
> Rich
>
>
>
>

attached mail follows:


On Thursday 11 December 2003 09:59 am, you wrote:
> Hi,
> Problem is, I want to compile on my win2k pro machine for the linux
> dedicated machine......

Okay, it's called cross-compiling, and it's a huge pain in the arse. My
advice: don't do it. If you don't have a lot of experience with GCC, it's
simply not going to happen. Sorry.

If you do want to try, you'd probably need gcc under cygwin with binutils for
elf, plus every package php depends on... yeah linking would be a nightmare.

> I have never compiled php before, I got one of those "ready to go packages"
> (PHP+MySql+Apache - in one .exe file)
>
> Cheers,
> -Ryan
>
> > On Wednesday 10 December 2003 08:23 pm, Ryan A wrote:
> > > Hi,
> > >
> > > Its been quite some time since I have done any compiling, the last time
>
> was
>
> > > java and before that C...which was years back.
> > >
> > > I want to install Turck MMCache for php on one of our new dedicated
>
> servers
>
> > > as we will be running a crapload of scripts there...differient
> > > applications...we estimate around 2k - 4k or even a few more
> > > scripts....
> >
> > honestly, i've never run turck, but the build process seems rather
>
> standard.
>
> > > I myself have been working on a windows machine for a lonnng time (yes,
>
> i
>
> > > said windows, you *unix users can stop spitting) and really have no
> > > idea about "compiling" MMCache...can anybody tell me how to do it
> > > please? and what i'll need?
> >
> > I'm going to assume you're compiling on a real OS, and your desktop is
> > Windows. If not, can't really help...
> >
> > > This is what I got from their page:
> > > (http://turck-mmcache.sourceforge.net/#install)
> > > Step 1. Compiling Turck MMCache
> > > export PHP_PREFIX="/usr"
> > > $PHP_PREFIX/bin/phpize
> >
> > Odds are phpize is in your $PATH, so you can just cd into the turck
>
> directory,
>
> > and type phpize. If not, try typing `locate phpize` to find it, then type
> > /path/to/phpize instead.
> >
> > > ./configure --enable-mmcache=shared
> > > --with-php-config=$PHP_PREFIX/bin/php-co nfig
> > > make
> >
> > then you move into the PHP source directory, since PHP needs to be
>
> recompiled
>
> > with support for turck. See http://www.php.net/manual/en/installation.php
> >
> > the only requirement is that you must include '--enable-mmcache=shared'
> > as
>
> an
>
> > argument to the configure script. If the server is already set up, you
>
> should
>
> > do a phpinfo() to see what was sent to configure, and use that exact
>
> command
>
> > plus the mmcache thing above. This will decrease the likelyhood of a
>
> snafu.
>
> > > Thanks,
> > > -Ryan
> > >
> > >
> > > http://Bestwebhosters.com
> >
> > --
> > Evan Nemerson
> > evancoeus-group.com
> > http://coeusgroup.com/en
> >
> > --
> > "I am indeed amazed when I consider how weak my mind is and how prone to
> > error. "
> >
> > -Rene Descartes

--
Evan Nemerson
evancoeus-group.com
http://coeusgroup.com/en

--
"God is love, Love is blind, Ray Charles is blind... Therefore, Ray Charles is
God"

attached mail follows:


I've dug around quite a bit and can't figure out how I might use PHP to handle an .htaccess login. For example, if I wanted a script to log in the user, rather than the user logging in with the standard .htaccess dialog.

Any ideas?

Since the .htaccess vars are stored in the browser, should I be looking at a PHP/JavaScritpt 1-2 punch?

Thanks,

Bob

attached mail follows:


On Thursday 11 December 2003 04:17 pm, ROBERT MCPEAK wrote:
> I've dug around quite a bit and can't figure out how I might use PHP to
> handle an .htaccess login. For example, if I wanted a script to log in the
> user, rather than the user logging in with the standard .htaccess dialog.
>
> Any ideas?

I could be wrong, but I think this would be rather client-dependent. I don't
think HTTP remembers who you throughout a session- i think the headers get
sent every time. My only idea from PHP would be to set the
$_SERVER['PHP_AUTH_*'] stuff, but i sincerely doubt that would do anything. I
just don't think there's a way to ask the browser to set that info through
http. Maybe ask javascript forum?

If you find a solution, I'd love to hear it...

>
> Since the .htaccess vars are stored in the browser, should I be looking at
> a PHP/JavaScritpt 1-2 punch?
>
> Thanks,
>
> Bob

--
Evan Nemerson
evancoeus-group.com
http://coeusgroup.com/en

--
"First they came for the Communists, and I didn't speak up, because I wasn't a
Communist. Then they came for the Jews, and I didn't speak up, because I
wasn't a Jew. Then they came for the Catholics, and I didn't speak up,
because I was a Protestant. Then they came for me, and by that time there was
no one left to speak up for me."

-Martin Niemoller

attached mail follows:


Combination of session vars and cookie vars...
example...
[login page]
sets cookie with auth=0 (variable)
sets session with auth=0 (variable)

[logged in page(s)]
sets cookie with auth=1 (variable -client side)
sets session with auth=1 (variable -server side)
hash of users password as client side var

then just write a function to look on the users machine for a cookie
from your site with auth=1, then if you see that present simply
authenticate the user.

HTH
Jas

Evan Nemerson wrote:

> On Thursday 11 December 2003 04:17 pm, ROBERT MCPEAK wrote:
>
>>I've dug around quite a bit and can't figure out how I might use PHP to
>>handle an .htaccess login. For example, if I wanted a script to log in the
>>user, rather than the user logging in with the standard .htaccess dialog.
>>
>>Any ideas?
>
>
> I could be wrong, but I think this would be rather client-dependent. I don't
> think HTTP remembers who you throughout a session- i think the headers get
> sent every time. My only idea from PHP would be to set the
> $_SERVER['PHP_AUTH_*'] stuff, but i sincerely doubt that would do anything. I
> just don't think there's a way to ask the browser to set that info through
> http. Maybe ask javascript forum?
>
> If you find a solution, I'd love to hear it...
>
>
>>Since the .htaccess vars are stored in the browser, should I be looking at
>>a PHP/JavaScritpt 1-2 punch?
>>
>>Thanks,
>>
>>Bob
>
>

attached mail follows:


Jas wrote:

> Combination of session vars and cookie vars...
> example...
> [login page]
> sets cookie with auth=0 (variable)
> sets session with auth=0 (variable)
>
> [logged in page(s)]
> sets cookie with auth=1 (variable -client side)
> sets session with auth=1 (variable -server side)
> hash of users password as client side var
>
> then just write a function to look on the users machine for a cookie
> from your site with auth=1, then if you see that present simply
> authenticate the user.
>
> HTH
> Jas
>
>
> Evan Nemerson wrote:
>
>> On Thursday 11 December 2003 04:17 pm, ROBERT MCPEAK wrote:
>>
>>> I've dug around quite a bit and can't figure out how I might use PHP to
>>> handle an .htaccess login. For example, if I wanted a script to log
>>> in the
>>> user, rather than the user logging in with the standard .htaccess
>>> dialog.
>>>
>>> Any ideas?
>>
>>
>>
>> I could be wrong, but I think this would be rather client-dependent. I
>> don't think HTTP remembers who you throughout a session- i think the
>> headers get sent every time. My only idea from PHP would be to set the
>> $_SERVER['PHP_AUTH_*'] stuff, but i sincerely doubt that would do
>> anything. I just don't think there's a way to ask the browser to set
>> that info through http. Maybe ask javascript forum?
>>
>> If you find a solution, I'd love to hear it...
>>
>>
>>> Since the .htaccess vars are stored in the browser, should I be
>>> looking at
>>> a PHP/JavaScritpt 1-2 punch?
>>>
>>> Thanks,
>>>
>>> Bob
>>
>>
>>

You could also use the PEAR::Auth package to do authentication (through
a form or a .htaccess style popup).

--
paperCrane <Justin Patrin>

attached mail follows:


On Thursday 11 December 2003 10:49 am, Pablo Gosse wrote:
> <snip>
> Hi,
> I'm on a win2k pro machine and need to copy a modified httpd.conf file
> to my
> linux box,
> I dont really know much about SSH and just learned a bit with my pals
> help
> (google)
>
> I am able to navigate around the directories, get a directory listing
> and
> delete...am unable to copy files from my harddisk for some reason....
> </snip>
>
> Hey Ryan. I'd suggest going to
> http://www.ssh.com/support/downloads/secureshellwks/ and downloading
> either the commercial evaluation version or non-commercial version. It
> has the standard SSH terminal, but it also features an SSH File Transfer
> client which will allow you to do what you want.

openssh also included an sftp client. IIRC, there is a pretty good win32 port
out there. And it's free

>
> Cheers,
> Pablo

--
Evan Nemerson
evancoeus-group.com
http://coeusgroup.com/en

--
"The superior man is satisfied and composed; the mean man is always full of
distress."

-Confucious

attached mail follows:


I posted a response to you guys on the list. Let me know if this is
what you were talking about or not.

Kris

Chris W. Parker wrote:

>Louie Miranda <mailto:louieaxishift.ath.cx>
> on Wednesday, December 10, 2003 11:40 PM said:
>
>
>
>>Its possible
>>
>>
>
>How did you solve your problem?
>
>
>
>Chris.
>--
>Don't like reformatting your Outlook replies? Now there's relief!
>http://home.in.tum.de/~jain/software/outlook-quotefix/
>
>
>

attached mail follows:


Just put the include inside the function.

<?php
post();
function post() {
print "<font size=\"2\">1</font><br>";
include("oongae.txt");
echo "<br>";
print "<font size=\"2\">2</font><br>";
}
?>

-- -
Louie Miranda
http://www.axishift.com

attached mail follows:


Sample script I have here is this...

--snip--
<a href="http://www.yourserver.com/yourpage.htm#RowNum3"
target="doc">Jump</a>

<iframe id="doc" name="doc"
src="http://www.yourserver.com/yourpage.htm"></iframe>
--snip--

Where yourpage.htm have this "<a href='#' name='RowNum3'>blah blah</a>"....

So, question here is how do I pass the post string to the Iframe, like
"&color=red" in this example, this example doesn't work... The iframe is
the target method....

--snip--
<a href=http://www.yourserver.com/yourpage.htm#RowNum3&color=red
target="doc">Jump</a>
--snip--

Thanks,
 Scott

attached mail follows:


I do not know, but you can try it yourselves:
1/ create form with action="http://www.yourserver.com/yourpage.htm#RowNum3"
method="get"
2/ make some input fields and submit this form

::)

Brona

> -----Original Message-----
> From: Scott Fletcher [mailto:scottabcoa.com]
> Sent: Thursday, December 11, 2003 11:56 PM
> To: php-generallists.php.net
> Subject: [PHP] How to use anchor with php post string to jump to a
> page???
>
>
> Sample script I have here is this...
>
> --snip--
> <a href="http://www.yourserver.com/yourpage.htm#RowNum3"
> target="doc">Jump</a>
>
> <iframe id="doc" name="doc"
> src="http://www.yourserver.com/yourpage.htm"></iframe>
> --snip--
>
> Where yourpage.htm have this "<a href='#' name='RowNum3'>blah
> blah</a>"....
>
> So, question here is how do I pass the post string to the Iframe, like
> "&color=red" in this example, this example doesn't work... The iframe is
> the target method....
>
> --snip--
> <a href=http://www.yourserver.com/yourpage.htm#RowNum3&color=red
> target="doc">Jump</a>
> --snip--
>
> Thanks,
> Scott
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

attached mail follows:


Hi,
    I am having a problem with sessions. On my testing machine my script
works perfectly. However on the remote server it tries to pass the session
id in the url even though I am accepting cookies. It is messing up all my
links since it puts PHPSESSID=6a4626fc1cde0fb228fcb3ebe5587ffd in front of
my hrefs without an & after. If I click the link then it registers the
session as a cookie and everything works fine from there on out. Don't
understand what is happening as everyting used to work fine, and I don't
think I changed anyting. Don't know how well I described this. Take a look
if you are confused. The link to the site is
http://www.designoriginalsbykim.com. Thanks for any help you may be able to
give.

Steve Turner
Fort Collins, CO
http://www.SteveOnWeb.com

The session part of phpinfo() is
session
      Session Support enabled
      Registered save handlers files user

      Directive Local Value Master Value
      session.auto_start Off Off
      session.bug_compat_42 On On
      session.bug_compat_warn On On
      session.cache_expire 180 180
      session.cache_limiter nocache nocache
      session.cookie_domain no value no value
      session.cookie_lifetime 0 0
      session.cookie_path / /
      session.cookie_secure Off Off
      session.entropy_file no value no value
      session.entropy_length 0 0
      session.gc_divisor 100 100
      session.gc_maxlifetime 1440 1440
      session.gc_probability 1 1
      session.name PHPSESSID PHPSESSID
      session.referer_check no value no value
      session.save_handler files files
      session.save_path /tmp /tmp
      session.serialize_handler php php
      session.use_cookies On On
      session.use_only_cookies Off Off
      session.use_trans_sid On On

attached mail follows:


Hi,
I don't have a stable php ftp client, but i do have an article that
shows you how one can be written very quickly
http://www.raditha.com/php/ftp

Unless you are working behind a firewall i don't see why you want to use
php for ftp.

hope this helps.

MIKE YRABEDRA wrote:

>Can anyone recommend a good, secure, stable php ftp client?
>
>And please save the "look at hotscripts" responses. I am looking for actual
>user input.
>
>Thanks.
>
>+--------------------------------------------+
>Mike Yrabedra (President)
>323 Incorporated
>Home of MacDock.com, MacAgent.com and MacShirt.com
>+--------------------------------------------+
>W: http://www.323inc.com/
>P: 770.382.1195
>F: 734.448.5164
>E: mike323inc.com
>I: ichatmacdock
>+--------------------------------------------+
>"Whatever you do, work at it with all your heart,
>as working for the Lord, not for men."
>~Colossians 3:23 <{{{><
>+--------------------------------------------+
>
>
>

--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.

attached mail follows:


hi

When connecting to a imap server ,it always takes a 20 second delay.

I use like this :
<?php
$mbox = imap_open("{202.200.0.8:143}INBOX","user","pass");
imap_close($mbox);
?>

why this happen???

attached mail follows:


hi

I have worked with imap functions for a long time .

When I use "imap_open" connecting to a imap server ,it always takes a 20 second delay.

I use like this :
<?php
$mbox = imap_open("{202.200.0.8:143}INBOX","user","pass");
imap_close($mbox);
?>


why this happen?

attached mail follows:


it could be happening for many reasons

1) network problems
2) server problems
3) client problems

try to get a copy of snort and watch the connection negotiating in
real-time, you will be able to see at what point the connection slows,
and try to solve the problem from there

try a traceroute from you to the server to check for basic network slowness

Everything else from there is outside the scope of the list (unless you
track it down to an error in php)

Mike

Yt1 wrote:
> hi
>
> I have worked with imap functions for a long time .
>
> When I use "imap_open" connecting to a imap server ,it always takes a 20 second delay.
>
> I use like this :
> <?php
> $mbox = imap_open("{202.200.0.8:143}INBOX","user","pass");
> imap_close($mbox);
> ?>
>
>
> why this happen?

attached mail follows:


<code>
<?php

$level = '$level_' . $_SESSION['user']['level'];
//Where $_SESSION['user']['level'] can equal "1" or "2"

$level_1 = array("PN", "GALUP", "VP", "PUBUP", "STATS", "MCI", "CONLIST",
"CP", "OAFS", "LO");
$level_2 = array("PN", "GALUP", "VP", "PUBUP", "MCI", "CONLIST", "CP",
"OAFS", "LO");

while (list ($key, $val) = each ($level)) {

        print "<tr>";
        print "<td width=\"30%\"><img src=./images/icons/" . $icon_array[$val] .
"></td>";
        print "<td>" . constant($val) . "</td>";
        print "</tr>";

}
?>

</code>

<error>
Warning: Variable passed to each() is not an array or object in
D:\projects\kf10\test65.php on line 43
</error>

Line 43 in the error output refers to the "while" control structure. I can
not seem to define $level as the array $level_1 or $level_2, depending on
the $_SESSION['user']['level'] value (which can also be "1" or "2"). Any
thoughts on how to do this? I tried using a switch statement like:

switch ($_SESSION['user']['level']) {
   case "1":
       $level = $level_1;
       break;
   case "2":
       $level = $level_2;
}

But this didn't work either. Any help would be greatly appreciated.

-m

attached mail follows:


Thanks Tom, that worked! I knew that $$level had something to do with it,
just wasn't sure what exactly. Thanks again.

-m

-----Original Message-----
From: Tom Rogers [mailto:trogerskwikin.com]
Sent: Thursday, December 11, 2003 9:34 PM
To: motorpsychkill
Subject: Re: [PHP] passing arrays?

Always use isset() to check if something exists before trying to use it if
originates externally to the running script.

you probabley need something like this

$level_0 = array('NONE');
$level_1 = array("PN", "GALUP", "VP", "PUBUP", "STATS", "MCI",
"CONLIST","CP", "OAFS", "LO");
$level_2 = array("PN", "GALUP", "VP", "PUBUP", "MCI", "CONLIST", "CP",
"OAFS", "LO");

if(isset($_SESSION['user']['level'])){
        $level = 'level_'.$_SESSION['user']['level'];
}else{
        $level = 'level_0'; //catchall value
}
foreach($$level as $value){
        echo $value.'<br>';
}
--
regards,
Tom