Weird Code on Screen After Install…..
-
Hi there,
I recently upgraded manually from a 2.8.x version, as I did not know there was auto install which worked fone on my other blog.So, basically I upgraded and got weird codes such as this just after install:
[code]lumn FROM $table WHERE meta_key = %s AND $column = %d", $meta_key, $object_id ) ) ) return add_metadata($meta_type, $object_id, $meta_key, $meta_value); $meta_value = maybe_serialize( stripslashes_deep($meta_value) ); $data = compact( 'meta_value' ); $where = array( $column => $object_id, 'meta_key' => $meta_key ); if ( !empty( $prev_value ) ) { $prev_value = maybe_serialize($prev_value); $where['meta_value'] = $prev_value; } do_action( "update_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $meta_value ); $wpdb->update( $table, $data, $where ); wp_cache_delete($object_id, $meta_type . '_meta'); do_action( "updated_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $meta_value ); return true; } function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $delete_all = false) { if ( !$meta_type || !$meta_key || (!$delete_all && ! (int)$object_id) ) return false; if ( ! $table = _get_meta_table($meta_type) ) return false; global $wpdb; $type_column = esc_sql($meta_type . '_id'); $id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id'; // expected_slashed ($meta_key) $meta_key = stripslashes($meta_key); $meta_value = maybe_serialize( stripslashes_deep($meta_value) ); $query = $wpdb->prepare( "SELECT $id_column FROM $table WHERE meta_key = %s", $meta_key ); if ( !$delete_all ) $query .= $wpdb->prepare(" AND $type_column = %d", $object_id ); if ( $meta_value ) $querlumn FROM $table WHERE meta_key = %s AND $column = %d", $meta_key, $object_id ) ) ) return add_metadata($meta_type, $object_id, $meta_key, $meta_value); $meta_value = maybe_serialize( stripslashes_deep($meta_value) ); $data = compact( 'meta_value' ); $where = array( $column => $object_id, 'meta_key' => $meta_key ); if ( !empty( $prev_value ) ) { $prev_value = maybe_serialize($prev_value); $where['meta_value'] = $prev_value; } do_action( "update_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $meta_value ); $wpdb->update( $table, $data, $where ); wp_cache_delete($object_id, $meta_type . '_meta'); do_action( "updated_{$meta_type}_meta", $meta_id, $object_id, $meta_key, $meta_value ); return true; } function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $delete_all = false) { if ( !$meta_type || !$meta_key || (!$delete_all && ! (int)$object_id) ) return false; if ( ! $table = _get_meta_table($meta_type) ) return false; global $wpdb; $type_column = esc_sql($meta_type . '_id'); $id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id'; // expected_slashed ($meta_key) $meta_key = stripslashes($meta_key); $meta_value = maybe_serialize( stripslashes_deep($meta_value) ); $query = $wpdb->prepare( "SELECT $id_column FROM $table WHERE meta_key = %s", $meta_key ); if ( !$delete_all ) $query .= $wpdb->prepare(" AND $type_column = %d", $object_id ); if ( $meta_value ) $query .= $wpdb->prepare(" AND meta_value = %s", $meta_value ); $meta_ids = $wpdb->get_col( $query ); if ( !count( $meta_ids ) ) return false; $query = "DELETE FROM $table WHERE $id_column IN( " . implode( ',', $meta_ids ) . " )"; $count = $wpdb->query($query); if ( !$count ) return false; wp_cache_delete($object_id, $meta_type . '_meta'); do_action( "deleted_{$meta_type}_meta", $meta_ids, $object_id, $meta_key, $meta_value ); return true; } function get_metadata($meta_type, $object_id, $meta_key = '', $single = false) { if ( !$meta_type ) return false; $meta_cache = wp_cache_get($object_id, $meta_type . '_meta'); if ( !$meta_cache ) { update_meta_cache($meta_type, $object_id); $meta_cache = wp_cache_get($object_id, $meta_type . '_meta'); } if ( ! $meta_key ) return $meta_cache; if ( isset($meta_cache[$meta_key]) ) { if ( $single ) { return maybe_unserialize( $meta_cache[$meta_key][0] ); } else { return array_map('maybe_unserialize', $meta_cache[$meta_key]); } } if ($single) return ''; else return array(); } function update_meta_cache($meta_type, $object_ids) { if ( empty( $meta_type ) || empty( $object_ids ) ) return false; if ( ! $table = _get_meta_table($meta_type) ) return false; $column = esc_sql($meta_type . '_id'); global $wpdb; if ( !is_array($object_ids) ) { $object_ids = preg_replace('|[^0-9,]|', '', $object_ids); $object_ids = explode(',', $object_ids); } $object_ids = array_map('intval', $object_ids); $cache_key = $meta_type . '_meta'; $ids = array(); foreach ( $object_ids as $id ) { if ( false === wp_cache_get($id, $cache_key) ) $ids[] = $id; } if ( empty( $ids ) ) return false; // Get meta info $id_list = join(',', $ids); $cache = array(); $meta_list = $wpdb->get_results( $wpdb->prepare("SELECT $column, meta_key, meta_value FROM $table WHERE $column IN ($id_list)", $meta_type), ARRAY_A ); if ( !empty($meta_list) ) { foreach ( $meta_list as $metarow) { $mpid = intval($metarow[$column]); $mkey = $metarow['meta_key']; $mval = $metarow['meta_value']; // Force subkeys to be array type: if ( !isset($cache[$mpid]) || !is_array($cache[$mpid]) ) $cache[$mpid] = array(); if ( !isset($cache[$mpid][$mkey]) || !is_array($cache[$mpid][$mkey]) ) $cache[$mpid][$mkey] = array(); // Add a value to the current pid/key: $cache[$mpid][$mkey][] = $mval; } } foreach ( $ids as $id ) { if ( ! isset($cache[$id]) ) $cache[$id] = array(); } foreach ( array_keys($cache) as $object) wp_cache_set($object, $cache[$object], $cache_key); return $cache; } function _get_meta_table($type) { global $wpdb; $table_name = $type . 'meta'; if ( empty($wpdb->$table_name) ) return false; return $wpdb->$table_name; } ?>
Parse error: syntax error, unexpected T_STRING, expecting '(' in /home1/rfivdvdc/public_html/gaol/wp-includes/taxonomy.php on line 42[/code]this one is pointing to a different filename now, as I deleted the whole database, made a new one, deleted everything and tried toinstall from scratch……
Every possible way I get an error like this.
Is there a cache or something messing up this install?I am now going back to an older version, creating a new DB and starting the install as if it were my first time.
Oh the errors first started happening whenI uploaded my themes and stuff it said to ‘keep’, from memory, but cannot be sure, it has been some 5 install variations ago now, and always get a message like this:
[code]https://gaol.me[/code]yes, DB info is correct, i created a new one from scatch and deleted all my old DBand users linked to it!
If anyone can help.
…. If not, I will switch hosts and see if that helps, as i cannot find a ‘cache’ folder which with phpBB3 has weird probs like this due to a cache.
Thank you kindly,
Jay
@jaycameron
- The topic ‘Weird Code on Screen After Install…..’ is closed to new replies.