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 |
Jump to:
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
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
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
Just tracking this issue
#4
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
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
Subscribing to this issue.
#7
Doesn't work for me CentOS 4 with php-4.3.9-3.22
#8
Subscribing.
#9
Subscribing.
#10
Subscribing, for the PHP 4 issue,
#11
ditto
#12
subscribing
#13
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
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
subscribing
#16
subscribing
#17
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 = $objectis
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
I've tried to do a quick conversion that way and failed.
But then I do not know the code ...
#19
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
subscribing
#21
subscribing
#22
subscribing
#23
Subscribing for the PHP4 issue
#24
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
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
i get a 'call to unknown function is_php4' error on hitting 'requery now' on admin/settings/releasemonitor page
#27
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
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
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
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
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
Version 1.45 seems to work fine, thanx a lot!
#33
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
#35