Does not work on php4

lbn.kiev.ua - January 12, 2007 - 10:01
Project:Release Monitor
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:douggreen
Status:closed
Description

Not working for me too

Drupal RC2, latest module (1.37) from CVS

On Releases page - only headers, without any modules in list; in database - string 'N;' in cvsversions column and timestamp of last update. That's all.

No error messages in log of apache and in Drupal logs.

#1

cog.rusty - January 12, 2007 - 17:22

I also see this on PHP4.4, MySQL 4.0. No modules are ever listed.
It does work on localhost using PHP 5.2, MySQL 5.0
I manually executed the update query in settings in both cases.

Possibly a clue:
- In the first case, in the Releases page, I read "The Release Monitor module () monitors Drupal for updates".
- In the second case the empty parentheses contain releasemonitor's cvsid, "(1.37)".

#2

douggreen - January 13, 2007 - 03:13
Title:Does not work» Does not work on php4
Priority:normal» critical
Assigned to:Anonymous» douggreen

As far as I know, this is exclusively a php4 problem. It has been reported, I can reproduce it, and I've mentioned it in other issues (such as 107695). For the sake of clarity, I have changed the title on this issue. I am going to mark the other issues as a duplicate and leave this one open.

The problem is that php4 and php5 treat objects considerably differently, and the my code uses objects fairly heavily to store the projects and modules. I've brought this issue up with the Drupal development list, and I believe that the best solution is to replace the objects with arrays, as this is pretty much the "Drupal way". This switch, though, is not trivial. I hope to get to it within the next week, but no promises.

Thanks for understanding, ... and if there is any way to switch to php5, I'd recommend that you do so.

#3

chrissearle - January 29, 2007 - 19:41

Just tracking this issue

#4

ray007 - January 30, 2007 - 14:29

Just tracking the issue too.

Are there any special problems with the conversion, or just the universal one we all have: time?

Unfortunately, there's currently no way I can switch the server to php5 ...

#5

douggreen - January 31, 2007 - 12:06

I developed releasmonitor heavily using objects rather than arrays only to learn that php4 and php5 differ considerably in how these work. It's a fairly major rewrite and a time issue...

#6

denney - February 2, 2007 - 11:30

Subscribing to this issue.

#7

ebremer - February 3, 2007 - 03:16

Doesn't work for me CentOS 4 with php-4.3.9-3.22

#8

nickistre - February 4, 2007 - 06:25

Subscribing.

#9

forseti - February 4, 2007 - 10:36

Subscribing.

#10

Andy Ramblings - February 6, 2007 - 02:00

Subscribing, for the PHP 4 issue,

#11

Pancho - February 7, 2007 - 08:06

ditto

#12

pyutaros - February 8, 2007 - 04:08

subscribing

#13

pyutaros - February 8, 2007 - 04:16

Wow, like pretty freakin amazing. My webhost seems to have a toggle feature for php 4 vs 5. ver 4 = broke. Ver 5 = happy me. And since Doug seems pretty busy here, don't think we're gonna see a fix here any time soon, unless someone wants to look into how php handles arrays differently in ver 4 and try to create a parallel module build.

#14

douggreen - February 8, 2007 - 15:44

If some submits a php4 patch, I'd be happy to look at it and hopefully apply it. I would hope that no one creates a parallel version.

#15

munga - February 8, 2007 - 23:41

subscribing

#16

Joe One - February 9, 2007 - 16:59

subscribing

#17

cordery - February 12, 2007 - 13:56

Having taken a brief look at the code it doesnt appear that you are using much of what makes PHP5s object handling different. I'd say the only real difference that would affect this code is that in PHP4 assigning an object to a variable copies the object, while in php5 it creates a reference to the original object. In other words the php4 equivalent of

PHP5 $myvar = $object

is
PHP4 $myvar =& $object.   

If you go through your code and keep in mind that every time you've passed an object around without using a =& reference you are duplicating that object in php4, and thus any changes you make to it will not affect the original object, it should be pretty simple to fix this up.

#18

ray007 - February 12, 2007 - 15:17

I've tried to do a quick conversion that way and failed.
But then I do not know the code ...

#19

douggreen - February 12, 2007 - 17:54

Most of the problem is in _releasemonitor_load_projects. If anyone wants to take a crack at it, that's where you should start.

#20

alkcxy - February 13, 2007 - 10:16

subscribing

#21

revival - February 13, 2007 - 23:48

subscribing

#22

widhalmt - February 15, 2007 - 09:52

subscribing

#23

MacRonin - February 17, 2007 - 16:44

Subscribing for the PHP4 issue

#24

jacauc - February 18, 2007 - 07:02

Great Module! Hope the php4 issue can be sorted out. Unfortunately, my PHP skills is dangerous.. Will keep an eye on this issue though.
Thanks!

#25

douggreen - February 18, 2007 - 17:17
Status:active» fixed

Please get the latest 5.x-1.x-dev release. As the Drupal packaging system sometimes takes awhile to package up updates, make sure you have releasemonitor.module 1.43.

#26

yched - February 19, 2007 - 00:55

i get a 'call to unknown function is_php4' error on hitting 'requery now' on admin/settings/releasemonitor page

#27

douggreen - February 19, 2007 - 01:32

Sorry, I removed the is_php4 function after discovering that this needed to be done with both php4 and php5. Please check out and try again.

#28

ray007 - February 19, 2007 - 09:23
Status:fixed» active

Hmm, looks promising, but still some things to fix ...

The "Requery Now" Button on the settings page returns an empty html document after quite some time.

When starting with an empty version-table in the DB and "Display CVS information and links" not checked, there's a message saying "Status not completely retrieved for ", but I do see some results in the admin/build/releases screen. After a few calls on this page, it only returns an empty html -> white screen.

Haven't yet seen any results with "Display CVS information and links" enabled.

Using version 1.44, re-opening the report.

#29

chrissearle - February 19, 2007 - 10:32

Interesting. Once I got the CVS version in - it worked fine. I see all modules with details. It did take two refreshes to get the list but after that - just fine.

When you say empty page - do you mean completely empty (no menus etc etc) or just the release info missing?

A completely empty page is often the sign that the page has taken more memory in generating than the php config allows - so you'd need to up the minimum memory in php.ini.

#30

ray007 - February 19, 2007 - 13:17

by "empty" I mean: zero-length result from server ... no html tags, no nothing.
I'll check the mem-settings, though I didn't want to change those for the drupal installation ...

And I didn't use a cvs-checkout, but the dev-snapshot from this morning. File-head says version 1.44.

#31

douggreen - February 19, 2007 - 13:37

Look at your web server (apache) error log the next to you get the empty page. It will help isolate if it is a programming problem or a system resource problem. If it's anything other than "out-of-memory", please post the error message back here. If it's "out-of-memory", then increase your php memory_limit.

#32

ray007 - February 19, 2007 - 17:31

Version 1.45 seems to work fine, thanx a lot!

#33

MacRonin - February 19, 2007 - 17:39

Just another data point.

I just tried The Release monitor again after upgrading to 1.44

I now get the module listing and the major/minor download buttons. A quick glace seems to have the choices as accurate.

BTW I am on Drupal 5.1 + PHP 4.4.2 and Apache 2.0.53

#34

douggreen - February 19, 2007 - 17:46
Status:active» fixed

#35

Anonymous - March 5, 2007 - 18:02
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.