This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 214074 - apigen will spit out error on certain setups
Summary: apigen will spit out error on certain setups
Status: RESOLVED WORKSFORME
Alias: None
Product: php
Classification: Unclassified
Component: ApiGen (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-13 03:01 UTC by elimc
Modified: 2012-06-14 06:43 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
old fashioned apiGen UI (73.52 KB, image/jpeg)
2012-06-13 03:01 UTC, elimc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description elimc 2012-06-13 03:01:51 UTC
Created attachment 120756 [details]
old fashioned apiGen UI

I'm running XAMPP on my localhost. I dled apigen through the PEAR install. PEAR installed the dependent libraries inside "xampp\php\PEAR" and not inside a lib folder which is what your script seems to be doing.

There are multiple ways of setting up apigen. Downloading the standalone apigen package seems to include the libs folder. Using PEAR 1 with a xampp setup, the libs folder seems to be removed.

After getting the error, I also noticed that when I tried to browse for the link, a very poor UI would show up [see attach screenshot]. It seems like these issues are related so I'm putting them together. 

I'm running NetBeans 7.2, but not the nightly builds.





Warning: require(Texy.php): failed to open stream: No such file or directory in C:\xampp\php\apigen on line 42

Fatal error: require(): Failed opening required 'Texy.php' (include_path='C:\xampp\php;C:\xampp\php/libs/FSHL;C:\xampp\php/libs/TokenReflection;.;C:\xampp\php\PEAR') in C:\xampp\php\apigen on line 42
Comment 1 Tomas Mysik 2012-06-13 03:44:12 UTC
(In reply to comment #0)
> I'm running XAMPP on my localhost. I dled apigen through the PEAR install. PEAR
> installed the dependent libraries inside "xampp\php\PEAR" and not inside a lib
> folder which is what your script seems to be doing.

What does "your script" mean? Which script?

> There are multiple ways of setting up apigen. Downloading the standalone apigen
> package seems to include the libs folder. Using PEAR 1 with a xampp setup, the
> libs folder seems to be removed.

XAMPP issue? Sorry, I have no idea...

> After getting the error, I also noticed that when I tried to browse for the
> link, a very poor UI would show up [see attach screenshot].

What do you mean by that? What exactly do you expect?

> It seems like these
> issues are related so I'm putting them together.

Sorry, which issues exactly?

> Warning: require(Texy.php): failed to open stream: No such file or directory in
> C:\xampp\php\apigen on line 42
> 
> Fatal error: require(): Failed opening required 'Texy.php'
> (include_path='C:\xampp\php;C:\xampp\php/libs/FSHL;C:\xampp\php/libs/TokenReflection;.;C:\xampp\php\PEAR')
> in C:\xampp\php\apigen on line 42

This is definitely problem of your environment, it has nothing to do with NetBeans. Verify that your include_path (in php.ini) is set to the expected value and that apigen is correctly installed (simply run it from command line).

NetBeans does just one simple task - it simply runs the apigen script (selected in the IDE Options). So if there is any problem if you run apigen from command line, NetBeans cannot help you.

Feel free to reopen and provide your comment.

Thanks for reporting.
Comment 2 elimc 2012-06-13 16:53:57 UTC
I fixed the problem. I have a file called apigen.php and one called apigen which has no extension.

They are the same file except for line 20.

apigen
if (false === strpos('C:\xampp\php\pear', '@php_dir')) {

vs.

apigen.php
if (false === strpos('@php_dir', '@php_dir')) {

I changed apigen.php to match apigen and it worked. Not sure what the deal is with that.

As far as the UI, I guess I expected the file browser to recognize files and display their respective icons on Windows. Maybe Netbeans doesn't have that capability. I had thought I had seen it on Netbeans before, but maybe my mind was playing tricks on me.
Comment 3 Tomas Mysik 2012-06-14 05:04:57 UTC
It is just a guess (I don't use Windows) but IMHO Pear needs some changes in the Windows registry; if one installs Pear manually [1], the installer asks for importing some file to the Windows registry (one must then reboot or logout & login). Perhaps this step is not done by your XAMPP package?

Thanks for reporting.
Comment 4 elimc 2012-06-14 06:03:55 UTC
PEAR came included with my XAMPP package. However, I think I need to be clearer on my bug reports for any future reference. It was my first submitted bug, so I am trying to learn how to contribute.

I did install apigen with the CLI. When I installed it through PEAR, it came with the apigen file and no .php extension. When I tried to run this with 7.2 beta, apigen wouldn't work. I looked through the bugs filed for apigen and saw that there was a bug that had been reported and corrected (http://hg.netbeans.org/web-main/rev/b033ca402584). But I did not have nightlies with the latest updates, so I downloaded the standalone package for apigen. I could not get either to work until I changed the apigen file as reported earlier.

I'm concerned I may be adding confusion instead of insight. So, I guess we will see if anyone else eventually replicates what happened to me.
Comment 5 Tomas Mysik 2012-06-14 06:43:38 UTC
The development version of NetBeans can be downloaded here [1]. BTW no need to worry about details of your bug report - if we miss anything, we will ask :)

Thanks for reporting.
[1] http://bits.netbeans.org/download/trunk/nightly/latest/