Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
Re: 32K plugin yields 8MB plugin file
Oh, and ignore that
// —- BEGIN PLUGIN CODE —-
- —- 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
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
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
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
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
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
Re: 32K plugin yields 8MB plugin file
Offline
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