41
ghia
Re: XHelp Pop email Not working - Cron help
  • 2010/6/21 5:27

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Yes, post 24 is also to change, as it is for automatic user creation by mail.
And the one from #36 is needed if you don't use the profile module.

42
hezina
Re: XHelp Pop email Not working - Cron help
  • 2010/6/21 8:45

  • hezina

  • Just popping in

  • Posts: 3

  • Since: 2010/6/18


ghia!

Many, many thanks ... checkemail and take new ticket on xhelp WORK!!!!

Good job

43
TDE-Drums
Re: XHelp Pop email Not working - Cron help
  • 2010/6/21 15:13

  • TDE-Drums

  • Just popping in

  • Posts: 29

  • Since: 2010/6/14


Hezina

Can you maybe describe if you did anything different or what you changed to get it working.

Also, an example of the cron you are using?

My POP3 still does not work.

So I want to try another cron etc.

As stated earlier my CRON was provided by my hosting company since the original cron from the module developer did not work at all.

Here are the results of the CRON which are emailed to me every time it is run.

--22:00:03--http://www.drumquestion.com/modules/xhelp/checkemail.php
=> `--q'
Resolving www.drumquestion.com... 74.220.215.201
Connecting to www.drumquestion.com|74.220.215.201|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

0K 18.36 MB/s

22:00:05 (18.36 MB/s) - `--q' saved [170]

Ghia, I went ahead and changed all of the code and will get back to this post.

David

44
ghia
Re: XHelp Pop email Not working - Cron help
  • 2010/6/21 15:34

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


I don't know what operation your CRON performs on the URL. If it acts as a HTTP GET then it won't work. It should then be modified to be called as POST.
Other method would be that php is invoked directly to execute the file.

45
TDE-Drums
Re: XHelp Pop email Not working - Cron help
  • 2010/6/21 20:56

  • TDE-Drums

  • Just popping in

  • Posts: 29

  • Since: 2010/6/14


It appears it is working now! The email ticketing system is working!

Thank you very much and I hope this post will help other new users as well.

You have been very helpful!

David

46
trabis
Re: XHelp Pop email Not working - Cron help
  • 2010/8/28 13:45

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Quote:

phppp wrote:
Quote:

Peekay wrote:
my question is, why has this method been changed and what benefits in terms of speed, efficiency and security are we gaining from that change?


It is not a good change and I also have the same question.
Unfortunately it is too late to revert or refactor many similar changes in 2.4*.
It seems at this moment the practical solution is to keep as it as and provide patches once bugs are discovered.


+1


Regarding the patches provided, I guess it would be easier to patch the module instead of patching the core.

In xhelp/servicemain.php, right after this lines:
//Include XOOPS Global Includes
error_reporting(E_ALL); //Enable Error Reporting
$xoopsOption['nocommon'] = 1;

require 
'../../mainfile.php';


you could add additional code required for 2.4.x class and files.
Example:
//Include XOOPS Global Includes
error_reporting(E_ALL); //Enable Error Reporting
$xoopsOption['nocommon'] = 1;

require 
'../../mainfile.php';

/*** ADDING CODE HERE ***/
if (version_compare(PHP_VERSION'5.3.0''<')) {
    
set_magic_quotes_runtime(0);
}

global 
$xoops$xoopsPreload$xoopsLogger$xoopsErrorHandler$xoopsSecurity$sess_handler;

/**
 * YOU SHOULD NEVER USE THE FOLLOWING TO CONSTANTS, THEY WILL BE REMOVED
 */
defined('DS') or define('DS'DIRECTORY_SEPARATOR);
defined('NWLINE')or define('NWLINE'"n");

/**
 * Include files with definitions
 */
include_once XOOPS_ROOT_PATH DS 'include' DS 'defines.php';
include_once 
XOOPS_ROOT_PATH DS 'include' DS 'version.php';
include_once 
XOOPS_ROOT_PATH DS 'include' DS 'license.php';

/**
 * Include XoopsLoad
 */
require_once XOOPS_ROOT_PATH DS 'class' DS 'xoopsload.php';

/**
 * YOU SHOULD BE CAREFUL WITH THE PRELOAD METHODS IN 2.4*, THEY WILL BE DEPRECATED AND IMPLEMENTED IN A DIFFERENT WAY
 */
/**
 *  Create Instance of Preload Object
 */
XoopsLoad::load('preload');
$xoopsPreload =& XoopsPreload::getInstance();
$xoopsPreload->triggerEvent('core.include.common.start');

/**
 * YOU SHOULD BE CAREFUL WITH THE {@xos_kernel_Xoops2}, MOST METHODS WILL BE DEPRECATED
 */
/**
 * Create Instance of xos_kernel_Xoops2 Object
 * Atention, not all methods can be used at this point
 */
XoopsLoad::load('xoopskernel');
$xoops = new xos_kernel_Xoops2();
$xoops->pathTranslation();
$xoopsRequestUri =& $_SERVER['REQUEST_URI'];// Deprecated (use the corrected $_SERVER variable now)


This should solve the missing $xoops global and the preload class required by database class.

Not tested.

47
ghia
Re: XHelp Pop email Not working - Cron help
  • 2010/8/29 7:19

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


-10 !!!

These changes can also easily made on the mainfile and common file and thus maintaining compatibility for the modules.

It makes no sense to lay the burden for core bugs to the module developers!!!
You made the mistakes: Correct them!
It would take several modules that must repeat above code, while doing once in the core would be fit for all.


48
trabis
Re: XHelp Pop email Not working - Cron help
  • 2010/8/29 11:42

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


I do not think this is a core bug. Any module that uses 'nocommon' and still wants to use core resources becomes responsible to initialize them.

But I agree that changes in common.php should not have happen.

What 'several modules' are using 'nocommon' btw?

49
Peekay
Re: XHelp Pop email Not working - Cron help
  • 2010/8/29 13:57

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


@Trabis

I understand that you see this as a change rather than a bug, but if it isn't fixed in the core, how is anyone supposed to know how to fix another module that may also rely on this method?. Unless of course, they happen to stumble apon this thread.

I think everone expects there to be changes, but I think the core team should accept the responsibility of providing some plain English documentation about those changes and their consequences on module operation.

I appreciate this requires an additional commitment, but without this information you're never going to attract any new module developers to Xoops.

You might wind up with a CMS that is technically advanced, but it will fail to compete because there will be so few modules to choose from.
A thread is for life. Not just for Christmas.

50
ghia
Re: XHelp Pop email Not working - Cron help
  • 2010/8/29 20:33

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
Any module that uses 'nocommon' and still wants to use core resources becomes responsible to initialize them.
No, these loadings were not necessary in previous XOOPS versions, but have been introduced in the newer versions. It is then up to the core to load these things itself!
Quote:
What 'several modules' are using 'nocommon' btw?
I know of this module xHelp and xDonations. But there might be others too.

Login

Who's Online

173 user(s) are online (112 user(s) are browsing Support Forums)


Members: 0


Guests: 173


more...

Donat-O-Meter

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

Latest GitHub Commits