Post by Qphoria » Thu Jul 31, 2008 11:23 pm

Suprised this hasn't been mentioned before. Maybe its something I'm missing.

Installed OpenCart on my home windows box. Install went smoothly, but when click on the main catalog index, it gave me some garbage errors. Seems that when it wrote the config, it didn't properly escape the backslashes that windows uses, so the php structure was invalid

I had to manually change:

Code: Select all

define('DIR_CACHE', 'C:\Documents and Settings\Server\Application Data\NuSphere\PhpED\projects\opencart\cache\');

Code: Select all

define('DIR_CACHE', 'C:\\Documents and Settings\\Server\\Application Data\\NuSphere\\PhpED\\projects\\opencart\\cache\\');
and all the rest of them too.

This got the main home page to load, but all links, such as "My Account", that I clicked said things like:
HTTP/404
The requested URL alias for /account is not defined.

Is there full support for windows install? It seems there at least needs to be an "addslashes" function somewhere in the install.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Thu Jul 31, 2008 11:37 pm

Ok, seems URL Alias doesn't work with windows maybe. That should probably be configurable at install time. Had to manually hack the db with phpmyadmin to disable url alias to get it working.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Fri Aug 01, 2008 12:04 am

Seems that the URL Alias only affects the admin area, the library/environment/url.php file is hard coded with a preg_replace to change the
"index.php?controller=account_login"
to
"account"
if its not the admin page.
This should be using the url_alias setting as well.

We got a lot of work to do :)
Last edited by Qphoria on Fri Aug 01, 2008 12:05 am, edited 1 time in total.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Fri Aug 01, 2008 12:16 am

Ok, I think I see the problem with the windows install.

I see in the installer:
if ((isset($_ENV['OS'])) && ($_ENV['OS'] == 'Windows_NT')) { define('SLASH', '\\'); }

I see that XP is showing up as Windows_NT but for some reason it didn't take.

So it looks like the check is there, just needs some refining.

I think the SLASH should also be carried over to the store as well, not just the install, as there are times that a slash may need to be read and depending on the OS, it will need to figure itself out on the fly.
Last edited by Qphoria on Fri Aug 01, 2008 12:21 am, edited 1 time in total.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by alberto » Wed Aug 06, 2008 12:19 am

There's something to repair that bug manually? I'll need to try this week in windows.

Thanks

Newbie

Posts

Joined
Wed Aug 06, 2008 12:16 am

Post by bruce » Wed Aug 06, 2008 10:13 am

Are you trying to run this on IIS or have you got apache running on windows?

If the second, I have had no trouble with 0.7.7 using xampp on windows. Straight out of the box.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by Qphoria » Wed Aug 06, 2008 11:03 am

Using Nusphere PHPEd's built-in server. No biggie about the URL aliasing, but it is weird that the installer didn't find the "\\" method instead of "/" but I see the code and it looks correct. I added the code to my index.php for some of the contribs I'm working on and it works fine.

All in all, this is no longer a problem for me.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by alberto » Wed Aug 06, 2008 3:14 pm

I've got apache on windows.

Newbie

Posts

Joined
Wed Aug 06, 2008 12:16 am

Post by alberto » Wed Aug 06, 2008 4:03 pm

I've got the 0.7.8 version where can i download the 0.7.7 ?
The 0.7.8 with xampp don't work.

Newbie

Posts

Joined
Wed Aug 06, 2008 12:16 am

Post by Qphoria » Wed Aug 06, 2008 6:25 pm

alberto wrote: I've got the 0.7.8 version where can i download the 0.7.7 ?
The 0.7.8 with xampp don't work.
Please elaborate a bit on the "don't work". Did it work with URL Aliasing off? (and the hack to make it actually turn off on the front end)

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by alberto » Wed Aug 06, 2008 10:46 pm

With the v.0.7.7 version it works perfectly. With 0.7.8 the admin page where fine but in the frontend all the links ara "broken" i have 404 error. I use apache 2.2 in my computer with windows XP

Newbie

Posts

Joined
Wed Aug 06, 2008 12:16 am

Post by Qphoria » Wed Aug 06, 2008 11:03 pm

alberto wrote: With the v.0.7.7 version it works perfectly. With 0.7.8 the admin page where fine but in the frontend all the links ara "broken" i have 404 error. I use apache 2.2 in my computer with windows XP
Check your config file. Do the paths show as:
'C:\path\to\my\folder'
or
'C:\\path\\to\\my\\folder'

If it is the former, then it is the same error I had. Manually changed them all from '\' to '\\' to fix it.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by fido-x » Thu Aug 07, 2008 7:57 pm

Simple solution - don't use Windows!

Fido-X.

Image
Modules for OpenCart 2.3.0.2
Homepage Module [Free - since OpenCart 0.7.7]
Multistore Extensions
Store Manager Multi-Vendor/Multi-Store management tool

If you're not living on the edge ... you're taking up too much space!


User avatar
Expert Member

Posts

Joined
Sat Jun 28, 2008 1:09 am
Location - Tasmania, Australia

Post by Qphoria » Thu Aug 07, 2008 9:02 pm

fido-x wrote: Simple solution - don't use Windows!

Fido-X.
;D ;D Of course!

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by bruce » Fri Aug 08, 2008 8:48 am

Back to the actual topic...

My config files all standardise on the / slash which works unchanged on windows (xampp) and hosted locations too. In addition they have an edit friendly layout as follows. The file is real but kept on my laptop and I don't use these passwords etc anywhere else.

Chances are too, that xampp puts something in the apache or php configurations to switch or interpret the slashes correctly but I have not investigated that far because this simply works.

cheers

Bruce

Code: Select all

<?php

define('HOSTING_URL',         'localhost/accolades');
define('HOSTING_DIR',         'C:/xampp/htdocs/accolades');
define('HOSTING_DB_HOST',     'localhost');
define('HOSTING_DB_USER',     'opencartdev');
define('HOSTING_DB_PASSWORD', 'support');
define('HOSTING_DB_NAME',     'accolades');

// HTTP
define('HTTP_SERVER', 'http://' . HOSTING_URL . '/');
define('HTTP_IMAGE', 'http://'  . HOSTING_URL . '/image/');

// HTTPS
define('HTTPS_SERVER', 'https://' . HOSTING_URL . '/');
define('HTTPS_IMAGE','https://'   . HOSTING_URL . '/image/');

// DIR
define('DIR_CACHE',      HOSTING_DIR . '/cache/');
define('DIR_DOWNLOAD',   HOSTING_DIR . '/download/');
define('DIR_IMAGE',      HOSTING_DIR . '/image/');
define('DIR_LIBRARY',    HOSTING_DIR . '/library/');
define('DIR_MODEL',      HOSTING_DIR . '/catalog/model/');
define('DIR_CONTROLLER', HOSTING_DIR . '/catalog/controller/');
define('DIR_LANGUAGE',   HOSTING_DIR . '/catalog/language/');
define('DIR_EXTENSION',  HOSTING_DIR . '/catalog/extension/');
define('DIR_TEMPLATE',   HOSTING_DIR . '/catalog/template/');
define('DIR_EXTERNAL',   HOSTING_DIR . '/library/external/');
define('DIR_LOGGING',    HOSTING_DIR . '/logs/');

// DB
define('DB_HOST',     HOSTING_DB_HOST);
define('DB_USER',     HOSTING_DB_USER);
define('DB_PASSWORD', HOSTING_DB_PASSWORD);
define('DB_NAME',     HOSTING_DB_NAME);

if ( ! defined( 'PATH_SEPARATOR' ) )
{
    if ( strpos( $_ENV['OS'], 'Win' ) !== false )
        define( 'PATH_SEPARATOR', ';' );
    else
        define( 'PATH_SEPARATOR', ':' );
}

?>

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by jballotti » Wed Aug 13, 2008 12:48 am

Qphoria wrote: Suprised this hasn't been mentioned before. Maybe its something I'm missing.

Installed OpenCart on my home windows box. Install went smoothly, but when click on the main catalog index, it gave me some garbage errors. Seems that when it wrote the config, it didn't properly escape the backslashes that windows uses, so the php structure was invalid

I had to manually change:

Code: Select all

define('DIR_CACHE', 'C:\Documents and Settings\Server\Application Data\NuSphere\PhpED\projects\opencart\cache\');

Code: Select all

define('DIR_CACHE', 'C:\\Documents and Settings\\Server\\Application Data\\NuSphere\\PhpED\\projects\\opencart\\cache\\');
and all the rest of them too.

This got the main home page to load, but all links, such as "My Account", that I clicked said things like:
HTTP/404
The requested URL alias for /account is not defined.

Is there full support for windows install? It seems there at least needs to be an "addslashes" function somewhere in the install.
I found that all I had to do was add a single backslash at the end of the define statements and it started working.

from this:

Code: Select all

define('DIR_CACHE', 'C:\Documents and Settings\Server\Application Data\NuSphere\PhpED\projects\opencart\cache\');
to this:

Code: Select all

define('DIR_CACHE', 'C:\Documents and Settings\Server\Application Data\NuSphere\PhpED\projects\opencart\cache\\');

Newbie

Posts

Joined
Sun Aug 10, 2008 9:45 pm
Location - Chicago Area

Post by Qphoria » Wed Aug 13, 2008 1:23 am

that works too :)  ;D

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by jballotti » Wed Aug 13, 2008 2:19 am

Okay, I now have both the admin and store-front displaying properly but none of the links on the storefront work. I've tried turning off URL aliases in the admin but that didn't work. I've looked through other posts on this subject and found a mention of a hack to fix the problem but am not sure I fully understand what that hack is.
Could someone explain what I need to do to get this working.  ???

Thanks,

Newbie

Posts

Joined
Sun Aug 10, 2008 9:45 pm
Location - Chicago Area

User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by hm2k » Thu Sep 25, 2008 6:56 pm

Bugs like this should be handled as per this thread: http://forum.opencart.com/index.php/topic,1466.0.html

Please test the latest SVN and this should be fixed.

Thanks.

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK
Who is online

Users browsing this forum: No registered users and 2 guests