Been working on a codebase generated via ModuleStudio .49 - Thanks Axel, its great!
BUT
A caveat is it generates PHP 5 only code using "abstract" classes.
Just FYI - feel free to correct me or point out how to force PHP 4 compatible code generation or how to manually change it easily.
Thanks!
NCM
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- internetking created topic »password problem« 25. May
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
ModuleStudio - PHP 5 only code?
-
- Rank: Helper
- Registered: Sep 16, 2004
- Last visit: Oct 21, 2009
- Posts: 731
-
- Rank: Software Foundation
- Registered: Sep 03, 2002
- Last visit: May 09, 2010
- Posts: 909
It is PHP5 only. Modulestudio is only just at the beginning - it would be a mistake to still let be PHP4-compatible. PHP4 is dead. Not on every shared-hosting but in general.
--
best regards from Kiel, sailing city
Steffen Voss
Member of the Zikula Steering Committee
Read The Zikulan's Blog "If you want people to RTFM, make a better FM!" -
- Rank: Helper
- Registered: Sep 16, 2004
- Last visit: Oct 21, 2009
- Posts: 731
True...but a great many websites are on PHP4 still - should they be? no
Are they? yes.
Thanks for the clarification. A notice in the FAQ or requirements (I'll mention this to Axel) may be a nicety.
Lastly,
If anyone wants to make it work in PHP4 the following helps:
In the PN"item"(Array)Base files change:
Where "item" is the class name and (Array) is if its an Array class or not.
Also, remove the "public" prefex to the "public function __toString()" part further in the document.
This seems to work, you could also just combine different class files into a single class.
Anyone see a downside to trying this - other than taking away the PHP5 class extensions like abstract and public, etc.? (obviously, should only be done if you absolutely require PHP4 compatibility)
edited by: uheweb, Jun 12, 2008 - 06:54 AM -
- Rank: Helper
- Registered: Sep 16, 2004
- Last visit: Oct 21, 2009
- Posts: 731
Actually, its more... lots of private / protected / etc variables and functiona in the Filter classes, too.
hmm...
I didn't use any Filter related stuff, so just commented out in pnuser.php all the FilterUtil related lines.
Works on PHP4 now
I'd prefer PHP5, but this little project I'm working on needed to be PHP4 compatible.
edited by: uheweb, Jun 12, 2008 - 07:32 AM -
- Rank: Developer
- Registered: Dec 31, 1969
- Last visit: Jun 01, 2010
- Posts: 6859
Anyone hosting with someone who doesn't have PHP5 available needs to move on to a new host. My service provider has both and it's a simple line in an .htaccess file to make 5 the default (They leave it defaulted to 4 because of the number of scripts that break under 5)
--
Home Page | Find on Facebook | Follow on Twitter
-
- Rank: Helper
- Registered: Sep 16, 2004
- Last visit: Oct 21, 2009
- Posts: 731
I know...I prefer 5, and all my dev stuff is 5. I uploaded a test of the module to a PHP4 only test site for a client, and thus the problem manifested.
Before, I didn't even pay attention that it was using PHP 5 only class stuff.
-
- Rank: Team Member
- Registered: Mar 18, 2002
- Last visit: Oct 21, 2009
- Posts: 6606
-
- Rank: Helper
- Registered: Sep 16, 2004
- Last visit: Oct 21, 2009
- Posts: 731
Yep. Well aware, and ready for it and PHP EOL 8/8/8 :)
As module studio was billed as a module creator for .8 (although still beta) and Zik 1.0, it took me by surprise it was PHP 5 only.
Just now as FYI for anyone wanting to use Zik 1.0 and ModuleStudio - make sure your own and any clients PHP is up to par - or, "revert" the code back to PHP4
-
- Rank: Developer
- Registered: May 17, 2004
- Last visit: Apr 08, 2010
- Posts: 386
-
- Rank: Software Foundation
- Registered: Sep 03, 2002
- Last visit: May 09, 2010
- Posts: 909
As they will be included earliest into Zik2 I guess it will be php5
--
best regards from Kiel, sailing city
Steffen Voss
Member of the Zikula Steering Committee
Read The Zikulan's Blog "If you want people to RTFM, make a better FM!"
- Moderated by:
- Support
