xenocrat / chyrp-lite

An ultra-lightweight blogging engine, written in PHP.
https://chyrplite.net/
BSD 3-Clause "New" or "Revised" License
417 stars 44 forks source link

Chyrp Lite "Coal" does not work under PHP 8.1 in my case #163

Closed Torsten-K closed 1 year ago

Torsten-K commented 2 years ago

Chyrp Lite "Coal" used to work under PHP 8.0, but it does not under PHP 8.1 (standard web hosting, Apache 2.4). The following error message appears, and the page won’t load:

urlencode(): Passing null to parameter #1 ($string) of type string is deprecated

This issue is described in general on Stack Overflow, but as I am not a programmer, I cannot do the suggested fixes. At least I don’t know where in the code I could fix this. So my question is: Will there be a new Chyrp Lite version in the near future?

xenocrat commented 2 years ago

Hello there,

This should be fixed in the development branch. Next release is due in November, targeting PHP 8.0, 8.1, and 8.2.

Torsten-K commented 2 years ago

Hi Daniel,

yes, the recent development version works fine on PHP 8.1. I only could not upgrade, because a database error appeared, which I cannot remember, something that a conversion of table config failed. I made a fresh install using a new database. But don't worry, my Chyrp Lite was not in productive status, but only in the private area for testing purposes, with a few entries that I can restore from the old database.

Thank you for your excellent blog system, and if I didn't have so many posts on my two blogs running on ClassicPress, I would definitely use Chyrp Lite.

Cheers, Torsten

xenocrat commented 2 years ago

Thanks for continuing to test. Feedback and bug reports are always welcome!

Torsten-K commented 2 years ago

Another test of upgrading "Coal" to recent development version. Here are more informations:

Error Database error: SQLSTATE[HY000]: General error: 3780 Referencing column 'fk_c_country_code' and referenced column 'pk_c_code' in foreign key constraint 'oc_t_city_ibfk_2' are incompatible.

Query string ALTER TABLE "oc_t_city" CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci

Parameter Array ( )

Backtrace

  1. includes/class/Query.php in line 192
  2. includes/class/Query.php in line 116
  3. includes/class/SQL.php in line 179
  4. upgrade.php in line 504
  5. upgrade.php in line 504
xenocrat commented 2 years ago

Thanks. The table “oc_t_city” doesn’t belong to Chyrp Lite. A web search indicates it likely belongs to some software called “osclass”.

When you create a MySQL database for Chyrp Lite, it’s best to use it only for Chyrp Lite otherwise this kind of thing can happen.

Torsten-K commented 2 years ago

Ah, okay, thanks for the information. In deed, I run different CMSs on one database, though every CMS has its own table prefix. Anyway, this time I created a new database for the fresh installation of Chyrp Lite Dev. So everything should work fine from now on.

xenocrat commented 2 years ago

I’m glad we resolved it! Thanks again for the detailed reports.