Coder Social home page Coder Social logo

Comments (7)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
[deleted comment]

from vqmod.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
[deleted comment]

from vqmod.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
Can you provide actual path's (editing out sensitive data but still showing the 
relevant paths). The path (both the one you pass and the current vQmod path) is 
passed through realpath to resolve the sym links by default, therefore if it's 
not working them out, then it sounds like
A) there's an issue with the symlink or
B) realpath isn't working on your system for some reason
C) The directory containing the vQmod directory isn't resolving for some reason

As you've pointed out, the path variable can be passed to the class, however 
vQmod isn't intended JUST for OpenCart so this "fix" would only help for an 
opencart install, and considering this is the first report of the bug, it's 
likely to be your system that is causing it

Original comment by [email protected] on 28 Dec 2011 at 5:54

from vqmod.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
Here they are.

On my test machine I'm using Windows 7 + HardLinkShellExt. My main store is 
located at http://localhost/oc1, the second store at http://localhost/oc2. oc2 
is an NTFS junction pointing to oc1 directory.

$vqmod->modCheck() resolves startup.php path in oc1 store to: 
C:\ServerRoot\oc1\vqmod\vqcache\vq2-system_startup.php, whereas in oc2 store 
to: C:\ServerRoot\oc1\system\startup.php.

$vqmod->_cwd is set in constructor to E:\ServerRoot\oc1 and E:\ServerRoot\oc2 
for oc1 and oc2 stores respectively.

The problem lies in the following line of modCheck() method:

$stripped_filename = preg_replace('~^' . preg_quote($this->getCwd(), '~') . 
'~', '', $sourcePath);

$sourcePath uses DIR_SYSTEM taken from config.php, but $vqmod->_cwd does not. 
OpenCart's root path when not given explicitly is set automatically to 
dirname(dirname(__FILE__)).

That's why setting vqmod path to DIR_SYSTEM . '/..' fixes the problem.

Original comment by [email protected] on 28 Dec 2011 at 6:24

from vqmod.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
This sounds to me like it's not understanding the symlink in realpath. Where is 
HardLinkShellExt from and is it that that creates these sym links? If so, then 
it's going to be down to that that it's not resolving them correctly, since 
php's realpath will not be able to handle it

Original comment by [email protected] on 28 Dec 2011 at 9:13

from vqmod.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
HardlinkShellExt is a nice tool that, among others, can create symlinks (or 
junctions as they are called when directories are involved) under NTFS.

Yes you're right, PHP's realpath() in Windows cannot resolve NTFS symlinks. 
That's a shame.

Original comment by [email protected] on 29 Dec 2011 at 12:17

from vqmod.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024

Original comment by [email protected] on 29 Dec 2011 at 3:33

  • Changed state: Invalid

from vqmod.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.