Hi, just now I have had to upgrade my dialup_admin installation to a machine running PHP5.3, and also noticed numerous PHP errors. I have fixed the code, see attached patch. It solves the following bugs/deprecated code warnings: * replace ereg -> preg_match, ereg_replace -> preg_replace, split -> preg_split for PHP5.3 compatibility * fix LIMIT not working when using MySQL * add configuration item "timezone" to make PHP 5.1+ happy and adds one (trivial, one-liner) feature: * add comparison operators "!=" and "not like" to Accounting Now, I have an almost error/warning/notice free installation. There is still something bogus around the use of mktime() someplace, but I don't use that part of dialup_admin, so I'll leave that alone. It's tested to work at my installation, and I would appreciate if the code could get into mainstream release. But it can of course use much more testing! Particularly the LDAP-related parts (user_edit a.s.o.) only got the same code massage about preg's but got no testing because that's also an unused code part for me. Doesn't help for Todd's errors, I suppose, but I find these code changes useful anyway. Greetings, Stefan Winter Am 06.01.2011 21:53, schrieb Alan DeKok:
Todd Bateman wrote:
Is CS down or the information change? I went to try to see if that was the problem, but I get a connection refused. dialup_admin hasn't used CVS for many years.
The latest version is included in 2.1.10, but if you look at the "git" repository, the dialup_admin code hasn't been changed in years.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Stefan WINTER Ingenieur de Recherche Fondation RESTENA - Réseau Téléinformatique de l'Education Nationale et de la Recherche 6, rue Richard Coudenhove-Kalergi L-1359 Luxembourg Tel: +352 424409 1 Fax: +352 422473
Hi,
Applied, thanks.
Cool. Related: isn't it about time to change the file extension from php3 to php? I think I recall that a long time ago, there was a perceived need for this, but that should be largely historic. This is all valid php 5.x code, after all. I would create a patch, but the filename changes will make it look ugly. Greetings, Stefan Winter
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
-- Stefan WINTER Ingenieur de Recherche Fondation RESTENA - Réseau Téléinformatique de l'Education Nationale et de la Recherche 6, rue Richard Coudenhove-Kalergi L-1359 Luxembourg Tel: +352 424409 1 Fax: +352 422473
On 13/1/2011 11:59 πμ, Stefan Winter wrote:
Hi,
Applied, thanks.
Cool. Related: isn't it about time to change the file extension from php3 to php? I think I recall that a long time ago, there was a perceived need for this, but that should be largely historic. This is all valid php 5.x code, after all.
I would create a patch, but the filename changes will make it look ugly. The only reason it didn't happen was because the revision history would be lost.
Greetings,
Stefan Winter
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
-- Kostas Kalevras Network Operations Center, NTUA.GR http://kkalev.wordpress.com http://kkalev4economy.wordpress.com
Hi,
Cool. Related: isn't it about time to change the file extension from php3 to php? I think I recall that a long time ago, there was a perceived need for this, but that should be largely historic. This is all valid php 5.x code, after all.
I would create a patch, but the filename changes will make it look ugly. The only reason it didn't happen was because the revision history would be lost.
Doesn't GIT have magic for that? Googling suggests that it has a "rename detection" and will keep history if you do a "git mv". I'm not into GIT at all though, so treat this just as an uneducated comment by an outsider :-) In any case, if we keep sticking to php3 people might run away from it, thinking "Yuck! What an old code!" (well, this is somewhat true regardless of the file extension, admitted ;-) ) or have to change their Web server config to treat php3 as PHP code. That's what I had to do; a superfluous step of fiddling where none should be needed. Greetings, Stefan Winter
Greetings,
Stefan Winter
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
-- Stefan WINTER Ingenieur de Recherche Fondation RESTENA - Réseau Téléinformatique de l'Education Nationale et de la Recherche 6, rue Richard Coudenhove-Kalergi L-1359 Luxembourg Tel: +352 424409 1 Fax: +352 422473
On 13/1/2011 12:12 μμ, Stefan Winter wrote:
Hi,
Cool. Related: isn't it about time to change the file extension from php3 to php? I think I recall that a long time ago, there was a perceived need for this, but that should be largely historic. This is all valid php 5.x code, after all.
I would create a patch, but the filename changes will make it look ugly. The only reason it didn't happen was because the revision history would be lost.
Doesn't GIT have magic for that? Googling suggests that it has a "rename detection" and will keep history if you do a "git mv". I'm not into GIT at all though, so treat this just as an uneducated comment by an outsider :-)
In any case, if we keep sticking to php3 people might run away from it, thinking "Yuck! What an old code!" (well, this is somewhat true regardless of the file extension, admitted ;-) ) or have to change their Web server config to treat php3 as PHP code. That's what I had to do; a superfluous step of fiddling where none should be needed.
I 'm talking about the old CVS days :) If there are any requests/bugs about dialup admin i 'd be happy to take a look at them. The code is a bit old just because most of the functionality is already there.
Greetings,
Stefan Winter
Greetings,
Stefan Winter
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
-- Kostas Kalevras Network Operations Center, NTUA.GR http://kkalev.wordpress.com http://kkalev4economy.wordpress.com
Hi,
If there are any requests/bugs about dialup admin i 'd be happy to take a look at them. The code is a bit old just because most of the functionality is already there.
Well, if you insist :-) One thing I found missing is that the ORDER BY is always ascending (accounting_query page). Which is bad if you want the latest n logins, where you order by login time, and which will give you the n oldest logins instead. I found that our staff exclusively wants descending order in all their queries, so I just hard-coded the "ORDER BY ... *DESC* " SQL in the source. Having this as a flippable option in the GUI, and a configurable default value for it would be nice. Greetings, Stefan Winter
Greetings,
Stefan Winter
Greetings,
Stefan Winter
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
-- Stefan WINTER Ingenieur de Recherche Fondation RESTENA - Réseau Téléinformatique de l'Education Nationale et de la Recherche 6, rue Richard Coudenhove-Kalergi L-1359 Luxembourg Tel: +352 424409 1 Fax: +352 422473
Kostas Kalevras wrote:
The only reason it didn't happen was because the revision history would be lost.
$ for x in `find . -name "*.php3" -print`; do y=`echo $x | sed 's/php3/php/'` git mv $x $y done Followed by: $ replace '\.php3' '.php' `find . -type f -print` It *should* work. Alan DeKok.
participants (3)
-
Alan DeKok -
Kostas Kalevras -
Stefan Winter