Recent Topics

Installing b2evo on USB with XAMPP

Started by on Apr 17, 2018 – Contents updated: Apr 19, 2018

Apr 17, 2018 19:51    

Hi. Given my poor access to the internet I am setting up a USB server so I can work on developing the structure of the site. The server is XAMPP from https://www.apachefriends.org/index.html
php 7.2.4
The purpose here is not just to get help but to provide a step by step for anyone else interested
I'm using a 2GB USB with NTFS formatting.

  1. I transferred my site {version 6.9.5 with a modified simple_zen skin ~ which you can see at http://calstock.org.uk) to the local [htdocs] with the following issues.
  2. Using the phpMyAdmin I created a database using the same name, user name and password as my online site.
  3. The install uses MariaDB rather than my online MySQL which seems fine. http://forums.b2evolution.net/mariadb-mysql
  4. I had to modify [\xampp\apache\conf\extra\httdp-default.conf] and change the Timeout from 300 to 900 as the transfer of the database contents kept being cropped with the timeout warning.

OK All good so far now I have a few error messages to deal with one at a time.

  1. Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in H:\xampp\htdocs\calstock.org.uk\inc\_core\_class_loader.funcs.php on line 55

So the problem here is the file mentioned looks as though it should have dealt with that

if( function_exists('spl_autoload_register') )
{
	// spl_autoload_register( 'var_dump' );
	spl_autoload_register( 'evocms_autoload_class' );
}
else
{
	// PHP<5.1.2: Use the fallback method.
	function __autoload( $classname )
	{
		return evocms_autoload_class($classname);
	}
}

so if anyone has any ideas while I look into it, that would be appreciated.
UPDATE
Should exist in (PHP 5 >= 5.1.0, PHP 7) ::: So what? the function couldn't be found so ( __autoload) was invoked??
__autoload is depricated since php7.2.4 https://secure.php.net/manual/en/function.autoload.php
OK by inserting an echo I see the code above is working. I now think the 'output' is more a 'notification' that may not have appeared except for the following

'warning and 3 'error'

warning and error :: OK a missing file sorted these. Somehow I have a [/skins/_toolbar.inc.php] in my online site but wasn't in my ftp transfer.
Still get the notification about (spl_autoload_register) which I can probably suppress :)

So finally the formating and stuff :: probably as I have some http URL's and
of course the baseline URL will be wrong. SORTED $baseurl = 'http://localhost/calstock.org.uk/';

So seems almost sorted. Recognisable site with anomalies. Will detail them if I resolve them and they seem relevant

Thanks for reading this.


The following image relates to post #3

Installing b2evo on USB with XAMPP

Apr 17, 2018 21:16

  • Had to remove code added to [/skins/***/_sidebar.inc.php] that called my database as I have to find alternative to mysql_connect which killed the site from there on. ???
  • Haven't worked out how to log in yet, but although received 'wrong password' later I realised I was logged in so set time to log out at 50 days for now.
    OK Logging in working fine
  • Commented out some error reporting in [/./././php.ini]
  • In blog [inc/core/class.loader.funcs]

    	/* PHP<5.1.2: Use the fallback method.
    	function __autoload( $classname )
    	{
    		return evocms_autoload_class($classname);
    	}*/


    Main engine working, post, edit, adding widgets . . .

Apr 17, 2018 22:51

Ok Final obvious problem only when logged in I get this warning between some, but not all widgets in the sidebar.

Warning: count(): Parameter must be an array or an object that implements Countable in H:\xampp\htdocs\calstock.org.uk\inc\items\model\_item.funcs.php on line 903

elseif( count( $show_statuses ) )
	{ // we are not filtering so all status are allowed, add allowed statuses condition
		$where[] = $dbprefix.'status IN ( \''.implode( '\',\'', $show_statuses ).'\' )';
	}

UPDATE: It seems to be a warning at the head of three widgets I use (simple post list, simple page list and calendar widget) not (Search Form , freeHTML or Category List)

?? I put an image of this on the initial post as couldn't add it here ??

Apr 18, 2018 00:44

Why could you not add your image here?

Apr 18, 2018 01:01

There was no option to add a file at the time. ?? Unless I missed the [Preview/Add File] button :?(

Apr 18, 2018 04:31

In my post #2 first bullet point

Had to remove code added to [/skins/***/_sidebar.inc.php] that called my database as I have to find alternative to mysql_connect which killed the site from there on. ???

I have amended the mysql commands to mysqli and added the extra parameters required . . and likewise for the mysql_query
Was

mysql_connect("localhost", "calstock_roger", "what1517NOW#") or die(mysql_error());
		mysql_select_db("calstock_b2evo") or die(mysql_error());

Is Now
$xxx = mysqli_connect("localhost", "calstock_roger", "what1517NOW#", "calstock_b2evo") or die(mysqli_error($xxx));

All going well, just one more issue to resolve, I think.


Form is loading...

free blog software – This forum is powered by b2evolution CMS, a complete engine for your website.