Fedora Linux Support Community & Resources Center
  #1  
Old 6th February 2007, 09:27 PM
brian928 Offline
Registered User
 
Join Date: Jan 2007
Location: Dallas Texas
Posts: 12
Rebuilding PHP on FC6

Hello,
I've installed a website CMS on my FC6 machine. It is complaining, not very loudly,
about 2 PHP extensions not built into PHP, mbstring and the GD library. It appears
that PHP needs to be re-compiled to install those extensions. These 2 extensions are
included in the standard PHP distribution, however they may not have been activated
duing the compile.

First, am I correct in assuming the above and I need to download, compile with the
proper compile flags, and install PHP?

Second, how do I install the rebuilt php? Do I create a RPM and have yum install it?
Or just copy the executable into the proper location?

Thanks,
Brian
Reply With Quote
  #2  
Old 6th February 2007, 10:24 PM
brunson Offline
Registered User
 
Join Date: Jun 2005
Location: Westminster, Colorado
Posts: 2,306
Quote:
First, am I correct in assuming the above and I need to download, compile with the proper compile flags, and install PHP?
No, that is incorrect. They are compiled as loadable modules and distributed in their own RPMs for Fedora.

Code:
yum install php-gd php-mbstring
To see a list of all php modules available try
Code:
yum list php-*
__________________
Registered Linux User #4837
411th in line to get sued by Micro$oft
Quote:
Basically, to learn Unix you learn to understand and apply a small set of key ideas and achieve expertise by expanding both the set of ideas and your ability to apply them - Paul Murphy
Reply With Quote
  #3  
Old 7th February 2007, 03:12 AM
brian928 Offline
Registered User
 
Join Date: Jan 2007
Location: Dallas Texas
Posts: 12
Thank you very much, this is exactly what I was needing. I did not think
that I had to go through the hassle of rebuilding PHP.

Thanks again,
Brian
Reply With Quote
  #4  
Old 7th February 2007, 04:29 AM
jvroig Offline
Registered User
 
Join Date: May 2006
Posts: 281
how about to set the --enable-memory-limit option? I want to be able to use the get_memory_usage() and get_memory_peak_usage() functions, which need PHP to be compiled with --enable-memory-limit. Do I really have to recompile PHP, or is there a quicker way to do it?

Thanks. And if I really have to recompile, can anyone help me in doing it for FC6? Thanks again
Reply With Quote
  #5  
Old 7th February 2007, 08:35 AM
zivko_sudarski Offline
Registered User
 
Join Date: Feb 2007
Location: Novi Sad
Age: 31
Posts: 88
you don't need PHP to compiled because Fedora use rpm, not source to install PHP

test script from php.net
?php
// This is only an example, the numbers below will
// differ depending on your system

echo memory_get_usage() . "\n"; // 36640

$a = str_repeat("Hello", 4242);

echo memory_get_usage() . "\n"; // 57960

unset($a);

echo memory_get_usage() . "\n"; // 36744

?>


su -
your root pass
rpm -qa|grep php
php-bcmath-5.1.6-3.3.fc6
php-dbase-5.1.6-1.fc6
php-soap-5.1.6-3.3.fc6
php-mbstring-5.1.6-3.3.fc6
php-ldap-5.1.6-3.3.fc6
php-readline-5.1.6-1.fc6
php-xmlrpc-5.1.6-3.3.fc6
php-mysql-5.1.6-3.3.fc6
phpMyAdmin-2.9.1.1-2.fc6
php-common-5.1.6-3.3.fc6
php-imap-5.1.6-3.3.fc6
php-xml-5.1.6-3.3.fc6
php-snmp-5.1.6-3.3.fc6
php-dba-5.1.6-3.3.fc6
php-cli-5.1.6-3.3.fc6
php-gd-5.1.6-3.3.fc6
php-pdo-5.1.6-3.3.fc6
php-5.1.6-3.3.fc6
php-Smarty-2.6.13-1.fc6
php-ncurses-5.1.6-3.3.fc6
Reply With Quote
  #6  
Old 7th February 2007, 10:25 AM
jvroig Offline
Registered User
 
Join Date: May 2006
Posts: 281
so just what rpm do i need to install for get_memory_usage() to work? anybody has any idea? I tried looking at the descriptions in yumex, but none of those seem to be the right rpm, but I"m not surprised since the memory functions are part of the php core, except that you just have to set the enable memory limit configuration... I'm completely lost here, I hope someone can straighten this out, I'm sure this is probably very simple. I always used xampp for development and recently just used yum to install php and mysql instead of DLing xampp, so I was surprised that the memory functions didn't work (get usage and get peak usage).

Thanks,
-JV
Reply With Quote
  #7  
Old 7th February 2007, 11:30 AM
zivko_sudarski Offline
Registered User
 
Join Date: Feb 2007
Location: Novi Sad
Age: 31
Posts: 88
(PHP 4, PHP 5)

getrusage — Gets the current resource usages
memory_get_usage

(PHP 4 >= 4.3.2, PHP 5)

memory_get_usage — Returns the amount of memory allocated to PHP

su -
your root pass
yum install php-5.1.6-3.3.fc6


in fedora when install php you have it!

1. Go to ->Application->Add/Remove Software
2.enter your root pass
3. Go to Search and type PHP
4. see what rpm you have

Last edited by zivko_sudarski; 7th February 2007 at 11:37 AM.
Reply With Quote
  #8  
Old 21st February 2007, 11:11 PM
aliber4079 Offline
Registered User
 
Join Date: Apr 2006
Posts: 39
Quote:
Originally Posted by brunson
No, that is incorrect. They are compiled as loadable modules and distributed in their own RPMs for Fedora.

Code:
yum install php-gd php-mbstring
To see a list of all php modules available try
Code:
yum list php-*
out of curiosity, how did you find out, did you search/post on the forum like us or do you somehow have the innate knowledge
Reply With Quote
  #9  
Old 21st February 2007, 11:19 PM
brunson Offline
Registered User
 
Join Date: Jun 2005
Location: Westminster, Colorado
Posts: 2,306
Not innate knowledge :-) Simply familiarity with Fedora and the available modules. "With experience comes wisdom"

If you ever wonder about what's in the repos try "yum list something" where something can contain globbing characters like '*'. yum list php*
__________________
Registered Linux User #4837
411th in line to get sued by Micro$oft
Quote:
Basically, to learn Unix you learn to understand and apply a small set of key ideas and achieve expertise by expanding both the set of ideas and your ability to apply them - Paul Murphy
Reply With Quote
  #10  
Old 21st February 2007, 11:29 PM
aliber4079 Offline
Registered User
 
Join Date: Apr 2006
Posts: 39
Quote:
Originally Posted by brunson
Not innate knowledge :-) Simply familiarity with Fedora and the available modules. "With experience comes wisdom"

If you ever wonder about what's in the repos try "yum list something" where something can contain globbing characters like '*'. yum list php*
thanks. Mainly I use the logic like Brian928, try to expect how something would work and make an educated guess, I just wanted to see if there is a more "efficient" thought process to finding answers. (no offense Brian )
Reply With Quote
  #11  
Old 22nd February 2007, 04:45 AM
brian928 Offline
Registered User
 
Join Date: Jan 2007
Location: Dallas Texas
Posts: 12
Quote:
Originally Posted by aliber4079
thanks. Mainly I use the logic like Brian928, try to expect how something would work and make an educated guess, I just wanted to see if there is a more "efficient" thought process to finding answers. (no offense Brian )
No offense taken. In the '90s I managed a unix (sun solaris) data center. The
sys admins had to build everything at that time. Sometimes with not so great
results. It could take a long time to get perl built with all the needed options. Not
to mention the undertaking of migrating from SunOS to Solaris. RH and FC is so
much simpler now than in those days. That's why I questioned the need to rebuild
a major piece of software. The folks on this forum have been very helpful in helping
me solve a couple of my problems. Now, in a couple years I may be able to help
someone out.

Thanks,
Brian
Reply With Quote
  #12  
Old 22nd February 2007, 08:54 PM
CD-RW Offline
Registered User
 
Join Date: Nov 2006
Posts: 557
Quote:
Originally Posted by jrroig
Thanks. And if I really have to recompile, can anyone help me in doing it for FC6? Thanks again
http://forum.fedoraforum.org/forum/s...d.php?t=140305
Reply With Quote
  #13  
Old 23rd February 2007, 04:29 AM
aliber4079 Offline
Registered User
 
Join Date: Apr 2006
Posts: 39
speaking of, is there a way to launch php extensions like in perl, with -M? or do you have to specify the fully qualified path to the extension. eg I want to do php pear/PEAR instead of php /usr/lib/php/pear...
Reply With Quote
Reply

Tags
fc6, php, rebuilding

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rebuilding Raid 5 briancosta Using Fedora 1 29th December 2008 03:26 AM
Rebuilding the Kernel firestorm Using Fedora 4 21st November 2005 12:48 AM
Kernel rebuilding binarykungfu Using Fedora 2 19th August 2005 08:15 PM


Current GMT-time: 21:58 (Thursday, 23-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Deggendorf Travel Photos on Instagram - Almassora - Quatro Barras Travel Photos on Instagram