[RESOLVED] Upgrading from php4 to php5, deprecated issues - Page 2
Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 34

Thread: [RESOLVED] Upgrading from php4 to php5, deprecated issues

  1. #16
    Junior Member
    Join Date
    Dec 2012
    Posts
    20
    However...

    Once I click on a topic in the forums... I get this:

    Unable to add cookies, header already sent.
    File: /home/motosout/public_html/forums/includes/init.php
    Line: 49

  2. #17
    Junior Member
    Join Date
    Dec 2012
    Posts
    20
    Sorry.. really wish you could edit your own posts here!

    Anyway... I did find the init.php file! So I'm guessing need to start editing that file?

  3. #18
    Junior Member
    Join Date
    Dec 2012
    Posts
    20
    Okay....

    I updated vbulletin and now have upgraded to php5.3.19

    The deprecated errors are gone on the "forums" part.

    http://www.motosouth.com/forums/index.php?

    I am using exactly what the VB updated the index file error reporting to:

    (E_ALL & ~E_NOTICE & ~8192)


    However, I'm still getting the below on the "home" part, there was no VB update to that index file. Should I use the same exact index file for both locations or ??

    http://www.motosouth.com/index.php

    I did find the init.php file.

  4. #19
    Junior Member
    Join Date
    Dec 2012
    Posts
    20
    And.. my photo gallery also gets the deprecated errors.

    http://www.motosouth.com/photopost/index.php

    I tried adding in the error_reporting line to this index, but still get the errors.

    I see the 2 pages where I have the deprecated errors are missing the ? after the php like the others.

    As in..the above is just index.php but more forum page with no error has index.php?

    How do I add a question mark if this is the issue?

    Doing a rundown of the errors now listed in the init.php file...... most are of this and some type of variant of it involving vbulletin:

    $db =& new vB_Database_MySQLi($vbulletin
    And this is the only one for the class_core php file:

    $this->noheader = defined('NOHEADER') ? true : false;
    Last edited by jbomx363; 12-31-2012 at 07:46 PM.

  5. #20
    Settled 4 red convertible dalecosp's Avatar
    Join Date
    Jul 2002
    Location
    Accelerating Windows at 9.81 m/s....
    Posts
    7,715
    Quote Originally Posted by jbomx363 View Post
    Doing a rundown of the errors now listed in the init.php file...... most are of this and some type of variant of it involving vbulletin:
    That's the cause of the warning; the ampersand after the equals sign, before the keyword "new" is saying to assign the object to the $db variable by reference.

    I have no idea, off the top of my head, if removing that "&" will fix the issue. It would remove this particular error, but might possibly cause others. If you try that, you should keep very careful track of exactly what you changed, so you can put it back like it was.

    The best idea would be to upgrade the photopost plugin, I think. (Is it indeed a plugin? I don't have a "photopost" in any of my vB installations).
    /!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade! /!!!\ ereg() is deprecated --- don't use it!

    dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket

    Getting Help at All --- Collected Solutions to Common Problems --- Debugging 101 --- Unanswered Posts --- OMBE: Office Machines, Business Equipment

  6. #21
    Junior Member
    Join Date
    Dec 2012
    Posts
    20
    Thanks... I decided to just add ~E_DEPRECATED to the error reporting to clear it up for now.

    I'll start tinkering with removing the & from the init file.

    Thanks.

  7. #22
    Settled 4 red convertible dalecosp's Avatar
    Join Date
    Jul 2002
    Location
    Accelerating Windows at 9.81 m/s....
    Posts
    7,715
    Is it really cleaned up? motosouth.com/photopost/index.php is still broken from here.
    /!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade! /!!!\ ereg() is deprecated --- don't use it!

    dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket

    Getting Help at All --- Collected Solutions to Common Problems --- Debugging 101 --- Unanswered Posts --- OMBE: Office Machines, Business Equipment

  8. #23
    Junior Member
    Join Date
    Dec 2012
    Posts
    20
    Oops... not the photopost page... it is a plug-in.

    Main and forums page is set.

    Don't know why photopost is still showing errors. I changed, well I had to add into the photopost's index.php file as there wasn't any error reporting?:

    error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);


    UPDATE: Took out the & from the photopost file and now have a new error:

    if ( eregi("^".$pattern, $key) )
    Last edited by jbomx363; 01-03-2013 at 02:02 PM.

  9. #24
    Pna lbh ernq guvf¿
    Join Date
    Jul 2004
    Location
    Kansas City area
    Posts
    19,428
    You posted some code, but what's the error message you're getting?

  10. #25
    Junior Member
    Join Date
    Dec 2012
    Posts
    20
    Deprecated: Function eregi() is deprecated in /home/motosout/public_html/photopost/pp-inc.php on line 79

    And the code above is line 79.

  11. #26
    Junior Member
    Join Date
    Dec 2012
    Posts
    20
    Sorry... that info/error was only for the admin portion of photopost.

    Still have the deprecated errors on the photopost index.

    http://www.motosouth.com/photopost/index.php

    I guess I need to know where I'm supposed to add the error_reporting to photopost files.

  12. #27
    Pna lbh ernq guvf¿
    Join Date
    Jul 2004
    Location
    Kansas City area
    Posts
    19,428
    Quote Originally Posted by jbomx363 View Post
    I guess I need to know where I'm supposed to add the error_reporting to photopost files.
    Probably near the top; at the very least, put it before any of your out-of-date, deprecated code gets executed.

    If there is some sort of central config file or something similar that all of the 'photopost' scripts include/require, you could potentially get away with only modifying that.

    However, rather than all of these modifications... why not just modify your php.ini file to: 1) exclude E_DEPRECATED from error_reporting, 2) turn off display_errors, and 3) turn on log_errors?

  13. #28
    Junior Member
    Join Date
    Dec 2012
    Posts
    20
    Quote Originally Posted by bradgrafelman View Post
    Probably near the top; at the very least, put it before any of your out-of-date, deprecated code gets executed.

    If there is some sort of central config file or something similar that all of the 'photopost' scripts include/require, you could potentially get away with only modifying that.

    However, rather than all of these modifications... why not just modify your php.ini file to: 1) exclude E_DEPRECATED from error_reporting, 2) turn off display_errors, and 3) turn on log_errors?
    I could do that. I just don't know how to write the code.

    I added the below to the photopost index file with nothing before the error reporting:
    error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
    I put the below in the public_html index file:


    error_r
    eporting(E_ALL & ~E_NOTICE & ~8192 & ~E_DEPRECATED);
    Is there a way just to fix all these errors? I'm going to start removing that & in those lines above and see how that goes. I guess I'll still get that class_core error as I don't know what to do with that one.

    I just got the photopost login info and will see if I can get an update for php5 to see if that fixes things too.

    Thanks for having patience with me as this is all new for me.

  14. #29
    Pedantic Curmudgeon Weedpacket's Avatar
    Join Date
    Aug 2002
    Location
    General Systems Vehicle "Thrilled To Be Here"
    Posts
    21,885
    Quote Originally Posted by jbomx363
    Is there a way just to fix all these errors?
    Try to obtain an updated version of photopost? If whoever wrote it still cares about enough it to pay attention there should be one by now: PHP 5.3 has been around for three years - and will be reaching the end of its development lifecycle in March, with development concentrating on 5.4 and 5.5.

    Quote Originally Posted by php.net
    [20 Dec 2012]
    Please note that the PHP 5.3 series will enter an end of life cycle and receive only critical fixes as of March 2013. All users of PHP are encouraged to upgrade to PHP 5.4.
    If photopost is a dead project, and you're not willing/able to update and maintain the plugin yourself, then two options are to hire someone to do the updating and maintenance of it, or to replace it with an alternative plugin that is still active.
    Last edited by Weedpacket; 01-03-2013 at 10:14 PM.
    THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER
    FAQs! FAQs! FAQs! Most forums have them!
    Search - Debugging 101 - Collected Solutions - General Guidelines - Getting help at all

  15. #30
    Junior Member
    Join Date
    Dec 2012
    Posts
    20
    It's not just photopost that gave these errors. It was also the vbadvanced page, which I just used the error_reporting code above so users wouldn't see it.

    Vbulletin doesn't give any error and works fine with php 5.3.19

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •