php-pear not working at /var/www/

Asked by paul88

I want to install pear in /var/www/htmlCD/libs/PEAR but the installation stop at installation part and cannot finish. The last statement shown " Installation Completed !
Note: To use PEAR without any problems you need to add your
PEAR Installation path (/var/www/htmlCD/libs/PEAR)
to your include_path.

Using a .htaccess file or directly edit httpd.conf would be working solutions
for Apache running servers, too.

I have added the include_path in /etc/php5/apache2/php.ini and restart apache2 but no luck. It still cannot finish the installation.
Anyone have any idea to solve this problem???
Thanks in advance.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu apache2 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
svens (svens) said :
#1
Revision history for this message
paul88 (deasysyeung) said :
#2

Hi Svens, thanks for your reply.
I have checked the linked you given, it seemed worked. The include_path verify is at: /usr/share/php
But how can i set pear work at include_path = '/var/www/htmlCD/libs/PEAR' because i put the pear-go.php in the libs folder.
After i run http://localhost/htmlCD/libs/go-pear.php, the page shown below messages:
Note: To use PEAR without any problems you need to add your
PEAR Installation path (/var/www/htmlCD/libs/PEAR)
to your include_path.
Anything i need to do and then run PEAR with no problem?
Anyone have any idea to solve this problem???
Thanks in advance.

Revision history for this message
Jacobsallan (jacobsallan) said :
#3

I think you are saying is that your php.ini file has
include_path=/usr/share/php
and that this wants to be
include_path=/var/www/htmlCD/libs/PEAR:/usr/share/php

Revision history for this message
paul88 (deasysyeung) said :
#4

Hi Jacobsallan, i want to set more than one include_path,
Your suggestion is two include_path in one line separate by colon, Is this work?
include_path=/var/www/htmlCD/libs/PEAR:/usr/share/php
Can I write like this:
include_path=/var/www/htmlCD/libs/PEAR
include_path=/usr/share/php

The other problem is:
As i want to start http://localhost/htmlCD/index.php inside /var/www/htmlCD folder, it will show blank screen, so i open the error log and found out the problem shown below: may i know what is the problem?

::1 - - [11/Sep/2011:18:14:30 +0800] "GET /gifs/checkerboard.gif HTTP/1.1" 404 507 "http://localhost/htmlCD/libs/go-pear.php?step=config&restart=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110628 Ubuntu/10.10 (maverick) Firefox/3.6.18"
::1 - - [11/Sep/2011:18:14:33 +0800] "POST /htmlCD/libs/go-pear.php?step=install HTTP/1.1" 200 3063 "http://localhost/htmlCD/libs/go-pear.php?step=config&restart=1" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.18) Gecko/20110628 Ubuntu/10.10 (maverick) Firefox/3.6.18"

OR

[Sun Sep 11 12:27:16 2011] [error] [client ::1] PHP Fatal error: Uncaught exception 'SmartyException' with message 'Please use parent::__construct() to call parent constuctor' in /var/www/htmlCD/libs/smarty/Smarty.class.php:785\nStack trace:\n#0 /var/www/htmlCD/presentation/application.php(13): Smarty->__call('Smarty', Array)\n#1 /var/www/htmlCD/presentation/application.php(13): Smarty->Smarty()\n#2 /var/www/htmlCD/index.php(13): Application->__construct()\n#3 {main}\n thrown in /var/www/htmlCD/libs/smarty/Smarty.class.php on line 785

Anyone have any idea to solve this problem???
Thanks in advance.

Revision history for this message
Jacobsallan (jacobsallan) said :
#5

One line, though I'm not convinced this is correct.

include_path=/var/www/htmlCD/libs/PEAR:/usr/share/php

I think you should do some installation checks first. They will march you through the ini configuration files you need to touch to get anything at all to work.

http://www.kirupa.com/web/testphp.htm
http://pear.php.net/manual/en/installation.checking.php

Revision history for this message
paul88 (deasysyeung) said :
#6

Hi Jacobsallan,
I have go through and tested in the website: http://pear.php.net/manual/en/installation.checking.php
It seemed no problem.
I checked:
$pear -> worked
$pear version -> worked
Verify the included_path:
1) $ pear config-get php_dir -> worked, displayed -> /usr/share/php
2) $php --ini -> worked
3) $ php -c /path/to/php.ini -r 'echo get_include_path()."\n";' -> worked -> displayed -> .:/usr/share/php:/usr/share/pear
4) Create a new check_pear.php file -> worked -> displayed -> bool(true)

I have a file in /var/www/htmlCD name test.php, it worked, display similar as: http://www.kirupa.com/web/testphp.htm But when i typeed: http://localhost/htmlCD/index.php, it does not work and displayed blank.
Content of index.php:
<?php
//load Smarty library and config files
require_once 'include/app_top.php';
//load Smarty template file
$page = new Page();
$page->display('index.tpl');
?>

I think the first part LOAD SMARTY do not work.
Do you have any idea to test the SMARTY?

Thanks in Advance.

Revision history for this message
svens (svens) said :
#7

I remember seeing a web based auto-config tool for pear and other PHP modules.
I'll get back once I find it.

Revision history for this message
paul88 (deasysyeung) said :
#8

Hu Svern,

The display blanked and the ERRORLOG behind it is:

[Wed Sep 14 21:32:05 2011] [error] [client ::1]
PHP Fatal error: Uncaught exception 'SmartyException' with message
'Please use parent::__construct() to call parent constuctor' in /var/www/htmlCD/libs/smarty/Smarty.class.php:785\nStack trace:\n#0
/var/www/htmlCD/presentation/application.php(13): Smarty->__call('Smarty', Array)\n#1
/var/www/htmlCD/presentation/application.php(13): Smarty->Smarty()\n#2
/var/www/htmlCD/index.php(13): Application->__construct()\n#3
{main}\n thrown in /var/www/htmlCD/libs/smarty/Smarty.class.php on line 785

Do you have any idea of 'Smarty.class.php on line 785' ?
And do you have any idea of application.php(13) 'parent::Smarty(); '?

class Application extends Smarty

{

  // Class constructor

  public function __construct()

  {

    // Call Smarty's constructor

    parent::Smarty();

Thanks
Paul

Revision history for this message
Launchpad Janitor (janitor) said :
#9

This question was expired because it remained in the 'Open' state without activity for the last 15 days.