
06-28-2007, 01:36 PM
|
|
Web Hosting Guru
|
|
Join Date: Sep 2002
Posts: 262
|
|
I want to add a new feature to my existing php, so, recompile php is expecting. I don't know how to recompile it.
What I did was
1) ./configure
2) make
3) make install
but everything keeps same as before, nothing changed.
I googled something about ./build clean, and ./build php, but it seems I don't have any command about ./build
I don't have control panel on my server, just php.
anybody may help me?
|

06-28-2007, 01:40 PM
|
|
Performance Specialist
|
|
Join Date: Dec 2004
Location: New York, NY
Posts: 10,338
|
|
Quote:
|
I googled something about ./build clean, and ./build php, but it seems I don't have any command about ./build
|
It sounds like that is specific to DirectAdmin.
Grab your current configure line - php -i | grep configure or look for "Configure Command" in phpinfo. Add the option you wanted to add and use that as your configure command, instead of ./configure.
|

06-28-2007, 01:46 PM
|
|
Web Hosting Master
|
|
Join Date: May 2006
Posts: 646
|
|
./configure --help will show the list of configuration switches that can be passed.
Use which are needed for you and then compile. After that php -i |grep config should show the configuration swithches you have passed.
|

06-29-2007, 10:34 PM
|
|
Web Hosting Guru
|
|
Join Date: Sep 2002
Posts: 262
|
|
I checked
php -i |grep config
already updated with the correct one. I also checked php.ini to make sure I entered the correct settings.
However, phpinfo() still shows the old things, the Build Date is old one. the Configure Command shows the old items too.
forgot mentioning, I compiled php as CGI/FastCGI, How may I force php use the new settings? thanks.
Last edited by surfmanjoe; 06-29-2007 at 10:40 PM.
|

06-29-2007, 10:42 PM
|
|
WebHosting Master
|
|
Join Date: Dec 2006
Posts: 4,075
|
|
Quote:
Originally Posted by surfmanjoe
I checked
php -i |grep config
already updated with the correct one. I also checked php.ini to make sure I entered the correct settings.
However, phpinfo() still shows the old things, the Build Date is old one. the Configure Command shows the old items too.
forgot mentioning, I compiled php as CGI/FastCGI, How may I force php use the new settings? thanks.
|
My guess is that the compiler either :
a.) Failed.
b.) Installed to the wrong directory.
You mentioned you compiled PHP as CGI/FastCGI. Are you using mod_php or something else?
Please remember that mod_php uses the CLI and not the CGI version of PHP.
|

06-30-2007, 08:45 AM
|
|
Web Hosting Guru
|
|
Join Date: Sep 2002
Posts: 262
|
|
I am not using apache, nginx instead. compiling and installing php 4.4.7 for the first time was smoothly. php script runs well.
however, after that, I found I did not include sendmail because it was not installed before the first installation of PHP.
then, I installed sendmail, tested sending under command line, the sendmail is working.
ok, I have to recompile php with '--with-sendmail=/usr/sbin/sendmail' to enable sendmail in php.
that's problem I have for now. I am using the same ./configure parameters as the previous php installtion, just added '--with-sendmail=/usr/sbin/sendmail', everything is ok, I did not see failed info for ./configure, make and make install
here is my ./configure
'./configure' '--prefix=/opt/php' '--enable-fastcgi' '--with-libdir=/lib64' '--with-config-file-path=../php' '--with-zlib' '--with-zlib-dir=..' '--with-gd' '--with-jpeg-dir=/usr' '--with-png-dir' '--enable-shmop' '--enable-track-vars' '--enable-sysvsem' '--enable-sysvshm' '--enable-magic-quotes' '--enable-sockets' '--prefix=/usr/local' '--with-xml' '--enable-calendar' '--with-iconv' '--with-mysql=/usr/local/mysql' '--with-sendmail=/usr/sbin/sendmail' '--enable-mbstring'
but this time phpinfo always shows the first time's settings, no sendmail supported, although php -i |grep config shows sendmail is included.
I also rebooted machine many times. no effect.
any idea on my problem? or may I uninstalled the previous php? thanks.
Last edited by surfmanjoe; 06-30-2007 at 08:50 AM.
|

06-30-2007, 09:12 AM
|
|
Web Hosting Guru
|
|
Join Date: Sep 2002
Posts: 262
|
|
also, I checked
/usr/local/bin/php /usr/local/lib/php.ini /usr/local/lib/php
all of them are dated with 2nd installation time. I have no idea on where phpinfo reads the old settings? say, build date and configure command, sendmail_from (shows no value).
|

06-30-2007, 09:19 AM
|
|
Aspiring Evangelist
|
|
Join Date: Apr 2007
Location: Melbourne, Australia
Posts: 410
|
|
--bindir=/usr/bin --sbindir=/usr/sbin or whatever it may be for you.
Hope this helps!
__________________
CentOSBlog.com - CentOS Management, Help, Tutorials and Guides, Security, News, Downloads, Scripts and more!
www.ctkn.net - Quick and easy tips and tutorials for Linux and Windows users !
|

06-30-2007, 09:23 AM
|
|
WebHosting Master
|
|
Join Date: Dec 2006
Posts: 4,075
|
|
Quote:
Originally Posted by surfmanjoe
also, I checked
/usr/local/bin/php /usr/local/lib/php.ini /usr/local/lib/php
all of them are dated with 2nd installation time. I have no idea on where phpinfo reads the old settings? say, build date and configure command, sendmail_from (shows no value).
|
Create a page with phpinfo();
Look at "Loaded Configuration File" to see which config file it loads.
|

06-30-2007, 10:38 AM
|
|
Web Hosting Guru
|
|
Join Date: Sep 2002
Posts: 262
|
|
the loaded configuration file shows
../php
what does that mean? thanks.
|

06-30-2007, 04:03 PM
|
|
Web Hosting Guru
|
|
Join Date: Sep 2002
Posts: 262
|
|
I fixed myself this morning.
What I did was
1) remove the source folder used by my first time installation
2) unzip the source file again.
3) ./configure, make, make install
done! everything is updated with the latest settings.
I believe each installation will leave something in the source folder, just post my experience here for reference to anyone who maybe have same situation with me.
thanks for all repliers above.
|
Related posts from TheWhir.com
|
| Title |
Type |
Date Posted |
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|