|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help_at_lists.php.net
Date: Fri Nov 22 2002 - 13:50:39 CST
php-general Digest 22 Nov 2002 19:50:39 -0000 Issue 1720
Topics (messages 125565 through 125652):
Re: sessions and trans-sid problem/question
125565 by: Justin French
125567 by: Ernest E Vogelsinger
125568 by: Jean-Christian Imbeault
125570 by: Ernest E Vogelsinger
125572 by: Jean-Christian Imbeault
125575 by: Jean-Christian Imbeault
125577 by: Jason Wong
125579 by: Jean-Christian Imbeault
125582 by: Ernest E Vogelsinger
125583 by: Ernest E Vogelsinger
125584 by: Ernest E Vogelsinger
125585 by: Jason Wong
125609 by: Michael Sims
125611 by: Ernest E Vogelsinger
125624 by: Chris Shiflett
Re: Sending variables help
125566 by: Jason Wong
Re: Getting info from users comp?
125569 by: . Edwin
125571 by: Ernest E Vogelsinger
125576 by: . Edwin
writing to a file
125573 by: gamin
125578 by: Jason Wong
Re: How do I initialize a page to do something ONCE
125574 by: Jason Wong
125599 by: . Nilaab
125621 by: Larry Brown
Ip address as 32bit int?
125580 by: Noodle Snacks
125594 by: Joakim Andersson
125598 by: Mark Charette
FAQ a good idea?
125581 by: Noodle Snacks
125587 by: Justin French
125597 by: Maxim Maletsky
125600 by: Clint Tredway
125601 by: Noodle Snacks
PHP Version of Outlook????
125586 by: Craig
125596 by: Maxim Maletsky
125603 by: Craig
page cannot be displayed after a post of form with over 80 post elements
125588 by: B.C. Lance
checkboxes
125589 by: empty
125590 by: Bastian Vogt
125592 by: Ernest E Vogelsinger
Re: ScanMail Message: To Sender, sensitive content found and action taken.
125591 by: Richard Allsebrook
getting image names from a directoryindex of files
125593 by: electroteque
Simple RegExp Problem...
125595 by: . Nilaab
125604 by: Ernest E Vogelsinger
PHP/MySQL
125602 by: Mr. BuNgL3
125605 by: John W. Holmes
Problem with sessions and Internet Explorer
125606 by: Andreas Otto
125610 by: Ernest E Vogelsinger
125614 by: Andreas Otto
125618 by: Ernest E Vogelsinger
125620 by: Andreas Otto
fixed - Re: page cannot be displayed after a post of form with over 80 post elements
125607 by: B.C. Lance
Re: PHP Coding HELP
125608 by: Vicky
125625 by: Per Lundkvist
transferring data from .php to <form>'s in an .html file
125612 by: Krzysztof Wozniak
125613 by: John W. Holmes
Re: Newbie: PHP/MySQL (SELECT)
125615 by: Marek Kilimajer
php-4.3.0pre2, fgets and socket_get_status
125616 by: Stephen Grier
Re: Order of arrays
125617 by: Marek Kilimajer
Re: ImageMagick Extension v0.2a Released (UPDATED)
125619 by: Michael Montero
Re: SQLCODE=-930
125622 by: Oliver Fänger
125623 by: Matthieu Le Corre
Newbie mail () question
125626 by: Duncan Ellwood
125628 by: Cesar Aracena
125634 by: Kyle Gibson
CCO
125627 by: Cesar Aracena
phpUpLoad
125629 by: Vicky
125631 by: John W. Holmes
125632 by: Dev
125633 by: Ray Hunter
125636 by: Vicky
125637 by: Adam Williams
125639 by: Vicky
125641 by: Morgan Hughes
125643 by: Marek Kilimajer
Re: [PHP-DB] Forums?
125630 by: Stephen
Re: How to cache PHP on Apache
125635 by: Luanna Silva
125647 by: Chris Shiflett
125652 by: Luanna Silva
Help Porting PHP Sites from Solaris to RedHat 7.3
125638 by: Gary Smith
Opening a socket and sending GET data
125640 by: Todd Cary
125644 by: Chris Shiflett
Re: Capturing multiple select with Javascript - nearly ther
125642 by: Phoebe Bright
mail() problem...
125645 by: Duncan
125648 by: Marek Kilimajer
ob_output
125646 by: Uros Gruber
125649 by: Chris Wesley
125650 by: Uros Gruber
125651 by: Chris Shiflett
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:
PHP cannot possibly know when a user closes a window... PHP regularly
"cleans out the garbage" of old abandoned sessions, but you cannot expect
this instantly...
the only way to kill a session is to kill it on the server with
session_destroy(), which will require the user to access a "logout" script,
or some javascript trickery...
If you access that URL tomorrow, I doubt the session will STILL be valid...
You should do some reading up in the manual & php.ini, making sure what
session destroy means, what session.auto_start means, etc.
Justin
on 22/11/02 6:02 PM, Jean-Christian Imbeault (jc
mega-bucks.co.jp) wrote:
> Justin French wrote:
>>
>> I know that for IE Mac users (not sure about NN7) it's not until you QUIT
>> the application that the session is "terminated"...
>>
>> I *think* you'll find something similar in Windows... perhaps when ALL open
>> browser windows are closed and/or the browser app is QUIT, the session will
>> end?
>
> I exited all apps and restarted the browser. Didn't help. I also
> copy-pasted the URL
> (http://192.168.254.14/my_account.html?step=order_list&PHPSESSID=b6f60469a3a67
> b677cf9c13e34b17072)
> from my Netscape 7 browser into an IE browser and the sessions was
> still valid ...
>
> Is it because I am putting the SID in the URL? I haven't tested with
> cookies yet as I want to get my site working without cookies first.
>
>> Adding a logout feature will help people who are worried about security,
>> because it can kill the cookies on the browser.
>
> I agree! The problem I have now is that a user can bookmark a page with
> the SID in the URL and then come back later and the session is still
> active ... the session should close when the browser is closed.
>
> I have set session.auto_start = 1 so I would think that after closing
> the browser and going to the bookmarked paged a new session would be
> started, killing the SID passed in from the URL no?
>
> Thanks!
>
> Jc
>
Justin French
--------------------
http://Indent.com.au
Web Developent &
Graphic Design
--------------------
attached mail follows:
At 08:02 22.11.2002, Jean-Christian Imbeault said:
--------------------[snip]--------------------
>Is it because I am putting the SID in the URL? I haven't tested with
>cookies yet as I want to get my site working without cookies first.
Definetely yes.
The PHP session is (with the default setup) nuthing more than a hash that's
used to construct a file name. So the session ID
"0ee410a57762be937d6d277b4ff642c8" will render the filename
"/tmp/sess_0ee410a57762be937d6d277b4ff642c8" which will subsequently used
by PHP as the session storage.
>> Adding a logout feature will help people who are worried about security,
>> because it can kill the cookies on the browser.
>
>I agree! The problem I have now is that a user can bookmark a page with
>the SID in the URL and then come back later and the session is still
>active ... the session should close when the browser is closed.
You cannot really control if the user is logging out or not - I saw a
"solution" once where they had a JavaScript for "onUnload" where they
warned the user that the next time he should log out - I believe the actual
action was to use the onUnload handler to redirect the browser to the
logout screen. However this wouldn't work if the user has JavaScript
switched off.
What I usually do (I also have session cookies switched off) is to send the
user a session cookie when he logs in. This way I can use cookieless
sessions, but when it comes to sensitive areas I can be sure that
bookmarking or giving away the SID wouldn't automatically transfer the
login session...
>I have set session.auto_start = 1 so I would think that after closing
>the browser and going to the bookmarked paged a new session would be
>started, killing the SID passed in from the URL no?
I always recomment NOT using session.auto_start. It effectively disables
making objects session-persistent as any class file needed for the objects
must be loaded BEFORE objects gets reconstructed.
When the browser requests an URL with a SID you have no control if this
stems from a link or from a bookmark (maybe you could go and analyze
$_SERVER['HTTP_REFERER'], but not all browsers tranmit it. What you can do
is to have a timestamp of the last access recorded in your session so you
can always check against your own timeout requirements.
Personally I believe it's a good thing not to enable automatic session
cookies. Relying on a session cookie effectively disables having two
browser windows open with the same application but running in different
contexts, since both would transmit the same session cookie.
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
attached mail follows:
Justin French wrote: > > PHP cannot possibly know when a user closes a window... PHP regularly > "cleans out the garbage" of old abandoned sessions, but you cannot expect > this instantly...
True ... but the browser does.
I think I would not have this problem using cookies since the cookie would expire after the browser is closed. The reason I am seeing this problem is that I am passing the SID in the URL and hence PHP does not know that the browser was closed.
> If you access that URL tomorrow, I doubt the session will STILL be valid...
True. I guess I should set the gc to clean up sessions more often than it does now. Maybe 30 minutes ...
> You should do some reading up in the manual & php.ini, making sure what > session destroy means, what session.auto_start means, etc.
I know what they mean. I got very confused until you pointed a very obvious thing out. It's passing the SID in the URL that is causing the problem and as you pointed out there is no work-around.
I'll just have to live with the fact that by passing the SID in the URL the session will be alive until the session gc cleans up.
Thanks,
Jc
PS If I got any of this wrong please let me know.
attached mail follows:
At 08:56 22.11.2002, Justin French said: --------------------[snip]-------------------- >PHP cannot possibly know when a user closes a window... PHP regularly >"cleans out the garbage" of old abandoned sessions, but you cannot expect >this instantly...
This is controlled by the session.gc_probability value in your INI file which is set to 1 by default. This means that every 100th access to any PHP script on your server will initiate the session garbage routine which might kill your outdated session file. Increasing this value will make this process more often, setting it to 100 will have PHP run the garbage collector every time a PHP script gets executed (you shouldn't do this - think in concurrency terms...)
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
attached mail follows:
Ernest E Vogelsinger wrote: > > Definetely yes.
After reading Justin's post I realized that.
> What I usually do (I also have session cookies switched off) is to send the > user a session cookie when he logs in. This way I can use cookieless > sessions, but when it comes to sensitive areas I can be sure that > bookmarking or giving away the SID wouldn't automatically transfer the > login session...
I don't get what you mean here. Can you explain a bit more? Sounds like what I need but I don't understand. You say you have cookies switched off but send the user a cookie ... a contradiction.
> I always recomment NOT using session.auto_start. It effectively disables > making objects session-persistent
I didn't know that but it doesn't matter as I don't do OO in PHP. Being also a Java programmer I can't wrap my brain around how PHP does pseudo-OO.
Jc
attached mail follows:
Ernest E Vogelsinger wrote: > > This is controlled by the session.gc_probability value in your INI file
I know I can probably find this in the documentation somewhere but ... how do I set the expire time on a session?
> Increasing this value will make this > process more often, setting it to 100 will have PHP run the garbage > collector every time a PHP script gets executed (you shouldn't do this - > think in concurrency terms...)
Again, why would congruency be affected by the gc? If the session hasn't timed-out then the gc won't clean it up. If it has then it's ok to clean it up. I obviously am missing something has what you say seems to make sense but I can see it just yet :)
Jc
attached mail follows:
On Friday 22 November 2002 16:28, Jean-Christian Imbeault wrote: > Ernest E Vogelsinger wrote: > > This is controlled by the session.gc_probability value in your INI file > > I know I can probably find this in the documentation somewhere but ... > how do I set the expire time on a session? > > > Increasing this value will make this > > process more often, setting it to 100 will have PHP run the garbage > > collector every time a PHP script gets executed (you shouldn't do this - > > think in concurrency terms...) > > Again, why would congruency be affected by the gc? If the session hasn't > timed-out then the gc won't clean it up. If it has then it's ok to clean > it up. I obviously am missing something has what you say seems to make > sense but I can see it just yet :)
If you set it 100, then _every_ request in which sessions are used, PHP has to go through all the session files (by default stored in /tmp) and check whether they have expired. If you have a busy server you could have thousands of session files. Checking thousands of files at each request is very time consuming.
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* Traffic jam on the Information Superhighway. */
attached mail follows:
Jason Wong wrote: > > If you set it 100, then _every_ request in which sessions are used, PHP has to > go through all the session files (by default stored in /tmp) and check > whether they have expired. If you have a busy server you could have thousands > of session files. Checking thousands of files at each request is very time > consuming.
*That* I understand and agree with. What I was more interested in was the "concurrency" aspect. Why setting gc to 100 might cause problems with concurrency.
Jc
attached mail follows:
At 09:28 22.11.2002, Jean-Christian Imbeault said: --------------------[snip]-------------------- >> This is controlled by the session.gc_probability value in your INI file > >I know I can probably find this in the documentation somewhere but ... >how do I set the expire time on a session?
The session.gc_probability value is an overall value that you cannot escape as to my knowledge. If you want a finer granularity you need to run this from within your application. For example, when a iser accesses your script, record the current timestamp in session storage. On the next access, compare the current timestamp with the recorded one and act accordingly.
>> Increasing this value will make this >> process more often, setting it to 100 will have PHP run the garbage >> collector every time a PHP script gets executed (you shouldn't do this - >> think in concurrency terms...) > >Again, why would congruency be affected by the gc? If the session hasn't >timed-out then the gc won't clean it up. If it has then it's ok to clean >it up. I obviously am missing something has what you say seems to make >sense but I can see it just yet :)
If it hasn't timed out it won't be touched, that's clear - but _if_ it has timed out it's not guaranteed that the gc has already removed the session file. Note that there is no expiry check when the session storage is accessed by session_start(); only the gc process itself checks if it should remove the session file.
In another message, Jean-Christian Imbeault said: --------------------[snip]-------------------- >*That* I understand and agree with. What I was more interested in was >the "concurrency" aspect. Why setting gc to 100 might cause problems >with concurrency.
Setting this to 100 means that _any_ script access will start the gc. Which means that even on a moderately busy server a multitude of gc's will check the session files, possibly interfering with each other as one gc removes a file that's being checked by another gc. Might be painless (I haven't looked at the implementation); but I'd avoid this as far as I could :)
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
attached mail follows:
At 09:25 22.11.2002, Jean-Christian Imbeault said: --------------------[snip]-------------------- >> What I usually do (I also have session cookies switched off) is to send the >> user a session cookie when he logs in. This way I can use cookieless >> sessions, but when it comes to sensitive areas I can be sure that >> bookmarking or giving away the SID wouldn't automatically transfer the >> login session... > >I don't get what you mean here. Can you explain a bit more? Sounds like >what I need but I don't understand. You say you have cookies switched >off but send the user a cookie ... a contradiction.
My php.ini has session.use_cookies set to 0, so no (automatic) session cookies get transmitted. Thie however doesn't stop me from programmatically sending a cookie to the client... So that's what I do, basically: I might be using a session for a lot of stuff that's not related to user login; but when a user logs in this happens:
a) Create a unique cookie name and remember it: $cookie_name = md5(date('YmdHis')); $_SESSION['cookie_name'] = $cookie_name; b) Create a random value for the cookie: $cookie_token = rand(); $_SESSION['cookie_token'] = $cookie_token; c) Transmit this cookie to the client (lifetime=session): setcookie($cookie_name, $cookie_token);
From now on, the login-check tests for the random session cookie to match the token: if ($_COOKIE[$_SESSION['cookie_name']] == $_SESSION['cookie_token']) { // valid cookie found, so generate a new value $_SESSION['cookie_token'] = rand(); setcookie($_SESSION['cookie_name'], $_SESSION['cookie_token']); } else { // no cookie set, or token doesn't match - take the appropriate action }
This helps me to allow multiple sessions at the same client computer, since every session has its own unique cookie. Giving away a link containing a SID wouldn't harm security since you cannot pass or bookmark session cookies.
>> I always recomment NOT using session.auto_start. It effectively disables >> making objects session-persistent > >I didn't know that but it doesn't matter as I don't do OO in PHP. Being >also a Java programmer I can't wrap my brain around how PHP does pseudo-OO.
It's not pseudo-OO - it's some kind of "back-to-the-roots" OO :) You _do_ have (single) inheritance, you _do_ have class abstraction, you _do_ have polymorphism (although you need to go a lot by hand), but you _don't_ have protected and private storage.
You can always put an object into session storage, like this:
class A { function A() {} } session_start(); if (!is_object($a)) $a = new A(); $_SESSION['a'] =& $a;
This will give you the same object of class A anytime you access the page with the same session. Note however that the session handler needs the class definition to be able to reconstruct the saved object - only the class name, and the instance data, gets stored in session data.
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
attached mail follows:
At 09:28 22.11.2002, Jean-Christian Imbeault said: --------------------[snip]-------------------- >> This is controlled by the session.gc_probability value in your INI file > >I know I can probably find this in the documentation somewhere but ...
Forgot to add this (sorry): http://www.php.net/manual/en/ref.session.php
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
attached mail follows:
On Friday 22 November 2002 16:44, Jean-Christian Imbeault wrote: > Jason Wong wrote: > > If you set it 100, then _every_ request in which sessions are used, PHP > > has to go through all the session files (by default stored in /tmp) and > > check whether they have expired. If you have a busy server you could have > > thousands of session files. Checking thousands of files at each request > > is very time consuming. > > *That* I understand and agree with. What I was more interested in was > the "concurrency" aspect. Why setting gc to 100 might cause problems > with concurrency.
Well if you have a few requests per second, then each of those requests will want to check through your thousands of session files meaning you will have tens of thousands of disk accesses?
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* Never raise your hand to your children -- it leaves your midsection unprotected. -- Robert Orben */
attached mail follows:
On Fri, 22 Nov 2002 14:57:23 +0900, you wrote:
[...] >1- the user logs in >2- bookmarks the page >3- closes the browser >4- opens the browser >5- goes to the saved bookmark page > >He has access to the page. I.e. the session did not close/terminate when >he closed his browser ...
I 'm not where I can test this right now, but if a session is older than session.gc_maxlifetime, isn't it invalid anyway? I.E. if I bookmark a page on your site and then come back 3 hours later passing an old SID, shouldn't that session have expired on the server by that time, in which case the session vars would be empty and you could kick me back to your login page?
I personally use a custom session handler (MySql based, which I got from www.phpbuilder.com) and I believe this is how my site behaves, but I'm not for certain. I'll try to test it out and see...
attached mail follows:
At 15:08 22.11.2002, Michael Sims spoke out and said: --------------------[snip]-------------------- >I 'm not where I can test this right now, but if a session is older >than session.gc_maxlifetime, isn't it invalid anyway? I.E. if I >bookmark a page on your site and then come back 3 hours later passing >an old SID, shouldn't that session have expired on the server by that >time, in which case the session vars would be empty and you could kick >me back to your login page? --------------------[snip]--------------------
I don't think the session handler checks session expiry - only gc does. I haven't checked the PHP sources yet, but I found out that on my development server (where we definetely don't have a lot of traffic ;->) session files can persist over night, and the session is still available in the morning... only when the gc_probability is hit (i.e. at the 100th access), the file gets removed. At least with my PHP (4.2.2, RH 7.2).
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
attached mail follows:
Jean,
This is a common challenge with a pretty easy solution.
First, in case you are curious why the session can be reestablished, the bookmarked page likely has the session identifier in the query string. Thus, it is unnecessary for the browser to send a cookie, because it is sending the session identifier as a GET variable. This is what PHP is using to identify the client.
It is a bad idea to depend on the timeout of a cookie or the session cleanup process to maintain a session timeout mechanism. Instead, you should keep a timestamp stored as a session variable that you use to make any time-based decisions for that session. For example:
$_SESSION["last_access"] = gmmktime();
To use this value to enforce a timeout, you would make a check similar to the following to make sure it hasn't been too long since the last access:
$seconds_idle = gmmktime() - $_SESSION["last_access"];
If the number of seconds they have been idle is too long for you, force them to reenter their password or even completely reauthenticate to continue. If the idle time is acceptable to you, reset the session variable to the current time.
Chris
--- Jean-Christian Imbeault <jc
mega-bucks.co.jp> wrote:
> I've made a site in PHP and on some pages a user needs to log > in first before gaining access to the page. (i.e. there is a > log in page). > > Once the user has logged in I keep that fact in a session > variable so that he doesn't need to log in again. > > However I have found out that if: > > 1- the user logs in > 2- bookmarks the page > 3- closes the browser > 4- opens the browser > 5- goes to the saved bookmark page > > He has access to the page. I.e. the session did not > close/terminate when he closed his browser ... > > In Netscape 7 I have checked the stored cookie and it is set > to expire at the end of the session (which is the default I > think), so I don't understand why the PHP thinks the session > is still opened ...
attached mail follows:
On Friday 22 November 2002 15:44, Kris wrote: > Hi All > > I want to send variables from one page to another page. > How can I go about this??? > > I don't want to use a form. Or if using a form I don't want the user to > have to hit the submit button.
Use sessions, or pass the variables around via the URL.
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* "There are some good people in it, but the orchestra as a whole is equivalent to a gang bent on destruction." -- John Cage, composer */
attached mail follows:
Hello,
"Ernest E Vogelsinger" <ernest
vogelsinger.at> wrote:
> So you're talking about a Trojan, do you?
No, not really. I was talking about "legitimate" programs run by the users themselves.
- E
attached mail follows:
At 09:17 22.11.2002,
Edwin said:
--------------------[snip]--------------------
>Hello,
>
>"Ernest E Vogelsinger" <ernest
vogelsinger.at> wrote:
>
>> So you're talking about a Trojan, do you?
>
>No, not really. I was talking about "legitimate" programs run by the users
>themselves.
--------------------[snip]--------------------
Of course it is possible for any application running locally to fetch any data about your hardware - e.g. M$ does it with their semi-automatic bug reporting feature (in Win XP). However you'd need hardware and OS specific applications to accomplish this.
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
attached mail follows:
"Ernest E Vogelsinger" <ernest
vogelsinger.at> wrote:
> Of course it is possible for any application running locally to fetch any > data about your hardware - e.g. M$ does it with their semi-automatic bug > reporting feature (in Win XP). However you'd need hardware and OS specific > applications to accomplish this.
True, I agree. That's why if you have read my earlier post(s) on this thread you'll see that what I'm trying to say is very similar to your conclusion :)
- E
attached mail follows:
Hello,
im running Red Hat 7.2 with PHP 4.0.6. How would i go about writing to a file as the data is being written, not when the file is closed
#!/usr/bin/php -q <?
$fp=fopen('t', "a"); if ($fp === false) die("could not open file");
for($i=0; $i<10; $i++) { $time= date("D, Ymd. G:i:s"); $time = $time."\n"; $result = fwrite($fp, $time, strlen($time)); if ($result == -1) die("error writing to file"); // if ($condition) die; <-- in case this happens i would like to have the times outputted to the file 't' sleep(2); }
fclose($fp);
?>
i tried the above, while it is running but 't' comes up as a blank (seen using ls). How would i go about putting the contents in 't' when they are written to the file
thx in advance
gamin.
attached mail follows:
On Friday 22 November 2002 16:34, gamin wrote: > Hello, > > im running Red Hat 7.2 with PHP 4.0.6. How would i go about writing to a > file as the data is being written, not when the file is closed > > #!/usr/bin/php -q > <? > > $fp=fopen('t', "a"); > if ($fp === false) > die("could not open file"); > > for($i=0; $i<10; $i++) > { > $time= date("D, Ymd. G:i:s"); > $time = $time."\n"; > $result = fwrite($fp, $time, strlen($time)); > if ($result == -1) > die("error writing to file"); > // if ($condition) die; <-- in case this happens i would like to have the > times outputted to the file 't' > sleep(2); > } > > fclose($fp); > > ?> > > i tried the above, while it is running but 't' comes up as a blank (seen > using ls). How would i go about putting the contents in 't' when they are > written to the file
I think you should try fclose() the file before you die!
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* Mieux vaut tard que jamais! */
attached mail follows:
On Friday 22 November 2002 07:26, superbus22
attbi.com wrote:
> Hello,
>
> I have a newbie problem. I have an php page that has many layers of forms
> to it. Once the user is finished with filling out one form and sending it,
> another form appears. This is of course done using simple if-else or switch
> statements. The problem is, how do I initialize a function or any other
> type of process just ONCE for the entire page. I don't want the function or
> process to run everytime a new form is displayed. Keep in mind that I'm
> also using sessions for this. Here is a tiny stripped-down example, of my
> failed attempt, that might help you analyze my question:
>
> session_start();
>
> if(!isset($initialize)) {
> $start_over = 1;
> }
> if ($start_over == 1) { > $temp_log = $logged_in; > session_unset(); > $logged_in = $temp_log; > $initialize = 1; > session_register("logged_in", "initialize"); > }
> There is the code/pseudo-code combination of what I have so far. The only > problem is that it is not processing the second if block -- if($start_over > == 1) -- unless I actually set start_over=1 in the get string. How would I > make sure that the page processes everything in that if block only ONCE > after the page first loads? Also, if anyone knows a better way of > displaying one form after another in on a single php page, I'm open to any > ideas.
OK, the only reason why the 2nd IF block is not executed is if $initialize is not empty (ie isset($initialize) is TRUE hence $start_over = 1 is never executed). So try:
if(!isset($initialize)) { $start_over = 1; } else { var_dump($initialize); // to see what the **** it contains }
-- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* My BIOLOGICAL ALARM CLOCK just went off ... It has noiseless DOZE FUNCTION and full kitchen!! */
attached mail follows:
The variable $initialize contains "int(1)", so it does set itself within the last if statement. I'm just not sure why it's not unsetting all the sessions when the page loads.
- Nilaab
> -----Original Message-----
> From: Jason Wong [mailto:php-general
gremlins.biz]
> Sent: Friday, November 22, 2002 2:36 AM
> To: php-general
lists.php.net
> Subject: Re: [PHP] How do I initialize a page to do something ONCE
>
>
> On Friday 22 November 2002 07:26, superbus22
attbi.com wrote:
> > Hello,
> >
> > I have a newbie problem. I have an php page that has many
> layers of forms
> > to it. Once the user is finished with filling out one form and
> sending it,
> > another form appears. This is of course done using simple
> if-else or switch
> > statements. The problem is, how do I initialize a function or any other
> > type of process just ONCE for the entire page. I don't want the
> function or
> > process to run everytime a new form is displayed. Keep in mind that I'm
> > also using sessions for this. Here is a tiny stripped-down
> example, of my
> > failed attempt, that might help you analyze my question:
> >
> > session_start();
> >
> > if(!isset($initialize)) {
> > $start_over = 1;
> > }
>
> > if ($start_over == 1) {
> > $temp_log = $logged_in;
> > session_unset();
> > $logged_in = $temp_log;
> > $initialize = 1;
> > session_register("logged_in", "initialize");
> > }
>
> > There is the code/pseudo-code combination of what I have so
> far. The only
> > problem is that it is not processing the second if block --
> if($start_over
> > == 1) -- unless I actually set start_over=1 in the get string.
> How would I
> > make sure that the page processes everything in that if block only ONCE
> > after the page first loads? Also, if anyone knows a better way of
> > displaying one form after another in on a single php page, I'm
> open to any
> > ideas.
>
> OK, the only reason why the 2nd IF block is not executed is if
> $initialize is
> not empty (ie isset($initialize) is TRUE hence $start_over = 1 is never
> executed). So try:
>
> if(!isset($initialize)) {
> $start_over = 1; }
> else {
> var_dump($initialize); // to see what the **** it contains
> }
>
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> My BIOLOGICAL ALARM CLOCK just went off ... It has noiseless DOZE
> FUNCTION and full kitchen!!
> */
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
Your first post stated.. > The only problem is that it is not processing the second if block -- if($start_over == 1) -- unless I actually set start_over=1 in the get string. >
Your second sounds like it is executing the second block...
>The variable $initialize contains "int(1)", so it does set itself within the last if statement.
If the second block is being executed...
Did you check out php.net and the comments about session_unset()?
If it is not, are you closing the browser between tests? The session information stays open even after leaving the site and coming back.
Larry S. Brown Dimension Networks, Inc. (727) 723-8388
attached mail follows:
Is it easy enough to change a formated IP addy (eg 192.168.0.1) to the 32bit unsigned int that computers use?
the reason I ask is because it is alot more efficient space wise in a db to be storing a 32bit number rather that a char or varchar field.
Or am I going to run into trouble because all ints are signed in PHP?
-- JJ Harrison lizner2002yahoo.com.au
attached mail follows:
In MySQL (and others?) you can use these two functions: INET_NTOA(expr) INET_ATON(expr)
Regards Joakim
----- Original Message -----
From: "Noodle Snacks" <webmaster
tececo.com>
To: <php-general
lists.php.net>
Sent: Friday, November 22, 2002 10:13 AM
Subject: [PHP] Ip address as 32bit int?
Is it easy enough to change a formated IP addy (eg 192.168.0.1) to the 32bit unsigned int that computers use?
the reason I ask is because it is alot more efficient space wise in a db to be storing a 32bit number rather that a char or varchar field.
Or am I going to run into trouble because all ints are signed in PHP?
-- JJ Harrison lizner2002yahoo.com.au
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
> From: Noodle Snacks [mailto:webmaster
tececo.com]
> the reason I ask is because it is alot more efficient space wise > in a db to > be storing a 32bit number rather that a char or varchar field.
While it is more efficient space-wise (4 bytes vs. 12 bytes), the price of the additional disk storage needed for storing them is trivial (unless you have a billions). Make sure you consider the addtional costs of maintenance, too, when you store data in a "non-human" format.
attached mail follows:
I think this group should have a regularly posted faq that outlines common problems such as register globals.
I would be glad to help write it etc if anyone else would like an input.
I wrote this in response to the millions of register global questions and the message with the subject "Be Nice to Newbies".
Reply on list if you think it would be a good idea and we can use this thread to discuss it...
-- JJ Harrison lizner2002yahoo.com.au
attached mail follows:
on 22/11/02 8:14 PM, Noodle Snacks (webmaster
tececo.com) wrote:
> I think this group should have a regularly posted faq that outlines common > problems such as register globals.
This has been discussed many times too :)
Last plan was to have it auto-posted to the subscriber when they sign up, plus possibly a monthly or weekly reminder... the weekly reminder is really easy (it just requires someone to write the FAQ and set up a cron or something), but the one when ppl sign-up really needs the PHP-team in on it... really, it's their list, so it should be in their hands.
Justin French -------------------- http://Indent.com.au Web Developent & Graphic Design --------------------
attached mail follows:
there is a bunch of info everywhere on the web. One should have better means to find these, but at the end, that is what others do here - answer questions :)
I don't think this will ever happen
-- Maxim Maletsky maximphp.net
"Noodle Snacks" <webmaster
tececo.com> wrote... :
> I think this group should have a regularly posted faq that outlines common > problems such as register globals. > > I would be glad to help write it etc if anyone else would like an input. > > I wrote this in response to the millions of register global questions and > the message with the subject "Be Nice to Newbies". > > Reply on list if you think it would be a good idea and we can use this > thread to discuss it... > > -- > JJ Harrison > lizner2002
yahoo.com.au > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
I think this is a good idea. We have have for ColdFusion because we can point new people to it and it answers a lot of questions without generating extra traffic on the list.
I for one am all for an FAQ.
Clint
-----Original Message-----
From: Maxim Maletsky [mailto:maxim
php.net]
Sent: Friday, November 22, 2002 6:53 AM
To: Noodle Snacks
Cc: php-general
lists.php.net
Subject: Re: [PHP] FAQ a good idea?
there is a bunch of info everywhere on the web. One should have better means to find these, but at the end, that is what others do here - answer questions :)
I don't think this will ever happen
-- Maxim Maletsky maximphp.net
"Noodle Snacks" <webmaster
tececo.com> wrote... :
> I think this group should have a regularly posted faq that outlines > common problems such as register globals. > > I would be glad to help write it etc if anyone else would like an > input. > > I wrote this in response to the millions of register global questions > and the message with the subject "Be Nice to Newbies". > > Reply on list if you think it would be a good idea and we can use this
> thread to discuss it... > > -- > JJ Harrison > lizner2002
yahoo.com.au > > > > > > -- > 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:
An about register globals post bi-weekly would eliminate tons of questions I reckon. But maxim is also right. People should find their own info and a faq could dominate the group...
-- JJ Harrison lizner2002yahoo.com.au
"Clint Tredway" <ctredway
fishermenstudios.com> wrote in message news:D6702F98B936A44BA0B8667F3182552904C43A
bhdaexch05.bhcs.pvt... > I think this is a good idea. We have have for ColdFusion because we can > point new people to it and it answers a lot of questions without > generating extra traffic on the list. > > I for one am all for an FAQ. > > Clint > > -----Original Message----- > From: Maxim Maletsky [mailto:maxim
php.net] > Sent: Friday, November 22, 2002 6:53 AM > To: Noodle Snacks > Cc: php-general
lists.php.net > Subject: Re: [PHP] FAQ a good idea? > > > there is a bunch of info everywhere on the web. One should have better > means to find these, but at the end, that is what others do here - > answer questions :) > > I don't think this will ever happen > > > -- > Maxim Maletsky > maxim
php.net > > > > "Noodle Snacks" <webmaster
tececo.com> wrote... : > > > I think this group should have a regularly posted faq that outlines > > common problems such as register globals. > > > > I would be glad to help write it etc if anyone else would like an > > input. > > > > I wrote this in response to the millions of register global questions > > and the message with the subject "Be Nice to Newbies". > > > > Reply on list if you think it would be a good idea and we can use this > > > thread to discuss it... > > > > -- > > JJ Harrison > > lizner2002
yahoo.com.au > > > > > > > > > > > > -- > > 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:
Does Any one of a web based version of Microsoft Outlook/MSN Hotmail address book and scheduler
attached mail follows:
What does outlook have to do with PHP?
No, there is nothing official has been made. There are some similar apps though, very good ones actually.
-- Maxim Maletsky maximphp.net
"Craig" <craig
sitedesign.net> wrote... :
> Does Any one of a web based version of Microsoft Outlook/MSN Hotmail address > book and scheduler > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
no i want to create a php version of the web based outlook account found on msn.com
"Maxim Maletsky" <maxim
php.net> wrote in message
news:20021122134858.63DF.MAXIM
php.net...
>
> What does outlook have to do with PHP?
>
> No, there is nothing official has been made. There are some similar apps
> though, very good ones actually.
>
>
> --
> Maxim Maletsky
> maxim
php.net
>
>
>
> "Craig" <craig
sitedesign.net> wrote... :
>
> > Does Any one of a web based version of Microsoft Outlook/MSN Hotmail
address
> > book and scheduler
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
attached mail follows:
hi guys,
i am facing the above problem. i couldn't explain whats causing this behavior. however, those data does get posted to the server. only thing is that the result page is not showing up but the above error page.
i have tested with 60+ post elements, but no error of such occur. any idea what could be the cause?
platform: win2k, sp3 iis5 php on cgi
i have been wondering if it is iis5 that is giving the problem.
thanks, lance
attached mail follows:
Hello;
I want to do that:
I have two checkboxes: if first one is checked assign the value as a; if first one is checked assign the value as s; if both of them checked assign th value as as and insert the result db;
the html code:
... <tr> <td><input type="checkbox" name="val" value="a" /> AAA</td> </tr> <tr> <td><input type="checkbox" name="val" value="s" /> SSS</td> </tr> ...
and the PHP code:
$eval=''; if(isset($val)){ if(isset($val[0]) && isset($val[1])) $eval="as"; if(isset($val[0]) && !isset($val[1])) $eval="a"; if(!isset($val[0]) && isset($val[1])) $eval="s";
$sql="insert into maillist (ID, postmeth) values ('$id_no','$eval')"; $result=mysql_query($sql); if(!$result) echo("ERROR"); }
I can't understand what is wrong;
Thanks everybody....
attached mail follows:
hi,
your missing some brackets "[]"! this should work better: <td><input type="checkbox" name="val[]" value="a" /> AAA</td> <td><input type="checkbox" name="val[]" value="s" /> SSS</td>
regards, Bastian
> Hello; > > I want to do that: > > I have two checkboxes: > if first one is checked assign the value as a; > if first one is checked assign the value as s; > if both of them checked assign th value as as > and insert the result db; > > the html code: > > ... > <tr> > <td><input type="checkbox" name="val" value="a" /> AAA</td> > </tr> > <tr> > <td><input type="checkbox" name="val" value="s" /> SSS</td> > </tr> > ... > > and the PHP code: > > $eval=''; > if(isset($val)){ > if(isset($val[0]) && isset($val[1])) $eval="as"; > if(isset($val[0]) && !isset($val[1])) $eval="a"; > if(!isset($val[0]) && isset($val[1])) $eval="s"; > > $sql="insert into maillist (ID, postmeth) values ('$id_no','$eval')"; > $result=mysql_query($sql); > if(!$result) echo("ERROR"); > } > > I can't understand what is wrong; > > Thanks everybody....
attached mail follows:
At 12:16 22.11.2002, empty spoke out and said: --------------------[snip]-------------------- >... ><tr> > <td><input type="checkbox" name="val" value="a" /> AAA</td> ></tr> ><tr> > <td><input type="checkbox" name="val" value="s" /> SSS</td> ></tr> >... > >and the PHP code: > >$eval=''; >if(isset($val)){ > if(isset($val[0]) && isset($val[1])) $eval="as"; > if(isset($val[0]) && !isset($val[1])) $eval="a"; > if(!isset($val[0]) && isset($val[1])) $eval="s"; > >$sql="insert into maillist (ID, postmeth) values ('$id_no','$eval')"; >$result=mysql_query($sql); >if(!$result) echo("ERROR"); >} > --------------------[snip]--------------------
Hi,
1) like Bastian already pointed out, you need to name your checkboxes "val[]" in order to have PHP recognize them being an array.
2) You cannot use "isset($val[0])" and "isset($val[1])". If any checkbox is clicked, $val[0] will always be set. If only one is clicked (regardless which one) index 0 will be set and index 1 unset.
Instead, you should if(is_array($val)){ if (in_array('a', $val) && in_array('s', $val)) $eval='as'; elseif (in_array('a', $val)) $eval='a'; elseif (in_array('s', $val)) $eval='s';
However this would give you the very same result, but much more elegant: $eval = join('', $val); And it will automatically handle all further additions when $val[] might have more possible values except 'a' and 's'.
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
attached mail follows:
John Homes is the name of a rather well endowed porn star :">
and I'm not making this up :-D
-- Richard Allsebrook Applications and Web Development"John W. Holmes" <holmes072000
charter.net> wrote in message news:003901c291c9$056b0930$7c02a8c0
coconut... This trend-smend content filter is friggin stupid. Someone should write another one.
Where is the "dirty word" in this:
> Is there a way to convert a date " 20/11/2002 " to a Float number in PHP, > since the date starts in 30/12/1899, just like the delphi treats the > dates....
Yeah, of course. To convert "20/11/2002" into a float, just do
echo (float)"20/11/2002";
and you get 20!!
Or you can use strtotime() to convert it to a Unix timestamp (integer, number of seconds since Jan 1, 1970).
---John Holmes...
???
Or is John Holmes dirty?? Heh..
---John Holmes.
-----Original Message----- From: System Attendant [mailto:NT-KBS-SA
upv.pertamina.co.id] Sent: Thursday, November 21, 2002 8:40 PM To: 'John W. Holmes' Subject: ScanMail Message: To Sender, sensitive content found and action taken.
Trend SMEX Content Filter has detected sensitive content. Place = 'Rodrigo Corrêa'; 'PHP List 1'; 'PHP List'; ; ; holmes072000
charter.net Sender = John W. Holmes Subject = [PHP] RE: [PHP-DB] Help with Date Delivery Time = November 22, 2002 (Friday) 09:39:38 Policy = Dirty Words Action on this mail = Delete message Warning message from administrator: Sender, Content filter has detected a sensitive e-mail.
attached mail follows:
hi i have fopen a directory of files and got the directoryindex as follows
<img src="/icons/image2.gif" alt="[IMG]" /> <a href="IMG_0005.jpg">IMG_0005.jpg</a> 19-Nov-2002 18:18 180K <img src="/icons/image2.gif" alt="[IMG]" /> <a href="IMG_0009.jpg">IMG_0009.jpg</a> 19-Nov-2002 18:18 248K <img src="/icons/image2.gif" alt="[IMG]" /> <a href="IMG_0010.jpg">IMG_0010.jpg</a> 19-Nov-2002 18:18 373K <img src="/icons/image2.gif" alt="[IMG]" /> <a href="IMG_0011.jpg">IMG_0011.jpg</a> 19-Nov-2002 18:18 236K <img src="/icons/image2.gif" alt="[IMG]" /> <a href="IMG_0012.jpg">IMG_0012.jpg</a> 19-Nov-2002 18:18 30<img src="/icons/image2.gif" alt="[IMG]" /> <a href="IMG_0014.jpg">IMG_0014.jpg</a> 19-Nov-2002 18:18 323K <img src="/icons/image2.gif" alt="[IMG]" /> <a href="IMG_0017.jpg">IMG_0017.jpg</a> 19-Nov-2002 18:18 283K <img src="/icons/image2.gif" alt="[IMG]" /> <a href="IMG_0018.jpg">IMG_0018.jpg</a> 19-Nov-2002 18:18 243K <img src="/icons/image2.gif" alt="[IMG]" /> <a href="IMG_0019.jpg">IMG_0019.jpg</a> 19-Nov-2002 18:18 253K <img src="/icons/image2.gif" alt="[IMG]" /> <a href="IMG_0020.jpg">IMG_0020.jpg</a> 19-Nov-2002 18:18 206K <img src="/icons/image2.gif" alt="[IMG]" /> <a href="IMG_0021.jpg">IMG_0021.jpg</a> 19-Nov-2002 18:18 320K <img src="/icons/image2.gif" alt="[IMG]" /> <a href="IMG_0022.jpg">IMG_0022.jpg</a> 19-Nov-2002 18:18 348K <img src="/icons/image2.gif" alt="[IMG]" /> <a href="IMG_0023.jpg">IMG_0023.jpg</a> 19-Nov-2002 18:18 298K
i would like to just get the image filenames out of the href tag using regex any suggestions ? i'm pretty terrible with regex is there a good online tutorial on the subject ?
attached mail follows:
Hello,
Ok, I know this is easy for most of you, and believe me I've been searching and trying to learn all about regular expressions, but I can't seem figure out how to allow addition of spaces between characters.
$text = "Here is some text";
Here, I want to be able to match the alpha characters as well as the spaces in between each word. So far I have:
preg_match("/^[a-zA-Z]+$/", $text);
But that only matches a single word without spaces. I would like to try to stay away from ereg and use preg_match instead because I heard preg_match is faster. ereg() has a way to match spaces by specifying [[:space:]], but I didn't get that solution to work either. How do I match $text to return true?
- Nilaab
attached mail follows:
At 13:38 22.11.2002,
Nilaab spoke out and said:
--------------------[snip]--------------------
>Ok, I know this is easy for most of you, and believe me I've been searching
>and trying to learn all about regular expressions, but I can't seem figure
>out how to allow addition of spaces between characters.
>
>$text = "Here is some text";
>
>Here, I want to be able to match the alpha characters as well as the spaces
>in between each word. So far I have:
>
>preg_match("/^[a-zA-Z]+$/", $text);
>
>But that only matches a single word without spaces. I would like to try to
>stay away from ereg and use preg_match instead because I heard preg_match is
>faster. ereg() has a way to match spaces by specifying [[:space:]], but I
>didn't get that solution to work either. How do I match $text to return
>true?
--------------------[snip]--------------------
use preg_match('/^[a-zA-Z\s]+$/', $text);
\s - any [:space:] \S - anything not [:space:]
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
attached mail follows:
Hi... What is the line code to optain the system date? I propose is to compare the system date with the date in one field in the database... Then what would be the mysql command to select all the rows with date with 10 days or less from the system date? Thanks...
attached mail follows:
> What is the line code to optain the system date? > I propose is to compare the system date with the date in one field in the > database... Then what would be the mysql command to select all the rows > with > date with 10 days or less from the system date?
NOW, CURDATE(), or CURRENT_DATE
SELECT * FROM your_table WHERE your_date_column > NOW() - INTERVAL 10 DAY;
---John Holmes...
attached mail follows:
Hi,
We have added some new features to a SiteShield protected website which makes it neccessary to use sessions. Although creating the session and the appropriate variables is a server side process there seem to be problems with IE (tested with version 6 on Win2000 Pro and WinXP Pro).
If I access the site with IE I will see the following error message at the bottom of the page:
Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/home/globstag/tmp) in Unknown on line 0
However if I access the site with any other browser writing the session data works.
But this isn't all yet. I can't replicate the problem on any other machine I have access to. On all other machines I have access to the site works fine.
First I thought that it might have been a problem with the PHP version because the server runs on PHP 4.0.6 and my notebook runs on PHP 4.2.1. Upgrading the server to 4.2.1 unfortunately didn't solve the problem.
I have then deployed the site to my private dedicated server which runs PHP 4.0.6 on SuSE 7.2. Even on that machine I can't replicate the error.
The main difference between the other servers and the server in NewYork is that only the server in NewYork is protected with SiteShield. Which leads me to the conclusion that there might be a problem related to the combination of SiteShield, IE and PHP.
If you have any ideas feel free to share your thoughts with me.
Cheers, Andreas
-- Andreas Otto <andreasphp4win.de> Using PHP on Windows? www.php4win.de
attached mail follows:
At 14:24 22.11.2002, Andreas Otto spoke out and said: --------------------[snip]-------------------- >We have added some new features to a SiteShield protected website which makes >it neccessary to use sessions. Although creating the session and the >appropriate variables is a server side process there seem to be problems with >IE (tested with version 6 on Win2000 Pro and WinXP Pro). > >If I access the site with IE I will see the following error message at the >bottom of the page: > >Warning: Failed to write session data (files). Please verify that the current >setting of session.save_path is correct (/home/globstag/tmp) in Unknown on >line 0 > >However if I access the site with any other browser writing the session data >works. --------------------[snip]--------------------
Hi,
I don't see how this behaviour could be related to a browser version - all browsers behave (should behave?) identically when requesting a page... they simply issue a MIME request, like GET /?PHPSESSIONID=aasdasdasdasdasdasd HTTP/1.0 Host: www.yourhost.com
The message you see looks disturbing to me - is the session.save_path value actually set to /home/globstag/tmp? Does Apache (or else) have all necessary rights to this directory?
_MAYBE_ you're using some mod_rewrite rules on the target server, depending on the user agent, so IE's would end up in a defunct installation?
I'd check for this inn the first place.
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
attached mail follows:
Hi Ernest,
On Friday 22 November 2002 15:05, Ernest E Vogelsinger wrote: > The message you see looks disturbing to me - is the session.save_path value > actually set to /home/globstag/tmp? Does Apache (or else) have all > necessary rights to this directory? > > _MAYBE_ you're using some mod_rewrite rules on the target server, depending > on the user agent, so IE's would end up in a defunct installation? > > I'd check for this inn the first place.
Well, guess what I did before writing this eMail ;-)
At the end of my original eMail I said: On Friday 22 November 2002 14:24, Andreas Otto wrote: > The main difference between the other servers and the server in NewYork is > that only the server in NewYork is protected with SiteShield. Which leads > me to the conclusion that there might be a problem related to the > combination of SiteShield, IE and PHP.
So what we have is a set of web servers to which access is controlled by a (proxy) server. The software that is used to manage access rights is called SiteShield and is developed by a company called Tempest.
Every request to the server I experience this strange problem at has to pass the SiteShield server.
The question is now: Has anyone heard about or had problems with the combination of PHP SiteShield and InternetExplorer?
Cheers, Andreas
-- Andreas Otto <andreasphp4win.de> Using PHP on Windows? www.php4win.de
attached mail follows:
At 15:35 22.11.2002, Andreas Otto spoke out and said: --------------------[snip]-------------------- >Well, guess what I did before writing this eMail ;-)
That's what I have feared...
>Every request to the server I experience this strange problem at has to pass >the SiteShield server.
Is it possible to have SiteShield log what its doing?
>The question is now: Has anyone heard about or had problems with the >combination of PHP SiteShield and InternetExplorer?
I don't know anything about SiteShield - can anyone else chime in please? I'd also try to holler at the guys at Tempest...
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
attached mail follows:
Hi Ernest,
On Friday 22 November 2002 16:11, Ernest E Vogelsinger wrote: > Is it possible to have SiteShield log what its doing? > > >The question is now: Has anyone heard about or had problems with the > >combination of PHP SiteShield and InternetExplorer? > > I don't know anything about SiteShield - can anyone else chime in please? > I'd also try to holler at the guys at Tempest...
I have been trying that, but it looks like I have to run the query through our office in NewYork where the servers are hosted. My colleagues in NewYork will have the right support details.
Cheers, Andreas
-- Andreas Otto <andreasphp4win.de> Using PHP on Windows? www.php4win.de
attached mail follows:
managed to found out the cause. it was the cookies. it got overloaded with data and exceed the 4k limit. the cookies was storing preferences for too many users thus it break the limit.
B.C. Lance wrote: > hi guys, > > i am facing the above problem. i couldn't explain whats causing this > behavior. however, those data does get posted to the server. only thing > is that the result page is not showing up but the above error page. > > i have tested with 60+ post elements, but no error of such occur. any > idea what could be the cause? > > platform: > win2k, sp3 > iis5 > php on cgi > > i have been wondering if it is iis5 that is giving the problem. > > > > thanks, > lance >
attached mail follows:
Thank you very much for everyone's help ^_^
I'm very much a novice in PHP, so whether I can actually figure out what I have to do'll be another thing *L*
Thanks again ^_^
-Vicky
-----Original Message-----
From: Vicky [mailto:vprince
btinternet.com]
Sent: Friday, November 22, 2002 9:56 AM
To: php-general
lists.php.net
Subject: [PHP] PHP Coding HELP
Hello!
I am looking to find or code a script that does the following. If anyone could help I'd be extremely greatful.
Users can upload their files, but the files they upload can only be downloaded X amount of times. After they've been downloaded so many times in an ideal world they'd be automatically removed, though just to be made so people couldn't download them anymore would be great.
Please help! Thanks!
Vicky
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Ok, make a form for upload with maybe fields as well where the user can write how many time that file is supposed to be downloaded. After submit you store that information in a database (MySQL) and when downloading files you do it through another PHP-file where you can check how many times it has been downloaded, if it reach the amount, delete it, otherwise update the database with one more download for this file!
How to upload files can be read in the PHP-Manual. For database use: www.mysql.com
Per L.
"Vicky" <vprince
btinternet.com> wrote in message
news:016801c2922c$71472720$0200a8c0
omnibook...
> Thank you very much for everyone's help ^_^
>
> I'm very much a novice in PHP, so whether I can actually figure out what I
> have to do'll be another thing *L*
>
> Thanks again ^_^
>
> -Vicky
>
> -----Original Message-----
> From: Vicky [mailto:vprince
btinternet.com]
> Sent: Friday, November 22, 2002 9:56 AM
> To: php-general
lists.php.net
> Subject: [PHP] PHP Coding HELP
>
> Hello!
>
> I am looking to find or code a script that does the following. If anyone
> could help I'd be extremely greatful.
>
> Users can upload their files, but the files they upload can only be
> downloaded X amount of times. After they've been downloaded so many
> times in
> an ideal world they'd be automatically removed, though just to be made
> so
> people couldn't download them anymore would be great.
>
> Please help! Thanks!
>
> Vicky
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Could someone help me with this: What combination of functions do I have to use to automatically redirect to an .html page (with <form>'s inside), while carrying a variable that would be automatically put into one of the <input> boxes, just like a predefined "value" would? Thanks a lot! Krzysztof
attached mail follows:
> What combination of functions do I have to use to automatically redirect > to an .html page (with <form>'s inside), while carrying a variable that > would be automatically put into one of the <input> boxes, just like a > predefined "value" would?
Can't do it unless your page "form" page is .php so you can execute some PHP commands in it, or you're using PHP to write the entire .html page with the default values.
If you use .php pages for both, then you can just pass the values in the URL
www.page.com/page.php?name=john
and use
<input type="text" name="name" value="<?=$_GET['name']?>">
---John Holmes...
attached mail follows:
if one of $titulotxt or $cdstxt is not set, your query will look something like this:
SELECT * FROM divx WHERE && cds like '$cdstxt' ORDER BY titulo
As you see, there is unnecessery &&. I build my search queries using this form:
$query_cond=''; foreach($_GET as $col => $val) { switch($col) { case 'cds': // you can add more cases here for conditions that need to be exact $query_cond .= " $col LIKE '$val' AND "; break; case 'titulo': // you can add more cases here for conditions that need not to be exact $query_cond .= " $col LIKE '%$val%' AND "; break; } } // get rid of final AND $query_cond = substr($query_cond, 0, strlen($query_cond) - 4); // and as you don't have any other conditions, $query_cond cannot be empty - we would have excessive WHERE // so if it is empty, make it 1 if($query_cond=='') $query_cond='1';
$sql="SELECT * FROM divx WHERE $query_cond ORDER BY titulo";
Mr. BuNgL3 wrote:
>Hi... >I'm with a little sintax problem... >The question is that i have two search fields (titulotxt and cdstxt) and i >want to create an mysql condition... i trying: > > $sql1=($titulotxt) ? "titulo like '%".$titulotxt."%'":""; > $sql2=($cdstxt) ? "cds like '$cdstxt'":""; > $sql="SELECT * FROM divx WHERE" .$sql1 " && " .$sql2 " ORDER BY titulo"; > >but he's giving me a sintax error on the 3 line... Can anyone >teach me how i must do to validate the mysql condition and make it work? >Thanks > > > > > > >
attached mail follows:
An application I am developing contains something like the following:
$this->socket = fsockopen($server, $port, $errnum, $errstr, "60"); ... while (!feof($this->socket)) {
$char = fgets($this->socket,1);
if (($char == "\n") || ($char == "\r")) return $buffer; } $buffer .= $char; } return $buffer;
This works fine upto php-4.2.x. However, I've recently built and installed php-4.3.0pre2 and now the above code appears to hang.
Substituting fread in place of fgets solves the problem. I know that fgets is supposed to be 'binary safe' as of php-4.3 but I'm not sure if this could be causing the above problem.
Does anyone know of any changes to fgets in php-4.3.0 which might be causing this? Are there any reasons why I should not use fread instead of fgets here?
Also, I am looking at using something like:
$status = socket_get_status($this->socket); if ($status["unread_bytes"] <= 0) return false;
However, $status["unread_bytes"] always returns 0 until the first call to fgets($this->socket). Is this right? I'd like to check the status of the socket before I try to read from it.
Thanks,
Stephen Grier
attached mail follows:
Use usort
Mako Shark wrote:
>I don't think a simple sort() will do this. Is there a >way I can sort these following array values so that >all will be in numerical order, and then alphabetical >after that? > >I need >Dirfiles/97 >Dirfiles/98 >Dirfiles/99 >Dirfiles/100 >Dirfiles/101 >Dirfiles/102 >Dirfiles/ABG1 >Dirfiles/ABG2 > >in that order. They could originally be in any >seemingly random order, but when I'm done with it, I >need them in that order. Is there a way to do it? A >simple string sort() won't work since 9 comes after 1 >and it'll order it like >'Dirfiles/100,101,102,97,98,99,ABG1,ABG2'. Any ideas? >For some reason, natsort() won't work. > >__________________________________________________ >Do you Yahoo!? >Yahoo! Mail Plus Powerful. Affordable. Sign up now. >http://mailplus.yahoo.com > > >
attached mail follows:
I believe there have been a few starts and stops with a module in the past but I haven't found anything with the complete feature set. I intend to do that. I am going to be looking for help in the future but I'd like to get the current stuff closer to my goal. There a number of things on the list that I'd like to get done before asking others to help.
I only need another few days before I push this to beta and start testing it on some live sites.
Actually, one way to help now is to test it...perhaps compile it on an OS other then Linux and put it through some testing.
I'm putting up a site for it now and will push another version by end of today.
On Thu, 21 Nov 2002, Weston Houghton wrote:
>
> I had no idea anyone was actively working on something like this. Are
> you looking for help? Do you plan on perhaps making this a Sourceforge
> project, or something similar?
>
> Cheers and great job,
> Wes
>
>
> On Thursday, November 21, 2002, at 05:56 PM, Michael Montero wrote:
>
> > Just released the next version of magick, the PHP ImageMagick
> > extension.
> > It is located here:
> >
> > http://apc.communityconnect.com/magick/magick-0.2a.tar.gz
> >
> > Here's the ChangeLog:
> >
> > November 21, 2002 0.2a
> >
> > o functions added:
> > magick_rotate()
> > magick_shear()
> > magick_contrast()
> > magick_equalize()
> > magick_gamma()
> > magick_level()
> > magick_modulate()
> > magick_negate()
> > magick_normalize()
> > magick_drawellipse()
> > o slight changes to output of gen_configm4
> > o fixed comments in all examples after the initial
> > magick_readimage(), they were wrong
> > o fixed all examples so they exit properly on errors
> > o fixed all examples so they work as either standalone script
> > or
> > web page; they do better output as well
> > o fixed output of magick info. when calling phpinfo()
> > o more commenting
> > o significantly better error handling
> >
> > --
> > Michael C. Montero
> > Chief Technology Officer
> > Community Connect Inc. Co-founder
> > MMontero
Mail.CommunityConnect.com
> >
> > -=-=-=-=-= Community Connect Inc.
> > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> >
> > The Premier Source of Interactive Online Communities 149 Fifth
> > Avenue
> > http://www.CommunityConnectInc.com/ New York, NY
> > 10010
> >
> > http://www.AsianAvenue.com/ http://www.BlackPlanet.com/
> > Click into Asian America The World Is Yours
> >
> > http://www.MiGente.com/
> > http://www.DiversityJobMarket.com/
> > The Power of Latinos In partnership with The New
> > York Times
> >
> > ----- Your Message May Appear Below This Line
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
-- Michael C. Montero Chief Technology Officer Community Connect Inc. Co-founder MMonteroMail.CommunityConnect.com
-=-=-=-=-= Community Connect Inc. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
The Premier Source of Interactive Online Communities 149 Fifth Avenue http://www.CommunityConnectInc.com/ New York, NY 10010
http://www.AsianAvenue.com/ http://www.BlackPlanet.com/ Click into Asian America The World Is Yours
http://www.MiGente.com/ http://www.DiversityJobMarket.com/ The Power of Latinos In partnership with The New York Times
----- Your Message May Appear Below This Line
attached mail follows:
i gave up
to many problems for a productive site: - gd - need the patches from RH - php-4.2.3 and informix - if you use a own handler, the URI must exist e.g. http://site/own-handler/xyz causes 404 not found http://site/server-status/xyz results 200 php with httpd 2.0 is still: "--with-apxs2[=FILE] EXPERIMENTAL: Build shared Apache 2.0 module."
Oliver
On Thu, 2002-11-21 at 12:56, Matthieu Le Corre wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> oki that good .... i managed to compile php 4.2.2 ....
> but my informix support is still broken :/
>
> did you manage tu connect tu ifx with 4.2.2 and apache 4.0.23 ?
yes I used the RH httpd-2.0.36-apxs.patch from the 2.0.40 src.rpm
> if yes ..... what's your ifx SDK version ?
>
csdk-2.60.UC1-1
>
> Le Lundi 18 Novembre 2002 17:00, Matthieu Le Corre a écrit :
> > arf ... I failed to compile php 4.2.2 ....
> > du to compiling error in sapi/apachefilter module for http2.0.43
> > on a RH 7.2
> > it's not my days ....
> >
> > Le Lundi 18 Novembre 2002 15:42, Oliver Fänger a écrit :
> > > could somebody tell me why libphp4.so (php-4.2.3 --with-informix,
> > > httpd-2.43, RH8, Intel) links against
> > >
> > > libthasf.so
> > > libthgen.so
> > > libthos.so
> > > libthsql.so
> > >
> > > and misses
> > >
> > > libifasf.so
> > > libifgen.so
> > > libifos.so
> > > libifsql.so
> > >
> > > 4.2.2 works fine with these libs and does not have the above ones.
> > >
> > > and why do i have to set LDFLAGS="-L/opt/informix/lib
> > > -L/opt/informix/lib/esql -L/tmp/src/php-4.2.3/ext/informix"
> > >
> > > i saw something like this in the macro file (/ext/informix/config.m4):
> > >
> > > PHP_ADD_LIBPATH($INFORMIXDIR/lib, INFORMIX_SHARED_LIBADD)
> > > PHP_ADD_LIBPATH($INFORMIXDIR/lib/esql, INFORMIX_SHARED_LIBADD)
> > >
> > > (INFORMIXDIR is set)
> > >
> > > php-4.2.3:
> > > libdl.so.2 => /lib/libdl.so.2 (0x40192000)
> > > libpam.so.0 => /lib/libpam.so.0 (0x40196000)
> > > libthsql.so => /opt/informix/lib/esql/libthsql.so (0x4019e000)
> > > libthasf.so => /opt/informix/lib/libthasf.so (0x401e1000)
> > > libthgen.so => /opt/informix/lib/esql/libthgen.so (0x40217000)
> > > libthos.so => /opt/informix/lib/esql/libthos.so (0x40269000)
> > > libifgls.so => /lib/libifgls.so (0x40280000)
> > > libcrypt.so.1 => /lib/libcrypt.so.1 (0x402bb000)
> > > libifglx.so => /lib/libifglx.so (0x402e8000)
> > > libexpat.so.0 => /usr/lib/libexpat.so.0 (0x402ea000)
> > > libpspell.so.4 => /usr/lib/libpspell.so.4 (0x4030a000)
> > > libncurses.so.5 => /usr/lib/libncurses.so.5 (0x40323000)
> > > libgmp.so.3 => /usr/lib/libgmp.so.3 (0x40362000)
> > > libgd.so.1.8 => /usr/lib/libgd.so.1.8 (0x4038f000)
> > > libpng12.so.0 => /usr/lib/libpng12.so.0 (0x403c0000)
> > > libz.so.1 => /usr/lib/libz.so.1 (0x403e3000)
> > > libdb-4.0.so => /lib/libdb-4.0.so (0x403f1000)
> > > libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x40499000)
> > > libcurl.so.2 => /usr/lib/libcurl.so.2 (0x404a0000)
> > > libbz2.so.1 => /usr/lib/libbz2.so.1 (0x404c2000)
> > > libssl.so.2 => /lib/libssl.so.2 (0x404d1000)
> > > libcrypto.so.2 => /lib/libcrypto.so.2 (0x40501000)
> > > libresolv.so.2 => /lib/libresolv.so.2 (0x405d5000)
> > > libm.so.6 => /lib/i686/libm.so.6 (0x405e7000)
> > > libttf.so.2 => /usr/lib/libttf.so.2 (0x40609000)
> > > libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x40630000)
> > > libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40679000)
> > > libnsl.so.1 => /lib/libnsl.so.1 (0x40697000)
> > > libxml2.so.2 => /usr/lib/libxml2.so.2 (0x406ac000)
> > > libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
> > > libltdl.so.3 => /usr/lib/libltdl.so.3 (0x40754000)
> > > libpspell-modules.so.1 => /usr/lib/libpspell-modules.so.1
> > > (0x4075c000)
> > > libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4075e000)
> > > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40810000)
> > > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
> > >
> > >
> > > php-4.2.2:
> > >
> > > libdl.so.2 => /lib/libdl.so.2 (0x40184000)
> > > libpam.so.0 => /lib/libpam.so.0 (0x40188000)
> > > libifsql.so => /lib/libifsql.so (0x40190000)
> > > libifasf.so => /lib/libifasf.so (0x401d0000)
> > > libifgen.so => /lib/libifgen.so (0x40206000)
> > > libifos.so => /lib/libifos.so (0x40254000)
> > > libifgls.so => /lib/libifgls.so (0x40268000)
> > > libcrypt.so.1 => /lib/libcrypt.so.1 (0x402a3000)
> > > libifglx.so => /lib/libifglx.so (0x402d0000)
> > > libexpat.so.0 => /usr/lib/libexpat.so.0 (0x402d2000)
> > > libpspell.so.4 => /usr/lib/libpspell.so.4 (0x402f2000)
> > > libncurses.so.5 => /usr/lib/libncurses.so.5 (0x4030b000)
> > > libgmp.so.3 => /usr/lib/libgmp.so.3 (0x4034a000)
> > > libgd.so.1.8 => /usr/lib/libgd.so.1.8 (0x40377000)
> > > libpng12.so.0 => /usr/lib/libpng12.so.0 (0x403a8000)
> > > libz.so.1 => /usr/lib/libz.so.1 (0x403cb000)
> > > libm.so.6 => /lib/i686/libm.so.6 (0x403d9000)
> > > libxml2.so.2 => /usr/lib/libxml2.so.2 (0x403fb000)
> > > libdb-4.0.so => /lib/libdb-4.0.so (0x404a3000)
> > > libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x4054c000)
> > > libcurl.so.2 => /usr/lib/libcurl.so.2 (0x40553000)
> > > libcrypto.so.2 => /lib/libcrypto.so.2 (0x40574000)
> > > libssl.so.2 => /lib/libssl.so.2 (0x40648000)
> > > libbz2.so.1 => /usr/lib/libbz2.so.1 (0x40678000)
> > > libresolv.so.2 => /lib/libresolv.so.2 (0x40687000)
> > > libttf.so.2 => /usr/lib/libttf.so.2 (0x4069a000)
> > > libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x406c0000)
> > > libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40709000)
> > > libnsl.so.1 => /lib/libnsl.so.1 (0x40727000)
> > > libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
> > > libltdl.so.3 => /usr/lib/libltdl.so.3 (0x4073c000)
> > > libpspell-modules.so.1 => /usr/lib/libpspell-modules.so.1
> > > (0x40744000)
> > > libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x40746000)
> > > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x407f8000)
> > > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
>
> - --
> __________
> / Matthieu Le Corre
> | Service Informatique
> | ____________________
> | Inspection Academique de la Sarthe
> | 72000 LE MANS
> | ____________________________
> | Tel : 02 43 61 58 91
> | Mail : Matthieu.lecorre
ac-nantes.fr
> \____________________________________
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
>
> iD8DBQE93MoJiQG6YxCcev4RAikNAJoCEgT7hWQI95JNEOJVxOk/ADt3zACgos+2
> OjucMPVnK9FYGjeyvq5IKkk=
> =Ksbm
> -----END PGP SIGNATURE-----
>
attached mail follows:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
don't do !!!
i've a working php 4.2.2 apache 2.0.43 with informix :D and Gd on a redhat 7. 2 ;) update your ifx SDK , il will be better ;) and Server status is working ;)
Le Vendredi 22 Novembre 2002 15:39, Oliver Fänger a écrit :
> i gave up
>
> to many problems for a productive site:
> - gd
> - need the patches from RH
> - php-4.2.3 and informix
> - if you use a own handler, the URI must exist e.g.
> http://site/own-handler/xyz causes 404 not found
> http://site/server-status/xyz results 200
> php with httpd 2.0 is still:
> "--with-apxs2[=FILE] EXPERIMENTAL: Build shared Apache 2.0 module."
>
> Oliver
>
> On Thu, 2002-11-21 at 12:56, Matthieu Le Corre wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > oki that good .... i managed to compile php 4.2.2 ....
> > but my informix support is still broken :/
> >
> > did you manage tu connect tu ifx with 4.2.2 and apache 4.0.23 ?
>
> yes I used the RH httpd-2.0.36-apxs.patch from the 2.0.40 src.rpm
>
> > if yes ..... what's your ifx SDK version ?
>
> csdk-2.60.UC1-1
>
> > Le Lundi 18 Novembre 2002 17:00, Matthieu Le Corre a écrit :
> > > arf ... I failed to compile php 4.2.2 ....
> > > du to compiling error in sapi/apachefilter module for http2.0.43
> > > on a RH 7.2
> > > it's not my days ....
> > >
> > > Le Lundi 18 Novembre 2002 15:42, Oliver Fänger a écrit :
> > > > could somebody tell me why libphp4.so (php-4.2.3 --with-informix,
> > > > httpd-2.43, RH8, Intel) links against
> > > >
> > > > libthasf.so
> > > > libthgen.so
> > > > libthos.so
> > > > libthsql.so
> > > >
> > > > and misses
> > > >
> > > > libifasf.so
> > > > libifgen.so
> > > > libifos.so
> > > > libifsql.so
> > > >
> > > > 4.2.2 works fine with these libs and does not have the above ones.
> > > >
> > > > and why do i have to set LDFLAGS="-L/opt/informix/lib
> > > > -L/opt/informix/lib/esql -L/tmp/src/php-4.2.3/ext/informix"
> > > >
> > > > i saw something like this in the macro file
> > > > (/ext/informix/config.m4):
> > > >
> > > > PHP_ADD_LIBPATH($INFORMIXDIR/lib, INFORMIX_SHARED_LIBADD)
> > > > PHP_ADD_LIBPATH($INFORMIXDIR/lib/esql, INFORMIX_SHARED_LIBADD)
> > > >
> > > > (INFORMIXDIR is set)
> > > >
> > > > php-4.2.3:
> > > > libdl.so.2 => /lib/libdl.so.2 (0x40192000)
> > > > libpam.so.0 => /lib/libpam.so.0 (0x40196000)
> > > > libthsql.so => /opt/informix/lib/esql/libthsql.so
> > > > (0x4019e000) libthasf.so => /opt/informix/lib/libthasf.so
> > > > (0x401e1000) libthgen.so => /opt/informix/lib/esql/libthgen.so
> > > > (0x40217000) libthos.so => /opt/informix/lib/esql/libthos.so
> > > > (0x40269000) libifgls.so => /lib/libifgls.so (0x40280000)
> > > > libcrypt.so.1 => /lib/libcrypt.so.1 (0x402bb000)
> > > > libifglx.so => /lib/libifglx.so (0x402e8000)
> > > > libexpat.so.0 => /usr/lib/libexpat.so.0 (0x402ea000)
> > > > libpspell.so.4 => /usr/lib/libpspell.so.4 (0x4030a000)
> > > > libncurses.so.5 => /usr/lib/libncurses.so.5 (0x40323000)
> > > > libgmp.so.3 => /usr/lib/libgmp.so.3 (0x40362000)
> > > > libgd.so.1.8 => /usr/lib/libgd.so.1.8 (0x4038f000)
> > > > libpng12.so.0 => /usr/lib/libpng12.so.0 (0x403c0000)
> > > > libz.so.1 => /usr/lib/libz.so.1 (0x403e3000)
> > > > libdb-4.0.so => /lib/libdb-4.0.so (0x403f1000)
> > > > libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x40499000)
> > > > libcurl.so.2 => /usr/lib/libcurl.so.2 (0x404a0000)
> > > > libbz2.so.1 => /usr/lib/libbz2.so.1 (0x404c2000)
> > > > libssl.so.2 => /lib/libssl.so.2 (0x404d1000)
> > > > libcrypto.so.2 => /lib/libcrypto.so.2 (0x40501000)
> > > > libresolv.so.2 => /lib/libresolv.so.2 (0x405d5000)
> > > > libm.so.6 => /lib/i686/libm.so.6 (0x405e7000)
> > > > libttf.so.2 => /usr/lib/libttf.so.2 (0x40609000)
> > > > libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x40630000)
> > > > libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40679000)
> > > > libnsl.so.1 => /lib/libnsl.so.1 (0x40697000)
> > > > libxml2.so.2 => /usr/lib/libxml2.so.2 (0x406ac000)
> > > > libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
> > > > libltdl.so.3 => /usr/lib/libltdl.so.3 (0x40754000)
> > > > libpspell-modules.so.1 => /usr/lib/libpspell-modules.so.1
> > > > (0x4075c000)
> > > > libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4075e000)
> > > > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40810000)
> > > > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
> > > >
> > > >
> > > > php-4.2.2:
> > > >
> > > > libdl.so.2 => /lib/libdl.so.2 (0x40184000)
> > > > libpam.so.0 => /lib/libpam.so.0 (0x40188000)
> > > > libifsql.so => /lib/libifsql.so (0x40190000)
> > > > libifasf.so => /lib/libifasf.so (0x401d0000)
> > > > libifgen.so => /lib/libifgen.so (0x40206000)
> > > > libifos.so => /lib/libifos.so (0x40254000)
> > > > libifgls.so => /lib/libifgls.so (0x40268000)
> > > > libcrypt.so.1 => /lib/libcrypt.so.1 (0x402a3000)
> > > > libifglx.so => /lib/libifglx.so (0x402d0000)
> > > > libexpat.so.0 => /usr/lib/libexpat.so.0 (0x402d2000)
> > > > libpspell.so.4 => /usr/lib/libpspell.so.4 (0x402f2000)
> > > > libncurses.so.5 => /usr/lib/libncurses.so.5 (0x4030b000)
> > > > libgmp.so.3 => /usr/lib/libgmp.so.3 (0x4034a000)
> > > > libgd.so.1.8 => /usr/lib/libgd.so.1.8 (0x40377000)
> > > > libpng12.so.0 => /usr/lib/libpng12.so.0 (0x403a8000)
> > > > libz.so.1 => /usr/lib/libz.so.1 (0x403cb000)
> > > > libm.so.6 => /lib/i686/libm.so.6 (0x403d9000)
> > > > libxml2.so.2 => /usr/lib/libxml2.so.2 (0x403fb000)
> > > > libdb-4.0.so => /lib/libdb-4.0.so (0x404a3000)
> > > > libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x4054c000)
> > > > libcurl.so.2 => /usr/lib/libcurl.so.2 (0x40553000)
> > > > libcrypto.so.2 => /lib/libcrypto.so.2 (0x40574000)
> > > > libssl.so.2 => /lib/libssl.so.2 (0x40648000)
> > > > libbz2.so.1 => /usr/lib/libbz2.so.1 (0x40678000)
> > > > libresolv.so.2 => /lib/libresolv.so.2 (0x40687000)
> > > > libttf.so.2 => /usr/lib/libttf.so.2 (0x4069a000)
> > > > libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x406c0000)
> > > > libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40709000)
> > > > libnsl.so.1 => /lib/libnsl.so.1 (0x40727000)
> > > > libc.so.6 => /lib/i686/libc.so.6 (0x42000000)
> > > > libltdl.so.3 => /usr/lib/libltdl.so.3 (0x4073c000)
> > > > libpspell-modules.so.1 => /usr/lib/libpspell-modules.so.1
> > > > (0x40744000)
> > > > libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x40746000)
> > > > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x407f8000)
> > > > /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
> >
> > - --
> > __________
> > / Matthieu Le Corre
> >
> > | Service Informatique
> > | ____________________
> > | Inspection Academique de la Sarthe
> > | 72000 LE MANS
> > | ____________________________
> > | Tel : 02 43 61 58 91
> > | Mail : Matthieu.lecorre
ac-nantes.fr
> >
> > \____________________________________
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.0.7 (GNU/Linux)
> >
> > iD8DBQE93MoJiQG6YxCcev4RAikNAJoCEgT7hWQI95JNEOJVxOk/ADt3zACgos+2
> > OjucMPVnK9FYGjeyvq5IKkk=
> > =Ksbm
> > -----END PGP SIGNATURE-----
- --
__________
/ Matthieu Le Corre
| Service Informatique
| ____________________
| Inspection Academique de la Sarthe
| 72000 LE MANS
| ____________________________
| Tel : 02 43 61 58 91
| Mail : Matthieu.lecorre
ac-nantes.fr
\____________________________________
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE93l3aiQG6YxCcev4RAnpkAJ9N6IOzzQYfJrnUatkjbJkWe9c2LgCeODfg 9ulp02rF8AFzxOJxPjXNdU4= =v25H -----END PGP SIGNATURE-----
attached mail follows:
I have just built a simple formmail script that validates certain fields and then if alls well mails the information to the client's email addressand displays some confirmatin html. This is all fine except for one minor issue. When I collect the email to check it looks OK etc the header From : in Outlook Express gives the www.servername.com
Can I personalise this a bit to display the From: as the email address that the user has supplied i.e $Email
I'm v. new to this so any help appreciated!
TIA
attached mail follows:
Why don't you send your mailing code so the rest of us can see it, help you and maybe even learn something from you too...
Cesar L. Aracena
icaam
icaam.com.ar
caracena
infovia.com.ar
(0299) 156-356688
Neuquén (8300) Capital
Argentina
-----Mensaje original-----
De: Duncan Ellwood [mailto:fraggaman
hotmail.com]
Enviado el: viernes, 22 de noviembre de 2002 13:30
Para: php-general
lists.php.net
Asunto: [PHP] Newbie mail () question
I have just built a simple formmail script that validates certain fields and then if alls well mails the information to the client's email addressand displays some confirmatin html. This is all fine except for one minor issue. When I collect the email to check it looks OK etc the header From : in Outlook Express gives the www.servername.com
Can I personalise this a bit to display the From: as the email address that the user has supplied i.e $Email
I'm v. new to this so any help appreciated!
TIA
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
> I have just built a simple formmail script that validates certain fields and > then if alls well mails the information to the client's email addressand > displays some confirmatin html. This is all fine except for one minor issue. > When I collect the email to check it looks OK etc the header From : in > Outlook Express gives the www.servername.com > > Can I personalise this a bit to display the From: as the email address that > the user has supplied i.e $Email > > I'm v. new to this so any help appreciated!
Try this:
//...snip
$headers="From: $name <$email>\r\n"; mail($recipient, $subject, $message, $headers);
//...end
The above code seems to work for me.
-- Kyle Gibson admin(at)frozenonline.com http://www.frozenonline.com/
attached mail follows:
Hi all,
Before anything else, thanks for the answers to the last request of mine. Now, I'm trying to make a mailing script which is a very common task to do, but from this one, my client needs to send one e-mail to all the recipients stored in a DB every once in a while. I know that is best to send just one e-mail and add all the recipients to the hidden CC (CCO) instead of adding all of them to the "TO" header.
Now, I usually use a very comfortable way to configure e-mails by setting all the $vaiables first and then adding a mail() function at the bottom, but I never used a CCO target variable and never less a loop to fetch all the addresses... any thoughts?
By the way, I'm very used to work with FOR loops, so I'll try to keep using it. Thanks in advance,
Cesar L. Aracena
icaam
icaam.com.ar
caracena
infovia.com.ar
(0299) 156-356688
Neuquén (8300) Capital
Argentina
attached mail follows:
Hi!
I'm using phpUpLoad but when I try to upload a file I get this error -
Warning: Unable to create '/home/silversa/AC/files/Amber.pet': No such file or directory in /home/silversa/public_html/AC/do_upload.php on line 9 Couldn't copy file.
I made a directory called "files" in the folder incase that was the problem but it hasn't helped. I also made the path /usr/home/silversa/public_html/AC/ incase that was the problem but that didn't help either. Can you shed any light?
Thanks ^_^
Vicky
attached mail follows:
> I'm using phpUpLoad but when I try to upload a file I get this error - > > Warning: Unable to create '/home/silversa/AC/files/Amber.pet': No such file > or directory in /home/silversa/public_html/AC/do_upload.php on line 9 > Couldn't copy file. > > I made a directory called "files" in the folder incase that was the problem > but it hasn't helped. I also made the path > /usr/home/silversa/public_html/AC/ incase that was the problem but that > didn't help either. Can you shed any light?
Does the Web Server/PHP have permission to write in that directory?
---John Holmes...
attached mail follows:
Need to ensure that your web sever is able to write to the location.
You may need to chmod the dir to 775 or even 777
hope that helps.
At 04:35 PM 11/22/2002 +0000, Vicky wrote: >Hi! > >I'm using phpUpLoad but when I try to upload a file I get this error - > >Warning: Unable to create '/home/silversa/AC/files/Amber.pet': No such file >or directory in /home/silversa/public_html/AC/do_upload.php on line 9 >Couldn't copy file. > >I made a directory called "files" in the folder incase that was the problem >but it hasn't helped. I also made the path >/usr/home/silversa/public_html/AC/ incase that was the problem but that >didn't help either. Can you shed any light? > >Thanks ^_^ > >Vicky > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Hint: Never change your directory or file to mod 777 that just invites hackers, plus it is a bad habit.
The best thing is to make sure that your directory is owned by your apache server and that it is writeable for that user...
Verify the user in your httpd.conf file and change the directory ownership to that user. Then give that user and only that user write access to it...
On Fri, 2002-11-22 at 09:35, Vicky wrote: > Hi! > > I'm using phpUpLoad but when I try to upload a file I get this error - > > Warning: Unable to create '/home/silversa/AC/files/Amber.pet': No such file > or directory in /home/silversa/public_html/AC/do_upload.php on line 9 > Couldn't copy file. > > I made a directory called "files" in the folder incase that was the problem > but it hasn't helped. I also made the path > /usr/home/silversa/public_html/AC/ incase that was the problem but that > didn't help either. Can you shed any light? > > Thanks ^_^ > > Vicky
attached mail follows:
Yup, both directorys are chmoded to 755. Lots of users are going to use this script so...
I'm still not sure what's wrong or what to do hehe.
attached mail follows:
You either need to make the directory 777 or change the ownership of the dir to apache or nobody (depending on which user httpd runs as)
Adam
On Fri, 22 Nov 2002, Vicky wrote:
> Yup, both directorys are chmoded to 755. Lots of users are going to use this > script so... > > I'm still not sure what's wrong or what to do hehe. > > >
attached mail follows:
I tried making the dir. 777 too, but it didn't work. How do I change the ownership of the dir?
-Vicky
----- Original Message -----
From: "Adam Williams" <awilliam
mdah.state.ms.us>
To: "Vicky" <vprince
btinternet.com>
Cc: <php-general
lists.php.net>
Sent: Friday, November 22, 2002 6:35 PM
Subject: Re: [PHP] phpUpLoad
> You either need to make the directory 777 or change the ownership of the > dir to apache or nobody (depending on which user httpd runs as) > > Adam > > On Fri, 22 Nov 2002, Vicky wrote: > > > Yup, both directorys are chmoded to 755. Lots of users are going to use this > > script so... > > > > I'm still not sure what's wrong or what to do hehe. > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
On Fri, 22 Nov 2002, Adam Williams wrote:
> You either need to make the directory 777 or change the ownership of the > dir to apache or nobody (depending on which user httpd runs as) > Adam
... or use a wrapper SUID to the user or group who owns the dir and have it wrap a back-end script that actually does the work. I've used this effectively, and so long as the back-end script is properly written I believe it's a very secure method.
-- Morgan Hughes C programmer and highly caffeinated mammal. kyhmkyhm.com ICQ: 79293356
attached mail follows:
in your shell or ftp type chmod 777 files
Vicky wrote:
>I tried making the dir. 777 too, but it didn't work. How do I change the
>ownership of the dir?
>
>-Vicky
>
>----- Original Message -----
>From: "Adam Williams" <awilliam
mdah.state.ms.us>
>To: "Vicky" <vprince
btinternet.com>
>Cc: <php-general
lists.php.net>
>Sent: Friday, November 22, 2002 6:35 PM
>Subject: Re: [PHP] phpUpLoad
>
>
>
>
>>You either need to make the directory 777 or change the ownership of the
>>dir to apache or nobody (depending on which user httpd runs as)
>>
>>Adam
>>
>>On Fri, 22 Nov 2002, Vicky wrote:
>>
>>
>>
>>>Yup, both directorys are chmoded to 755. Lots of users are going to use
>>>
>>>
>this
>
>
>>>script so...
>>>
>>>I'm still not sure what's wrong or what to do hehe.
>>>
>>>
>>>
>>>
>>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>
>
>
>
attached mail follows:
www.invisionboard.com is great thought the skinning takes some getitng used to.
If you aren't out for the absolute best like IB, go with XMB. http://www.xmbforum.com/. I haven't used it much but I hear it's easy to skin, features are great, and all that. The admin panel is kind of hard to use but you get used to it rather quickly...
----- Original Message -----
From: "Paul Ihrig" <pihrig
columbus.rr.com>
To: <php-db
lists.php.net>; "'Jason Vincent'" <jayv
nortelnetworks.com>
Sent: Friday, November 22, 2002 8:04 AM
Subject: [PHP-DB] Forums?
> hey guys. > > a friend want help setting up a forum. > > what are some good easy to use ones out there? > > thanks > -paul > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
attached mail follows:
My header looks just like this:
HTTP/1.0 200 OK Date: Sat, 16 Nov 2002 16:45:29 GMT Server: Apache/1.3.20 (Win32) PHP/4.0.6 Cache-Control: public, max-age=3600 Expires: Sat, 16 Nov 2002 17:45:29 GMT X-Powered-By: PHP/4.0.6 Content-Type: text/html
And yes, we use sessions.
So, setting session_cache_limiter() to "public" should solve my problem? The pragma header is what is missing?
Instead of changing the code, could i use Apache´s mod_header to do the job?
Thank you for the help!
Luanna
>Do you use sessions? If so, try using session_cache_limiter() function. >Otherwise connect directly to >apache with telnet and see the headers yourself.
attached mail follows:
Luanna,
This response allows caching, but the cached response is only considered fresh for one hour (which might be appropriate for you), as is determined by both the Expires header and the max-age attribute of the Cache-Control header.
The Pragma header is defined under HTTP/1.0 and is only used when backwards compatibility with HTTP/1.0 Web agents is required (meaning, Web agents that do not support HTTP/1.1). The absence of Pragma will not restrict caching in any way, however, even with an HTTP/1.0 cache.
You can use PHP's header() function to manipulate headers.
One thing I am not clear on is whether this type of caching is what you were originally inquiring about. The HTTP headers specify what restrictions are placed on the ability for a caching system to cache this HTTP response. It has nothing to do with caching the PHP script in any way on the server. If that latter sounds more like what you are interested in, there are several products that can help with this also. One is Zend Cache.
Chris
--- Luanna Silva <luanna.silva
promon.com.br> wrote:
> My header looks just like this: > > HTTP/1.0 200 OK > Date: Sat, 16 Nov 2002 16:45:29 GMT > Server: Apache/1.3.20 (Win32) PHP/4.0.6 > Cache-Control: public, max-age=3600 > Expires: Sat, 16 Nov 2002 17:45:29 GMT > X-Powered-By: PHP/4.0.6 > Content-Type: text/html > > And yes, we use sessions. > > So, setting session_cache_limiter() to "public" should solve my > problem? > > The pragma header is what is missing? > > Instead of changing the code, could i use Apache´s mod_header to > do the job?
attached mail follows:
Chris,
your explanation was just what i needed to really understand my problem :-)
For the moment, i want to cache the HTTP Response. So, if i´m correct, the header that i sent to the list should do the job.
I have:
Apache Web Server 1.3.x A Reverse Proxy The client(IE 5.00)
I thought that, if the responses were cached, the access.log file would have 304 codes on the responses for php scripts. Is that correct? Well, if it is, that´s not happening. If its not, i´m pretty lost :-)
Thank you for the explanation!
Luanna
-----Mensagem original-----
De: Chris Shiflett [mailto:shiflett
php.net]
Enviada em: sexta-feira, 22 de novembro de 2002 17:32
Para: Luanna Silva; php-general
lists.php.net
Assunto: Re: [PHP] RE: How to cache PHP on Apache
Luanna,
This response allows caching, but the cached response is only considered fresh for one hour (which might be appropriate for you), as is determined by both the Expires header and the max-age attribute of the Cache-Control header.
The Pragma header is defined under HTTP/1.0 and is only used when backwards compatibility with HTTP/1.0 Web agents is required (meaning, Web agents that do not support HTTP/1.1). The absence of Pragma will not restrict caching in any way, however, even with an HTTP/1.0 cache.
You can use PHP's header() function to manipulate headers.
One thing I am not clear on is whether this type of caching is what you were originally inquiring about. The HTTP headers specify what restrictions are placed on the ability for a caching system to cache this HTTP response. It has nothing to do with caching the PHP script in any way on the server. If that latter sounds more like what you are interested in, there are several products that can help with this also. One is Zend Cache.
Chris
--- Luanna Silva <luanna.silva
promon.com.br> wrote:
> My header looks just like this: > > HTTP/1.0 200 OK > Date: Sat, 16 Nov 2002 16:45:29 GMT > Server: Apache/1.3.20 (Win32) PHP/4.0.6 > Cache-Control: public, max-age=3600 > Expires: Sat, 16 Nov 2002 17:45:29 GMT > X-Powered-By: PHP/4.0.6 > Content-Type: text/html > > And yes, we use sessions. > > So, setting session_cache_limiter() to "public" should solve my > problem? > > The pragma header is what is missing? > > Instead of changing the code, could i use Apache´s mod_header to > do the job?
attached mail follows:
Hi All,
I've been using PHP and FastTemplates for a couple of years on multiple platforms (Mac OSX, Win98, WinNT, Solaris). I've just installed RedHat 7.3 and FastTemplates doesn't work anymore.
I get the message: Warning: Invalid content of \{\} in /var/www/cgi-bin/php/FastTemplate/class.FastTemplate.php4 on line 201
Here are the lines from FastTemplate: line 199> // php4 doesn't like '{$' combinations. line 200> $key = "{"."$key"."}"; line 201> $template = ereg_replace("$key","$val","$template");
I've applied the patch for FastTemplates and php4. The version of PHP that comes with RedHat 7.3 is 4.1.2 which is the same as my Mac OSX which works fine.
One of the only differences I see is that with phpinfo the RedHat systems are using the system regex library and the others are using the bundled library. This is the default installation with RH7.3.
Any Clues?
Thanks, Gary Smith
attached mail follows:
I am able to open a socket and send POST data, however I do not know the format of doing the same for the GET method. Here is my POST Query:
Query: POST http://209.204.172.137:80/_calendar/php/selectevent.php HTTP/1.0 Accept-Language: en-us Host: 209.204.172.137:80 Connection: close Content-type: application/x-www-form-urlencoded Content-length: 125 pa_county=&reenter_page=1&sel_from_mo=November&sel_from_dy=22&sel_from_yr=2002&sel_to_mo=December&sel_to_dy=06&sel_to_yr=2002
Any help would be greatly appreciated
-- Ariste Software, Petaluma, CA 94952
attached mail follows:
This is your same HTTP request using the GET method rather than POST to send the same data.
GET http://209.204.172.137/_calendar/php/selectevent.php?pa_county=&reenter_page=1&sel_from_mo=November&sel_from_dy=22&sel_from_yr=2002&sel_to_mo=December&sel_to_dy=06&sel_to_yr=2002 HTTP/1.1 Host: 209.204.172.137 Accept-Language: en-us Connection: Close
--- Todd Cary <todd
aristesoftware.com> wrote:
> I am able to open a socket and send POST data, however I do not
> know the format of doing the same for the GET method.
attached mail follows:
My original reply may have got lost in the sending, so thanks for the info in case you didn't receive it. Phoebe.
Mike Ford wrote:
>>-----Original Message-----
>>From: Phoebe Bright [mailto:phoebebright
spamcop.net]
>>Sent: 19 November 2002 14:20
>>
>>My remaining problem is that the array that PHP sees only
>>has the final
>>few characters of the values it should have.
>>
>>This is the result of print_r after selecting two items
>>(analysis1 and
>>analysis3):
>>
>> Array ( [0] => ysis1 [1] => ysis3 )
>>
>>expecting:
>>
>> Array ( [0] => analysis1 [1] => analysis3 )
>
>
> Known bug. A quick search of http://bugs.php.net/ for "character cut off
> form array" reveals half a dozen reports for this, of which this is probably
> the most informative: http://bugs.php.net/bug.php?id=19518.
>
> Basically, you need to configure PHP without --enable-mbstr-enc-trans (or
> install 4.3.0RC1, if that's acceptable for you).
>
> Cheers!
>
> Mike
>
> ---------------------------------------------------------------------
> Mike Ford, Electronic Information Services Adviser,
> Learning Support Services, Learning & Information Services,
> JG125, James Graham Building, Leeds Metropolitan University,
> Beckett Park, LEEDS, LS6 3QS, United Kingdom
> Email: m.ford
lmu.ac.uk
> Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
Hi,
i wrote a helpdesk script, which can send the user emails, if requested.
The helpdesk sends emails as "nobody
mydomain.com", but some servers
don't accept "nobody" as the sender!
do you know how i can change that?
i don't mean the "From:" header, but the real sender header of the email...
e.g.:
"Received: from nobody by hostname.mydomain.com with local (Exim ......"
Would i have to change the apache user to change this? I mean, there are so many scripts out there and they all have a proper "Received: from..." header, so i guess i simply overlooked s.th.
Thanks for your help,
Duncan
.
attached mail follows:
This header is added by mail server, so you must change the apache user.
Duncan wrote:
> Hi,
>
> i wrote a helpdesk script, which can send the user emails, if requested.
>
> The helpdesk sends emails as "nobody
mydomain.com", but some servers
> don't accept "nobody" as the sender!
> do you know how i can change that?
> i don't mean the "From:" header, but the real sender header of the
> email...
> e.g.:
> "Received: from nobody by hostname.mydomain.com with local (Exim ......"
>
> Would i have to change the apache user to change this?
> I mean,
> there are so many scripts out there and they all have a proper
> "Received: from..." header, so i guess i simply overlooked s.th.
>
> Thanks for your help,
>
> Duncan
>
>
> .
>
>
>
>
attached mail follows:
Hi!
here is my test code
<?php
ob_start(); for ($n=1;$n<10;$n++) {
echo "test<br>";
ob_end_flush();
sleep(2); }
?>
I can make this work on php and apache. I always get output in one shot not line by line. If i try this code with php and iis it works.
What am i doing wrong. Do i have to tell apache to send line by line to browser not everything together.
-- lp, Uros
attached mail follows:
On Fri, 22 Nov 2002, Uros Gruber wrote:
> ob_end_flush();
This turns off output buffering after flushing, the first time it gets called in the first iteration of your for() loop.
> I can make this work on php and apache. I always get output > in one shot not line by line. If i try this code with php and > iis it works.
Try using ob_flush() instead. http://www.php.net/ob_flush "This function does not destroy the output buffer like ob_end_flush() does."
What's odd is that it works like you want it to in IIS ....
g.luck, ~Chris
attached mail follows:
Hi!
I changed it to ob_flush() and the problem still exist.
Check the link and you'll se. http://www.kud-igen.si/link.php
I have 3 apache servers and no one works as i want to. But iis makes no problems.
-- bye, UrosFriday, November 22, 2002, 8:32:56 PM, you wrote:
CW> On Fri, 22 Nov 2002, Uros Gruber wrote:
>> ob_end_flush();
CW> This turns off output buffering after flushing, the first time it gets CW> called in the first iteration of your for() loop.
>> I can make this work on php and apache. I always get output >> in one shot not line by line. If i try this code with php and >> iis it works.
CW> Try using ob_flush() instead. http://www.php.net/ob_flush CW> "This function does not destroy the output buffer like ob_end_flush() CW> does."
CW> What's odd is that it works like you want it to in IIS ....
CW> g.luck, CW> ~Chris
attached mail follows:
You need to use flush() to try and send a chunked response that will display on the user's browser line at a time like that. Output buffering is fairly closely related I suppose, but it is a separate thing.
As far as I know, you cannot flush() with output buffering started unless you end or flush that output buffering first. However, output buffering is not required for what you are wanting to do, so only use it if you also need that.
I wrote a quick little example of displaying a bulleted list one item at a time that might be helpful to you:
http://shiflett.org/tutorials/php_flush.txt
Chris
--- Uros Gruber <uros.gruber
sir-mag.com> wrote:
> <?php > ob_start(); > for ($n=1;$n<10;$n++) { > echo "test<br>"; > ob_end_flush(); > sleep(2); > } > ?> > > I can make this work on php and apache. I always get output > in one shot not line by line.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]