Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0a1

Bug #8533 require() broken in a lot of places - cannot run!
Submitted: 2006-08-22 08:53 UTC Modified: 2006-10-18 13:52 UTC
From: giunta dot gaetano at sea-aeroportimilano dot it Assigned: cellog
Status: Closed Package: PhpDocumentor (version 1.3.0)
PHP Version: 5.1.4 OS: windows 2000
Roadmaps: (Not assigned)    

 [2006-08-22 08:53 UTC] giunta dot gaetano at sea-aeroportimilano dot it (Gaetano Giunta)
Description: ------------ Got phpdoc 1.3.0 from the web, dumped into a dir under the web root. Open up the browser to localhost/phpdocumentor/ - all I get is: Warning: require_once(PhpDocumentor/phpDocumentor/ [function.require-once]: failed to open stream: No such file or directory in E:\htdocs\phpDocumentor\phpDocumentor\ on line 59 Looking at da code, I see: if ('1.3.0' != '@'.'VER@') { if (_IN_PHP5) { require_once 'PhpDocumentor/phpDocumentor/'; } else { require_once 'PhpDocumentor/phpDocumentor/'; } } else { if (_IN_PHP5) { require_once dirname(__FILE__) . '/'; } else { require_once dirname(__FILE__) . '/'; } } This looks very suspicious: why should I include files using path 'PhpDocumentor/...' instead of dirname(__FILE__) ??? The same error is repeated here and there in the source code....


 [2006-08-22 09:16 UTC] giunta dot gaetano at sea-aeroportimilano dot it
PS: I fixed it by inverting the 2 blocks of code, plus doing the same inversion in line 1651 of PPS: in .\Converters\PDF and .\Converters\XML\ there are still some files that always use include(''PhpDocumentor/...'), without doing appropriate indirection... PPPS: are bugs to be reported here or on sf? not very clear...
 [2006-09-09 09:32 UTC] jens at codes-concepts dot com (Jens Kleikamp)
Same issue here on php 5.1.6 fcgi. But it works fine when I use the pear installer.
 [2006-10-06 15:45 UTC] ashnazg at users dot sourceforge dot net (Chuck Burgess)
That appears to be code that determines whether or not PhpDocumentor was installed via PEAR or not, as best I can tell via the CVS logs for these files.
 [2006-10-10 09:30 UTC] ashnazg at users dot sourceforge dot net (Chuck Burgess)
I can work around this "no such file" error by running the phpdoc command from just above the PhpDocumentor directory, i.e if path to code is /opt/PhpDocumentor/phpDocumentor/phpdoc, then cd into /opt and run it from there. That seems to help line the hardcoded pathing up with your curring directory location, thereby allowing you to run it. Again, not a fix, but a work-around. This PEAR bug seems to have many duplicates on Sourceforge (#s 1574470, 1556091, 1551640, and 1544544).
 [2006-10-18 13:52 UTC] cellog (Greg Beaver)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.