Menu Content

Podpora

> Diskusní fóra, FAQs & placená podpora
Welcome, Guest
Username Password: Remember me

problem with php
(1 viewing) (1) Guest
Support forum for users using free edition of JoomSEF 3 (Joomla 1.5 compatible). These forums are mainly for mutual help between users.

Please note that due to our capacity limitations, we do not monitor these forums regularly.
  • Page:
  • 1

TOPIC: problem with php

problem with php 15 years, 1 month ago #8454

Hi All I`m new on this forum.

I using: Joomla v 1.5.13
ARTIO JoomSEFv3.3.5 free
php 5
host: superhost.pl/

The problem is with my page www.cyeweb.pl. The first page is correct but when you click another link You will see error: Fatal error: Call to undefined function: array_diff_key() in /users/amb/www/cyeweb.pl/components/com_sef/joomsef.php on line 616

In file joomsef.php is :
if (!empty($newVars) && !empty($vars)) {
// If this was SEF url, consider the vars in query as nonsef
616: $nonsef = array_diff_key($vars, $newVars);
if (!empty($nonsef)) {
$mainframe->set('sef.global.nonsefvars', $nonsef);
}
}


I have read that is a problem with php 4 , but I useing PhP5 :(
Please help me what I did wrong!

Re:problem with php 15 years, 1 month ago #8529

  • jaku
Hello,
well, depends on what version of PHP 5 you have.

according to PHP documentation, function array_diff_key() is available from
(PHP 5 >= 5.1.0)

Generally, I recommend you to move to host with PHP 5.2.x. Next versions of Joomla and also many components will not work with older versions of PHP. This is because of major object-oriented improvements in 5.2.0.
On the other hand, be carefull with PHP > 5.3.0. That can be problematic.
At the moment, for Joomla, PHP 5.2.x is the best choice.
Last Edit: 15 years, 1 month ago by .

Re:problem with php 15 years, 1 month ago #8543

Thank you Jan
Now It`s working
Problem solved

Re:problem with php 14 years, 8 months ago #11425

  • jaku
Just a note - you can also rewrite the function array_diff_key using other 2 functions. However, you will need to chage the code on each upgrade. Anyway, the rewriting can be made as (in general):

array_diff_key($a, $b);

equals to
array_diff(array_keys($a), array_keys($b));
Last Edit: 14 years, 8 months ago by .
  • Page:
  • 1
Přihlášení uživatele Prázdný