21
dejadingo
[critical] hosting service turning off allow_url_fopen
  • 2007/12/14 18:02

  • dejadingo

  • Just popping in

  • Posts: 67

  • Since: 2004/10/22


My hosting service has turned off allow_url_fopen for all shared host sites (which mine are). I've searched the XOOPS code base for usage of fopen() and although Protector prefers allow_url_fopen OFF, there seems to be a lot of fopen() usage throughout the system.

I'm currently using XOOPS 2.0.16, mostly with my own modules. Can anyone please comment on what in the base system I can now expect to stop functioning?



22
dejadingo
Re: FCKeditor on 2.0.x - with Image and Uploads - Instructions
  • 2007/7/16 16:46

  • dejadingo

  • Just popping in

  • Posts: 67

  • Since: 2004/10/22


Thanks very much for your instructions. I managed to get XoopsEditor installed and working in my own content module (that used to use native FCKEditor installed inside the module admin). I simply changed the creation of the editor widget to
$fckeditor_root XOOPS_ROOT_PATH.'/class/xoopseditor/fckeditor/';
include 
XOOPS_ROOT_PATH.'/class/xoopseditor/fckeditor/fckeditor.php';
ob_start();
$oFCKeditor = new FCKeditor('message') ;
$oFCKeditor->BasePath    XOOPS_URL."/class/xoopseditor/fckeditor/" ;
$oFCKeditor->ToolbarSet "Custom";
$oFCKeditor->Value        "" ;
$oFCKeditor->Height        500 ;
$oFCKeditor->Create() ;
$wysiwyg_text_area = new XoopsFormLabel(_C_CONTENTob_get_contents());
$form->addElement($wysiwyg_text_area);
ob_end_clean();

I can't see where $fckeditor_root is used, but I left it in anyway.

I've been looking at formfckeditor.php and editor_registry.php which XoopsEditor installed and trying to figure out how to set up the per-module configuration stuff which I will also need. Can you please explain how this is all hooked up in a non-Frameworks system. I really don't need the stuff in Frameworks, and would rather not have the footprint just to do wysiwyg editing in some admin pages.
- Is the installation of XoopsEditor sufficient to hook up this registry thing?
- What should my module do, if anything, to hook it up?
- What (other than the above) should my admin file have to activate this appropriately?
I'd also like to remove all the other wysiwyg editors from the installation if that is possible.

BTW- In exchange, I'd be glad to provide the Xoops-enabled newest FCKeditor version (2.4.3) for inclusion in the XoopsEditor package.

Thanks for the help.



23
dejadingo
Re: [FIX] xoops_config.php errors in Xoops2.2.3/2.2.4
  • 2006/3/7 22:43

  • dejadingo

  • Just popping in

  • Posts: 67

  • Since: 2004/10/22


These fixes address the following error :
Quote:

Notice [PHP]: unserialize() [function.unserialize]: Error at offset 0 of 20 bytes in file ...\kernel\object.php line 344

which is the result of incorrect select options coded in [xoops]/modules/system/xoops_version.php

I haven't had "security token" problems with XOOPS 2.2.4, but then I'm not yet running it on my live sites, and I mostly use custom modules so I don't have lots of experience with the common portal-site modules.



24
dejadingo
Re: [FIX] xoops_config.php errors in Xoops2.2.3/2.2.4
  • 2006/3/2 1:23

  • dejadingo

  • Just popping in

  • Posts: 67

  • Since: 2004/10/22


The fixes in this post are the permanent fixes.

However, they will only take effect if you make the changes to the file before you install your XOOPS system. Once you have a running system, you can only get the changes to take effect by making changes to the database.

It's possible to remove all the traces of the umode field and its options from the several database tables, and then update the system module to pick up the changes from the new xoops_version.php file. However, the easiest thing to do here is to directly update the options array in the database as svaha describes.

If you want to make similar changes for the meta_rating options it's probably easier to delete the traces and then update the system module. The places to delete are:

table: xoops_config
row: conf_name = 'meta_rating'

table: xoops_configoption
rows: all rows with '_MD_AM_METAxxxxx' in either confop_name or confop_value

To delete a single row in phpMyAdmin, simply press the red X in the row. To delete multiple rows, check the box next to the row and then click the red X at the bottom of the form (Delete all checked rows).

After the rows are deleted, update the System module and you should see the following somewhere in the update log that displays :

Quote:

Config meta_rating added to the database.
Config option added. Name: _MD_AM_METAOGEN Value: general
Config option added. Name: _MD_AM_METAO14YRS Value: 14 years
Config option added. Name: _MD_AM_METAOREST Value: restricted
Config option added. Name: _MD_AM_METAOMAT Value: mature


Hope this clears things up.



25
dejadingo
Re: [FIX] xoops_config.php errors in Xoops2.2.3/2.2.4
  • 2006/2/28 2:19

  • dejadingo

  • Just popping in

  • Posts: 67

  • Since: 2004/10/22


To fix these problems on a running system, you will probably need to manually update the database values, or at least remove the relevant rows from the database so updating the system module can install your changes from the updated xoops_version.php file. If the options are already in the database, updating the system module does not change them.

See this thread for database changes to the "umode" values.



26
dejadingo
Re: [FIX] xoops_config.php errors in Xoops2.2.3/2.2.4
  • 2006/2/28 2:10

  • dejadingo

  • Just popping in

  • Posts: 67

  • Since: 2004/10/22


Aargh! Sorry, it _is_ Monday, and I've been at this all weekend. The file is, in fact, xoops_version.php and the line numbers are 199 and 687
I can't even manage to copy my own notes!

Submitted to Patch Tracker.



27
dejadingo
Re: unserialize() error in kernel/object.php
  • 2006/2/27 17:00

  • dejadingo

  • Just popping in

  • Posts: 67

  • Since: 2004/10/22


Here's the source of the problem :
[fix]



28
dejadingo
[FIX] xoops_config.php errors in Xoops2.2.3/2.2.4
  • 2006/2/27 16:52

  • dejadingo

  • Just popping in

  • Posts: 67

  • Since: 2004/10/22


Here are fixes to two bugs I found in modules/system/xoops_config.php

1) Preferences >> Meta Tags and Footer
Select options for Meta Rating are corrupt.

replace
line 678
Quote:
$modversion['config'][38]['options'] = array("_MD_AM_METAOGEN" => "general", "_MD_AM_METAO14YRS" => "14 years", "_MD_AM_METAOREST" => "restricted", "_MD_AM_METAOMAT", "mature");

with
Quote:
$modversion['config'][38]['options'] = array("_MD_AM_METAOGEN" => "general", "_MD_AM_METAO14YRS" => "14 years", "_MD_AM_METAOREST" => "restricted", "_MD_AM_METAOMAT" => "mature");


2) Modules >> Extended Profiles >> Fields : umode [Edit]
Select options for Default are empty.
- also -
kernel/object.php line 344 unserialize() offset 0 of 20

replace
line 199
Quote:
$modversion['profile']['field'][1]['options'] = array('nest'=>_NESTED, 'flat'=>_FLAT, 'thread'=>_THREADED);

with
Quote:
$modversion['profile']['field'][1]['options'] = array(_NESTED => 'nest', _FLAT => 'flat', _THREADED => 'thread');



29
dejadingo
Re: unserialize() error in kernel/object.php
  • 2006/2/24 13:46

  • dejadingo

  • Just popping in

  • Posts: 67

  • Since: 2004/10/22


Hmmm ... seems to have lost my reply, trying again ...

The error you see is exactly what I had. It's a basic XOOPS problem and does not seem related to any particular version of PHP, Apache or MySQL.

If you have phpMyAdmin installed on your machine, you can try executing the SQL in my post, or you can make the change manually as I did. Simply open the xoops_user_profile_field table and browse the rows until you find the one with the value "umode" in the field-name column. Edit that row and replace the current value of the field_options column --

Nested,Flat,Threaded

with --

a:3:{s:4:"nest";s:6:"Nested";s:4:"flat";s:4:"Flat";s:6:"thread";s:8:"Threaded";}

(make sure you have everything exactly correct here, including the braces and double-quotes).

Note, however, that this is not a real fix, but only a temporary workaround. As long as there is a value in the database for the profile field, updating the System or Profiles modules should not cause the problem to reappear. But since I haven't yet found the original source of the invalid data, every new installation of XOOPS 2.2.3/2.2.4 will also need this manual workaround.

It's really fairly easy to do, but if you need more specific help using phpMyAdmin to change the database, please post back here.



30
dejadingo
Re: unserialize() error in kernel/object.php
  • 2006/2/23 2:24

  • dejadingo

  • Just popping in

  • Posts: 67

  • Since: 2004/10/22


Well, it looks like the places I thought were broken are OK, which means I have no idea what caused the problem. I fixed it, but to do so I had to manually change the value in the database.

The equivalent SQL would be

UPDATE xoops_user_profile_field
SET field_options = 'a:3:{s:4:"nest";s:6:"Nested";s:4:"flat";s:4:"Flat";s:6:"thread";s:8:"Threaded";}'
WHERE field_name = 'umode'

I would really appreciate it if someone can point out where the problem originated.
Thanks.




TopTop
« 1 2 (3) 4 5 6 7 »



Login

Username:
Password:

Lost Password? Register now!

Who's Online

77 user(s) are online (54 user(s) are browsing Support Forums)


Members: 0


Guests: 77


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits