PDA

View Full Version : php 5.2 and zend trouble !


Dj-Grobe
03-26-2007, 02:45 AM
php -v
PHP 5.2.0 (cgi) (built: Mar 25 2007 23:39:51)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies


I have zend installed but not listed, some idea why?


If i run phpinfo script form web i have result:
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.2.6, Copyright (c) 1998-2007, by Zend Technologies

Why, form shell, zedn its not listed?

I have few scripts in cron need zend and that scripts not run.

I rebuild rpms form source php-5.2.0-100.iworx.src.rpm , i downloaded form experimental section under iworx ftp.


I apreciate help please.

IWorx-Socheat
03-26-2007, 10:13 AM
You could try restarting Apache while tailing /var/log/httpd/error.log. It might give you some clues as to why the Zend Optimizer extension isn't loading. Also, double check your php.ini file and make sure all the zend paths are correct.

Dj-Grobe
03-26-2007, 10:18 AM
zend its loading !!, but only avilable from apache, when i run php on shell, example: php -v

this is the result:

php -v
PHP 5.2.0 (cgi) (built: Mar 25 2007 23:39:51)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies



When check php using phpinfo from web:

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.2.6, Copyright (c) 1998-2007, by Zend Technologies


I dont know why this happen, some idea?
Can be related to something wrong on php-5.2.0-100.iworx.src.rpm ?

IWorx-Socheat
03-26-2007, 10:37 AM
Try stracing php -v and figure out which php.ini file it's looking at. The webserver always uses /etc/php.ini, whereas the command line php -v usually uses /etc/php-cgi.ini or /etc/php-cli.ini if they exist.

I really doubt it's an issue with the SRPM, but not impossible.

Dj-Grobe
03-26-2007, 10:41 AM
php -v
PHP 5.2.0 (cgi) (built: Mar 25 2007 23:39:51)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.2.6, Copyright (c) 1998-2007, by Zend Technologies


FIXED ! : )

I never check /etc/php-cgi.ini, after chek i see zend lines no exist : )

Thankyou for your support Socheat!! : )

hubbadubba
03-30-2007, 11:56 AM
Can someone (Socheat?) explain why the web server always look at /etc/php.ini when info.php in the control panel references /etc/php-cgi ?

Does this mean I need to keep both /etc/php.ini and /etc/php-cgi up to date when I make changes?

IWorx-Socheat
03-30-2007, 12:03 PM
By info.php, I assume you mean:
https://yourserver.com:2443/nodeworx/http.php?mode=phpinfo

on the System Services -> Web Server page in NodeWorx? If so, this is the reason:

To generate the content for that popup, we execute "php -i" on the server and use that output. Since we *executed* "php -i", that means the php info was run as a CGI script, so it uses /etc/php-cgi.ini.

In order for us to properly use mod_php (which uses /etc/php.ini), we'd have to request a page running on the Apache server running on port 80. Since there is no reliable place for us to put that page, exec'ing "php -i" was the only reliable way to get the phpinfo() contents.

Hopefully that made sense :)

hubbadubba
03-30-2007, 12:15 PM
yes- that's what I meant.

But I'm still a little confused- do I need to keep both updated php-cgi.ini and php.ini updated?

For instance, my test install of Moderbill today looked at php.ini and wanted me to change the memory_limit setting, which I had already done in /etc/php-ini.

IWorx-Socheat
03-30-2007, 12:29 PM
If ModernBill uses the php binary for any reason (i.e., a php script it calls from the command line or cronjob), then you will need to update the /etc/php-cgi.ini file. If ModernBill uses mod_php (i.e., a php page served up by Apache), then that would use the /etc/php.ini file.

Without know exactly what all ModernBill does, it would be hard for me to say which php.ini file you should use. You could probably symlink one to the other, if you didn't care that the php binary would also use the same ini file.

Does that help?