Error in Script ?

Installation Problems And Solutions

Error in Script ?

Postby m4tnix » Wed May 13, 2015 9:06 pm

Hy

I have found asp tags in Common.php line 62 and 64
original:
Code: Select all
      <? if($this->showBackLink): ?>
         <br /><br /><div align="center"><a href="index.php">Back To Examples</a></div><br /><br />
      <? endif; ?>

Fix:
Code: Select all
      <?php if($this->showBackLink){?>
         <br /><br /><div align="center"><a href="index.php">Back To Examples</a></div><br /><br />
      <?php } ?>



in the example 1 AutoComplete.php i have a error:

Strict Standards: Redefining already defined constructor for class AutoComplete in D:\www\testsite\grid\AutoComplete.php on line 170

Invalid json sent back from server. Error: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Server sent: Strict Standards: Redefining already defined constructor for class AutoComplete in D:\www\testsite\grid\AutoComplete.php on line 170
[{"layer_id":"#mate1_tableLayer","where":"innerHTML","value":"

All oders sample work perfect, can you help me?
m4tnix
 
Posts: 1
Joined: Wed May 13, 2015 8:57 pm

Re: Error in Script ?

Postby admin » Thu May 14, 2015 1:01 am

Actually this code is valid php code.
Code: Select all
      <? if($this->showBackLink): ?>
         <br /><br /><div align="center"><a href="index.php">Back To Examples</a></div><br /><br />
      <? endif; ?>

It does rely on short_open_tag to be enabled in the php.ini file (I believe this is enabled by default on most php installations). If you don't want to enable short_open_tag you can change it to
Code: Select all
      <?php if($this->showBackLink): ?>
         <br /><br /><div align="center"><a href="index.php">Back To Examples</a></div><br /><br />
      <?php endif; ?>


As for the other error, I don't know if I've ever tested with PHP strict standards. What version of MySQL Ajax Table Editor are you using?
admin
Site Admin
 
Posts: 1502
Joined: Fri Jul 11, 2008 1:34 am

Re: Error in Script ?

Postby stomperz » Fri May 15, 2015 10:12 am

For information, while the code is accepted as valid programming, I wanted to set the "Showbacklink" to false to hide the hyperlink. I tried "$this->Editor->setConfig('showBackLink',false);" but did not have any success so I have just taken it out of Common - maybe it originally was a testing thing ...
stomperz
 
Posts: 8
Joined: Thu Sep 08, 2011 6:38 am

Re: Error in Script ?

Postby MikeW » Thu Oct 29, 2015 10:33 am

SOLVED: :D
put this line at .htaccess
php_value error_reporting 30711


I can't get the example AutoComplete.php to run!
Use Mate Pro v4.2 and PHP 5.4.7 on an XAMPP Server.

I get nearly the same error message:
Strict Standards: Redefining already defined constructor for class AutoComplete in
/html/mate/AutoComplete.php on line 200

and second message:
Invalid json sent back from server. Error: SyntaxError: Unexpected token <
Server sent: Strict Standards: Redefining already defined constructor for class AutoComplete in /html/mate/AutoComplete.php on line 200 [{"layer_id":"#mate1_tableLayer","where":"innerHTML","value":"
MikeW
 
Posts: 27
Joined: Mon Oct 31, 2011 11:43 am


Return to Installation

Who is online

Users browsing this forum: No registered users and 2 guests

cron