Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #16256 > unrolled thread
| Started by | crankypuss <invalid@invalid.invalid> |
|---|---|
| First post | 2016-01-13 15:54 -0700 |
| Last post | 2016-01-15 08:57 -0700 |
| Articles | 20 on this page of 23 — 6 participants |
Back to article view | Back to comp.lang.php
how to set default timezone as a .config argument? crankypuss <invalid@invalid.invalid> - 2016-01-13 15:54 -0700
Re: how to set default timezone as a .config argument? Arno Welzel <usenet@arnowelzel.de> - 2016-01-14 00:18 +0100
Re: how to set default timezone as a .config argument? crankypuss <invalid@invalid.invalid> - 2016-01-14 00:13 -0700
Re: how to set default timezone as a .config argument? Arno Welzel <usenet@arnowelzel.de> - 2016-01-14 08:45 +0100
Re: how to set default timezone as a .config argument? Arno Welzel <usenet@arnowelzel.de> - 2016-01-14 08:49 +0100
Re: how to set default timezone as a .config argument? crankypuss <invalid@invalid.invalid> - 2016-01-14 10:19 -0700
Re: how to set default timezone as a .config argument? Arno Welzel <usenet@arnowelzel.de> - 2016-01-14 20:09 +0100
Re: how to set default timezone as a .config argument? Tim Streater <timstreater@greenbee.net> - 2016-01-15 11:22 +0000
Re: how to set default timezone as a .config argument? crankypuss <invalid@invalid.invalid> - 2016-01-15 08:53 -0700
Re: how to set default timezone as a .config argument? Tim Streater <timstreater@greenbee.net> - 2016-01-15 17:40 +0000
PHP in a local environment (was: how to set default timezone as a .config argument?) "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-01-15 18:51 +0100
Re: PHP in a local environment (was: how to set default timezone as a .config argument?) crankypuss <invalid@invalid.invalid> - 2016-01-15 11:00 -0700
Re: PHP in a local environment (was: how to set default timezone as a .config argument?) Tim Streater <timstreater@greenbee.net> - 2016-01-15 20:41 +0000
Re: PHP in a local environment "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-01-17 16:36 +0100
Re: PHP in a local environment Tim Streater <timstreater@greenbee.net> - 2016-01-17 15:54 +0000
Re: how to set default timezone as a .config argument? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-01-16 01:21 +0000
Re: how to set default timezone as a .config argument? Michael Vilain <vilain@NOspamcop.net> - 2016-01-15 18:25 -0800
Re: how to set default timezone as a .config argument? Tim Streater <timstreater@greenbee.net> - 2016-01-16 08:25 +0000
Re: how to set default timezone as a .config argument? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-01-16 11:55 +0000
Re: how to set default timezone as a .config argument? "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-01-14 11:57 +0100
Re: how to set default timezone as a .config argument? crankypuss <invalid@invalid.invalid> - 2016-01-14 10:29 -0700
Re: how to set default timezone as a .config argument? "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-01-15 12:14 +0100
Re: how to set default timezone as a .config argument? crankypuss <invalid@invalid.invalid> - 2016-01-15 08:57 -0700
Page 1 of 2 [1] 2 Next page →
| From | crankypuss <invalid@invalid.invalid> |
|---|---|
| Date | 2016-01-13 15:54 -0700 |
| Subject | how to set default timezone as a .config argument? |
| Message-ID | <n76kdi$29c$1@dont-email.me> |
When building PHP from source, I want to set the default timezone to UTC via some .config option, is there such an option? What I've found is, "To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE." Apparently I don't know how to do specify that in a syntactically correct way. TIA. -- http://totally-portable-software.blogspot.com [Sun Nov 22: "Total Portability is not binary"]
[toc] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2016-01-14 00:18 +0100 |
| Message-ID | <5696DB4E.1020802@arnowelzel.de> |
| In reply to | #16256 |
crankypuss schrieb am 2016-01-13 um 23:54: > When building PHP from source, I want to set the default timezone to UTC > via some .config option, is there such an option? No, there isn't. See <http://php.net/manual/en/configure.about.php>. > What I've found is, > > "To assign environment variables (e.g., CC, CFLAGS...), specify them as > VAR=VALUE." Yes - but this has nothing to do with the default timezone PHP uses at runtime. See <http://php.net/manual/en/datetime.configuration.php#ini.date.timezone>. Even if TZ is set this makes no difference for compilation. -- Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de http://fahrradzukunft.de
[toc] | [prev] | [next] | [standalone]
| From | crankypuss <invalid@invalid.invalid> |
|---|---|
| Date | 2016-01-14 00:13 -0700 |
| Message-ID | <n77hmm$ers$1@dont-email.me> |
| In reply to | #16258 |
Arno Welzel wrote: > crankypuss schrieb am 2016-01-13 um 23:54: > >> When building PHP from source, I want to set the default timezone to >> UTC via some .config option, is there such an option? > > No, there isn't. > > See <http://php.net/manual/en/configure.about.php>. Why should I read again the same text that is provided by ".configure -- help"? >> What I've found is, >> >> "To assign environment variables (e.g., CC, CFLAGS...), specify them >> as VAR=VALUE." > > Yes - but this has nothing to do with the default timezone PHP uses at > runtime. See > <http://php.net/manual/en/datetime.configuration.php#ini.date.timezone>. > > Even if TZ is set this makes no difference for compilation. One of the reasons I want to build PHP from source is so I'm not constantly hounded by whatever is deprecated this week. If there's no option I can use when building it that will shut off the damned idiotic warning, I'll just hunt it down and remove it. Thanks. -- http://totally-portable-software.blogspot.com [Sun Nov 22: "Total Portability is not binary"]
[toc] | [prev] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2016-01-14 08:45 +0100 |
| Message-ID | <56975237.1070907@arnowelzel.de> |
| In reply to | #16264 |
crankypuss schrieb am 2016-01-14 um 08:13: > Arno Welzel wrote: > >> crankypuss schrieb am 2016-01-13 um 23:54: >> >>> When building PHP from source, I want to set the default timezone to >>> UTC via some .config option, is there such an option? >> >> No, there isn't. >> >> See <http://php.net/manual/en/configure.about.php>. > > Why should I read again the same text that is provided by ".configure -- > help"? I just mentioned it because I was not sure if you did read it at all or you may believe ".configure --help" will not show all possible options. >>> What I've found is, >>> >>> "To assign environment variables (e.g., CC, CFLAGS...), specify them >>> as VAR=VALUE." >> >> Yes - but this has nothing to do with the default timezone PHP uses at >> runtime. See >> > <http://php.net/manual/en/datetime.configuration.php#ini.date.timezone>. >> >> Even if TZ is set this makes no difference for compilation. > > One of the reasons I want to build PHP from source is so I'm not > constantly hounded by whatever is deprecated this week. If there's no > option I can use when building it that will shut off the damned idiotic > warning, I'll just hunt it down and remove it. Things do not become deprecated from one week to the next. They become deprecated between PHP major version updates - e.g. from PHP 5.6 to 7. And these changes don't happen every week and are well documented - and not many things become deprecated at all each release: <http://php.net/manual/en/migration70.deprecated.php> <http://php.net/manual/en/migration56.deprecated.php> -- Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de http://fahrradzukunft.de
[toc] | [prev] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2016-01-14 08:49 +0100 |
| Message-ID | <56975301.8000108@arnowelzel.de> |
| In reply to | #16266 |
Arno Welzel schrieb am 2016-01-14 um 08:45: > crankypuss schrieb am 2016-01-14 um 08:13: > >> Arno Welzel wrote: >> >>> crankypuss schrieb am 2016-01-13 um 23:54: >>> >>>> When building PHP from source, I want to set the default timezone to >>>> UTC via some .config option, is there such an option? >>> >>> No, there isn't. >>> >>> See <http://php.net/manual/en/configure.about.php>. >> >> Why should I read again the same text that is provided by ".configure -- >> help"? > > I just mentioned it because I was not sure if you did read it at all or > you may believe ".configure --help" will not show all possible options. > >>>> What I've found is, >>>> >>>> "To assign environment variables (e.g., CC, CFLAGS...), specify them >>>> as VAR=VALUE." >>> >>> Yes - but this has nothing to do with the default timezone PHP uses at >>> runtime. See >>> >> <http://php.net/manual/en/datetime.configuration.php#ini.date.timezone>. >>> >>> Even if TZ is set this makes no difference for compilation. >> >> One of the reasons I want to build PHP from source is so I'm not >> constantly hounded by whatever is deprecated this week. If there's no >> option I can use when building it that will shut off the damned idiotic >> warning, I'll just hunt it down and remove it. > > Things do not become deprecated from one week to the next. They become > deprecated between PHP major version updates - e.g. from PHP 5.6 to 7. > And these changes don't happen every week and are well documented - and > not many things become deprecated at all each release: > > <http://php.net/manual/en/migration70.deprecated.php> > <http://php.net/manual/en/migration56.deprecated.php> Oh - and BTW: deprecation also means that a feature may get *removed* completely in the future. So it is really not helpful to just remove deprecation warnings as you need to change your code to work with future PHP versions as well. -- Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de http://fahrradzukunft.de
[toc] | [prev] | [next] | [standalone]
| From | crankypuss <invalid@invalid.invalid> |
|---|---|
| Date | 2016-01-14 10:19 -0700 |
| Message-ID | <n78l56$dkm$1@dont-email.me> |
| In reply to | #16267 |
Arno Welzel wrote: > Arno Welzel schrieb am 2016-01-14 um 08:45: > >> crankypuss schrieb am 2016-01-14 um 08:13: >> >>> Arno Welzel wrote: >>> >>>> crankypuss schrieb am 2016-01-13 um 23:54: >>>> >>>>> When building PHP from source, I want to set the default timezone >>>>> to UTC via some .config option, is there such an option? >>>> >>>> No, there isn't. >>>> >>>> See <http://php.net/manual/en/configure.about.php>. >>> >>> Why should I read again the same text that is provided by >>> ".configure -- help"? >> >> I just mentioned it because I was not sure if you did read it at all >> or you may believe ".configure --help" will not show all possible >> options. >> >>>>> What I've found is, >>>>> >>>>> "To assign environment variables (e.g., CC, CFLAGS...), specify >>>>> them as VAR=VALUE." >>>> >>>> Yes - but this has nothing to do with the default timezone PHP uses >>>> at runtime. See >>>> >>> <http://php.net/manual/en/datetime.configuration.php#ini.date.timezone>. >>>> >>>> Even if TZ is set this makes no difference for compilation. >>> >>> One of the reasons I want to build PHP from source is so I'm not >>> constantly hounded by whatever is deprecated this week. If there's >>> no option I can use when building it that will shut off the damned >>> idiotic warning, I'll just hunt it down and remove it. >> >> Things do not become deprecated from one week to the next. They >> become deprecated between PHP major version updates - e.g. from PHP >> 5.6 to 7. And these changes don't happen every week and are well >> documented - and not many things become deprecated at all each >> release: >> >> <http://php.net/manual/en/migration70.deprecated.php> >> <http://php.net/manual/en/migration56.deprecated.php> > > Oh - and BTW: deprecation also means that a feature may get *removed* > completely in the future. > > So it is really not helpful to just remove deprecation warnings as you > need to change your code to work with future PHP versions as well. If I look far enough into my future (and hopefully it isn't very far), I see no PHP there. For me, PHP is an interim measure, the pseudocode in which I've implemented a whole lot of imperfect but working functionality. And by the way, the only reason I'm bothering to build PHP from the source is so that people can't *remove* features and break my code before I have a chance to finish it (and, so I can run PHP code on a system with no PHP and no freakin' config files). Enjoy looking wise while it lasts, nothing is forever. -- http://totally-portable-software.blogspot.com [Sun Nov 22: "Total Portability is not binary"]
[toc] | [prev] | [next] | [standalone]
| From | Arno Welzel <usenet@arnowelzel.de> |
|---|---|
| Date | 2016-01-14 20:09 +0100 |
| Message-ID | <5697F274.40000@arnowelzel.de> |
| In reply to | #16272 |
crankypuss schrieb am 2016-01-14 um 18:19: > Arno Welzel wrote: [...] >> So it is really not helpful to just remove deprecation warnings as you >> need to change your code to work with future PHP versions as well. > > If I look far enough into my future (and hopefully it isn't very far), I > see no PHP there. For me, PHP is an interim measure, the pseudocode in > which I've implemented a whole lot of imperfect but working > functionality. > > And by the way, the only reason I'm bothering to build PHP from the > source is so that people can't *remove* features and break my code > before I have a chance to finish it (and, so I can run PHP code on a > system with no PHP and no freakin' config files). Then either stick with an older version of PHP or use your time to implement your stuff in another language - e.g. C++. -- Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de http://fahrradzukunft.de
[toc] | [prev] | [next] | [standalone]
| From | Tim Streater <timstreater@greenbee.net> |
|---|---|
| Date | 2016-01-15 11:22 +0000 |
| Message-ID | <150120161122102384%timstreater@greenbee.net> |
| In reply to | #16272 |
In article <n78l56$dkm$1@dont-email.me>, crankypuss <invalid@invalid.invalid> wrote: >If I look far enough into my future (and hopefully it isn't very far), I >see no PHP there. For me, PHP is an interim measure, the pseudocode in >which I've implemented a whole lot of imperfect but working >functionality. > >And by the way, the only reason I'm bothering to build PHP from the >source is so that people can't *remove* features and break my code >before I have a chance to finish it (and, so I can run PHP code on a >system with no PHP and no freakin' config files). So what are you going to use instead of PHP then? Magic? -- Lady Astor: "If you were my husband I'd give you poison." Churchill: "If you were my wife, I'd drink it."
[toc] | [prev] | [next] | [standalone]
| From | crankypuss <invalid@invalid.invalid> |
|---|---|
| Date | 2016-01-15 08:53 -0700 |
| Message-ID | <n7b4gq$ltt$1@dont-email.me> |
| In reply to | #16287 |
Tim Streater wrote: > In article <n78l56$dkm$1@dont-email.me>, crankypuss > <invalid@invalid.invalid> wrote: > >>If I look far enough into my future (and hopefully it isn't very far), >>I >>see no PHP there. For me, PHP is an interim measure, the pseudocode >>in which I've implemented a whole lot of imperfect but working >>functionality. >> >>And by the way, the only reason I'm bothering to build PHP from the >>source is so that people can't *remove* features and break my code >>before I have a chance to finish it (and, so I can run PHP code on a >>system with no PHP and no freakin' config files). > > So what are you going to use instead of PHP then? Magic? That's probably as good a name as anything, but naming things is always difficult. PHP has some useful features like associative storage, its method of specifying string data, its arithmetic, and a few other things. But it also carries along a lot of baggage, most of it based on assumptions like "this is a web-page generating language!", and the idea that it has to provide support for a whole bunch of stuff that I find useless (like mySQL, builtin session support, etc). I'm looking at a whole different ballpark than the one PHP was developed for, PHP just happens to be the language that I've developed a lot of useful code in, so converting that code to another language with similar features should be easier than rewriting it from scratch (although conversions often do seem to turn into rewrites). Instead of a "Hypertext Preprocessor" what I'm look at is a scripting language for a new portable "desktop environment", kinda-sorta like Android uses Java, only the OS and the application languages will be the same. Curiosity satisfied? If not see below. -- http://totally-portable-software.blogspot.com [Sun Nov 22: "Total Portability is not binary"]
[toc] | [prev] | [next] | [standalone]
| From | Tim Streater <timstreater@greenbee.net> |
|---|---|
| Date | 2016-01-15 17:40 +0000 |
| Message-ID | <150120161740399745%timstreater@greenbee.net> |
| In reply to | #16288 |
In article <n7b4gq$ltt$1@dont-email.me>, crankypuss <invalid@invalid.invalid> wrote: >Tim Streater wrote: > >> In article <n78l56$dkm$1@dont-email.me>, crankypuss >> <invalid@invalid.invalid> wrote: >> >>>If I look far enough into my future (and hopefully it isn't very far), >>>I >>>see no PHP there. For me, PHP is an interim measure, the pseudocode >>>in which I've implemented a whole lot of imperfect but working >>>functionality. >>> >>>And by the way, the only reason I'm bothering to build PHP from the >>>source is so that people can't *remove* features and break my code >>>before I have a chance to finish it (and, so I can run PHP code on a >>>system with no PHP and no freakin' config files). >> >> So what are you going to use instead of PHP then? Magic? > >That's probably as good a name as anything, but naming things is always >difficult. > >PHP has some useful features like associative storage, its method of >specifying string data, its arithmetic, and a few other things. But it >also carries along a lot of baggage, most of it based on assumptions >like "this is a web-page generating language!", and the idea that it has >to provide support for a whole bunch of stuff that I find useless (like >mySQL, builtin session support, etc). I use PHP it whenever I want an ordinary unix script to do something or other, nothing to do with web pages. I find also that the wide range of things that PHP can interface to (such as, in my case, SQLite, sockets, ...) and its string handling to be very useful (there are those who might complain about naming conventions for its library functions but life's too short to care about that). That its syntax is similar to C is very helpful too. I have an app that runs in a browser (so its mostly javascript) and uses ajax/apache to communicate with a bunch of PHP scripts on the same machine. None of those scripts generates any html, they just return data that I parse in the browser to decide how to modify the DOM. I develop under OS X; what's been particularly useful there is that it comes standard with PHP and apache - so nothing to download. IOW, there are other uses for PHP than just generating html. >I'm looking at a whole different ballpark than the one PHP was developed >for, PHP just happens to be the language that I've developed a lot of >useful code in, so converting that code to another language with similar >features should be easier than rewriting it from scratch (although >conversions often do seem to turn into rewrites). Instead of a >"Hypertext Preprocessor" what I'm look at is a scripting language for a >new portable "desktop environment", kinda-sorta like Android uses Java, >only the OS and the application languages will be the same. > >Curiosity satisfied? If not see below. <grin> That's one reason I'm using PHP. Mind you, it is expensive in resources to get apache to fire up PHP so I can run a short script. At the minute I'm looking to redo my app in Xojo and so far it's looking a lot faster. Too bad about their language, mind - I can lay out PHP scripts to be far more legible than in their glorified Basic, and I find strict typing to be irksome. -- HAL 9000: Dave. Put down those Windows disks. Dave. DAVE!
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2016-01-15 18:51 +0100 |
| Subject | PHP in a local environment (was: how to set default timezone as a .config argument?) |
| Message-ID | <n7bbi9$h76$1@solani.org> |
| In reply to | #16290 |
Tim Streater wrote: > That's one reason I'm using PHP. Mind you, it is expensive in resources > to get apache to fire up PHP so I can run a short script. At the minute > I'm looking to redo my app in Xojo and so far it's looking a lot > faster. Too bad about their language, mind - I can lay out PHP scripts > to be far more legible than in their glorified Basic, and I find strict > typing to be irksome. Have you tried to use PHP's built-in webserver instead of Apache? That might improve overall performance. And of course enabling OPcache may also be very useful. -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | crankypuss <invalid@invalid.invalid> |
|---|---|
| Date | 2016-01-15 11:00 -0700 |
| Subject | Re: PHP in a local environment (was: how to set default timezone as a .config argument?) |
| Message-ID | <n7bbvd$lji$1@dont-email.me> |
| In reply to | #16291 |
Christoph M. Becker wrote: > Tim Streater wrote: > >> That's one reason I'm using PHP. Mind you, it is expensive in >> resources to get apache to fire up PHP so I can run a short script. >> At the minute I'm looking to redo my app in Xojo and so far it's >> looking a lot faster. Too bad about their language, mind - I can lay >> out PHP scripts to be far more legible than in their glorified Basic, >> and I find strict typing to be irksome. > > Have you tried to use PHP's built-in webserver instead of Apache? That's a new one to me, didn't know it had such a thing. Kitchen sink, too? Will it trim my toenails? <g> -- http://totally-portable-software.blogspot.com [Sun Nov 22: "Total Portability is not binary"]
[toc] | [prev] | [next] | [standalone]
| From | Tim Streater <timstreater@greenbee.net> |
|---|---|
| Date | 2016-01-15 20:41 +0000 |
| Subject | Re: PHP in a local environment (was: how to set default timezone as a .config argument?) |
| Message-ID | <150120162041159631%timstreater@greenbee.net> |
| In reply to | #16291 |
In article <n7bbi9$h76$1@solani.org>, Christoph M. Becker <cmbecker69@arcor.de> wrote: >Tim Streater wrote: > >> That's one reason I'm using PHP. Mind you, it is expensive in resources >> to get apache to fire up PHP so I can run a short script. At the minute >> I'm looking to redo my app in Xojo and so far it's looking a lot >> faster. Too bad about their language, mind - I can lay out PHP scripts >> to be far more legible than in their glorified Basic, and I find strict >> typing to be irksome. > >Have you tried to use PHP's built-in webserver instead of Apache? That >might improve overall performance. And of course enabling OPcache may >also be very useful. I looked into that briefly, but can it manage to service a number of asynchronous requests? And can it have a config file so I can initialise PHP with a timezone? Hmm, is this where we started? -- "People don't buy Microsoft for quality, they buy it for compatibility with what Bob in accounting bought last year. Trace it back - they buy Microsoft because the IBM Selectric didn't suck much" - P Seebach, afc
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2016-01-17 16:36 +0100 |
| Subject | Re: PHP in a local environment |
| Message-ID | <n7gcdm$65n$1@solani.org> |
| In reply to | #16293 |
On 15.01.2016 at 21:41 Tim Streater wrote: > In article <n7bbi9$h76$1@solani.org>, Christoph M. Becker > <cmbecker69@arcor.de> wrote: > >> Have you tried to use PHP's built-in webserver instead of Apache? That >> might improve overall performance. And of course enabling OPcache may >> also be very useful. > > I looked into that briefly, but can it manage to service a number of > asynchronous requests? The built-in webserver is single-threaded, so it is not possible to do "nested" requests to the same server (e.g. from a PHP script), but there shouldn't be any problems with asynchronous client-side requests. > And can it have a config file so I can > initialise PHP with a timezone? Yes, php.ini is loaded as usual. -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | Tim Streater <timstreater@greenbee.net> |
|---|---|
| Date | 2016-01-17 15:54 +0000 |
| Subject | Re: PHP in a local environment |
| Message-ID | <170120161554051239%timstreater@greenbee.net> |
| In reply to | #16298 |
In article <n7gcdm$65n$1@solani.org>, Christoph M. Becker <cmbecker69@arcor.de> wrote: >On 15.01.2016 at 21:41 Tim Streater wrote: > >> In article <n7bbi9$h76$1@solani.org>, Christoph M. Becker >> <cmbecker69@arcor.de> wrote: >> >>> Have you tried to use PHP's built-in webserver instead of Apache? That >>> might improve overall performance. And of course enabling OPcache may >>> also be very useful. >> >> I looked into that briefly, but can it manage to service a number of >> asynchronous requests? > >The built-in webserver is single-threaded, so it is not possible to do >"nested" requests to the same server (e.g. from a PHP script), but there >shouldn't be any problems with asynchronous client-side requests. I put a counter into the "client-side" part of my app which showed a high-water mark of 16 AJAX requests on the go at once. This was at startup of the app. The apache config file (also created on the fly) allowed a max of 10 workers. >> And can it have a config file so I can >> initialise PHP with a timezone? > >Yes, php.ini is loaded as usual. Hmmm. I'd need to create a php.ini on the fly then and ensure that scripts were able to use it. I suppose there'd need to be a startup script to do that, which relied on whatever default php.ini there was. Hmmm again. Something to try perhaps if the path I'm following at the moment breaks down. -- "People don't buy Microsoft for quality, they buy it for compatibility with what Bob in accounting bought last year. Trace it back - they buy Microsoft because the IBM Selectric didn't suck much" - P Seebach, afc
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2016-01-16 01:21 +0000 |
| Message-ID | <87y4bqfhfh.fsf@bsb.me.uk> |
| In reply to | #16290 |
Tim Streater <timstreater@greenbee.net> writes: <snip> > I use PHP it whenever I want an ordinary unix script to do something or > other, nothing to do with web pages. <snip> > I develop under OS X; what's been particularly useful there is that it > comes standard with PHP and apache - so nothing to download. > > IOW, there are other uses for PHP than just generating html. <snip> > That's one reason I'm using PHP. Mind you, it is expensive in resources > to get apache to fire up PHP so I can run a short script. These remarks look odd to me since PHP has a command-line interface to run scrips. Maybe it's not available for OS X, or maybe I'm just misunderstanding something you've said, but running "an ordinary unix script" written in PHP does not need Apache or any other web server. <snip> -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | Michael Vilain <vilain@NOspamcop.net> |
|---|---|
| Date | 2016-01-15 18:25 -0800 |
| Message-ID | <vilain-BCDE44.18252315012016@news.individual.net> |
| In reply to | #16294 |
In article <87y4bqfhfh.fsf@bsb.me.uk>, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote: > Tim Streater <timstreater@greenbee.net> writes: > <snip> > > I use PHP it whenever I want an ordinary unix script to do something or > > other, nothing to do with web pages. > <snip> > > I develop under OS X; what's been particularly useful there is that it > > comes standard with PHP and apache - so nothing to download. > > > > IOW, there are other uses for PHP than just generating html. > <snip> > > That's one reason I'm using PHP. Mind you, it is expensive in resources > > to get apache to fire up PHP so I can run a short script. > > These remarks look odd to me since PHP has a command-line interface to > run scrips. Maybe it's not available for OS X, or maybe I'm just > misunderstanding something you've said, but running "an ordinary unix > script" written in PHP does not need Apache or any other web server. > > <snip> CentOS and Fedora's php-server package have a php.ini file that's installed and has defaults for the timezone. php 5.4 required that you set the defaults, so when I installed php via puppet, I had to edit these files to change the values. /etc/php.ini /etc/php.ini.default I modified date.default_latitude date.default_longitude date.timezone to set those values for the site. I did the same for MacOS when phpMyAdmin started giving me errors, but I used the command-line and vi to do it. -- DeeDee, don't press that button! DeeDee! NO! Dee... [I filter all Goggle Groups posts, so any reply may be automatically ignored]
[toc] | [prev] | [next] | [standalone]
| From | Tim Streater <timstreater@greenbee.net> |
|---|---|
| Date | 2016-01-16 08:25 +0000 |
| Message-ID | <160120160825215037%timstreater@greenbee.net> |
| In reply to | #16294 |
In article <87y4bqfhfh.fsf@bsb.me.uk>, Ben Bacarisse <ben.usenet@bsb.me.uk> wrote: >Tim Streater <timstreater@greenbee.net> writes: ><snip> >> I use PHP it whenever I want an ordinary unix script to do something or >> other, nothing to do with web pages. ><snip> >> I develop under OS X; what's been particularly useful there is that it >> comes standard with PHP and apache - so nothing to download. >> >> IOW, there are other uses for PHP than just generating html. ><snip> >> That's one reason I'm using PHP. Mind you, it is expensive in resources >> to get apache to fire up PHP so I can run a short script. > >These remarks look odd to me since PHP has a command-line interface to >run scrips. Maybe it's not available for OS X, or maybe I'm just >misunderstanding something you've said, but running "an ordinary unix >script" written in PHP does not need Apache or any other web server. I'm talking about two separate things. Just running a script from the command line doesn't need apache, of course. If I'm running an app in a browser, then it does, if I want some data that requires a PHP script to provide it. See: http://www.iletter.org.uk -- "I am enclosing two tickets to the first night of my new play; bring a friend.... if you have one." - GB Shaw to Churchill "Cannot possibly attend first night, will attend second... if there is one." - Winston Churchill, in response.
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2016-01-16 11:55 +0000 |
| Message-ID | <87h9idg2m9.fsf@bsb.me.uk> |
| In reply to | #16296 |
Tim Streater <timstreater@greenbee.net> writes: > In article <87y4bqfhfh.fsf@bsb.me.uk>, Ben Bacarisse > <ben.usenet@bsb.me.uk> wrote: > >>Tim Streater <timstreater@greenbee.net> writes: >><snip> >>> I use PHP it whenever I want an ordinary unix script to do something or >>> other, nothing to do with web pages. >><snip> >>> I develop under OS X; what's been particularly useful there is that it >>> comes standard with PHP and apache - so nothing to download. >>> >>> IOW, there are other uses for PHP than just generating html. >><snip> >>> That's one reason I'm using PHP. Mind you, it is expensive in resources >>> to get apache to fire up PHP so I can run a short script. >> >>These remarks look odd to me since PHP has a command-line interface to >>run scrips. Maybe it's not available for OS X, or maybe I'm just >>misunderstanding something you've said, but running "an ordinary unix >>script" written in PHP does not need Apache or any other web server. > > I'm talking about two separate things. Just running a script from the > command line doesn't need apache, of course. I suspected I'd got the wrong end of the stick. <snip> -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2016-01-14 11:57 +0100 |
| Message-ID | <n77uu0$t86$1@solani.org> |
| In reply to | #16264 |
crankypuss wrote: > Arno Welzel wrote: > >> Yes - but this has nothing to do with the default timezone PHP uses at >> runtime. See >> > <http://php.net/manual/en/datetime.configuration.php#ini.date.timezone>. >> >> Even if TZ is set this makes no difference for compilation. > > One of the reasons I want to build PHP from source is so I'm not > constantly hounded by whatever is deprecated this week. But rather accept that you ship a PHP engine that has bugs and even vulnerabilities? > If there's no > option I can use when building it that will shut off the damned idiotic > warning, I'll just hunt it down and remove it. Instead I suggest that you make sure that PHP is started with the option set to a reasonable value, e.g. php -d date.timezone=UTC index.php or use PHP 7, where the warning will not be thrown at all. -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | comp.lang.php
csiph-web