RE: [PHP] header function odd behavior
> -Original Message- > From: H Rao [mailto:hydsd...@gmail.com] > Sent: 28 June 2011 04:40 > > I am trying to understand odd(different) behavior of the header > function > under two different environments. > > Here is the code which I am trying to execute from two different > servers > > header ("Set-Cookie: c1=value1;path=/; domain=.domain.com"); > header ("Set-Cookie: c2=value2;path=/; domain=.domain.com"); > ?> > > When executed from server1(OS X), both cookies are set in browser, > but when > executed from server2(Linux), only the second cookie is set. > > server1 and server2 are running different OS and php version as > below. I > know I could add $replace=false option on the Linux server, but I am > trying > to understand the different behavior of header() function on these > two > servers. Any thoughts? Well, according to the manual, you need to be using the FALSE parameter anyway since "By default it will replace, but if you pass in FALSE as the second argument you can force multiple headers". So the wrong behaviour is on the (older) OS X server, but I'm as confused as you as to why this should be as there is no indication in the manual or the ChangeLog that the default behaviour has changed at any point. Cheers! Mike -- Mike Ford, Electronic Information Developer, Libraries and Learning Innovation, Leeds Metropolitan University, Portland PD507, City Campus, Portland Way, LEEDS, LS1 3HE, United Kingdom E: m.f...@leedsmet.ac.uk T: +44 113 812 4730 To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] caching problem
On Tuesday, 28 June 2011 at 06:57, Fatih P. wrote: > On Tue, Jun 28, 2011 at 7:40 AM, Nilesh Govindarajan > mailto:cont...@nileshgr.com)>wrote: > > > On 06/28/2011 10:56 AM, Fatih P. wrote: > > > Hi guys, > > > > > > the code files are being cached. and modifications in methods are skipped > > > and not executed. is there any parameter that i can pass it from ini > > file? > > > this has been so annoying for me. restarting apache, windows, etc does > > not > > > even help. im running apache 2.2.19, php ts 5.3.6 on windows 2003 r2 > > > any ideas how to avoid this situation? thanks > > > > > > Fatih > > > > It seems you have a wrongly configured opcode cache runnning about which > > you're not aware of. > > > > -- > > Regards, > > Nilesh Govindarajan > > @nileshgr on twitter/identica > basically using default configuration, have not changed anything except the > path for extensions in php.ini. > and there is nothing installed/configured to cache anything. Since restarting Apache does not help, the problem is obviously outside the web server. There are two possibilities I can think of... * Browser caching * Proxy caching See if clearing your browser cache helps. If not then you probably have a proxy between you and the server that's caching the content. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] caching problem
If the issue is a caching proxy or browser caching I suggest you look into controlling the page caching header. You can expire the header. // calc an offset of 24 hours $offset = 3600 * 24; // calc the string in GMT not localtime and add the offset $expire = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT"; //output the HTTP header Header($expire); Just a thought. Richard L. Buskirk -Original Message- From: Stuart Dallas [mailto:stu...@3ft9.com] Sent: Tuesday, June 28, 2011 7:53 AM To: Fatih P. Cc: php-general@lists.php.net Subject: Re: [PHP] caching problem On Tuesday, 28 June 2011 at 06:57, Fatih P. wrote: > On Tue, Jun 28, 2011 at 7:40 AM, Nilesh Govindarajan > mailto:cont...@nileshgr.com)>wrote: > > > On 06/28/2011 10:56 AM, Fatih P. wrote: > > > Hi guys, > > > > > > the code files are being cached. and modifications in methods are skipped > > > and not executed. is there any parameter that i can pass it from ini > > file? > > > this has been so annoying for me. restarting apache, windows, etc does > > not > > > even help. im running apache 2.2.19, php ts 5.3.6 on windows 2003 r2 > > > any ideas how to avoid this situation? thanks > > > > > > Fatih > > > > It seems you have a wrongly configured opcode cache runnning about which > > you're not aware of. > > > > -- > > Regards, > > Nilesh Govindarajan > > @nileshgr on twitter/identica > basically using default configuration, have not changed anything except the > path for extensions in php.ini. > and there is nothing installed/configured to cache anything. Since restarting Apache does not help, the problem is obviously outside the web server. There are two possibilities I can think of... * Browser caching * Proxy caching See if clearing your browser cache helps. If not then you probably have a proxy between you and the server that's caching the content. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- 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
Re: [PHP] caching problem
On Tue, Jun 28, 2011 at 1:51 PM, Fatih P. wrote: > > > On Tue, Jun 28, 2011 at 1:52 PM, Stuart Dallas wrote: > >> On Tuesday, 28 June 2011 at 06:57, Fatih P. wrote: >> > On Tue, Jun 28, 2011 at 7:40 AM, Nilesh Govindarajan >> > mailto:cont...@nileshgr.com)>wrote: >> > >> > > On 06/28/2011 10:56 AM, Fatih P. wrote: >> > > > Hi guys, >> > > > >> > > > the code files are being cached. and modifications in methods are >> skipped >> > > > and not executed. is there any parameter that i can pass it from ini >> > > file? >> > > > this has been so annoying for me. restarting apache, windows, etc >> does >> > > not >> > > > even help. im running apache 2.2.19, php ts 5.3.6 on windows 2003 r2 >> > > > any ideas how to avoid this situation? thanks >> > > > >> > > > Fatih >> > > >> > > It seems you have a wrongly configured opcode cache runnning about >> which >> > > you're not aware of. >> > > >> > > -- >> > > Regards, >> > > Nilesh Govindarajan >> > > @nileshgr on twitter/identica >> > basically using default configuration, have not changed anything except >> the >> > path for extensions in php.ini. >> > and there is nothing installed/configured to cache anything. >> >> Since restarting Apache does not help, the problem is obviously outside >> the web server. There are two possibilities I can think of... >> >> * Browser caching >> >> * Proxy caching >> >> See if clearing your browser cache helps. If not then you probably have a >> proxy between you and the server that's caching the content. >> >> -Stuart >> >> -- >> Stuart Dallas >> 3ft9 Ltd >> http://3ft9.com/ >> >> > This is not proxy or browser caching. browser does not receive php code. it > gets output of php code. Well thanks, cos I only started doing this whole webby programmy developy technobabble thing yesterday and I'm still learning the basics!* How do you know that "modifications in methods are skipped and not executed"? By looking at the output shown in your browser? The output that could be cached by proxies and/or your browser? Or are you running them on the command line, in which case some sort of opcode cache is probably the culprit, or you're not running the code you think you are. -Stuart *sarcasm! -- Stuart Dallas 3ft9 Ltd http://3ft9.com/
RE: [PHP] caching problem
Faith, I actually did read from the beginning of the message. That does not make sense. PHP files are cached intentionally, the system does not Cache PHP on its own. Sounds to me like you have an issue re-declaring an object or calling the right script/path/class/method something. I have never heard of PHP being cached unless it was intentionally cached it. Thank god for security reason! HTML output?? Sure all the time helps the browser load the content faster. I have a real issue with who ever told you that PHP is being cached, because if that was the case there is SERIOUS security hole in your PHP. I am doubting that. I have cached PHP, it can be done. Are you using APC(Alternative PHP Cache)??? I would not suggest it with complex scripting using classes and methods they are the whole reason NOT to cache. That’s just my opinion. Richard L. Buskirk -Original Message- From: Stuart Dallas [mailto:stu...@3ft9.com] Sent: Tuesday, June 28, 2011 9:18 AM To: Fatih P. Cc: PHP General Subject: Re: [PHP] caching problem On Tue, Jun 28, 2011 at 1:51 PM, Fatih P. wrote: > > > On Tue, Jun 28, 2011 at 1:52 PM, Stuart Dallas wrote: > >> On Tuesday, 28 June 2011 at 06:57, Fatih P. wrote: >> > On Tue, Jun 28, 2011 at 7:40 AM, Nilesh Govindarajan >> > mailto:cont...@nileshgr.com)>wrote: >> > >> > > On 06/28/2011 10:56 AM, Fatih P. wrote: >> > > > Hi guys, >> > > > >> > > > the code files are being cached. and modifications in methods are >> skipped >> > > > and not executed. is there any parameter that i can pass it from ini >> > > file? >> > > > this has been so annoying for me. restarting apache, windows, etc >> does >> > > not >> > > > even help. im running apache 2.2.19, php ts 5.3.6 on windows 2003 r2 >> > > > any ideas how to avoid this situation? thanks >> > > > >> > > > Fatih >> > > >> > > It seems you have a wrongly configured opcode cache runnning about >> which >> > > you're not aware of. >> > > >> > > -- >> > > Regards, >> > > Nilesh Govindarajan >> > > @nileshgr on twitter/identica >> > basically using default configuration, have not changed anything except >> the >> > path for extensions in php.ini. >> > and there is nothing installed/configured to cache anything. >> >> Since restarting Apache does not help, the problem is obviously outside >> the web server. There are two possibilities I can think of... >> >> * Browser caching >> >> * Proxy caching >> >> See if clearing your browser cache helps. If not then you probably have a >> proxy between you and the server that's caching the content. >> >> -Stuart >> >> -- >> Stuart Dallas >> 3ft9 Ltd >> http://3ft9.com/ >> >> > This is not proxy or browser caching. browser does not receive php code. it > gets output of php code. Well thanks, cos I only started doing this whole webby programmy developy technobabble thing yesterday and I'm still learning the basics!* How do you know that "modifications in methods are skipped and not executed"? By looking at the output shown in your browser? The output that could be cached by proxies and/or your browser? Or are you running them on the command line, in which case some sort of opcode cache is probably the culprit, or you're not running the code you think you are. -Stuart *sarcasm! -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] caching problem
On Tue, Jun 28, 2011 at 5:12 PM, wrote: > Faith, > > I actually did read from the beginning of the message. > > That does not make sense. > PHP files are cached intentionally, the system does not Cache PHP on its > own. > Sounds to me like you have an issue re-declaring an object or calling the > right script/path/class/method something. > > > I have never heard of PHP being cached unless it was intentionally cached > it. Thank god for security reason! > HTML output?? Sure all the time helps the browser load the content faster. > > I have a real issue with who ever told you that PHP is being cached, > because if that was the case there is SERIOUS security hole in your PHP. > I am doubting that. > > I have cached PHP, it can be done. > > Are you using APC(Alternative PHP Cache)??? > > I would not suggest it with complex scripting using classes and methods > they are the whole reason NOT to cache. > > > That’s just my opinion. > > Richard L. Buskirk > > Well, seems you didn't read it carefully even to write my name correctly. if this is an issue with PHP then it is an issue with PHP. AsI said I am using pre-compiled binaries with default settings. also mentioned no caching is enabled to cache anything. And NO i am not using APC either or something else!!!
Re: [PHP] caching problem
On Tue, Jun 28, 2011 at 4:23 PM, Fatih P. wrote: > On Tue, Jun 28, 2011 at 5:12 PM, wrote: > > > Faith, > > > > I actually did read from the beginning of the message. > > > > That does not make sense. > > PHP files are cached intentionally, the system does not Cache PHP on its > > own. > > Sounds to me like you have an issue re-declaring an object or calling the > > right script/path/class/method something. > > > > > > I have never heard of PHP being cached unless it was intentionally cached > > it. Thank god for security reason! > > HTML output?? Sure all the time helps the browser load the content > faster. > > > > I have a real issue with who ever told you that PHP is being cached, > > because if that was the case there is SERIOUS security hole in your PHP. > > I am doubting that. > > > > I have cached PHP, it can be done. > > > > Are you using APC(Alternative PHP Cache)??? > > > > I would not suggest it with complex scripting using classes and methods > > they are the whole reason NOT to cache. > > > > > > That’s just my opinion. > > > > Richard L. Buskirk > > > > > Well, seems you didn't read it carefully even to write my name correctly. > if > this is an issue with PHP then it is an > issue with PHP. AsI said I am using pre-compiled binaries with default > settings. also mentioned no caching is > enabled to cache anything. And NO i am not using APC either or something > else!!! > Fatih, please explain what you mean by "the code files are being cached. and modifications in methods are skipped and not executed." How are you getting the modified files onto the server, and how are you running the scripts? Are you working directly on the server, or are you uploading the files to the server via FTP, SCP or some other mechanism? -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/
Re: [PHP] caching problem
On Tue, Jun 28, 2011 at 5:30 PM, Stuart Dallas wrote: > On Tue, Jun 28, 2011 at 4:23 PM, Fatih P. wrote: > >> On Tue, Jun 28, 2011 at 5:12 PM, wrote: >> >> > Faith, >> > >> > I actually did read from the beginning of the message. >> > >> > That does not make sense. >> > PHP files are cached intentionally, the system does not Cache PHP on its >> > own. >> > Sounds to me like you have an issue re-declaring an object or calling >> the >> > right script/path/class/method something. >> > >> > >> > I have never heard of PHP being cached unless it was intentionally >> cached >> > it. Thank god for security reason! >> > HTML output?? Sure all the time helps the browser load the content >> faster. >> > >> > I have a real issue with who ever told you that PHP is being cached, >> > because if that was the case there is SERIOUS security hole in your PHP. >> > I am doubting that. >> > >> > I have cached PHP, it can be done. >> > >> > Are you using APC(Alternative PHP Cache)??? >> > >> > I would not suggest it with complex scripting using classes and methods >> > they are the whole reason NOT to cache. >> > >> > >> > That’s just my opinion. >> > >> > Richard L. Buskirk >> > >> > >> Well, seems you didn't read it carefully even to write my name correctly. >> if >> this is an issue with PHP then it is an >> issue with PHP. AsI said I am using pre-compiled binaries with default >> settings. also mentioned no caching is >> enabled to cache anything. And NO i am not using APC either or something >> else!!! >> > > > Fatih, please explain what you mean by "the code files are being cached. > and modifications in methods are skipped > and not executed." How are you getting the modified files onto the server, > and how are you running the scripts? Are you working directly on the server, > or are you uploading the files to the server via FTP, SCP or some other > mechanism? > > -Stuart > > -- > Stuart Dallas > 3ft9 Ltd > http://3ft9.com/ > OK, this is a development machine, everything is running on it. nothing is being uploaded through ftp, scp or something else. all kind of content caching is disabled. and what I mean by the code files are being cached is: after the modifications, i do get the result which was produced before modification. which shows that the file is not being interpreted by php. how i get to this point that I see errors after restarting the machine which were not there during coding or when i dump an object it doesn't show up anything other than previous content. to recover this situation, either I have to restart httpd which sometimes does work or when it gets more problematic, i have to crush httpd / php on start. and only having this problem on windows machines. sounds funny to most of you but it is happening
Re: [PHP] caching problem
On Tue, Jun 28, 2011 at 5:12 PM, Fatih P. wrote: > On Tue, Jun 28, 2011 at 5:30 PM, Stuart Dallas wrote: > >> Fatih, please explain what you mean by "the code files are being cached. >> and modifications in methods are skipped >> and not executed." How are you getting the modified files onto the server, >> and how are you running the scripts? Are you working directly on the server, >> or are you uploading the files to the server via FTP, SCP or some other >> mechanism? >> >> OK, this is a development machine, everything is running on it. nothing is > being uploaded through ftp, scp or something else. > all kind of content caching is disabled. > > and what I mean by the code files are being cached is: after the > modifications, i do get the result which was produced before modification. > which shows > that the file is not being interpreted by php. how i get to this point that > I see errors after restarting the machine which were not there during coding > or when > i dump an object it doesn't show up anything other than previous content. > > to recover this situation, either I have to restart httpd which sometimes > does work or when it gets more problematic, > i have to crush httpd / php on start. and only having this problem on > windows machines. > > sounds funny to most of you but it is happening > I'm sure it is happening, I don't doubt that, but there's probably a very simple explanation. What browser are you using? Certain older browsers such as IE6 have their own ideas about whether pages should be cached or not. You can usually bypass the browser cache by holding control and/or shift while clicking on the refresh button. Try that next time this happens. Other possibilities include filesystem issues, such that the OS is not seeing that the file has been changed - there are levels of caching on modern operating systems that most people, quite correctly, are not aware of. The likelihood of this being the cause is miniscule. If you're absolutely certain that you are not using any opcode caching (you mentioned that you are using pre-compiled binaries, and it's possible they include APC or similar by default), then I have no idea what's going on beyond what I and others have already suggested. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/
RE: [PHP] caching problem
Fatih, I am sorry spell check auto corrected your name, I was not changing your name on purpose. It was not my intension to piss you off. I understand your frustration, trust me. I am running 5.3.6 on Windows Server 2008 R2 IIS, I am running massive class based methods in my own framework. I am trying to help you narrow down the issue. I never blame PHP first because in my trouble shooting steps, I never get to PHP before I find the issue. Segmentation Faults: that prevent the php script from completing locking up resources and causing a nightmare chain of events. It dumps the process at the fail point can look like it is a PHP thing but it is not. This can explain sometimes it works and sometimes it does not. This can be caused by a host of reasons: Buffer Overflow, Attempting to access memory the program does not own. (This also points to Storage Violations) Using uninitialized pointers, Dereferencing Null pointers Again suggestions please do not take offense. Richard L. Buskirk -Original Message- From: Fatih P. [mailto:fatihpirist...@gmail.com] Sent: Tuesday, June 28, 2011 12:13 PM To: Stuart Dallas Cc: ad...@buskirkgraphics.com; PHP General Subject: Re: [PHP] caching problem On Tue, Jun 28, 2011 at 5:30 PM, Stuart Dallas wrote: > On Tue, Jun 28, 2011 at 4:23 PM, Fatih P. wrote: > >> On Tue, Jun 28, 2011 at 5:12 PM, wrote: >> >> > Faith, >> > >> > I actually did read from the beginning of the message. >> > >> > That does not make sense. >> > PHP files are cached intentionally, the system does not Cache PHP on its >> > own. >> > Sounds to me like you have an issue re-declaring an object or calling >> the >> > right script/path/class/method something. >> > >> > >> > I have never heard of PHP being cached unless it was intentionally >> cached >> > it. Thank god for security reason! >> > HTML output?? Sure all the time helps the browser load the content >> faster. >> > >> > I have a real issue with who ever told you that PHP is being cached, >> > because if that was the case there is SERIOUS security hole in your PHP. >> > I am doubting that. >> > >> > I have cached PHP, it can be done. >> > >> > Are you using APC(Alternative PHP Cache)??? >> > >> > I would not suggest it with complex scripting using classes and methods >> > they are the whole reason NOT to cache. >> > >> > >> > That’s just my opinion. >> > >> > Richard L. Buskirk >> > >> > >> Well, seems you didn't read it carefully even to write my name correctly. >> if >> this is an issue with PHP then it is an >> issue with PHP. AsI said I am using pre-compiled binaries with default >> settings. also mentioned no caching is >> enabled to cache anything. And NO i am not using APC either or something >> else!!! >> > > > Fatih, please explain what you mean by "the code files are being cached. > and modifications in methods are skipped > and not executed." How are you getting the modified files onto the server, > and how are you running the scripts? Are you working directly on the server, > or are you uploading the files to the server via FTP, SCP or some other > mechanism? > > -Stuart > > -- > Stuart Dallas > 3ft9 Ltd > http://3ft9.com/ > OK, this is a development machine, everything is running on it. nothing is being uploaded through ftp, scp or something else. all kind of content caching is disabled. and what I mean by the code files are being cached is: after the modifications, i do get the result which was produced before modification. which shows that the file is not being interpreted by php. how i get to this point that I see errors after restarting the machine which were not there during coding or when i dump an object it doesn't show up anything other than previous content. to recover this situation, either I have to restart httpd which sometimes does work or when it gets more problematic, i have to crush httpd / php on start. and only having this problem on windows machines. sounds funny to most of you but it is happening -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] caching problem
On Tue, 2011-06-28 at 17:34 +0100, Stuart Dallas wrote: > On Tue, Jun 28, 2011 at 5:12 PM, Fatih P. wrote: > > > On Tue, Jun 28, 2011 at 5:30 PM, Stuart Dallas wrote: > > > >> Fatih, please explain what you mean by "the code files are being cached. > >> and modifications in methods are skipped > >> and not executed." How are you getting the modified files onto the server, > >> and how are you running the scripts? Are you working directly on the > >> server, > >> or are you uploading the files to the server via FTP, SCP or some other > >> mechanism? > >> > >> OK, this is a development machine, everything is running on it. nothing is > > being uploaded through ftp, scp or something else. > > all kind of content caching is disabled. > > > > and what I mean by the code files are being cached is: after the > > modifications, i do get the result which was produced before modification. > > which shows > > that the file is not being interpreted by php. how i get to this point that > > I see errors after restarting the machine which were not there during coding > > or when > > i dump an object it doesn't show up anything other than previous content. > > > > to recover this situation, either I have to restart httpd which sometimes > > does work or when it gets more problematic, > > i have to crush httpd / php on start. and only having this problem on > > windows machines. > > > > sounds funny to most of you but it is happening > > > > I'm sure it is happening, I don't doubt that, but there's probably a very > simple explanation. > > What browser are you using? Certain older browsers such as IE6 have their > own ideas about whether pages should be cached or not. You can usually > bypass the browser cache by holding control and/or shift while clicking on > the refresh button. Try that next time this happens. > > Other possibilities include filesystem issues, such that the OS is not > seeing that the file has been changed - there are levels of caching on > modern operating systems that most people, quite correctly, are not aware > of. The likelihood of this being the cause is miniscule. > > If you're absolutely certain that you are not using any opcode caching (you > mentioned that you are using pre-compiled binaries, and it's possible they > include APC or similar by default), then I have no idea what's going on > beyond what I and others have already suggested. > > -Stuart > maybe, you're updating the wrong files? I've done that a few times, where the files i THOUGHT it was using, ended up being in the wrong folder (or apache was pointing to a different folder... kinda one in the same). just an alternate spin on it... Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] caching problem
On Tue, Jun 28, 2011 at 6:39 PM, wrote: > Fatih, >I am sorry spell check auto corrected your name, I was not changing > your name on purpose. > It was not my intension to piss you off. > > I understand your frustration, trust me. > I am running 5.3.6 on Windows Server 2008 R2 IIS, I am running massive > class based methods in my own framework. > I am trying to help you narrow down the issue. I never blame PHP first > because in my trouble shooting steps, I never get to PHP before I find the > issue. > > Segmentation Faults: that prevent the php script from completing locking up > resources and causing a nightmare chain of events. It dumps the process at > the fail point can look like it is a PHP thing but it is not. This can > explain sometimes it works and sometimes it does not. > > This can be caused by a host of reasons: > Buffer Overflow, > Attempting to access memory the program does not own. (This also points to > Storage Violations) > Using uninitialized pointers, > Dereferencing Null pointers > > Again suggestions please do not take offense. > > > Richard L. Buskirk > already here to ask for suggestions not to take offense. Anyway, I will re-check these points you have mentioned. thanks.
Re: [PHP] caching problem
OP: Can we see the methods in question? Have you tried running the code on a different server/host? Have you added any scaffolding to your methods in order to test your caching theory? This would be the first thing I would try (i.e. create random number (or whatever), concat with variable vals generated via method, other.) Sent from my iPhone -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] caching problem
On Tue, Jun 28, 2011 at 5:53 PM, Fatih P. wrote: > > > On Tue, Jun 28, 2011 at 6:34 PM, Stuart Dallas wrote: > >> On Tue, Jun 28, 2011 at 5:12 PM, Fatih P. wrote: >> >>> On Tue, Jun 28, 2011 at 5:30 PM, Stuart Dallas wrote: >>> Fatih, please explain what you mean by "the code files are being cached. and modifications in methods are skipped and not executed." How are you getting the modified files onto the server, and how are you running the scripts? Are you working directly on the server, or are you uploading the files to the server via FTP, SCP or some other mechanism? OK, this is a development machine, everything is running on it. nothing >>> is being uploaded through ftp, scp or something else. >>> all kind of content caching is disabled. >>> >>> and what I mean by the code files are being cached is: after the >>> modifications, i do get the result which was produced before modification. >>> which shows >>> that the file is not being interpreted by php. how i get to this point >>> that I see errors after restarting the machine which were not there during >>> coding or when >>> i dump an object it doesn't show up anything other than previous content. >>> >>> to recover this situation, either I have to restart httpd which >>> sometimes does work or when it gets more problematic, >>> i have to crush httpd / php on start. and only having this problem on >>> windows machines. >>> >>> sounds funny to most of you but it is happening >>> >> >> I'm sure it is happening, I don't doubt that, but there's probably a very >> simple explanation. >> >> What browser are you using? Certain older browsers such as IE6 have their >> own ideas about whether pages should be cached or not. You can usually >> bypass the browser cache by holding control and/or shift while clicking on >> the refresh button. Try that next time this happens. >> >> Other possibilities include filesystem issues, such that the OS is not >> seeing that the file has been changed - there are levels of caching on >> modern operating systems that most people, quite correctly, are not aware >> of. The likelihood of this being the cause is miniscule. >> >> If you're absolutely certain that you are not using any opcode caching >> (you mentioned that you are using pre-compiled binaries, and it's possible >> they include APC or similar by default), then I have no idea what's going on >> beyond what I and others have already suggested. >> >> using FF3,5 and IE7 as browser. Those browsers should be fine, but forcing a reload (the control/shift + refresh) is always worth trying. Maybe I should compile php myself disabling things i dont need and see it > will make any difference. > You can see what's in your PHP build by creating a script that just contains the following.. Run that and check the output. If you got the binary from php.net then chances are that you don't have any opcode caching modules in there. It's also worth doing a variation on Micky's suggestion - when I want to make sure a script has actually been executed rather than cached data being served I put a call to echo date('r'); in an appropriate place. That way the script output will display the current date and time which should change with each request. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/
Re: [PHP] asynchronous launch of a script
On Sun, Jun 26, 2011 at 7:42 PM, Tamara Temple wrote: > How do I launch a php script from another running php script > asynchronously? > You can perform the long-running job in the same process that handles the request by sending appropriate headers. We use this to run reports that take ten minutes without making the user keep the browser tab open. Call this method before starting the job: /** * Effectively causes PHP to keep running after flushing everything and closing the client connection * * @param mixed $status JSON-encoded and sent to the client */ public function flushAndCloseConnection($status) { // disable any apache or php gzipping if (function_exists('apache_setenv')) { apache_setenv('no-gzip', 1); } ini_set('zlib.output_compression', 0); // Tell the server and client we intend for it to disconnect ignore_user_abort(true); // Tell the client we are done! header('Connection: close'); header('Content-type: application/json'); $json = json_encode($status); header('Content-Length: ' . strlen($json)); echo $json; flush(); } In our case we send a JSON status string ("ok") as well. Another option is to fork the process using pcntl_fork() [1]. I haven't used this in PHP before so I can't give an example. Peace, David [1] http://www.php.net/manual/en/function.pcntl-fork.php
Re: [PHP] asynchronous launch of a script
On Tue, Jun 28, 2011 at 8:16 PM, David Harkness wrote: > On Sun, Jun 26, 2011 at 7:42 PM, Tamara Temple >wrote: > > > How do I launch a php script from another running php script > > asynchronously? > > > > You can perform the long-running job in the same process that handles the > request by sending appropriate headers. We use this to run reports that > take > ten minutes without making the user keep the browser tab open. Call this > method before starting the job: > >/** > * Effectively causes PHP to keep running after flushing everything and > closing the client connection > * > * @param mixed $status JSON-encoded and sent to the client > */ >public function flushAndCloseConnection($status) { >// disable any apache or php gzipping >if (function_exists('apache_setenv')) { >apache_setenv('no-gzip', 1); >} >ini_set('zlib.output_compression', 0); >// Tell the server and client we intend for it to disconnect >ignore_user_abort(true); >// Tell the client we are done! >header('Connection: close'); >header('Content-type: application/json'); >$json = json_encode($status); >header('Content-Length: ' . strlen($json)); >echo $json; >flush(); >} > > In our case we send a JSON status string ("ok") as well. > While this will work, I would caution against doing this, especially when using Apache as the web server. Keeping an HTTP request handler process occupied with an offline task is a substantial waste of resources. Far better to offload that work to a separate process so as to free up the request handler so it's available to handle another incoming request. Another option is to fork the process using pcntl_fork() [1]. I haven't used > this in PHP before so I can't give an example. > Forking an HTTP request handler can lead to some very unwelcome side-effects. I'd urge you not to do this. It may appear to work for a while, but I guarantee you'll live to regret it. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/
[PHP] best ways to recruit volunteers for a PHP framework
Hi everybody, I have developed an ORM framework in PHP for the last 2 years and it's becoming a more professional and nice solution so before doing a new complete revamp I am going to look for volunteer developers to do a real good version. But I am wondering what would be the best and clearest way to present the project in order to get some people interested in it ? I was thinking about - showing the previous versions - showing use cases - showing unit testing (I'm doing test driven development) - a short user manual (the project doesn't have any user manual yet!) Thanks in advance!
RE: [PHP] best ways to recruit volunteers for a PHP framework
[snip] I have developed an ORM framework in PHP for the last 2 years and it's becoming a more professional and nice solution so before doing a new complete revamp I am going to look for volunteer developers to do a real good version. [/snip] https://github.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] best ways to recruit volunteers for a PHP framework
thanks, I should have said I have the project already in sourceforge so I have an SVN ready, and a outdated website with an outdated user manual and even an outdated dissertation about the reason for the development of the project. On 28 June 2011 21:29, Jay Blanchard wrote: > [snip] > I have developed an ORM framework in PHP for the last 2 years and it's > becoming a more professional and nice solution so before doing a > new complete revamp I am going to look for volunteer developers to do a > real > good version. > [/snip] > > https://github.com/ >
Re: [PHP] best ways to recruit volunteers for a PHP framework
On Tue, Jun 28, 2011 at 9:24 PM, jean-baptiste verrey < jeanbaptiste.ver...@gmail.com> wrote: > Hi everybody, > Hi Dr Nick! I have developed an ORM framework in PHP for the last 2 years and it's > becoming a more professional and nice solution so before doing a > new complete revamp I am going to look for volunteer developers to do a > real > good version. > > But I am wondering what would be the best and clearest way to present the > project in order to get some people interested in it ? > > I was thinking about > - showing the previous versions > - showing use cases > - showing unit testing (I'm doing test driven development) > - a short user manual (the project doesn't have any user manual yet!) > The best way to get other developers interested in contributing to your project is to not ask for it. Build something they want to use, put a mechanism in place for them to contribute patches and new features, and let it happen naturally. You can't force developers to contribute to your project without paying them. As Jay mentioned, GitHub is a great place to share code, and it would appear to be far more popular than Sourceforge these days. It has features that allow other developers to fork your code and contribute changes back to your repository. However, it doesn't really matter where you put it because most of the interest in it will come from other things you do to spread the word. Contribute to PHP mailing lists and put a link to your project in your signature. Do the same on forums and any other channels where you can engage with your intended audience, but don't force it down their throats. Give your project lots of exposure, but don't ask developers to contribute - let them discover/decide how worthy your project is of their attention and efforts on their own. That's the only way to build a quality bunch of contributors. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/
Re: [PHP] best ways to recruit volunteers for a PHP framework
+1 for GitHub or BitBucket. I have not visited SourceForge for years... I just like using Git myself. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] best ways to recruit volunteers for a PHP framework
I would definitely be interested in working on/developing the user manual for the project. You have my interest. Best, Christopher From: jean-baptiste verrey [jeanbaptiste.ver...@gmail.com] Sent: Tuesday, June 28, 2011 4:24 PM To: php-general@lists.php.net Subject: [PHP] best ways to recruit volunteers for a PHP framework Hi everybody, I have developed an ORM framework in PHP for the last 2 years and it's becoming a more professional and nice solution so before doing a new complete revamp I am going to look for volunteer developers to do a real good version. But I am wondering what would be the best and clearest way to present the project in order to get some people interested in it ? I was thinking about - showing the previous versions - showing use cases - showing unit testing (I'm doing test driven development) - a short user manual (the project doesn't have any user manual yet!) Thanks in advance! This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP 5.4.0alpha1 released
Hello! Stas has packed PHP 5.4.0alpha1 which you can find here: http://downloads.php.net/stas/ Please test it carefully, and report any bugs in the bug system, but only if you have a short reproducable test case. Alpha 2 will be released in about 2 weeks. You can read more information about this release here: http://www.php.net/archive/2011.php#id2011-06-28-1 regards, Stas and David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5.4.0alpha1 released
On 28 Jun 2011 at 22:39, David Soria Parra wrote: > You can read more information about this release here: > http://www.php.net/archive/2011.php#id2011-06-28-1 Not quite yet, perhaps? -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP 5.4.0alpha1 released
On Tue, 2011-06-28 at 22:51 +0100, Tim Streater wrote: > On 28 Jun 2011 at 22:39, David Soria Parra wrote: > > > You can read more information about this release here: > > http://www.php.net/archive/2011.php#id2011-06-28-1 > > Not quite yet, perhaps? will take a few minutes before it's up on every server > > -- > Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] asynchronous launch of a script
On Tue, Jun 28, 2011 at 1:02 PM, Stuart Dallas wrote: > While this will work, I would caution against doing this, especially when > using Apache as the web server. . . . > > Forking an HTTP request handler can lead to some very unwelcome > side-effects. I'd urge you not to do this. It may appear to work for a > while, but I guarantee you'll live to regret it. Thank you, Negative Nancy. :) Those are excellent points, and luckily we're doing this for an infrequently run internal report that runs on a machine that doesn't do much else. Alternatively, you can use & in bash or some other shell to spawn a background job, and I suppose you could create a wrapper shell script that does that calls php in the background. But there must be a direct way using an alternate to exec(). David
[PHP] Connection usign SSL with a JAVA Server
Hi, i made a SSL Client using JAVA, with a key generated by Keytool. The command was the next: *keytool -genkey -keystore mySrvKeystore -keyalg RSA* Password: 123456 Now, im tryint to send a simple text using this kind of connection in PHP. The server already works with a Java Server / Java Client. Now i want a PHP Client. I tried every example listed in the OpenSSL section in the PHP help but nothing worked. Can you help me? Mariano