1
nmshah
Quote module that works on php5
  • 2008/4/23 22:47

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


I need a quotes module which displays random quotes in a block. I m using php5 and XOOPS 2.0.18.1

Tried random clients module, also tips and tricks module but on submitting a quote i m sent back to the module admin page without the quote being added to the module database.

2
nmshah
Re: Quote module that works on php5
  • 2008/4/25 17:49

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


anyone pls help
also tried random quotes module but even this is not working on php5. Pls help

3
zyspec
Re: Quote module that works on php5
  • 2008/4/25 21:20

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


If you can provide links to the locations where we can download the modules we might be able to look at it to see if it's something "easy" to fix.

4
nmshah
Re: Quote module that works on php5
  • 2008/4/26 20:39

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


The modules can be downloaded from here

https://xoops.org/modules/repository/viewcat.php?cid=54

Interestingly these module seem to be working on my test server with php5.2.3 but on my webserver which has php5.2.4 installed on it there is the problem as mentioned in my first post.

5
zyspec
Re: Quote module that works on php5
  • 2008/4/26 23:06

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


It appears, doing just a cursory review of the code, that the problem may be due to the module using HTTP_GET_VARS and HTTP_POST_VARS instead of the 'current' $_GET & $_POST variables.

The reason it may work on your local server instead of on the remote/public server is that the php.ini directive for register_long_arrays is probably set to '1' on the local server and to '0' on the remote server.

You could just search through the module files and replace all instances of $HTTP_GET_VARS with $_GET and $HTTP_POST_VARS with $_POST. That 'should' make the module work.

I need to 'caution' you that when I was glancing through the code there appears to be some coding standards used that have the potential to allow the module to be exploited. I didn't look at the code close enough to see if there are actually any problems but you might want to review the code closely before you use it.

6
nmshah
Re: Quote module that works on php5
  • 2008/5/10 18:11

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


Thanks a lot,
I will replace all instances of $HTTP_GET_VARS with $_GET and $HTTP_POST_VARS with $_POST and see if it works.
But will it be safe to use the module because i have no php knowledge and hence reviewing the code is something that i have no idea about. Also which of the modules did u find these potential problems. Pls let me know

7
chefry
Re: Quote module that works on php5
  • 2009/3/27 17:34

  • chefry

  • Home away from home

  • Posts: 1005

  • Since: 2006/10/14


I did the above changes and on the admin side it's working now. At least, it's accepting quotes and showing them in the database.

But it's not giving a block and it's not appearing on any pages on the website

Ramdon Quotes
Random Client Quotes
and
Tip of the Day

are all small, and very useful little modules

I don't suppose some genius coder out there could get them working again?

TIA!

8
trabis
Re: Quote module that works on php5
  • 2009/3/27 19:35

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Block is visible to admin only. You must set group permissions for it.

Login

Who's Online

338 user(s) are online (127 user(s) are browsing Support Forums)


Members: 0


Guests: 338


more...

Donat-O-Meter

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

Latest GitHub Commits