Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-01-21 07:12:17

tmacwrig
Archived Plugin Author
Registered: 2004-03-06
Posts: 204
Website

32K plugin yields 8MB plugin file

Could this be possible? My plugin’s text source is consistently yielding an 8MB plugin file. Of course this is way too big for txp to load without dying, so I’m not sure what’s going on at the other end. This is using zem_tpl.php and classTextile. I know it’s a (very) big plugin, but this is a little strange. base64_encode should only increase file size by 33% or so, according to PHP docs. What’s going on here?

Edit: now it outputs a 1k file which only contains <?php?>

Last edited by tmacwrig (2006-01-21 18:34:43)

Offline

#2 2006-01-21 21:54:30

tmacwrig
Archived Plugin Author
Registered: 2004-03-06
Posts: 204
Website

Re: 32K plugin yields 8MB plugin file

Oh, and ignore that
// —- BEGIN PLUGIN CODE —-

has been changed to
  1. —- BEGIN PLUGIN CODE —-

in the actual code.

Offline

#3 2006-01-21 22:04:05

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: 32K plugin yields 8MB plugin file

For starters, get rid of $test = true.


Alex

Offline

#4 2006-01-23 19:59:17

tmacwrig
Archived Plugin Author
Registered: 2004-03-06
Posts: 204
Website

Re: 32K plugin yields 8MB plugin file

This is the updated source file which is still returning a plugin file that only contains <?php ?>

Offline

#5 2006-01-23 20:43:13

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: 32K plugin yields 8MB plugin file

I can compile it just fine.

Try removing the @ in front of the include of zem_tpl.php and see if you get any error when trying to compile. Are you sure that it resides one directory up from where your plugin is?

Offline

#6 2006-01-23 23:23:52

tmacwrig
Archived Plugin Author
Registered: 2004-03-06
Posts: 204
Website

Re: 32K plugin yields 8MB plugin file

egh, this is really ridiculous. I can’t get it to compile even if i make a completely new location on the server and specify the full address for zem_tpl.php. Still nothing. Also it’s inducing 500 errors on my Textpattern interface now.

Last edited by tmacwrig (2006-01-23 23:24:12)

Offline

#7 2006-01-23 23:26:04

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: 32K plugin yields 8MB plugin file

Get rid of the @ in front of

@include_once('../zem_tpl.php');

sounds like it’s including the wrong file, or failing to include it at all.


Alex

Offline

#8 2006-01-23 23:29:27

tmacwrig
Archived Plugin Author
Registered: 2004-03-06
Posts: 204
Website

Re: 32K plugin yields 8MB plugin file

i’ve gotten rid of it and it’s still creating huge / small files. i’m beginning to think that it’s compiling php.cgi.

Offline

#9 2006-01-23 23:48:00

tmacwrig
Archived Plugin Author
Registered: 2004-03-06
Posts: 204
Website

Re: 32K plugin yields 8MB plugin file

Oh, and this is exactly the code that is trying to compile here. And the zem_tpl.php is exactly stock, as is classTextile.php

Last edited by tmacwrig (2006-01-23 23:48:53)

Offline

#10 2006-01-24 00:58:53

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: 32K plugin yields 8MB plugin file

Best suggestion I have is to do some good old-fashioned var_dump() debugging in zem_tpl.php.


Alex

Offline

#11 2006-01-24 01:12:03

tmacwrig
Archived Plugin Author
Registered: 2004-03-06
Posts: 204
Website

Re: 32K plugin yields 8MB plugin file

Offline

#12 2006-01-24 01:35:53

tmacwrig
Archived Plugin Author
Registered: 2004-03-06
Posts: 204
Website

Re: 32K plugin yields 8MB plugin file

egh, okay. here’s the deal. I’m on dreamhost. compile_plugin() uses SCRIPTNAME to get the filename. since it’s running as php-cgi, SCRIPTNAME is apparently /dh/cgi-system/php.cgi.

let this be a warning to others.

Offline

Board footer

Powered by FluxBB