hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : recompile php?
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

recompile php?

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 06-28-2007, 01:36 PM
surfmanjoe surfmanjoe is offline
Web Hosting Guru
 
Join Date: Sep 2002
Posts: 262

recompile php?


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?

Reply With Quote


Sponsored Links
  #2  
Old 06-28-2007, 01:40 PM
layer0 layer0 is offline
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.

Reply With Quote
  #3  
Old 06-28-2007, 01:46 PM
SparkSupport SparkSupport is offline
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.

__________________
SparkSupporT
http://sparksupport.com
sales@sparksupport.com
1- 408-335-0493

Reply With Quote
Sponsored Links
  #4  
Old 06-29-2007, 10:34 PM
surfmanjoe surfmanjoe is offline
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.
Reply With Quote
  #5  
Old 06-29-2007, 10:42 PM
tsj5j tsj5j is offline
WebHosting Master
 
Join Date: Dec 2006
Posts: 4,075
Quote:
Originally Posted by surfmanjoe View Post
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.

Reply With Quote
  #6  
Old 06-30-2007, 08:45 AM
surfmanjoe surfmanjoe is offline
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.
Reply With Quote
  #7  
Old 06-30-2007, 09:12 AM
surfmanjoe surfmanjoe is offline
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).

Reply With Quote
  #8  
Old 06-30-2007, 09:19 AM
omega36 omega36 is offline
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 !


Reply With Quote
  #9  
Old 06-30-2007, 09:23 AM
tsj5j tsj5j is offline
WebHosting Master
 
Join Date: Dec 2006
Posts: 4,075
Quote:
Originally Posted by surfmanjoe View Post
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.

Reply With Quote
  #10  
Old 06-30-2007, 10:38 AM
surfmanjoe surfmanjoe is offline
Web Hosting Guru
 
Join Date: Sep 2002
Posts: 262
the loaded configuration file shows

../php

what does that mean? thanks.

Reply With Quote
  #11  
Old 06-30-2007, 04:03 PM
surfmanjoe surfmanjoe is offline
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.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?