PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
testy1
Involved
Involved


Joined: Apr 06, 2008
Posts: 483

PostPosted: Tue Oct 27, 2009 5:32 pm Reply with quote Back to top

Some errors and assorted for future reference.

Currently using php 5.3 and thought I would log some of the errors.



Deprecated: Assigning the return value of new by reference is deprecated in includes\xmlrpc\xmlrpc.php on line 554

Fixed these errors using the following function, although probably not the best way :(


Code:
function & rn_newref(&$new_value) {
  return $new_value;
}



then for example find:
Code:

$client =& new xmlrpc_client('/version.php', 'nukeseo.com', 80);


Change To:
Code:

$client =& rn_newref(new xmlrpc_client('/version.php', 'nukeseo.com', 80));




Error: Function split() is deprecated in includes\xmlrpc\xmlrpc.php on line 2272

Find:
Code:
$ar = split("\r?\n", trim(substr($data, 0, $pos)));


Change To:
Code:

$ar = explode("\r?\n", trim(substr($data, 0, $pos)));




Other Errors:

All ereg need to be replaced

Code:

ereg()
ereg_replace()



Link:
Code:
admin.php?op=ABTrackedAgentsPages&tid=1

Notice: Undefined variable: perpage in admin\modules\nukesentinel\ABTrackedAgentsPages.php on line 23
View user's profile Send private message
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 1535
Location: North Carolina

PostPosted: Tue Oct 27, 2009 5:52 pm Reply with quote Back to top

Those deprecated warnings in php 5.3 are known. They are still fully supported in php 5.3 and will be up until php 6. They will all be addressed well before php 6 is released. To remove them for testing purposes, in rnconfig.php find
Code:
$error_reporting = E_ALL^E_NOTICE;
and replace with
Code:
$error_reporting = E_ALL^E_NOTICE^E_DEPRECATED;
and that will suppress the reporting of deprecated errors.

EDIT: also the best way to handle the deprecated split and ereg will be with the Perl-compatible preg family IMO.


Last edited by nuken on Tue Nov 03, 2009 6:26 pm; edited 1 time in total
View user's profile Send private message Send e-mail Visit poster's website
testy1
Involved
Involved


Joined: Apr 06, 2008
Posts: 483

PostPosted: Tue Oct 27, 2009 9:09 pm Reply with quote Back to top

nuken wrote:
Those depreciated warnings in php 5.3 are known. They are still fully supported in php 5.3 and will be up until php 6. They will all be addressed well before php 6 is released. To remove them for testing purposes, in rnconfig.php find
Code:
$error_reporting = E_ALL^E_NOTICE;
and replace with
Code:
$error_reporting = E_ALL^E_NOTICE^E_DEPRECATED;
and that will suppress the reporting of depreciated errors.

EDIT: also the best way to handle the depreciated split and ereg will be with the Perl-compatible preg family IMO.


I understand its just a notice basically but ultimately it should be fixed.Well thats the way I code anyway.Just thought I'd post it up for future reference.I always thought explode was faster unless you specifically needed to use regex.
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16986
Location: Kansas

PostPosted: Wed Oct 28, 2009 12:23 am Reply with quote Back to top

Thanks Testy1 Smile. Btw, Explode carries some security issues if not handled just right.

Nuken: You are correct and we should probably add $error_reporting = E_ALL^E_NOTICE^E_DEPRECATED; as our default. Please enter a Mantis issue on this and mark it for v2.40.01 . Thanks!


Last edited by Raven on Wed Oct 28, 2009 6:25 pm; edited 1 time in total
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
nuken
RavenNuke(tm) Development Team


Joined: Mar 11, 2007
Posts: 1535
Location: North Carolina

PostPosted: Wed Oct 28, 2009 9:36 am Reply with quote Back to top

Done
View user's profile Send private message Send e-mail Visit poster's website
eldorado
Involved
Involved


Joined: Sep 10, 2008
Posts: 413
Location: France,Translator

PostPosted: Wed Oct 28, 2009 5:50 pm Reply with quote Back to top

Raven wrote:
Please enter a Mantis issue on this and mark it for v2.30.01 . Thanks!

yey retroactive fix Smile

nah just kidding it's late and I've been fiddling with 5.3 tonight , getting on my nerves.

Btw , I didn't get how you cloned split()
View user's profile Send private message Visit poster's website MSN Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16986
Location: Kansas

PostPosted: Wed Oct 28, 2009 6:27 pm Reply with quote Back to top

Thanks for the catch killing me
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9133
Location: Arizona

PostPosted: Sat Oct 31, 2009 9:05 am Reply with quote Back to top

This is assigned to me and this is how I intend to implement and would like some testing by Testy1 as I do not have 5.3 nor the time ATM to install it:

Code:

$error_reporting = E_ALL^E_NOTICE; // This is the default and means: All errors except Notices
if (defined('E_DEPRECATED')) $error_reporting = $error_reporting^E_DEPRECATED; // If want to see these warnings when running PHP5.3, comment out this IF statement


I am still needing to hunt down the constant value so that I can place it in the comments above.

Let me know how this works. It will gracefully degrade for lower PHP's which do not have that constant defined.
View user's profile Send private message Visit poster's website
eldorado
Involved
Involved


Joined: Sep 10, 2008
Posts: 413
Location: France,Translator

PostPosted: Sat Oct 31, 2009 5:59 pm Reply with quote Back to top

huhm....? I'll test this Smile
View user's profile Send private message Visit poster's website MSN Messenger
testy1
Involved
Involved


Joined: Apr 06, 2008
Posts: 483

PostPosted: Sat Oct 31, 2009 9:54 pm Reply with quote Back to top

As a quick note; I have used xampp on my windows box for about 3 years, but recently decided to try wamp.It allows me to easily install the multiple versions of php, mysql, apache (including beta versions) with a quick automated install.and at the click of a button it restarts the server with a different version.I wont be going back to xampp Smile


Ok some testing;

My Version Info

Apache: 2.2.13
PHP: 5.3.0
MySQL: 5.1.36

With a default install of ravennuke 2.4 it displays the following errors at the top of the page

Code:

Deprecated: Function set_magic_quotes_runtime() is deprecated in E:\wamp\www\raven\rnconfig.php on line 267

Deprecated: Function ereg() is deprecated in E:\wamp\www\raven\includes\ipban.php on line 22

Deprecated: Function eregi() is deprecated in E:\wamp\www\raven\modules\Your_Account\includes\mainfileend.php on line 17

Deprecated: Function eregi() is deprecated in E:\wamp\www\raven\modules\Your_Account\includes\constants.php on line 17



After making suggested changes in rnconfig.php I get the following error still.

Code:

Deprecated: Function set_magic_quotes_runtime() is deprecated in E:\wamp\www\raven\rnconfig.php on line 267


so it seems that there also needs to be a php version check to the new ini setting at the bottom of rnconfig.php

Note: It also displays all the errors once you comment out your changes.Also the changes you suggested seem to work fine in php version 5.2.11.


Some other test's I did for further info if needed....

Apache: 2.2.13
PHP: 5.2.11
MySQL: 5.1.36

Quote:

Test 1
Code:

$error_reporting = E_ALL;


The above outputs

Code:

int(6134)


Test 2
Code:

$error_reporting = E_NOTICE;


The above outputs

Code:

int(8)


Test 3
Code:

$error_reporting = E_STRICT;


The above outputs

Code:

int(2048)



Test 4
Code:

$error_reporting = E_ALL^E_NOTICE;


The above outputs

Code:

int(6135)




Apache: 2.2.13
PHP: 5.3.0
MySQL: 5.1.36

Quote:

Test 1
Code:

$error_reporting = E_ALL;


The above outputs

Code:

int(30719)


Test 2
Code:

$error_reporting = E_NOTICE;


The above outputs

Code:

int(8)


Test 3
Code:

$error_reporting = E_STRICT;


The above outputs

Code:

int(2048)



Test 4
Code:

$error_reporting = E_ALL^E_NOTICE;


The above outputs

Code:

int(30711)



Test 5
Code:

$error_reporting = E_DEPRECATED;


The above outputs

Code:

int(8192)

View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9133
Location: Arizona

PostPosted: Tue Nov 03, 2009 6:43 am Reply with quote Back to top

testy1, this is excellent info... I did manage to find the constant values. That is a real PITA about the other error and THANKS for letting me know that!

The reason for that is the error level isn't actually set until further down in mainfile.php which is why the warning is still be shown. I don't think I can just move that, which would be the ideal. I'll look into it.

Thanks again m8!
View user's profile Send private message Visit poster's website
testy1
Involved
Involved


Joined: Apr 06, 2008
Posts: 483

PostPosted: Tue Nov 03, 2009 4:03 pm Reply with quote Back to top

just moving it sounds way to easy lol,

Good rule of thumb is if you have 1 hour spare it will take at least 4 hours Smile
View user's profile Send private message
Unit1
Worker
Worker


Joined: Oct 26, 2004
Posts: 134
Location: Boston

PostPosted: Tue Nov 03, 2009 4:39 pm Reply with quote Back to top

testy1 wrote:
just moving it sounds way to easy lol,

Good rule of thumb is if you have 1 hour spare it will take at least 4 hours Smile


So True Laughing
View user's profile Send private message
silicastorm
New Member
New Member


Joined: Jan 15, 2010
Posts: 22
Location: Abu Dhabi, UAE

PostPosted: Wed Jan 27, 2010 10:18 pm Reply with quote Back to top

Good Day,

Currently in production server running phpnuke 8.0 + Nuke Sentinal 2.6.01 and combined with the bbantispam has stabilized the site from intrusions.

Now starting a migration with a complete new install of RN in a test environment.

In Windose platform with XAMPP 1.7.3 I was able to complete the installation without issue to "Install RavenNuke Tables" - with no issue.

Now attempting to access admin.php and recieve the following error:

Quote:
Deprecated: Function ereg() is deprecated in C:\xampp\htdocs\dspx360\includes\ipban.php on line 22


Followed Montego suggestion to edit rnconfig.php

Code:
$error_reporting = E_ALL^E_NOTICE; // This is the default and means: All errors except Notices
if (defined('E_DEPRECATED')) $error_reporting = $error_reporting^E_DEPRECATED; // If want to see these warnings when running PHP5.3, comment out this IF statement


but now only a white page with the comical "Nice Try"

Let me know if I have missed something,
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16986
Location: Kansas

PostPosted: Thu Jan 28, 2010 2:35 am Reply with quote Back to top

Check your server log and/or PHP log for errors.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16986
Location: Kansas

PostPosted: Thu Jan 28, 2010 2:38 am Reply with quote Back to top

Adding to Testy1's observations, you can get a full list of the numerics at
Only registered users can see links on this board!
Get registered or login to the forums!
. Then to combine settings just do the math Wink
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
silicastorm
New Member
New Member


Joined: Jan 15, 2010
Posts: 22
Location: Abu Dhabi, UAE

PostPosted: Thu Jan 28, 2010 10:15 am Reply with quote Back to top

This is the Apache Error Log:

Quote:
[Thu Jan 28 20:09:44 2010] [notice] Digest: generating secret for digest authentication ...
[Thu Jan 28 20:09:44 2010] [notice] Digest: done
[Thu Jan 28 20:09:44 2010] [notice] Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Thu Jan 28 20:09:44 2010] [notice] Server built: Nov 11 2009 14:29:03
[Thu Jan 28 20:09:44 2010] [notice] Parent: Created child process 2164
[Thu Jan 28 20:09:46 2010] [notice] Digest: generating secret for digest authentication ...
[Thu Jan 28 20:09:46 2010] [notice] Digest: done
[Thu Jan 28 20:09:46 2010] [notice] Child 2164: Child process is running
[Thu Jan 28 20:09:46 2010] [notice] Child 2164: Acquired the start mutex.
[Thu Jan 28 20:09:46 2010] [notice] Child 2164: Starting 150 worker threads.
[Thu Jan 28 20:09:46 2010] [notice] Child 2164: Starting thread to listen on port 80.
[Thu Jan 28 20:09:46 2010] [notice] Child 2164: Starting thread to listen on port 443.
[Thu Jan 28 20:09:46 2010] [notice] Child 2164: Starting thread to listen on port 80.
[Thu Jan 28 20:09:46 2010] [notice] Child 2164: Starting thread to listen on port 443.


@ Raven: sorry but I have no idea what math you want me to do...

Quote:
Then to combine settings just do the math Wink
View user's profile Send private message Visit poster's website
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2455
Location: Pittsburgh, Pennsylvania

PostPosted: Thu Jan 28, 2010 11:29 am Reply with quote Back to top

Try changing it to just this

Code:

$error_reporting = E_ALL^E_NOTICE^E_DEPRECATED;
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2455
Location: Pittsburgh, Pennsylvania

PostPosted: Thu Jan 28, 2010 11:32 am Reply with quote Back to top

montego wrote:
This is assigned to me and this is how I intend to implement and would like some testing by Testy1 as I do not have 5.3 nor the time ATM to install it:

Code:

$error_reporting = E_ALL^E_NOTICE; // This is the default and means: All errors except Notices
if (defined('E_DEPRECATED')) $error_reporting = $error_reporting^E_DEPRECATED; // If want to see these warnings when running PHP5.3, comment out this IF statement


I am still needing to hunt down the constant value so that I can place it in the comments above.

Let me know how this works. It will gracefully degrade for lower PHP's which do not have that constant defined.


Montego, I don't have 5.3 either, but wouldn't it have to be this?
if (defined('E_DEPRECATED')) $error_reporting = $error_reporting . ^E_DEPRECATED;
View user's profile Send private message
silicastorm
New Member
New Member


Joined: Jan 15, 2010
Posts: 22
Location: Abu Dhabi, UAE

PostPosted: Thu Jan 28, 2010 11:50 am Reply with quote Back to top

Ok made the suggested revision and returned the following error:

Quote:
Parse error: syntax error, unexpected '^' in C:\xampp\htdocs\dspx360\rnconfig.php on line 83


Thanks for your help guys,,, is this because I am using XAMPP with PHP 5.3.1 ?

Should I find an old version of XAMPP to install?

Didn't expect to have issues this early in the install.... sorry to bother you guys with this as it is only a test environment.
View user's profile Send private message Visit poster's website
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2455
Location: Pittsburgh, Pennsylvania

PostPosted: Thu Jan 28, 2010 1:02 pm Reply with quote Back to top

Replace everything you have done with simply this:

Code:

$error_reporting = E_ALL^E_NOTICE^E_DEPRECATED;
View user's profile Send private message
silicastorm
New Member
New Member


Joined: Jan 15, 2010
Posts: 22
Location: Abu Dhabi, UAE

PostPosted: Thu Jan 28, 2010 1:24 pm Reply with quote Back to top

Right back to the same error in the beginning: White Page "Nice Try"
View user's profile Send private message Visit poster's website
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9133
Location: Arizona

PostPosted: Fri Jan 29, 2010 7:00 am Reply with quote Back to top

silicastorm, I believe you have gotten past the PHP errors and are now running into a situation where you are trying to do something that RN's code does not like. So, one issue down and now on to the next.

I have searched through my library of 2.30.00 and 2.40.00 distributions and I cannot find "Nice Try" as text within the code. I know it has to be there, so my searches are failing me. Unfortunately, I have to get moving to get to work... I'll try this again tonight if no-one beats me to it.

Palbin, per your question here

Code:

Montego, I don't have 5.3 either, but wouldn't it have to be this?
if (defined('E_DEPRECATED')) $error_reporting = $error_reporting . ^E_DEPRECATED;


The answer is that $error_reporting is NOT a string, therefore, we don't concatenate it. We're trying to adjust the final integer value that is holds to include the removal of deprecated warnings.
View user's profile Send private message Visit poster's website
spasticdonkey
RavenNuke(tm) Development Team


Joined: Dec 02, 2006
Posts: 1359
Location: Texas, USA

PostPosted: Fri Jan 29, 2010 7:40 am Reply with quote Back to top

this is in includes/ipban.php

Code:
$ip = $_SERVER['REMOTE_ADDR'];
if(!ereg('^([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})$', $ip)) die('Nice try!!');


I think your problem may be related to your XAMPP and/or test sever setup
View user's profile Send private message
silicastorm
New Member
New Member


Joined: Jan 15, 2010
Posts: 22
Location: Abu Dhabi, UAE

PostPosted: Fri Jan 29, 2010 9:02 pm Reply with quote Back to top

Ok, thanks everyone,,,

1) now uninstalling XAMPP
2) installed Wamp Server
a. activated "rewrite_module" - Apache
b. using PHP 5.2.9
c. activated PHP "magic quotes gpc"

Recieve this error at top of page: (No more white blank page) can see CMS

Quote:
Notice: Use of undefined constant E_DEPRECATED - assumed 'E_DEPRECATED' in C:\wamp\www\dspx360\rnconfig.php on line 82

Quote:



And this is line 82:

Code:
*********************************************************************************/
$error_reporting = E_ALL^E_NOTICE^E_DEPRECATED; 
/*********************************************************************************
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum