Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

PHP error in helper.php

PHP error in helper.php

When you have error reporting on maximum, it seems there is a ( non-fatal ) in modules/mod_metamod/helper.php

It seems line 523:

Code:

$mods = strlen($php) ? eval( str_replace( "\r<br />", "\n", str_replace( "\n<br />", "\n", $php ) ) ) : '';

In the menu it shows:

Parse error: syntax error, unexpected $end, expecting '(' in /<directory>/modules/mod_metamod/helper.php(523) : eval()'d code on line 1

Could anyone please explain me he error and how to solve this.

Kind regards,

Tom Rowel

TomR
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: PHP error in helper.php

Hi Tom,

the syntax error means you have an error in your PHP code (in the PHP box in MetaMod). It gets reported as being in the line with the "eval" in it, because that's where/when the PHP code is executed.

Can you post the code from your PHP box?

Best regards,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3313 Posts
User info in posts
Administrator has disabled public posting

Re: PHP error in helper.php

Hi Stephen,

thanks for the follow up. What do you mean by the code from the PHP box. How can I show that to you. I use MetaModPro together with SuperFusch Menu. Can I PM you an account with password and URL?

TomR
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: PHP error in helper.php

Hi Tom,

When you are editing a MetaMod module, there's a box near the bottom of the right column where you can put PHP code. There's an error in the PHP code in that box. Can you please copy and paste the contents of that box into this forum so I can see what was in there?

Thanks,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3313 Posts
User info in posts
Administrator has disabled public posting

Re: PHP error in helper.php

Hi Stephen,

For some unknow reason the PHP block only had the word Array in it. I removed it, and now the error is gone. Is it a standard text for the PHP box, and could I just remove it?

Thanks for your help anyway.

Tom

TomR
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: PHP error in helper.php

That's very, very unusual; I've never seen that happen before. Just remove it and save the module.

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3313 Posts
User info in posts
Administrator has disabled public posting

Re: PHP error in helper.php

Hello metamod guy, I'm having this same problem with the error

mod_metamod \ helper.php (523): eval () 'd code on line 1

Minah in the box I'm using the php senguite sitaxe

$vm = JomGenius("virtuemart"); // need this at the start of every rule
if ( $vm->check( "pagetype = frontpage, shop.cart" ) ) return 72;

cheers

linhos
Beginner Modder
ranks
useravatar
Offline
8 Posts
Administrator has disabled public posting

Re: PHP error in helper.php

Hi,

the error is somewhere in the 1st line of code that you have in the PHP box. Try copying and pasting exactly the following code:

$vm = JomGenius("virtuemart");
if ($vm->check("pagetype = frontpage, shop.cart")) return 72;

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3313 Posts
User info in posts
Administrator has disabled public posting

Re: PHP error in helper.php

(and have absolutely nothing else in the PHP box, just the 2 lines of code above)

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10783
Newest User:
weatti4qx
Members Online:
0
Guests Online:
198

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked