Home arrow Forum

Remository Forum

 


<< Start < Previous 1 2 Next > End >>
dotcom22

Karma: 0  
Problem with version PHP 5.3.2 - 2010/03/20 21:53 hello

I have installed time ago Glossary on my site and all work well...Few days ago I get follow error in some place of my site:

Deprecated: Function eregi() is deprecated in /home/mysite/public_html/plugins/content/definitionbot.php on line 291

This seem to be related to PHP who was updated to version 5.3.2. In fact I have revert PHP to version 5.2.9 and all is fine...So it seem your plugin use a deprecated php function who generate this error...

Do you confirm ???

Other question: It seem is not possible to choose our own user password on your website...In my profile I don't see any possibility to choose...Do you confirm ??

thank for help
  | | Sorry, you do not currently have permission to write here.
admin

Karma: 101  
Re:Problem with version PHP 5.3.2 - 2010/03/21 16:32 You are correct on both counts

Glossary and Remository still contain some uses of ereg functions that are deprecated in PHP 5.3. They will be removed in the next versions. It is quite a simple change to alter them to the corresponding preg_ functions.

For the sake of security, the Remository site uses only system generated passwords. You can always request a new one, so long as you know your email address.
Martin Brampton aka Counterpoint
http://aliro.org
http://black-sheep-research.com
  | | Sorry, you do not currently have permission to write here.
jicejice57

Karma: 0  
Re:Problem with version PHP 5.3.2 - 2010/04/29 08:57 Hi,

I just installed the component and I get the same error message as dotcom here. I am also running PHP 5.3 but unfortunately cannot revert to a previous version.

So 2 questions

1) Is there a temporary fix (through editing some file somewhere)?
2) If not, how far away are we from the next version that eliminates the problem.

Thanks in advance for your response and Kudos for the nice extension !
  | | Sorry, you do not currently have permission to write here.
admin

Karma: 101  
Re:Problem with version PHP 5.3.2 - 2010/04/29 14:49 The uses of ereg* are all in the definitionbot. At line 151 you will find

Code:

 $descereg_replace("<br />|<p>"" "$desc);



and this could be replaced with

Code:

 $desc str_replace(array('<br />''<br />''</p><p>''</p>'), ' '$desc);



Line 291 has

Code:

 if (eregi('{definition}',$newContent)) $page->text showDefinition ($definitiony$param$newContent);



which could be replaced with

Code:

 if (false !== strpos($newContent'{definition}')) $page->text showDefinition ($definitiony$param$newContent);



That eliminates use of ereg* and also makes the code more efficient, since regular expression processing was never really needed in these now rather ancient fragments of code!

Post edited by: admin, at: 2010/04/29 14:50
Martin Brampton aka Counterpoint
http://aliro.org
http://black-sheep-research.com
  | | Sorry, you do not currently have permission to write here.
jicejice57

Karma: 0  
Re:Problem with version PHP 5.3.2 - 2010/04/29 16:45 Thanks a lot.

However I still get this above my Glossary

Code:

 DeprecatedAssigning the return value of new by reference is deprecated in C<img src="http://remository.com/components/com_aliroboard/emoticons/tongue.png" alt="" style="vertical-align: middle;border:0px;" />rogram Files (x86)EasyPHP5.3.0wwwCBKELcomponentscom_glossarycmsapi.interface.php on line 456 DeprecatedAssigning the return value of new by reference is deprecated in C<img src="http://remository.com/components/com_aliroboard/emoticons/tongue.png" alt="" style="vertical-align: middle;border:0px;" />rogram Files (x86)EasyPHP5.3.0wwwCBKELcomponentscom_glossarycmsapi.interface.php on line 460 DeprecatedAssigning the return value of new by reference is deprecated in C<img src="http://remository.com/components/com_aliroboard/emoticons/tongue.png" alt="" style="vertical-align: middle;border:0px;" />rogram Files (x86)EasyPHP5.3.0wwwCBKELcomponentscom_glossarycmsapi.interface.php on line 516 Deprecated: Function set_magic_quotes_runtime() is deprecated in C<img src="http://remository.com/components/com_aliroboard/emoticons/tongue.png" alt="" style="vertical-align: middle;border:0px;" />rogram Files (x86)EasyPHP5.3.0wwwCBKELcomponentscom_glossarycmsapi.interface.php on line 318 DeprecatedAssigning the return value of new by reference is deprecated in C<img src="http://remository.com/components/com_aliroboard/emoticons/tongue.png" alt="" style="vertical-align: middle;border:0px;" />rogram Files (x86)EasyPHP5.3.0wwwCBKELcomponentscom_glossaryc-classesglossary_list_Controller.php on line 96



And this below my footer :

Code:

 Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\Program Files (x86)\EasyPHP5.3.0\www\CBKEL\components\com_glossary\cmsapi.interface.php on line 322



As you can see I am running EasyPHP 5.3.0, don't know might be a lead.

Any idea as to what needs to be modified and where ?

Thanks again, your comp rocks!

Post edited by: jicejice57, at: 2010/04/30 09:20
  | | Sorry, you do not currently have permission to write here.
jicejice57

Karma: 0  
Re:Problem with version PHP 5.3.2 - 2010/05/01 20:03 Hi!

I found a "fix". It is not clean but it is enough at this stage.

As stated above, the problem lies with the present lack of compatibility of your component with PHP 5.3.0.

There are 3 ways to fix the problem :

1) Revert to PHP 5.2.9;

or

2) Manually alter the code to eliminate split references and replace them with proper PHP 5.3.0 functions;

or

3) Deactivate the error reporting (either completely or partially) according to this manual : http://php.net/manual/fr/function.error-reporting.php

That is what I did. I inserted that code at the very beginning of my index files (the general one and the administrator one, since I received error messages also in Glossary's back end) :

Code:

 <?php  error_reporting(0); ?> 



It is not clean I admit it but that does it until I download the soon-to-exist PHP 5.3.0 compatible version of your great component.

Thanks again and cheers !

Post edited by: jicejice57, at: 2010/05/01 20:08
  | | Sorry, you do not currently have permission to write here.
<< Start < Previous 1 2 Next > End >>

Save FM Radio

Login

Subscribe to Premium Support

Get priority support for Remository and Glossary, sign up now for a Premium Support monthly subscription:

Your Remository user name

Or purchase a year's support:

Your Remository user name

Recommended SEF

SEF Advance

Who is Online

Remository welcomes guests and visitors

We have 7 guest online