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 191503 - PHP error when registering Zend Provider.
Summary: PHP error when registering Zend Provider.
Status: RESOLVED WORKSFORME
Alias: None
Product: php
Classification: Unclassified
Component: Zend (show other bugs)
Version: 7.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-31 23:09 UTC by eklutna
Modified: 2011-06-15 09:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screen Shot (138.07 KB, image/png)
2010-10-31 23:09 UTC, eklutna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description eklutna 2010-10-31 23:09:22 UTC
Created attachment 102734 [details]
Screen Shot

I downloaded, configured, and installed PHP on Ubuntu 10.04.  I also put the the path to the PHP interpreter in my $PATH variable.  There are 2 related bugs here:

Bug #1
When NetBeans attempts to search for a PHP interpreter, it will not find it unless it is in a path like "/usr/local/bin".  The search feature should find PHP interpreter if it is also in the $PATH variable.

Note:  The search feature I'm talking about is in Tools->Options->PHP General Tab.



Bug #2
If I manually set the path for "PHP 5 Interpreter:" in Tools->Options->PHP General Tab, I get the error below when attempting to register the Zend Provider:

Error Msg:
/usr/local/php/include/ZendFramework-1.10.8/bin/zf.sh: 44: php: not found

Workaround:
I have to add a symbolic link in "/usr/local/bin" to the PHP interpreter.


I consider this a bug since the command line recognizes PHP as seen below:

$ php -version
PHP 5.3.3 (cli) (built: Oct 29 2010 23:37:17) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies


Solution:
Have NetBeans look in $PATH for PHP interpreter.  This also applies to zf.sh and zf.php
Comment 1 Tomas Mysik 2011-06-03 10:20:41 UTC
Batch reassigning.
Comment 2 Tomas Mysik 2011-06-15 09:37:23 UTC
(In reply to comment #0)
> Solution:
> Have NetBeans look in $PATH for PHP interpreter.  This also applies to zf.sh
> and zf.php

We do so, of course. I think that your problem could be - have you logout and login back after you installed php? At least my understanding is that you have installed PHP yourself and from Ubuntu repository.

> Error Msg:
> /usr/local/php/include/ZendFramework-1.10.8/bin/zf.sh: 44: php: not found

IMHO this confirms my suspicion (zf.sh is ZF script, nothing related to NetBeans).

Thanks for reporting.
Comment 3 Tomas Mysik 2011-06-15 09:38:28 UTC
(In reply to comment #2)
> and from Ubuntu repository.

Should be "and NOT from Ubuntu repository", of course.