vovanmozg / phpquery

Automatically exported from code.google.com/p/phpquery
0 stars 0 forks source link

win32 is not supported with include pathes #51

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. run code on win32
2. output the php include_path setting

What is the expected output? What do you see instead?
; should be used as path seperator, ; is used

Please use labels and text to provide additional information.
PHP-Const PATH_SEPARATOR can be used to circumvent the problem. See 
following patch against r192.

Patch:

Index: //workspace/phpQuery SVN DEV/phpQuery/phpQuery.php
===================================================================
--- //workspace/phpQuery SVN DEV/phpQuery/phpQuery.php  (revision 195)
+++ //workspace/phpQuery SVN DEV/phpQuery/phpQuery.php  (working copy)
@@ -4206,8 +4206,8 @@
 // add plugins dir and Zend framework to include path
 set_include_path(
    get_include_path()
-       .':'.dirname(__FILE__).'/'
-       .':'.dirname(__FILE__).'/plugins/'
+       .'PATH_SEPARATOR'.dirname(__FILE__).'/'
+       .'PATH_SEPARATOR'.dirname(__FILE__).'/plugins/'
 );
 // why ? no __call nor __get for statics in php...
 phpQuery::$plugins = new phpQueryPlugins();

Original issue reported on code.google.com by artn...@gmail.com on 5 Oct 2008 at 12:31

GoogleCodeExporter commented 8 years ago
must be:
": is used"

and the path is wrong, right patch is:

Index: phpQuery.php
===================================================================
--- phpQuery.php    (revision 195)
+++ phpQuery.php    (working copy)
@@ -4206,8 +4206,8 @@
 // add plugins dir and Zend framework to include path
 set_include_path(
    get_include_path()
-       .':'.dirname(__FILE__).'/'
-       .':'.dirname(__FILE__).'/plugins/'
+       .PATH_SEPARATOR.dirname(__FILE__).'/'
+       .PATH_SEPARATOR.dirname(__FILE__).'/plugins/'
 );
 // why ? no __call nor __get for statics in php...
 phpQuery::$plugins = new phpQueryPlugins();

Original comment by artn...@gmail.com on 5 Oct 2008 at 12:38

GoogleCodeExporter commented 8 years ago
Fixed in r197, thanks for the patch.

Original comment by tobiasz....@gmail.com on 5 Oct 2008 at 10:37