PDA

View Full Version : From PHP5-cli - php5-cgi issue



juni
08-27-2008, 06:36 PM
Hi ,

Situation as follows, i need to have php5-cgi with zend,ioncube libxslt. PHPSuExec / suPHP. (would be nice to have also more phps versions)

i set the options.conf php5_cgi=yes and php5_cli=no

The current php5-cli before the build:


php -v


PHP 5.2.6 (cli) (built: Aug 27 2008 23:56:55)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with the ionCube PHP Loader v3.1.33, Copyright (c) 2002-2007, by ionCube Ltd., and
with NuSphere PhpExpress v2.0.0, Copyright (c) 2002-2008 NuSphere Corp, by Dmitri Dmitrienko
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies


This is the log after ./build php n


Make Complete
Copying php.ini..
/usr/local/etc/php5/cgi/php.ini already exists, skipping.
Increasing memory limit to 20M...
Installing php...
Installing PHP SAPI module: cgi
Installing PHP CGI binary: /usr/local/php5/bin/
Installing PHP CLI binary: /usr/local/php5/bin/
Installing PHP CLI man page: /usr/local/php5/man/man1/
Installing build environment: /usr/local/php5/lib/php/build/
Installing header files: /usr/local/php5/include/php/
Installing helper programs: /usr/local/php5/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/php5/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment: /usr/local/lib/php/
[PEAR] Console_Getopt - already installed: 1.2.3
[PEAR] Archive_Tar - already installed: 1.3.2
[PEAR] Structures_Graph- already installed: 1.0.2
[PEAR] PEAR - already installed: 1.7.1
Wrote PEAR system config file at: /usr/local/php5/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
Installing PDO headers: /usr/local/php5/include/php/ext/pdo/
Installing ZIP headers: /usr/local/php5/include/php/ext/zip/lib
PHP 5.2.6 with suPHP Installed.
Writing data to /etc/httpd/conf/extra/httpd-suphp.conf
Done.
Rewriting all users httpd.conf files, please wait...
In debug mode
Debug set to level 10
root priv set: uid:0 gid:0 euid:0 egid:0
pidfile written
staring queue
done queue
Restarting apache.


After the ./build php n i get a still double php (although i configured php5-cgi only).

currently:

php -v

PHP 5.2.6 (cli) (built: Aug 28 2008 00:58:47)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with NuSphere PhpExpress v2.0.0, Copyright (c) 2002-2008 NuSphere Corp, by Dmitri Dmitrienko
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies



and

php-cgi -v


NuSphere PhpExpress requires Zend Engine API version 220060519.
The Zend Engine API version 220051025 which is installed, is outdated.

PHP 5.1.6 (cgi-fcgi) (built: Jul 16 2008 19:49:06)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
with the ionCube PHP Loader v3.1.33, Copyright (c) 2002-2007, by ionCube Ltd., and
with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies


I've tried to ./build zend and i still have the same zend engine v2.1.0 (insted of 2.2.0)

is it possible to update the php5-cgi to 5.2.2?
how to update to zend 2.2.0?

is it possible to specify a subdomain to be php5-cgi (or just php5-cli?)
i made ./build libxslt but i still dont see it in phpinfo.

At site, seems its php5-cgi wich is effective and working:

Server API CGI/FastCGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/etc/php5/cgi
Loaded Configuration File /usr/local/etc/php5/cgi/php.ini

I discovered that editing /usr/local/lib/php.ini effects on php5-cli
while /etc/php.ini & /usr/local/etc/php5/cgi/php.ini works for php5-cgi.

I'm also trying to open a php script on my site and i get "500 internal server error" while i dont have any issue opening phpinfo page..

as well on directadmin the plugins look weird with some errors, i think under php5-cli they were still ok.
example:
# AwStats Statistics END; if (strlen($data) > 1) { echo <<
email
AwStats Statistics
END; } $data = <<PHP Version Selector END; if (strlen($data) > 1)


Its getting too complicated for so simple thing :(
I appreciate your support.

Thanks.

Oleg_Bkk
08-27-2008, 07:40 PM
Juni, try to contact smtalk over MSN messenger. For the whole forum he is the one who can help. Oh yes, don't forget $$
I have the same frigging mess with my server: "custombuild, customapache, custombanana, custom-what-ever": is like Lego box for kids - you're on your own.

smtalk
08-28-2008, 12:57 AM
Why don't you read CustomBuild FAQ? :) For PHP-CGI you should use:


/usr/local/php5/bin/php-cgi -v


And why do you need AWstats 3rd party plug-in if it comes with DA? :) http://directadmin.com/features.php?id=894

Oleg_Bkk
08-28-2008, 04:48 AM
Why don't you read CustomBuild FAQ?
Great! there's one *** here at the forum who advised to "Read Fu**ng Manual", now Martinas suggest to read the forum topic.
btw, aw-stats don't work at all - so we gave up on them since first install.

smtalk
08-28-2008, 04:52 AM
Oleg_Bkk, what problems do you have with AWstats?

Oleg_Bkk
08-28-2008, 05:19 AM
Martinas, we have no problems with AWstats :-)
we don't use this feature , its a pain in the back to install, so we just gave up.
thanks some miracle, webalizer works on 80%.

smtalk
08-28-2008, 05:23 AM
No, it's very easy to install it :) You just need to run awstats.sh and restart DA. That's it.

Oleg_Bkk
08-28-2008, 05:50 AM
No, it's very easy to install it :) You just need to run awstats.sh and restart DA. That's it.
Martinas, I don't remember the whole story, why exactly we decided not to use it., but the decision was made out of desperation - it was not yesterday - it was more than half year ago.
Nobody wanted to debug it: time is money. As well as exim nonsence "spam assassin" - junk in the bin, to say the truth - the spam mail is coming and nothing prevents it.

smtalk
08-28-2008, 06:37 AM
If you want - I can install it for you :) (for free)

Oleg_Bkk
08-28-2008, 07:13 AM
Martynas, you're the kindest person on this forum :-)

smtalk
08-28-2008, 07:15 AM
Thank you :) (It's really great to hear these words) Waiting for your server details.

MadHag
08-28-2008, 07:56 AM
As well as exim nonsence "spam assassin" - junk in the bin, to say the truth - the spam mail is coming and nothing prevents it.

I am finding the Spam Filters feature in DA quite effective, I am using 'Block all e-mail containing the word' feature and my spam is dropping quite remarkably, I am dropping the email and not just storing in a spam folder so I don't have to go through it or that would defeat the object.

You have to be careful what words you use mind but adding things like viagra and penis and watches etc is proving to work :rolleyes:

David

Oleg_Bkk
09-01-2008, 09:39 PM
Finally, after purchasing new cartridge for the printer (I had to print lot of Linux and PHP manuals and how-to) - I fixed the problems myself.
David, my advice for extra-features on the server: stay away! I thought too, it might help, but in fact you can have some issues with untested scripts and server failures.
As long as it run basic functions - leave it, I did wasted 1 month (hell, yeah) for such improvements.

Chad McCan
12-01-2008, 12:19 PM
I have this same problem! Any input on how you fixed it?