PHP built without CLI SAPI?

Support/Development for PHP
mfichtner
Forum User
Forum User
Posts: 22
Joined: Tue Dec 28, 2004 9:42 pm

PHP built without CLI SAPI?

Unread post by mfichtner »

I'm still using PHP 4.3.10, so feel free to yell at me in case this was changed in a later release. ;)

I noticed that the ART PHP package seems to have been built without --enable-cli (or, since it is a 4.3.x release, with --disable-cli). Was that a deliberate decision (for some technical reason), or did you just figure that CLI mode wasn't particularly important in the Plesk environment?

I use PHP for a number of command line tools and cron scripts, and it would make things a bit easier if I could use the CLI SAPI instead of CGI. For example, CLI mode adds some useful constants and overrides some INI directives.

Is there any chance the CLI SAPI could be added for a future release?

PS: I'm on a 3ES server running Plesk 7.5.4.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Just ran a quick check:

[root@mandarin ~]# rpm -qf `which php`
php-4.4.0-3.rhfc3.art

So its definitely there, I dont have the .spec file handy, but as I recall that the build process puts the CLI together separate from the apache module, so phpinfo() wouldn't return the build options used on that particular component.
mfichtner
Forum User
Forum User
Posts: 22
Joined: Tue Dec 28, 2004 9:42 pm

Unread post by mfichtner »

I didn't mean to say that the PHP binary isn't there. It definitely is. But it was built for CGI use -- not for the CLI. See the "(cgi)" indicator in the version information:

[root@cgn3 ~]# php --version
PHP 4.3.10 (cgi) (built: Feb 17 2005 09:31:19)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

As I understand it, using "--enable-cli" will build a *second* PHP binary that is optimized for the CLI environment. The PHP documentation has more information on that:

http://www.php.net/features.commandline
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Oh gotcha, well I wont be able to do anything until I get the development environment back operational again. I'll add it to the list though.
mfichtner
Forum User
Forum User
Posts: 22
Joined: Tue Dec 28, 2004 9:42 pm

Unread post by mfichtner »

scott wrote:I'll add it to the list though.
Thanks. :)
Post Reply