GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 20-Jun-2008, 07:19
sp00ky sp00ky is offline
New Member
 
Join Date: Jun 2008
Posts: 14
sp00ky is on a distinguished road

Illegal offset type in


After fixing the previous problem in my last post thanks to TurboPT, I successfully installed a feature called fckeditor with tabs onto my website. however whenever I try to add into this fckeditor and try to upload, I get an error message saying:

PHP Code:

Warning: Illegal offset type in /html/catalog/admin/categories.php on line 1387 



here is the categories.php code from line 1378 to 1421:

PHP Code:

<?php
/* Re-Post all POST'ed variables */
      reset($HTTP_POST_VARS);
      while (list($key, $value) = each($HTTP_POST_VARS)) {
        if (!is_array($HTTP_POST_VARS[$key])) {
          echo tep_draw_hidden_field($key, htmlspecialchars(stripslashes($value)));
        }
      }
      $languages = tep_get_languages();
      for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
        echo tep_draw_hidden_field('products_name[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_name[$languages[$i]['id']])));
        echo tep_draw_hidden_field('products_description[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_description[$languages[$i]])));

// Product Tabs 2.0 Start
        echo tep_draw_hidden_field('products_spec[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_spec[$languages[$i]['id']])));
        echo tep_draw_hidden_field('products_musthave[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_musthave[$languages[$i]['id']])));
        echo tep_draw_hidden_field('products_extraimage[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_extraimage[$languages[$i]['id']])));
        echo tep_draw_hidden_field('products_manual[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_manual[$languages[$i]['id']])));
        echo tep_draw_hidden_field('products_extra1[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_extra1[$languages[$i]['id']])));
        echo tep_draw_hidden_field('products_moreinfo[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_moreinfo[$languages[$i]['id']])));
// Product Tabs 2.0 End

        echo tep_draw_hidden_field('products_url[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_url[$languages[$i]['id']])));
      }
      echo tep_draw_hidden_field('products_image', stripslashes($products_image_name));

// Product Tabs 2.0 Start
//BOF UltraPics
      echo tep_draw_hidden_field('products_image_med', stripslashes($products_image_med_name));
      echo tep_draw_hidden_field('products_image_lrg', stripslashes($products_image_lrg_name));
      echo tep_draw_hidden_field('products_image_sm_1', stripslashes($products_image_sm_1_name));
      echo tep_draw_hidden_field('products_image_xl_1', stripslashes($products_image_xl_1_name));
      echo tep_draw_hidden_field('products_image_sm_2', stripslashes($products_image_sm_2_name));
      echo tep_draw_hidden_field('products_image_xl_2', stripslashes($products_image_xl_2_name));
      echo tep_draw_hidden_field('products_image_sm_3', stripslashes($products_image_sm_3_name));
      echo tep_draw_hidden_field('products_image_xl_3', stripslashes($products_image_xl_3_name));
      echo tep_draw_hidden_field('products_image_sm_4', stripslashes($products_image_sm_4_name));
      echo tep_draw_hidden_field('products_image_xl_4', stripslashes($products_image_xl_4_name));
      echo tep_draw_hidden_field('products_image_sm_5', stripslashes($products_image_sm_5_name));
      echo tep_draw_hidden_field('products_image_xl_5', stripslashes($products_image_xl_5_name));
      echo tep_draw_hidden_field('products_image_sm_6', stripslashes($products_image_sm_6_name));
      echo tep_draw_hidden_field('products_image_xl_6', stripslashes($products_image_xl_6_name));
//EOF UltraPics
// Product Tabs 2.0 End


can anyone please help me out what is going wrong, and any solutions?

thanks
  #2  
Old 20-Jun-2008, 11:00
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,140
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: ok, another problem...Illegal offset type in


hint: second line inside the for-loop.
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
  #3  
Old 21-Jun-2008, 14:31
sp00ky sp00ky is offline
New Member
 
Join Date: Jun 2008
Posts: 14
sp00ky is on a distinguished road

Re: ok, another problem...Illegal offset type in


Quote:
Originally Posted by TurboPT
hint: second line inside the for-loop.

you got me here, what is a for-loop? can you give more hints ?
  #4  
Old 21-Jun-2008, 15:15
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,140
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: Illegal offset type in


Quote:
Originally Posted by sp00ky
...what is a for-loop?...
PHP Code:

for ($i=0, $n=sizeof($languages); $i<$n; $i++) { 


__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
Last edited by TurboPT : 21-Jun-2008 at 16:04.
  #5  
Old 21-Jun-2008, 21:34
sp00ky sp00ky is offline
New Member
 
Join Date: Jun 2008
Posts: 14
sp00ky is on a distinguished road

Re: Illegal offset type in


Nope, sorry I dont see it, what is wrong with that? is it missing something?
  #6  
Old 21-Jun-2008, 22:30
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,140
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: Illegal offset type in


Near the end. (how does it differ from the previous line?)
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
  #7  
Old 22-Jun-2008, 03:04
sp00ky sp00ky is offline
New Member
 
Join Date: Jun 2008
Posts: 14
sp00ky is on a distinguished road

Re: Illegal offset type in


I added a ; before { and now I dont see any error messages.

But when I type something in fckeditor and upload it, the text doesnt show on my website. and when I go back into the editor the text I typed before has dissappeared, so the editor is not saving the text that I input.

any ideas how I can fix this?
  #8  
Old 22-Jun-2008, 06:46
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,140
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: Illegal offset type in


I don't know where that point is, but where I tried to imply reference was here:
(above the ^^^ marker)
Code:
... htmlspecialchars(stripslashes($products_description[$languages[$i]]))); ^^^
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
  #9  
Old 22-Jun-2008, 13:01
sp00ky sp00ky is offline
New Member
 
Join Date: Jun 2008
Posts: 14
sp00ky is on a distinguished road

Re: Illegal offset type in


Quote:
Originally Posted by TurboPT
I don't know where that point is, but where I tried to imply reference was here:
(above the ^^^ marker)
Code:
... htmlspecialchars(stripslashes($products_description[$languages[$i]]))); ^^^


My bad, so I got rid of the ; I added last time, then I added a ['id'] after [$i] in the line:

PHP Code:

htmlspecialchars(stripslashes($products_description[$languages[$i]]))); 



and guess what.... IT IS FIXED!!!!!!! Thanks again TurboPT....you are too good! until next time
  #10  
Old 23-Jun-2008, 07:09
sp00ky sp00ky is offline
New Member
 
Join Date: Jun 2008
Posts: 14
sp00ky is on a distinguished road

Re: Illegal offset type in


I have got another error

when i try to upload a image onto my website site, it give this error:

Warning: Cannot modify header information - headers already sent by (output started at html/catalog/admin/includes/languages/english/categories.php:99) in html/catalog/admin/includes/functions/general.php on line 22

here is general. php code line from 13 to 30:

PHP Code:

////
// Redirect to another page or site
  function tep_redirect($url) {
    global $logger;

    if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) {
      tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
    }

    header('Location: ' . $url);

    if (STORE_PAGE_PARSE_TIME == 'true') {
      if (!is_object($logger)) $logger = new logger;
      $logger->timer_stop();
    }

    exit;
  } 



ANY HELP PLZ?
 
 

Recent GIDBlogProgramming ebook direct download available by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error C2296: '^' : illegal, left operand has type 'Node *' garrettw09 C++ Forum 3 11-Feb-2008 07:11
Hard drive/CPU Diagnoses Issues binarybug Computer Hardware Forum 1 22-Jan-2007 20:23
type convert problem 2 linq C++ Forum 5 04-Nov-2006 20:47
template <class Data> problem, more than one data type qboy C++ Forum 1 13-Oct-2006 17:08
Microsoft Visual C++6.0 - Illegal use of this type as an expression RealmMaster C++ Forum 5 24-Aug-2006 14:51

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 10:26.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.