Ampps on mac, additional configuration info

SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
Just updated my local dev server and found a couple of things that you need to do to get Jamroom (5.2.12) running on Ampps (2.5) on Mac (Yosemite).

***Edit*** Installing Jamroom on Ampps on Mac is now documented here:
https://www.jamroom.net/ultrajam/documentation/guides/2146/installing-ampps-locally-on-mac-os-x

Installing Ampps on Mac is easy, you just drag it to the Apps directory, but it won't run Jamroom until you do the following tweaks to the default configuration:

1. Enable ctype and iconv extensions:
In the Ampps control panel, click PHP, then Php Extension.
Enable ctype.so and iconv.so, then save.

2. Enable mod_deflate:
In the Ampps control panel, click Apache, then Configuration.
In the configuration file, search for mod_deflate, and uncomment the following line.
LoadModule deflate_module modules/mod_deflate.so
Then save.

Restart Apache from the Ampps control panel. You should now be able to run Jamroom.

Note: The above is true for php5.5, not sure about other versions. There is currently a Yosemite bug in ampps, to upgrade to php5.5 you need to start apache from the command line rather than from the control panel. The other php versions will then appear in Ampps control center > PHP > Change php version.
This is the command to paste into Terminal:
sudo /Applications/AMPPS/apache/bin/httpd -k start
(stop apache first if it is already running)

It's a Mac, so one more thing: System check will show that ffmpeg is not working. For each Jamroom site you have installed you can replace the file /modules/jrCore/tools/ffmpeg with the relevant download from here: http://ffmpegmac.net/
You will find your sites in /Applications/AMPPS/www/

***Edit - I've updated the info above, so you can ignore the thread below.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 12/04/14 04:02:54PM
brian
@brian
11 years ago
10,149 posts
Awesome Steve - thanks for the update, it's appreciated!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
Ahh, it would be, but...
Jamroom runs, but there is something else missing, but I can't find what it is.

Form saves (create blog, update blog, etc) don't work. No errors in any log I can find.
Quote: a system level error was encountered trying to validate the form values: error: Internal Server Error

I guess this is the problem Sweet was having here:
https://www.jamroom.net/the-jamroom-network/forum/installation-and-configuration/12466/ampps


Quote: 127.0.0.1 - - [26/Oct/2014:14:04:57 +0000] "POST /core/form_validate/__ajax=1 HTTP/1.1" 200 8 "http://demo7.ultrabubble.com/blog/create" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:33.0) Gecko/20100101 Firefox/33.0"
127.0.0.1 - - [26/Oct/2014:14:04:57 +0000] "POST /blog/create_save/__ajax=1 HTTP/1.1" 500 - "http://demo7.ultrabubble.com/blog/create" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:33.0) Gecko/20100101 Firefox/33.0"



--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 10/26/14 08:43:43AM
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
This problem is caused by running jrCore_url_string

Specifically this line:
$str = @iconv('UTF-8', 'ASCII//TRANSLIT', substr(trim($string), 0, 128));

If I comment it out and give $str another value I can save items (but of course they then have the wrong url string in the db).
//$str = @iconv('UTF-8', 'ASCII//TRANSLIT', substr(trim($string), 0, 128));
$str = "thiswillgivethewrongurl";

It feels like victory that I pinpointed the line of code causing the problem on my system, but I don't have a clue what to do about it :(

Any idea as to what I need to enable or change in my php ini?

The php.net manual says this:
Quote: You will need nothing if the system you are using is one of the recent POSIX-compliant systems because standard C libraries that are supplied in them must provide iconv facility. Otherwise, you have to get the » libiconv library installed in your system.

My php5.5 ini mentions iconv but only this:
; You can redirect all of the output of your scripts to a function.  For; example, if you set output_handler to "mb_output_handler", character
; encoding will be transparently converted to the specified encoding.
; Setting any output handler automatically turns on output buffering.
; Note: People who wrote portable scripts should not depend on this ini
;   directive. Instead, explicitly set the output handler using ob_start().
;   Using this ini directive may cause problems unless you know what script
;   is doing.
; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler"
;   and you cannot use both "ob_gzhandler" and "zlib.output_compression".
; Note: output_handler must be empty if this is set 'On' !!!!
;   Instead you must use zlib.output_handler.
; http://php.net/output-handler
;output_handler =
and then further down, this
[iconv]
;iconv.input_encoding = ISO-8859-1
;iconv.internal_encoding = ISO-8859-1
;iconv.output_encoding = ISO-8859-1



--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
SteveX
SteveX
@ultrajam
11 years ago
2,584 posts
Turns out there is a php extension iconv.so which needs to be enabled.

I'll update the first post in the thread with that hard won info :)


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
brian
@brian
11 years ago
10,149 posts
Thanks for the update Steve - glad to see it's working now :)


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags