View Full Version : error on make install PHP
doniking
09-06-2007, 05:13 AM
Hello.
I am running FreeBSD 6.2, Litespeed + PHP 4.4.7 installed from port, and they are all running well.
But the problem came up when I want to upgrade the PHP.
I got this error when doing make install PHP
esabsd# tar zxvf php-litespeed-4.1.tgz
x litespeed/
x litespeed/config.m4
x litespeed/Makefile.frag
x litespeed/lsapi_main.c
x litespeed/README
x litespeed/lsapilib.c
x litespeed/lsapilib.h
x litespeed/lsapidef.h
esabsd# cd ..
esabsd# make install
Installing PHP SAPI module: litespeed
:No such file or directory
*** Error code 1
Stop in /root/php-5.1.4.
esabsd#
I've tried PHP 5.2.3 and 5.1.4 and got same problem. even though I reconfigured PHP many times.
What made this error?
Thanks in advance
mistwang
09-06-2007, 08:49 AM
It is bug with PHP configuration on FreeBSD. The solution is to install CGI verion of PHP first, then build LiteSpeed SAPI without "make install", just copy over sapi/litespeed/php .
doniking
09-06-2007, 09:07 AM
Hi mistwang,
Thanks for your reply.
I thought so. I'll try it.
regards,
donie
mistwang
09-06-2007, 09:34 AM
"make install" will install PHP PEAR library for you, for LiteSpeed PHP, "sapi/litespeed/php" is the only thing you need if PEAR extensions are not used.
doniking
09-06-2007, 10:04 AM
It is bug with PHP configuration on FreeBSD. The solution is to install CGI verion of PHP first, then build LiteSpeed SAPI without "make install", just copy over sapi/litespeed/php .
can you please explain it step by step? maybe others will need it too.
Thanks
Regards,
donie
mistwang
09-06-2007, 10:25 AM
To install the CGI version of PHP, just configure PHP without neither "--with-litespeed" nor "--with-axps", the rest is the same, it will build the CGI version of PHP.
doniking
09-06-2007, 11:48 AM
if I did ./configure without neither "--with-litespeed" nor "--with-axps"
make
and copy, but hey, where is php file under sapi/litespeed ?
did I make a mistake?
Thanks,
donie
mistwang
09-06-2007, 12:15 PM
if I did ./configure without neither "--with-litespeed" nor "--with-axps"
make
and copy, but hey, where is php file under sapi/litespeed ?
did I make a mistake?
You just do "make install" to install PHP library files, so you can build matching php opcode cache like APC or eAccelerator.
After that you need to configure PHP with "--with-litespeed" option and "make", then copy.
doniking
09-06-2007, 10:07 PM
Thanks mistwang.
You rock!
First I installed PHP as usually into /usr/local/php5/ then reconfigure and recompile it with litespeed as you told to me, without "make install".
And, tada..., it works. All extensions needed successfully loaded.
And the new drupal site is online.
Thanks
regards,
donie
doniking
09-30-2007, 01:52 PM
I've created an article for this
http://wowtutorial.org/en/tutorial/3.html
Hope this helps others
mistwang
10-01-2007, 11:21 AM
Thank Donie,
Please feel free to add that link in our wiki page?
I've created an article for this
http://wowtutorial.org/en/content/installing%2C-configuring%2C-and-securing-litespeed-+-php5-+-suhosin-freebsd-6.2.html
Hope this helps others
* Setup up PHP [Y/n]: n
* Suffix for PHP script(comma separated list) [php]: php
* Would you like to change PHP opcode cache setting [y/N]? N
Correct me if I'm wrong but if you choose No for setup PHP then it wont ask you for suffix nor opcache? Just change it to Y.
doniking
10-01-2007, 11:56 AM
* Setup up PHP [Y/n]: n
* Suffix for PHP script(comma separated list) [php]: php
* Would you like to change PHP opcode cache setting [y/N]? N
Correct me if I'm wrong but if you choose No for setup PHP then it wont ask you for suffix nor opcache? Just change it to Y.
Ok thanks.
luckypoem
02-07-2011, 06:54 AM
i do as what u said.but when i visit mydomain.com/info.php,it didn't show php info but a download box pop out.why ?how to fix it?
webizen
02-07-2011, 09:32 PM
Check script handle for php at your lsws server level (Admin Console -> Configurations -> Server -> Script Handler -> php). It is likely missing.