Jump to content
xisto Community
Sign in to follow this  
richierich1m

Php Version Difference Error

Recommended Posts

hi, i had a site which had php coded in earlier version of php ,and gence i feel i am facing errors like

DB Error: unknown errorDB_Error Object
(
   [error_message_prefix] => 
   [mode] => 16
   [level] => 1024
   [code=auto:0] => -1
   [message] => DB Error: unknown error
   [userinfo] => select count(*) from osdate_views_winks where userid = '143' and act_time > '1174236810' and act = 'V' [nativecode=145 ** Table './richie_shaadiya/osdate_views_winks' is marked as crashed and should be repaired]
   [backtrace] => Array
       (
           [0] => Array
               (
                   [file] => /home/richie/public_html/libs/Pear/DB.php
                   [line] => 748
                   [function] => PEAR_Error
                   [class] => PEAR_Error
                   [type] => ->
                   [args] => Array
                       (
                           [0] => DB Error: unknown error
                           [1] => -1
                           [2] => 16
                           [3] => errhndl
                           [4] => select count(*) from osdate_views_winks where userid = '143' and act_time > '1174236810' and act = 'V' [nativecode=145 ** Table './richie_shaadiya/osdate_views_winks' is marked as crashed and should be repaired]
                       )

               )

           [1] => Array
               (
                   [file] => /home/richie/public_html/libs/Pear/PEAR.php
                   [line] => 539
                   [function] => DB_Error
                   [class] => DB_Error
                   [type] => ->
                   [args] => Array
                       (
                           [0] => -1
                           [1] => 16
                           [2] => errhndl
                           [3] => select count(*) from osdate_views_winks where userid = '143' and act_time > '1174236810' and act = 'V' [nativecode=145 ** Table './richie_shaadiya/osdate_views_winks' is marked as crashed and should be repaired]
                       )

               )

           [2] => Array
               (
                   [file] => /home/richie/public_html/libs/Pear/DB/common.php
                   [line] => 501
                   [function] => raiseError
                   [class] => PEAR
                   [type] => ->
                   [args] => Array
                       (
                           [0] => 
                           [1] => -1
                           [2] => 
                           [3] => 
                           [4] => select count(*) from osdate_views_winks where userid = '143' and act_time > '1174236810' and act = 'V' [nativecode=145 ** Table './richie_shaadiya/osdate_views_winks' is marked as crashed and should be repaired]
                           [5] => DB_Error
                           [6] => 1
                       )

               )

           [3] => Array
               (
                   [file] => /home/richie/public_html/libs/Pear/DB/mysql.php
                   [line] => 775
                   [function] => raiseError
                   [class] => DB_common
                   [type] => ->
                   [args] => Array
                       (
                           [0] => -1
                           [1] => 
                           [2] => 
                           [3] => 
                           [4] => 145 ** Table './richie_shaadiya/osdate_views_winks' is marked as crashed and should be repaired
                       )

               )

           [4] => Array
               (
                   [file] => /home/richie/public_html/libs/Pear/DB/mysql.php
                   [line] => 227
                   [function] => mysqlRaiseError
                   [class] => DB_mysql
                   [type] => ->
                   [args] => Array
                       (
                       )

               )

           [5] => Array
               (
                   [file] => /home/richie/public_html/libs/Pear/DB/common.php
                   [line] => 954
                   [function] => simpleQuery
                   [class] => DB_mysql
                   [type] => ->
                   [args] => Array
                       (
                           [0] => select count(*) from osdate_views_winks where userid = '143' and act_time > '1174236810' and act = 'V'
                       )

               )

           [6] => Array
               (
                   [file] => /home/richie/public_html/libs/Pear/DB/common.php
                   [line] => 1212
                   [function] => execute
                   [class] => DB_common
                   [type] => ->
                   [args] => Array
                       (
                           [0] => 111
                           [1] => Array
                               (
                                   [0] => osdate_views_winks
                                   [1] => 143
                                   [2] => 1174236810
                                   [3] => V
                               )

                       )

               )

           [7] => Array
               (
                   [file] => /home/richie/public_html/index.php
                   [line] => 310
                   [function] => getOne
                   [class] => DB_common
                   [type] => ->
                   [args] => Array
                       (
                           [0] => select count(*) from ! where userid = ? and act_time > ? and act = ?
                           [1] => Array
                               (
                                   [0] => osdate_views_winks
                                   [1] => 143
                                   [2] => 1174236810
                                   [3] => V
                               )

                       )

               )

       )

   [callback] => errhndl
)

 

the name of the script i used is osdate,is there amy solution for this problem

i found that this error is because the change in php version

one of my friend suggested there is an option in php.ini called the compatibility mode which checks the version of php written and then works according to it

currently its turn off as seen in php info file

" zend.ze1_compatibility_mode Off "

i am sure if this is turn "on" it will be helpful to everyone who have scripts of older version . :P

Share this post


Link to post
Share on other sites

The error actually seems to state that the database you are trying to access has crashed and needs you to either repair it or load it again from a backup. Which version of PHP are you going from and to? If you are going from an older version to a newer version then you shouldn't really have any problems. If you are moving from a newer version to an older version you you will need to go through the code and check for any functions that are only available on the new version, and replace them with ones that will work on the older version.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.