Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: unforgiven on October 31, 2010, 08:13:15 AM

Title: mbstring PHP extension
Post by: unforgiven on October 31, 2010, 08:13:15 AM
hi, i'm using php and apache2 for web programming, nad i need the MBstring extension for php, how should i add this to php in Tinycore?

i download the source code of php 5.3.3 from repository, and see the build.sh, for enabling mbstring, i should just make a little change into the build.sh file.
but what is i don't know is, how to make tcz from that and replacing with that package i downloaded first.

any help?


p.s: sorry for my poor english
Title: Re: mbstring PHP extension
Post by: robc on October 31, 2010, 01:01:04 PM
are you using the php5 or the apache2 module extension?

the php5 extension has mbstring enabled
Title: Re: mbstring PHP extension
Post by: unforgiven on October 31, 2010, 03:54:22 PM
I understand now! i installed Apache2.tcz, php5.tcz and apache2-mod-php5.tcz as ondemand.
with your tips, i don't load apache2-mod-php5, and just load apache2 and php5, and use the instruction info in php5.tcz, and try to activate php5 in apache2
but i can't!  :-[
when i try to request a sample php file in default htdocs ("/usr/local/apache2/htdocs/test.php") i received 500 Internal server error, and in log file i have:
Code: [Select]
(13)Permission denied: exec of '/usr/local/apache2/htdocs/test.php' faild

and when i try to change htdocs to some directory in my /home/tc, i still receive 500 internal server error but in log files i have:
Code: [Select]
(8)Exec format error: exec of '/home/tc/htdocs/test.php' faild

what is wrong with my apache and php?  ???


===================================================
i found my problem, i should add this line in my every php file!:
Code: [Select]
#!/usr/local/bin/php-cgi

it worked, but it's not the good way!!!!, i should change permission of every file to 777!
is there any other solution to run php as apache_mod or somthing like that?
or should i download and configure and install fresh php source?
Title: Re: mbstring PHP extension
Post by: gutmensch on November 02, 2010, 04:58:29 AM
I will add mbstring to the mod extension as well, just left it out before because it increased the size by about 40%, now it's at about 25% - that's reasonable ;-)

[edit]now sent in for submission[/edit]
Title: Re: mbstring PHP extension
Post by: unforgiven on November 03, 2010, 12:53:22 AM
thank you very much, but i compile apache & php myself, and it's worked for me. but i'm really sure it's good apache-mod-php5 has mbstring  ;D