HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Please help - how to recompile php5 (http://www.howtoforge.com/forums/showthread.php?t=25052)

satimis 12th July 2008 17:06

Please help - how to recompile php5
 
Hi folks,


Ubuntu LAMP 6.06 amd64
SugarCRM 5.0
Postfix
Apache2
php5


I have SugarCRM 5.0 running on this LAMP box. But users can neither send nor receive emails. It comes to my notice that "Inbound Email cannot function without the IMAP c-client libraries enabled/compiled with the PHP module"


$ apt-cache policy php5-imap
Code:

php5-imap:
  Installed: 5.1.2-1
  Candidate: 5.1.2-1
  Version table:
 *** 5.1.2-1 0
        500 http://archive.ubuntu.com dapper/universe Packages
        100 /var/lib/dpkg/status


$ apt-cache policy libc-client2002edebian
Code:

libc-client2002edebian:
  Installed: 7:2002edebian1-13
  Candidate: 7:2002edebian1-13
  Version table:
 *** 7:2002edebian1-13 0
        500 http://archive.ubuntu.com dapper/universe Packages
        100 /var/lib/dpkg/status


I need to recompile php5 with;
Code:

./configure' '---enable-mbstring' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--with-curl'
However I can't find php5 source


$ sudo find / -name src -type d | grep php5
No printout


Also I need Debian package development tools:


$ apt-cache policy build-essential debhelper
Code:

build-essential:
  Installed: (none)
  Candidate: 11.1
  Version table:
    11.1 0
        500 http://hk.archive.ubuntu.com dapper/main Packages
debhelper:
  Installed: (none)
  Candidate: 5.0.7ubuntu13
  Version table:
    5.0.7ubuntu13 0
        500 http://hk.archive.ubuntu.com dapper/main Packages


I suppose need to install them running;
Code:

$ sudo apt-get install build-essential debhelper
and download php5 sourece;
Code:

$ sudo apt-get source php5

plus all the dependencies for building PHP:
Code:

$ sudo apt-get build-dep php5

Here I hesitate on which directory shall I run;
Code:

./configure' '---enable-mbstring' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--with-curl'

On "cd php5-xxx/debian" ???

Kinldy shed me some light assisting me to avoid making mistake. TIA


B.R.
satimis

falko 13th July 2008 13:13

Quote:

Originally Posted by satimis (Post 135672)
I suppose need to install them running;
Code:

$ sudo apt-get install build-essential debhelper
and download php5 sourece;
Code:

$ sudo apt-get source php5

plus all the dependencies for building PHP:
Code:

$ sudo apt-get build-dep php5

That's right.


Quote:

Originally Posted by satimis (Post 135672)
Here I hesitate on which directory shall I run;
Code:

./configure' '---enable-mbstring' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--with-curl'

On "cd php5-xxx/debian" ???

I don't think you have to run ./configure. I think the ./Configure statement is in one of the files, maybe in the debian subdirectory. I'd modify that, go one directory up, and run
Code:

dpkg-buildpackage
This creates new PHP5 .deb packages that you can install with
Code:

dpkg -i
.

satimis 13th July 2008 16:58

Hi falko,


Thanks for your advice.


Before reading your posting I already got it done.


Quote:

I don't think you have to run ./configure. I think the ./Configure statement is in one of the files, maybe in the debian subdirectory. I'd modify that, go one directory up, and run
Code:

dpkg-buildpackage
This creates new PHP5 .deb packages that you can install with
Code:

dpkg -i
.
# cd /home/satimis/php5-5.1.2/
It is the correct directory to run ./configure


# ls
Code:

acconfig.h        configure.in    INSTALL          mkinstalldirs        README.input_filter              README.Zeus              TODO
acconfig.h.in    CREDITS          install-sh      netware              README.PARAMETER_PARSING_API      regex                    TODO-5.1
acinclude.m4      cvsclean        LICENSE          NEWS                README.PHP4-TO-PHP5-THIN-CHANGES  run-tests.php            TODO-PHP5
aclocal.m4        cvsclean.bat    ltmain.sh        pear                README.QNX                        sapi                    TSRM
build            debian          main            php5.spec.in        README.SELF-CONTAINED-EXTENSIONS  scripts                  UPGRADING
buildconf        ext              makedist        php.gif              README.STREAMS                    server-tests-config.php  win32
buildconf.bat    EXTENSIONS      Makefile.frag    php.ini-dist        README.SUBMITTING_PATCH          server-tests.php        Zend
CODING_STANDARDS  footer          Makefile.gcov    php.ini-recommended  README.TESTING                    snapshot
config.guess      generated_lists  Makefile.global  README.CVS-RULES    README.TESTING2                  stamp-h.in
config.sub        genfiles        makerpm          README.EXTENSIONS    README.UNIX-BUILD-SYSTEM          stub.c
configure        header          missing          README.EXT_SKEL      README.WIN32-BUILD-SYSTEM        tests


# ls | grep configure
Code:

configure
configure.in

# ./configure --enable-mbstring --with-imap --with-imap-ssl --with-kerberos --with-curl
Code:

........
creating libtool
appending configuration tag "CXX" to libtool

Generating files
updating cache ./config.cache
creating ./config.status
creating php5.spec
creating main/build-defs.h
creating scripts/phpize
creating scripts/man1/phpize.1
creating scripts/php-config
creating scripts/man1/php-config.1
creating sapi/cli/php.1
creating main/php_config.h
creating main/internal_functions.c
creating main/internal_functions_cli.c
+--------------------------------------------------------------------+
|                        *** WARNING ***                            |
|                                                                    |
| You will be compiling the CGI version of PHP without any          |
| redirection checking.  By putting this cgi binary somewhere in    |
| your web space, users may be able to circumvent existing .htaccess |
| security by loading files directly through the parser.  See        |
| http://www.php.net/manual/security.php for more details.          |
+--------------------------------------------------------------------+
| License:                                                          |
| This software is subject to the PHP License, available in this    |
| distribution in the file LICENSE.  By continuing this installation |
| process, you are bound by the terms of this license agreement.    |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point.                            |
+--------------------------------------------------------------------+

Thank you for using PHP.

It went through without problem. Reboot PC.


I'm still struggling on the email problem. SugarCRM on the remote server can be visited on local PC on browser running;
Code:

https://domain.com/
Users can login their accounts. It is very strange users can't send and receive emails on SugarCRM. However the users, same users, can send and receive emails on local PC via SquirrelMail on browser without problem. The same users can receive email on Evolution of local PC. But they can't send emails on Evolution. (please see another thread on this forum)


B.R.
satimis


All times are GMT +2. The time now is 04:40.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.