Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2022-11-24 10:41:10

Gallex
Member
Registered: 2006-10-08
Posts: 1,305

Badly formed or empty plugin code

fresh install
Textpattern version: 4.8.8
PHP version: 5.6.40-pl9-zoneos

tying to install some plugins but getting error all time:

 Badly formed or empty plugin code.

i know, PHP is very old, but year ago, i was able to install TXP 4.8.7 and plugins to this same server

Offline

#2 2022-11-24 11:20:06

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,138
Website

Re: Badly formed or empty plugin code

How are you installing those ? Are the plugins in .txt format (paste in the textarea) or a .php or .zip file (uploading) ?

I am not sure of that old version of PHP can handle the latter, especially the zip format. In that case, it should give a more meaningful error message though.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#3 2022-11-24 12:39:28

Gallex
Member
Registered: 2006-10-08
Posts: 1,305

Re: Badly formed or empty plugin code

phiw13 wrote #334197:

How are you installing those ? Are the plugins in .txt format (paste in the textarea) or a .php or .zip file (uploading) ?

in .txt format

Offline

#4 2022-11-24 13:22:22

etc
Developer
Registered: 2010-11-11
Posts: 5,133
Website GitHub

Re: Badly formed or empty plugin code

There has been no important changes concerning plugins between 4.8.7 and 4.8.8. Yesterday, I have updated a .txt plugin on php 5.4.8 without any hassle.

Do you see the plugin preview step, or the error is thrown before it?

Offline

#5 2022-11-24 13:26:06

Gallex
Member
Registered: 2006-10-08
Posts: 1,305

Re: Badly formed or empty plugin code

etc wrote #334200:

Do you see the plugin preview step, or the error is thrown before it?

after hitting button ‘‘upload’‘

Offline

#6 2022-11-24 13:28:40

etc
Developer
Registered: 2010-11-11
Posts: 5,133
Website GitHub

Re: Badly formed or empty plugin code

Could you post .txt plugins code here please?

Offline

#7 2022-11-24 13:54:35

Gallex
Member
Registered: 2006-10-08
Posts: 1,305

Re: Badly formed or empty plugin code

# rvm_maintenance v0.5
# Maintenance Mode
#
# License: GNU GPLv2 or later
#
# Ruud van Melick
# http://vanmelick.com/

# ......................................................................
# This is a plugin for Textpattern - http://textpattern.com/
# To install: textpattern > admin > plugins
# Paste the following text into the 'Install plugin' box:
# ......................................................................

YTo5OntzOjc6InZlcnNpb24iO3M6MzoiMC41IjtzOjY6ImF1dGhvciI7czoxNToiUnV1ZCB2
YW4gTWVsaWNrIjtzOjEwOiJhdXRob3JfdXJpIjtzOjIxOiJodHRwOi8vdmFubWVsaWNrLmNv
bS8iO3M6MTE6ImRlc2NyaXB0aW9uIjtzOjE2OiJNYWludGVuYW5jZSBNb2RlIjtzOjQ6InR5
cGUiO2k6MDtzOjQ6Im5hbWUiO3M6MTU6InJ2bV9tYWludGVuYW5jZSI7czo0OiJoZWxwIjtz
OjEwMDM6Igk8aDE+TWFpbnRlbmFuY2UgTW9kZTwvaDE+CgoJPHA+VGhpcyBwbHVnaW4sIHdo
ZW4gYWN0aXZhdGVkLCB3aWxsIHNob3cgYSBtYWludGVuYW5jZSBwYWdlIHRvIGFsbCB2aXNp
dG9ycyB3aG8gYXJlIG5vdCBsb2dnZWQgaW4gb24gdGhlIGFkbWluIHNpZGUgb2YgVGV4dHBh
dHRlcm4uPC9wPgoKCTxwPkFmdGVyIGVuYWJsaW5nIHRoZSBwbHVnaW4sIGNsaWNrIHRoZSA8
ZW0+VmlldyBTaXRlPC9lbT4gdGFiLiBUaGlzIHdpbGwgYWxsb3cgeW91IHRvIHNlZSB3aGF0
IHlvdXIgd2Vic2l0ZSB3aWxsIGxvb2sgbGlrZSB0byB2aXNpdG9ycyBvbmNlIHRoZSBtYWlu
dGVuYW5jZSBtb2RlIGlzIGRlYWN0aXZhdGVkLjwvcD4KCgk8cD5UaGVyZSBhcmUgdHdvIHdh
eXMgdG8gY3VzdG9taXplIHRoZSBtYWludGVuYW5jZSBtb2RlIGVycm9yIHBhZ2U8c3VwIGNs
YXNzPSJmb290bm90ZSI+PGEgaHJlZj0iI2ZuMjA5MjUzNjA1OTU2OWNiN2JjZGYxNjEiPjE8
L2E+PC9zdXA+OgoJPG9sPg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ZXRleHRfZW5k
Jyk7CiAgfQp9CgpmdW5jdGlvbiBydm1fbWFpbnRlbmFuY2UoKQp7CiAgICB0eHBfZGllKCdT
aXRlIG1haW50ZW5hbmNlIGluIHByb2dyZXNzLiBQbGVhc2UgY2hlY2sgYmFjayBsYXRlci4n
LCA1MDMpOwp9CiI7czozOiJtZDUiO3M6MzI6IjU0M2YyOGU0NTQyNDM0YzYwYzBiNjgwYWU2
NzY0YTNiIjt9

Offline

#8 2022-11-24 13:59:20

Gallex
Member
Registered: 2006-10-08
Posts: 1,305

Re: Badly formed or empty plugin code

..it reacts so for every plugin i try to install.

Offline

#9 2022-11-24 14:00:45

etc
Developer
Registered: 2010-11-11
Posts: 5,133
Website GitHub

Re: Badly formed or empty plugin code

Looks ok. Have you tried to upload it in Debug mode?

Offline

#10 2022-11-24 14:40:53

Gallex
Member
Registered: 2006-10-08
Posts: 1,305

Re: Badly formed or empty plugin code

etc wrote #334206:

Have you tried to upload it in Debug mode?

TXP in debug mode? actually it is.
diagnostic tool says: ‘‘all checks passed’‘.

Offline

#11 2022-11-24 14:47:17

etc
Developer
Registered: 2010-11-11
Posts: 5,133
Website GitHub

Re: Badly formed or empty plugin code

Ah, it must be this bug. Can you edit textpattern/vendors/Textpattern/Plugin/Plugin.php file and replace

$plugin = unserialize($plugin, array());

on line 188 with

$plugin = unserialize($plugin);

Offline

#12 2022-11-25 07:59:06

Gallex
Member
Registered: 2006-10-08
Posts: 1,305

Re: Badly formed or empty plugin code

etc wrote #334208:

Ah, it must be this bug. Can you edit textpattern/vendors/Textpattern/Plugin/Plugin.php file and replace

genius!! yes, that was it! thank you, oleg!

Offline

Board footer

Powered by FluxBB