Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#205 2020-04-24 16:30:02
Re: Textpattern CMS demo site
gaekwad wrote #322686:
Since literally nobody asked, here’s how I find the PHP
date.timezone
on a web server:
curl 'https://freegeoip.app/json/' | jq .time_zone | sed -e 's/[\/&]/\\&/g'...
that command fails for me. ran it both on local terminal and on the web server?
parse error: Invalid numeric literal at line 1, column 8
…. texted postive
Offline
#206 2020-04-24 16:32:59
Re: Textpattern CMS demo site
bici wrote #322692:
that command fails for me. ran it both on local terminal and on the web server?
parse error: Invalid numeric literal at line 1, column 8...
…and the service is currently down. So much for my 100% record!
Time to find another route.
Offline
#207 2020-04-24 16:37:07
Re: Textpattern CMS demo site
gaekwad wrote #322693:
…and the service is currently down. So much for my 100% record!
Time to find another route.
;-)
…. texted postive
Offline
#208 2020-04-28 14:55:16
Re: Textpattern CMS demo site
gaekwad wrote #322693:
…and the service is currently down. So much for my 100% record!
Time to find another route.
It’s back again. For now, at least.
So, curl
or wget
the JSON (see the URL above)…:
$ curl 'https://freegeoip.app/json/'
{"ip":"[IP ADDRESS SNIPPED]","country_code":"GB","country_name":"United Kingdom","region_code":"ENG","region_name":"England","city":"London","zip_code":"SL1","time_zone":"Europe/London","latitude":51.5353,"longitude":-0.6658,"metro_code":0}
…and then we use jq
to extract the "time_zone"
component (with a silent flag in the following example)…:
$ curl -s 'https://freegeoip.app/json/' | jq .time_zone
"Europe/London"
It looks like the schema changed when the site was down so the sed
part isn’t needed now.
Offline
#209 2020-04-28 23:29:53
Re: Textpattern CMS demo site
Is jq
a custom installed package?
If I run your command(s) locally (macOS 10.15), I get this:
zsh: command not found: jq
(23) Failed writing body
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
#210 2020-04-29 06:03:21
Re: Textpattern CMS demo site
phiw13 wrote #322742:
Is
jq
a custom installed package?
Yes. See stedolan.github.io/jq/download/ for info.
For macOS, you’re probably best off using MacPorts or Homebrew.
If you curl
or wget
the URL listed, it gives you the full JSON info about where you are, based in geolocation. jq
then strips it back to the part you want. You could do some sed
or awk
to achieve the same thing, I daresay.
Offline
#211 2020-04-29 08:49:38
Re: Textpattern CMS demo site
gaekwad wrote #322744:
Yes. See stedolan.github.io/jq/download/ for info.
Thank you. That package sound interesting for eventually messing with some JSON data. I’ll have a closer look.
Last edited by phiw13 (2020-04-29 08:49:50)
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
#212 2020-05-02 19:24:00
Re: Textpattern CMS demo site
Something is wrong with dev-demo, hope not some last commits fault:
config.php is missing or corrupt. To install Textpattern, visit textpattern/setup/.
Offline
#213 2020-05-02 20:08:33
Re: Textpattern CMS demo site
etc wrote #322796:
Something is wrong with dev-demo, hope not some last commits fault:
config.php is missing or corrupt. To install Textpattern, visit textpattern/setup/....
I will investigate – please stand by.
Offline
#214 2020-05-02 20:12:30
Re: Textpattern CMS demo site
The auto-installer tells me this:
Fatal error: Uncaught Error: Call to undefined function safe_escape() in /var/www/sites/textpattern.co/dev-demo/live/textpattern/lib/txplib_misc.php:77
Stack trace:
#0 /var/www/sites/textpattern.co/dev-demo/live/textpattern/lib/txplib_misc.php(159): doArray()
#1 /var/www/sites/textpattern.co/dev-demo/live/textpattern/vendors/Textpattern/L10n/Lang.php(523): doSlash()
#2 /var/www/sites/textpattern.co/dev-demo/live/textpattern/vendors/Textpattern/L10n/Lang.php(580): Textpattern\L10n\Lang->extract()
#3 /var/www/sites/textpattern.co/dev-demo/live/textpattern/lib/txplib_misc.php(413): Textpattern\L10n\Lang->load()
#4 /var/www/sites/textpattern.co/dev-demo/live/textpattern/lib/txplib_misc.php(320): load_lang()
#5 /var/www/sites/textpattern.co/dev-demo/live/textpattern/setup/setup_lib.php(256): gTxt()
#6 /var/www/sites/textpattern.co/dev-demo/live/textpattern/setup/setup.php(79): setup_load_lang()
#7 {main}
thrown in /var/www/sites/textpattern.co/dev-demo/live/textpattern/lib/txplib_misc.php on line 77
Is that of any help to you, etc?
Edit: that’s with PHP 7.4.5:
$ php -v
PHP 7.4.5 (cli) (built: Apr 23 2020 17:12:54) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
Last edited by gaekwad (2020-05-02 20:13:04)
Offline
#215 2020-05-05 15:35:17
Re: Textpattern CMS demo site
I am planning some work on the demo server, starting with beta-demo
and php-src-dev-demo
, then dev-demo
and release-demo
afterwards.
Expected start time: 1700UTC today.
Expected end time: 1900UTC today.
Expected outcome: some downtime, hopefully very brief. If I get it right, it should be zero, but let’s be realistic.
Thank you.
Offline
#216 2020-05-05 17:05:37
Re: Textpattern CMS demo site
Maintenance window begins.
Offline