wordwrap() function

D

Dug

Guest
The database works on my computer, under my local host.
When I upload it to my web server and change the config file, everything works, except when i search for a record. Once i press the button i get the message

Fatal error: Call to undefined function: wordwrap() in ./include/business_logic.php on line 1113

I'm guessing it's because my server uses an older version of php. Is there anyway around this??
 
D

Dug

Guest
Hi,
I've managed to fix this problem by changing the line

$field_to_display = nl2br(wordwrap($field_value, $word_wrap_col));

to

$field_to_display = ($field_value);

But now when my results are shown, the icons on the left are missing, so i cant update or delete.
 
E

Eugenio

Guest
Dug wrote:
>
> Hi,
> I've managed to fix this problem by changing the line
>
> $field_to_display = nl2br(wordwrap($field_value,
> $word_wrap_col));
>
> to
>
> $field_to_display = ($field_value);

$field_to_display = nl2br($field_value);

is better.

> But now when my results are shown, the icons on the left are
> missing, so i cant update or delete.

That's because you haven't a primary key in your main table or you haven't enabled edit/delete/details in config.php

The change about wordwrap doesn't affect edit/delete/details.

(Latest version of DaDaBIK when this message was posted: 1.6)
 
D

Dietmar Liste

Guest
After updating the PHP version everything? works fine.

Dietmar
 
D

Dietmar Liste

Guest
Error messages occurs while running PHP4.0.0. After installing PHP4.0.6 everything works fine (a little but important difference as my provider wrote).

Dietmar
 
E

Eugenio

Guest
Dietmar Liste wrote:
>
> Error messages occurs while running PHP4.0.0. After
> installing PHP4.0.6 everything works fine (a little but
> important difference as my provider wrote).

Yes, wordwrap() function is supported only from php 4.0.2.

(Latest version of DaDaBIK when this message was posted: 1.8)
 
Top