QImageControl 0.4.10 working ok for others?

thread: 9 messages  |  last: a year ago  |  started: wednesday, january 27, 2010, 12:50 pm pst


#1  |  Jandal (Christchurch) New Zealand
Wednesday, January 27, 2010, 12:50 PM PST

G'day,

I'm running a test server where I'm trying to upgrade my site to Qcodo 0.4.10 and none of my QImageControl's are working.

Is anyone else having this issue?

Is there a change log with Qcodo?

Even on a clean install with the sample page, no luck has been found.

Thanks,


EDIT:
Sample page code removed

#2  |  Jandal (Christchurch) New Zealand
Wednesday, January 27, 2010, 2:12 PM PST

Interesting,

I know what has caused it.  My WAMP install is not happy about the new file paths

In the file 'assets/php/_require_prepend.inc.php'

require(dirname(_FILE_) . '/../../../includes/prepend.inc.php');
works better for me as
require(dirname(_FILE_) . '../../../includes/prepend.inc.php');

Maybe I can change a setting in my WAMP server to help solve this issue?

Thanks,
=-)

#3  |  Mike Ho (Sunnyvale, CA) United States of America Qcodo Administrator
Wednesday, January 27, 2010, 4:45 PM PST

Hmm... what happens when you do something like

<?php
    
print (__FILE__);
    print 
"\r\n";
    print (
dirname(__FILE__));
?>

Specifically, I'm wondering what happens if you throw this in a test.php file in your assets directory, and then go to http://localhost/assets/test.php

#4  |  Jandal (Christchurch) New Zealand
Thursday, January 28, 2010, 2:57 PM PST

I have a VHost set up so my url was

http://qcodo.con/assets/test.php

and the test.php printed

D:\websites\qcodo.con\assets\test.php D:\websites\qcodo.con\assets

I hope that is helpful,
thank you,
=-)

#5  |  Fernando Lordán (Barcelona, CAT, Spain) Spain
Thursday, January 28, 2010, 4:11 PM PST

Maybe it's a matter of using different directory separators in the same path.

Try this:

<?php
require( str_replace('\\''/'dirname(_FILE_)) . '/../../../includes/prepend.inc.php');
?>

On Windows servers, I suggest to always treat path specifications to use forward slashes.

#6  |  Jandal (Christchurch) New Zealand
Sunday, January 31, 2010, 5:05 PM PST

G'day Mike,

I tried applying the following line and had no success.
require( str_replace('\\', '/', dirname(_FILE_)) . '/../../../includes/prepend.inc.php');

Thank you,

#7  |  Mike Ho (Sunnyvale, CA) United States of America Qcodo Administrator
Monday, February 1, 2010, 11:38 AM PST

where is your includes directory?  If I am reading you correctly, then the way you have that line set up assumes your includes directory is at

d:\websites\includes

If this is not correct, then make sure you update the expected path to the includes directory appropriately.

If all else fails, you can always just hardcode an absolute path instead of trying to determine the absolute path via dirname(_FILE_).

#8  |  Jandal (Christchurch) New Zealand
Tuesday, February 9, 2010, 6:25 PM PST

Ah, yes,

My http://localhost server doc root is
d:/websites/

and my VirtualHost http://qcodo.con docroot is
d:/websites/qcodo.con/

and if I shorten the path in 'assets/php/_require_prepend.inc.php'
from
require(dirname(FILE) . '/../../../includes/prepend.inc.php');
to
require(dirname(FILE) . '/../../includes/prepend.inc.php');
then everything works fine.

and my configuration file is set up as so
define ('__DOCROOT__', 'd:/websites/qcodo.con');
define ('__VIRTUAL_DIRECTORY__', '');
define ('__SUBDIRECTORY__', '');

Thank you,
=-)

#9  |  Mike Ho (Sunnyvale, CA) United States of America Qcodo Administrator
Thursday, February 11, 2010, 3:48 PM PST

Yep -- depending on how you have everything installed, you may need to change the path to the prepend.inc.php file.  As long as you have that set up correctly, then you should be good to go.

Note that this _require_prepend.inc.php file resides OUTSIDE of a _core directory, which means that it is intended to be modified.



Copyright © 2005 - 2012, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.