Jump to content

Install CC3.0.1 on local machine


Guest theorbo

Recommended Posts

Guest theorbo

Lessee: using XAMPP latest distro under WinXP SP1, running fine for things like phpBB and WordPress, so this problem with CC seems off the wall....

Fantastico installed CC3.0 and I upgraded to 3.0.1 on my host server just fine, that's not a problem. However I generally tweak site look-and-feel locally, much much easier than online. That's where the problem originates.

I tried following the install instructions on my local server, which work just fine up until I click "continue" at Step 2. The Step 3 page partially loads (the fields are all there, and you can even enter info in them, but there's no way to continue to Step 4); then within a few moments my apache server shuts down with this error message: "Apache HTTP Server has encountered a problem and needs to close. We are sorry for the inconvenience." and the usual dreck about reporting to MS etc. This is the only program that's ever done this particular thing....

So I also tried downloading the database and the working install from my host server, assuming I could access it the way I do with WordPress or phpBB. Nope - with that I get an error about unable to connect the user etc. - and yes, I have tried using phpmyadmin to add the user to the database - but it still doesn't work, just errors out.

I must be missing something. Not unusual.... any ideas, anyone? (I did search first, but may not be searching using the correct terms - as in, you have to know how to phrase the question....)

Link to comment
Share on other sites

Guest toys4mobiles.com

Did you have CC3.0 working on XAMPP or is it a fresh install of XAMPP.

If it's a fresh install you will have to set a password to phpMyadmin database for the username 'root'.

As there is normally no password set on a fresh install for the MySQL database as it's hosted locally. Cubecart requires the database to have a password (which makes sense if it's on a webserver, which is what it's designed for).

It took me a while to figure the above out.

Let me know what errors you are getting.

Link to comment
Share on other sites

Guest theorbo

Nope - it's my 3 year old XAMPP install I run everything on.... I never installed 3.0 on it because I knew I was going to upgrade to 3.01 - since Fantastico was still installing the older version.... [Edit: latest XAMPP version though!]

However, while "root" does have a password, I NEVER connect to ANY database with "root"! I have various other usernames for various other databases (there's a dozen or so on my machine), and I set up a specific user for CC when I set up the database, and added that user to the database in phpmyadmin.

Aside from the apache error reported above, step 3 eventually displays a "The document contains no data" error. And this is the error if I try to load the CC I downloaded from my web install:

MySQL Error Occured

1045: Access denied for user '***_ccrt1'@'localhost' (using password: YES)

I have yet to discover where I might be able to change that WITHIN CC - since I can't get it to actually finish an install locally, and I can't access the downloaded one from the web. And until I'm WAY more familiar with the program, or until someone who knows more about it tells me, I'm not about to go dinking with the php files! [Edit: yes, I did try making a username exactly like the web-install one, with the password YES - doesn't work either....]

This is the first time with apache and databases etc. that I've had anything like this problem.

Link to comment
Share on other sites

I too have the page not finish loading on step 3. Viewing the source the end is...

<tr>

    <td style="border-bottom: 1px solid #020E72;">Full Name:</td>

    <td style="border-bottom: 1px solid #020E72;"><input type="text" name="fullName" class="textbox" />      </td>



    <td colspan="2" nowrap="nowrap" style="border-bottom: 1px solid #020E72;">e.g. Rachel Taylor</td>

  </tr>

  <tr>

    <td colspan="4">

...looking at the install script, i dont see any issues with the rest of what should print.

Link to comment
Share on other sites

I have narrowed the issue down to the GD version check code.

To fix, change...

<tr>

    <td>GD Version:</td>

    <td>

	<?php

	// GD detection and settings 

	// Taken from php.net

	// Original Author Hagan Fox

	function gdVersion($user_ver = 0)

	{

    if (! extension_loaded('gd')) { return; }

    static $gd_ver = 0;

    // Just accept the specified setting if it's 1.

    if ($user_ver == 1) { $gd_ver = 1; return 1; }

    // Use the static variable if function was called previously.

    if ($user_ver !=2 && $gd_ver > 0 ) { return $gd_ver; }

    // Use the gd_info() function if possible.

    if (function_exists('gd_info')) {

     $ver_info = gd_info();

     preg_match('/\d/', $ver_info['GD Version'], $match);

     $gd_ver = $match[0];

     return $match[0];

    }

    // If phpinfo() is disabled use a specified / fail-safe choice...

    if (preg_match('/phpinfo/', ini_get('disable_functions'))) {

     if ($user_ver == 2) {

      $gd_ver = 2;

      return 2;

     } else {

      $gd_ver = 1;

      return 1;

     }

    }

    // ...otherwise use phpinfo().

    ob_start();

    phpinfo(8);

    $info = ob_get_contents();

    ob_end_clean();

    $info = stristr($info, 'gd version');

    preg_match('/\d/', $info, $match);

    $gd_ver = $match[0];

    return $match[0];

	} // End gdVersion()





	if ($gdv = gdVersion()) {

    if ($gdv >=2) {

     $gdVal = 2;

    } else {

     $gdVal = 1;

    }

	} else {

    $gdVal = 0;

	}

	?>

	<select name="gdversion">

  <option value="2" <?php if($gdVal==2) echo "selected='selected'"; ?>>2</option>

  <option value="1" <?php if($gdVal==1) echo "selected='selected'"; ?>>1</option>

  <option value="0" <?php if($gdVal==0) echo "selected='selected'"; ?>>None</option>

	</select>

	</td>

    <td colspan="2" nowrap="nowrap">&nbsp;</td>

  </tr>


to...




<tr>

    <td>GD Version:</td>

    <td>

	<select name="gdversion">

  <option value="2">2</option>

  <option value="1">1</option>

  <option value="0">None</option>

	</select>

	</td>

    <td colspan="2" nowrap="nowrap">&nbsp;</td>

  </tr>

..the side effect of this "fix" is that you will need to know which version of GD your server is using, but at least it works unlike the code "borrowed" from php.net.

Link to comment
Share on other sites

Oh, just incase...

PHP 5.0.4

MySQL 4.1.10

FreeBSD 4.10

...the reason the "borrowed" code fails is because GD Reports like... "GD Version bundled (2.0.28 compatible)" in the phpinfo() for PHP5

Link to comment
Share on other sites

Guest theorbo

Edited: Nev'mind, got it, thank you SO much! I appreciate it no end....

[[Techweavers, thanks for a potential fix. Am I understanding that your posted replace code needs to be hacked into one of the cart files? And that the GD version number needs to be input in that first line? Or am I confused? (Not at all unlikely....)

I can get the GD version, no problem....]]

Link to comment
Share on other sites

The file is install.php i believe. Its inside the install directory. All the code that i cut out does; is check to see which version of GD you have installed for PHP. I know that im using GD2 so i simply remove the whole checker, and leave the radio buttons for me to choose with.

its a workaround more then a fix.

Link to comment
Share on other sites

  • 1 year later...
Guest SimplyBea

Yes, not a fix, but for a local install the workaround is sufficient. And yes, it was install.php.

Thanks again!

:)

Is there a SIMPLE version of this??? It went waaaay over me..........

:)

I have xampp but don't even know how to use it......... :(

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...