EllisLab text mark
Advanced Search
1 of 2
1
   
Codeigniter Hook Based Plugin System
Posted: 10 August 2011 02:03 AM   [ Ignore ]   [ # 11 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-24
119 posts

Yes I left that completely intact and the directory plugins is at root level /. The two example plugins are also located in there and I ran the sql script so I have the plugins table as well.

Anything else I could be missing?

Thanks for your help

 Signature 

Everything’s under control…

 
Posted: 10 August 2011 02:34 AM   [ Ignore ]   [ # 12 ]   [ Rating: 0 ]
Avatar
Joined: 2010-08-08
304 posts

Hey, no worries! Hmm. This is a really troubling issue I haven’t seen happen before. It sounds like it could be server related, I’ll see if I can replicate on that particular version of PHP tonight, I’m just at work at the moment. What happens if you load the library manually in a test controller? Do you still get the 500 error or some other kind of error.

 Signature 

Plenty Parser - Parser library WolfAuth - Role Based Authentication library | CI Smarty - Smarty integration for Codeigniter 2.0+ | CI Plugins System - A simple hooks system.

 
Posted: 10 August 2011 04:51 AM   [ Ignore ]   [ # 13 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-24
119 posts

Hey,

Sorry about the delay in reply, I was also at work.

Tried loading from within the controller and same error.

Please let me know if you need anymore information.

This is almost a clean install of CI 2.0.2 and as I have said other libraries seem to be working normally.

Thanks,

Tim

 Signature 

Everything’s under control…

 
Posted: 14 August 2011 09:23 PM   [ Ignore ]   [ # 14 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-24
119 posts

Hello Vheissu,

Just wanted to see if you were able to reproduce the issue I am getting?

If not could you perhaps tell me what version of PHP/CI you are using.

I have tried doing a basic debug but it’s slow work because it is such a big library.

Thanks,

Tim

 Signature 

Everything’s under control…

 
Posted: 17 August 2011 01:06 AM   [ Ignore ]   [ # 15 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-24
119 posts

Hello,

I have tracked down the line where your library is crashing.

Its line 184

// If the file was included
@include_once $this->plugins_dir.$name."/".$name.".php"

I echoed $this->plugins_dir.$name.”/”.$name.”.php”; and the paths seems fine.

I appreciate that you are probably very busy, however it would be great if you could give me an indication if you are likely to pursue this in the near future.

Thanks,

Tim

 Signature 

Everything’s under control…

 
Posted: 17 August 2011 01:08 AM   [ Ignore ]   [ # 16 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-24
119 posts

Hello,

I also tested on a clean version of CI 2.0.2 on PHP Version 5.3.5.

Same 500 internal server error so I don’t think this is just my problem.

Thanks,

Tim

 Signature 

Everything’s under control…

 
Posted: 17 August 2011 08:11 PM   [ Ignore ]   [ # 17 ]   [ Rating: 0 ]
Avatar
Joined: 2010-08-08
304 posts

Out of curisosity are you loading a plugin you’ve made yourself or a plugin that came with the library? The library expects a filename of the same name as it’s parent folder in lowercase to be there. So if you have a plugin called ‘news’ (that’s the folder name) then a file called ‘news.php’ is expected inside of that folder.

Looks like it could be trying to load a plugin file that isn’t correct. Case of the name is very important.

 Signature 

Plenty Parser - Parser library WolfAuth - Role Based Authentication library | CI Smarty - Smarty integration for Codeigniter 2.0+ | CI Plugins System - A simple hooks system.

 
Posted: 17 August 2011 11:19 PM   [ Ignore ]   [ # 18 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-24
119 posts

Hello,

I haven’t gotten to the stage of creating plugins as it’s very difficult to ignore a 500 internal server error whenever I include your library.

I am using the two examples you have included.

plugins -> helloworld -> helloworld.php
plugins -> cimarkdown -> cimarkdown.php
plugins -> cimarkdown -> markdown.php

I have tried on two seperate OS’s, Ubuntu and Snow leopard. I have tried two different versions of PHP 5.3.3 and PHP 5.3.5 and I have tried with a completely new downloaded version of CI 2.0.2

As I mentioned I echoed out the paths before the include statement and they are fine and match the files perfectly.

I havent changed your file structure, I copied and pasted all the files very carefully.

Thanks,

Tim

 Signature 

Everything’s under control…

 
Posted: 19 August 2011 03:25 AM   [ Ignore ]   [ # 19 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-24
119 posts

Hello Vheissu,

Which version of PHP and CI are you running?

Thanks,

Tim

 Signature 

Everything’s under control…

 
Posted: 20 August 2011 02:42 AM   [ Ignore ]   [ # 20 ]   [ Rating: 0 ]
Avatar
Joined: 2010-08-08
304 posts

This is very pecuilar. I wonder if it’s some kind of paths issue. I am using the latest copy of XAMPP so the following;

Apache 2.2.17
MySQL 5.5.8
PHP 5.3.5

I know Windows and UNIX paths are different, this could perhaps be the reason. Need to fire up my Mac Mini and have a look, this is friggen troubling, haha.

 Signature 

Plenty Parser - Parser library WolfAuth - Role Based Authentication library | CI Smarty - Smarty integration for Codeigniter 2.0+ | CI Plugins System - A simple hooks system.

 
Posted: 20 August 2011 08:50 AM   [ Ignore ]   [ # 21 ]   [ Rating: 0 ]
Joined: 2010-06-17
163 posts

Hi. Sometimes you have to use DIRECTORY_SEPARATOR in windows.

 
Posted: 20 August 2011 08:37 PM   [ Ignore ]   [ # 22 ]   [ Rating: 0 ]
Avatar
Joined: 2010-08-08
304 posts

I was using the constant FCPATH to set the default path, but found it to be unreliable. So now I’m using APPPATH and replacing the /application port of it and it seems to work. Would love for people to test though. Also did some optimisation on queries to stop unnecessary overhead.

For the paths issue, I’ve forced it by default to use forward slashes as they seem to work on NIX file systems and Windows file systems.

 Signature 

Plenty Parser - Parser library WolfAuth - Role Based Authentication library | CI Smarty - Smarty integration for Codeigniter 2.0+ | CI Plugins System - A simple hooks system.

 
Posted: 22 August 2011 08:21 PM   [ Ignore ]   [ # 23 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-24
119 posts

Hello Vheissu,

It seems you have fixed the issue I posted relating to the paths, however I am still getting a 500 internal server error.

This time something different happens though. The entire server hangs for about 10 seconds before the crash.

It happens when Line 195 is called

do_action('install_' $name); 

I am on Snow Leopard
PHP 5.3.5

Thanks,

Tim

 Signature 

Everything’s under control…

 
Posted: 28 August 2011 06:20 PM   [ Ignore ]   [ # 24 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-24
119 posts

Hi Vheissu,

How are things?

I’m still trying to find a resolution to my latest problem with this library.

When I comment out the following function starting on line 576 the library starts working again.

function do_action($name$arguments "")
{
    
return Plugins::instance()->do_action($name$arguments);

I hope you are still keen to help me out with this because I’m really keen to use this library.

Thanks,

Tim

 Signature 

Everything’s under control…

 
Posted: 31 August 2011 10:19 PM   [ Ignore ]   [ # 25 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-24
119 posts

Hello,

Is anyone else able to confirm that this a problem? Or alternatively confirm that this library is working perfectly?

Can anyone else recommend a plugin library for codeigniter?

Any help would be appreciated.

Thanks,

Tim

 Signature 

Everything’s under control…

 
1 of 2
1