[SOLVED] : "Warning: makeclassname" and then "Fatal error: makeclassname(): "

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
apo666

[SOLVED] : "Warning: makeclassname" and then "Fatal error: makeclassname(): "

Post by apo666 »

CMS Version 1.4.1
FrontEndUsers 1.5.3
SelfRegistration 1.2.1
CustomContent 1.5
FormBuilder 0.5.5
FormBrowser 0.2.3

Hello everybody,

I'm getting same error log message with FormBuilder and FormBrowser.
From my CMS MS website I exported a Form in XML format from FormBuilder Admin panel.
On my localhost, I imported this form.xml.

When I tried to edit the properties of this form by clicking on Form Name under FormBuilder I got following message:

Warning: makeclassname(c:\program files\easyphp1-8\www\cms\modules\FormBuilder\classes/Field.class.php): failed to open stream: No such file or directory in c:\program files\easyphp1-8\www\cms\modules\FormBuilder\classes\Form.class.php on line 1148

Fatal error: makeclassname(): Failed opening required 'c:\program files\easyphp1-8\www\cms\modules\FormBuilder\classes/Field.class.php' (include_path='.;C:\PROGRA~1\EASYPH~1\\php\pear\') in c:\program files\easyphp1-8\www\cms\modules\FormBuilder\classes\Form.class.php on line 1148

Moreover, if I tried to delete this Form I got the same message.

For FormBrowser, same error message seems obvious since FormBrowser works over FormBuilder.

Any idea?

Creating a new form is OK.
Deleting this new created form is OK too.

Thanks.

Apo
Last edited by apo666 on Tue Nov 25, 2008 7:51 pm, edited 1 time in total.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm
Location: Comox Valley, BC

Re: "Warning: makeclassname" and then "Fatal error: makeclassname(): "

Post by Nullig »

Is the php_xsl extension enabled on your local server?

Nullig
apo666

Re: "Warning: makeclassname" and then "Fatal error: makeclassname(): "

Post by apo666 »

Thanks Nullig for your prompt response.

I have enabled following option in my local php.ini, but nothing new after activating it. same error message.
extension=php_xslt.dll

or do I have to insert a line with "extension=php_xsl.dll", without the "t"?

Finally, maybe my version of EasyPHP (1.8.0.1) doesn't support it.

Apo
apo666

Re: "Warning: makeclassname" and then "Fatal error: makeclassname(): "

Post by apo666 »

After making some search on the web, I got following info details.

Even with the last php-4.4.9-Win32.zip, there is no extension php_xsl.dll (only the php_xslt.dll with "t" is present).

The php_xsl.dll extension is delivered within the last php-5.2.6-Win32.zip. It seems it was included since PHP 5.x.

Should we conclude that for old PHP 4.x there is no clue?
Or is the issue related to something else?

Wait&see.

Apo
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm
Location: the Netherlands

Re: "Warning: makeclassname" and then "Fatal error: makeclassname(): "

Post by Dee »

Failed opening required 'c:\program files\easyphp1-8\www\cms\modules\FormBuilder\classes/Field.class.php'
Try changing line 1148 (1142 in FormBuilder-0.5.5?) of modules\FormBuilder\classes\Form.class.php from

Code: Select all

require_once dirname(__FILE__).'/'.$classFile;
to

Code: Select all

require_once cms_join_path(dirname(__FILE__), $classFile);
Regards,
D
apo666

Re: "Warning: makeclassname" and then "Fatal error: makeclassname(): "

Post by apo666 »

Hi Dee,

Thanks for your input.

At this moment, I won't try it, because I made a complete change on the way to import the required form from FormBuilder.
I have exported the SQL tables of my website, and I inserted the SQL into my localhost system. Not the easiest way, I know. ;D

If somebody has same issue, he could try your recommandation. In my case, I would like to not modify as much as possible modules source code.

Question : Is following line code only used when we import the XML forms? As stated previous, creating/editing new forms under FormBuilder works fine.

Code: Select all

require_once dirname(__FILE__).'/'.$classFile;
If the answer is YES, this might/should be a bug in the FormBuilder Module to be notified to CMSMS Dev Team. To be investigated.

Thanks.
Apo
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm
Location: the Netherlands

Re: "Warning: makeclassname" and then "Fatal error: makeclassname(): "

Post by Dee »

apo666 wrote: At this moment, I won't try it...
I would like to not modify as much as possible modules source code.
If the answer is YES, this might/should be a bug in the FormBuilder Module to be notified to CMSMS Dev Team. To be investigated.
Hey, don't fix it if you don't want to ;)

It is a bug in Form Builder, the forward slash (I made it red in your error message in my last post) should be a backslash on Windows.

You can fix it either by using the DIRECTORY_SEPARATOR constant or the cms_join_path function (which does the same), so:

Code: Select all

require_once dirname(__FILE__).DIRECTORY_SEPARATOR.$classFile;
or

Code: Select all

require_once cms_join_path(dirname(__FILE__), $classFile);
I reported the bug to the module developer(s) yesterday after answering your question.

Regards,
D
Last edited by Anonymous on Tue Nov 25, 2008 7:53 pm, edited 1 time in total.
apo666

Re: "Warning: makeclassname" and then "Fatal error: makeclassname(): "

Post by apo666 »

Hi Dee,

Thanks for the reply and the bug report.  ;)

I'll fix it on my localhost as soon as I have another new XML form to import.

See you.
Regards
Apo

Note: I'll change the subject of thread to [SOLVED]
alanchill
New Member
New Member
Posts: 5
Joined: Wed Oct 08, 2008 5:49 pm

Re: [SOLVED] : "Warning: makeclassname" and then "Fatal error: makeclassname():

Post by alanchill »

Hi, I'm afraid neither of the suggestions worked for me - I changed line 1142 to both:

Code: Select all

require_once dirname(__FILE__).DIRECTORY_SEPARATOR.$classFile;
and

Code: Select all

require_once cms_join_path(dirname(__FILE__), $classFile);
and still got the same error (although it does now have the slash in the correct direction).

Error now reads:

Code: Select all

Warning: fbForm::require_once(C:\wamp\www\sites\<sitename>\modules\FormBuilder\classes\Field.class.php) [fbform.require-once]: failed to open stream: No such file or directory in C:\wamp\www\sites\<sitename>\modules\FormBuilder\classes\Form.class.php on line 1142

Fatal error: fbForm::require_once() [function.require]: Failed opening required 'C:\wamp\www\sites\<sitename>\modules\FormBuilder\classes\Field.class.php' (include_path='.;C:\php5\pear') in C:\wamp\www\sites\<sitename>\modules\FormBuilder\classes\Form.class.php on line 1142
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm
Location: the Netherlands

Re: [SOLVED] : "Warning: makeclassname" and then "Fatal error: makeclassname():

Post by Dee »

alanchill wrote: and still got the same error (although it does now have the slash in the correct direction).
In case anyone else is having this problem: the wrong direction of the slash seems to be not the only problem. The module tries to include a file that doesn't exist.
Just create a blank file modules/FormBuilder/classes/Field.class.php as described here.

Regards,
D
Last edited by Anonymous on Sun Dec 14, 2008 5:43 pm, edited 1 time in total.
broony
Forum Members
Forum Members
Posts: 17
Joined: Mon Apr 23, 2007 5:52 am

Re: [SOLVED] : "Warning: makeclassname" and then "Fatal error: makeclassname(): "

Post by broony »

Just a final note on this.
It didn't work for me.. after a trip all round the houses..
I realised I'dadded a lower case
field.class.php
when it is clearly stated as
Field.class.php
changed this then it worked for me..
hooray! ;D
Post Reply

Return to “Developers Discussion”