WordPress.org

Ready to get started?Download WordPress

Forums

Error while running wp-admin/install (4 posts)

  1. Manik Saraf
    Member
    Posted 1 year ago #

    Hello Guys,

    I'm trying to deploy our old website locally just to access some of the information unavailable to me now. The website originally wasn't built by me , so I don't know a lot about it, But during install I got the following errors while running localhost/wp-admin/install.php


    Here's the code for the file that is conflicting,

    <?php
    
    	add_action( 'add_meta_boxes', 'register_bulk_metabox' );
    
    	function register_bulk_metabox(){
    		add_meta_box( 'ep-bulk', _x( 'Bulk Actions', 'Metabox Heading', 'eventpress' ), 'bulk_metabox', 'ep_event', 'side', 'low' );
    	}
    
    	/**
    	 * Metabox for bulk actions on the event.
    	 *
    	 * @since 0.1
    	 *
    	 */
    
    	function bulk_metabox($postid){
    		global $post;
    
    		$unit = get_post_meta( $postid, '_ep_schedule_unit', true );
    		$magnitude = get_post_meta( $postid, '_ep_schedule_magnitude', true );
    		$till = get_post_meta( $postid, '_ep_schedule_till', true );
    
    		$selected['days'] = '';
    		$selected['weeks'] = '';
    		$selected['months'] = '';
    		$selected['years'] = '';
    		$selected['hours'] = '';
    
    		if ( $unit )
    			$selected[$unit] = 'selected = "selected"';
    
    		?>
    
    		<p><b>Change:</b></p>
    		<p><input name="bulk_types[title]" type = "checkbox" />Title<br /></p>
    		<p><input name="bulk_types[time]" type = "checkbox" />Time of day<br /></p>
    		<p><input name="bulk_types[categories]" type = "checkbox" />Categories<br /></p>
    		<p><input name="bulk_types[date]" value = 'none' type = "radio" checked="checked" />Do not change the date</p>
    		<p><input name="bulk_types[date]" value = 'week' type = "radio" />Day of week</p>
    		<p><input name="bulk_types[date]" value = 'month' type = "radio" />Day of the month</p>
    		<p>(All values are absolute, such that selecting a 'Day of the month' will normalize to that day in every month, regardless of        the day of the week, and vice versa.  In most cases, one will want to match the currently applied scheme.)</p>
    		<p><b>Select Events To Apply Bulk Changes To:</b></p>
    		<p><input type='checkbox' name='select_all'></input><span><b>Select All</b></span></p>
    		<p>
    		<?php
    		$rq_title = $post->post_title;
    		$rq_generic_name = preg_replace ("/(-\d+)+$/", '', $post->post_name );
    
    		global $wpdb;
    
    		$wpquery = $wpdb->prepare("SELECT * FROM $wpdb->posts as p
    
    		LEFT JOIN $wpdb->postmeta  as pm ON
    		pm.meta_key = %s AND pm.meta_value = %s AND pm.post_id = p.ID
    
    		WHERE p.ID != %d AND p.post_name LIKE %s AND p.post_status = 'publish' AND p.post_type = 'ep_event'
    		", '_ep_schedule_series', '1', $post->ID , $rq_generic_name.'%');
    
    		$rq = $wpdb->get_results ( $wpquery);
    
    		if (is_array ( $rq ) ): foreach ( $rq as $event ):
    			$repeat_id = $event->ID;
    			$repeat_date = get_post_meta($repeat_id, '_ep_start', true);
    			?>
    			<input name="bulk_changes[<?php echo $repeat_id; ?>]" type = "checkbox" />
    			<span>Event on <?php echo date( EP_DATE_FORMAT , $repeat_date  ); ?> at <?php echo date ( EP_TIME_FORMAT ,$repeat_date); ?></span>
    			<?php
    			echo $event->post_title;
    			echo "<br>";
    		endforeach; endif;
                ?>
            </p>

    Here's the Error Message I get:

    Warning: Creating default object from empty value in C:\xampp\htdocs\utpsychiatry\wp-includes\ms-load.php on line 113

    Warning: Creating default object from empty value in C:\xampp\htdocs\utpsychiatry\wp-includes\ms-settings.php on line 111

    Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\utpsychiatry\wp-content\themes\Dept-Psych\includes-functions\event-press-bulk-actions.php on line 74
    Im unable to figure this out, this is the first time I'm doing something of the sort and I think I might have made some errors in the initial configuration steps.

    I would really appreciate some help with this!
    Thanks guys

    -Manik Saraf

    ~~~Keep Calm and Code On~~~

  2. Pipe Ten Hosting
    Member
    Posted 1 year ago #

    Hi Manik,

    You shouldn't need to run though the installation process if you are trying to get an existing website up and running.

    You would need to obtain a copy of the MySQL database, upload this via phpmyadmin then update the connection string details within your wp-config.php file.

    Hope this helps

    Kind regards
    Jamie

  3. Manik Saraf
    Member
    Posted 1 year ago #

    Hello Jamie,

    It's an old website that doesn't exist anymore, but my boss wants me to deploy it locally so he could work with some of that old data.For such a task, what configuration options should I change in wp-config?
    I was re-installing wordpress because my current system doesn't have the website files, I went to phpmyadmin, created a database, created a user,Imported the old database into the current one, changed the username and password and host settings in wp-config. What else should be done?

    Thanks a lot for your assistance
    Manik

  4. 2ninerniner2
    Member
    Posted 1 year ago #

    How "old" is old? Approximately what year? The reason I ask is because more than likely, you will need the same version of WP that the old site was using.

    And then comes the issue of compatibility with the version of PHP you have on your local XAMPP installation. If it is fairly recent, so will be the PHP and older versions of WP don't always "play well" with the newest ones.

Topic Closed

This topic has been closed to new replies.

About this Topic