 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

6th February 2007, 09:27 PM
|
|
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
|

6th February 2007, 10:24 PM
|
|
Registered User
|
|
Join Date: Jun 2005
Location: Westminster, Colorado
Posts: 2,304

|
|
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
|

7th February 2007, 03:12 AM
|
|
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
|

7th February 2007, 04:29 AM
|
|
Registered User
|
|
Join Date: May 2006
Posts: 261

|
|
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
__________________
AMD Desktop:
"Thuban" Phenom II X6 1090T @ 4GHz, 8GB RAM, Radeon 4770, 320GB + 1TB HDDs
Dual-booting: Fedora 14 64-bit + Windows XP
ASUS EEE PC 1215T
AMD V105 1.2GHz, 2GB RAM, 320GB HDD
Fedora 14 64-bit
Registered Linux User #419754
|

7th February 2007, 08:35 AM
|
 |
Registered User
|
|
Join Date: Feb 2007
Location: Novi Sad
Age: 30
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
|

7th February 2007, 10:25 AM
|
|
Registered User
|
|
Join Date: May 2006
Posts: 261

|
|
|
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
__________________
AMD Desktop:
"Thuban" Phenom II X6 1090T @ 4GHz, 8GB RAM, Radeon 4770, 320GB + 1TB HDDs
Dual-booting: Fedora 14 64-bit + Windows XP
ASUS EEE PC 1215T
AMD V105 1.2GHz, 2GB RAM, 320GB HDD
Fedora 14 64-bit
Registered Linux User #419754
|

7th February 2007, 11:30 AM
|
 |
Registered User
|
|
Join Date: Feb 2007
Location: Novi Sad
Age: 30
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.
|

21st February 2007, 11:11 PM
|
|
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
|
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
|

21st February 2007, 11:19 PM
|
|
Registered User
|
|
Join Date: Jun 2005
Location: Westminster, Colorado
Posts: 2,304

|
|
|
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*
|

21st February 2007, 11:29 PM
|
|
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  )
|

22nd February 2007, 04:45 AM
|
|
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
|

23rd February 2007, 04:29 AM
|
|
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...
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
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
|
|
|
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: 19:15 (Tuesday, 21-05-2013)
|
|
 |
 |
 |
 |
|
|