Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zenphoto will not run on the basic version of MAMP 4 #1143

Open
JatB opened this issue Mar 7, 2018 · 19 comments
Open

Zenphoto will not run on the basic version of MAMP 4 #1143

JatB opened this issue Mar 7, 2018 · 19 comments

Comments

@JatB
Copy link

@JatB JatB commented Mar 7, 2018

Zenphoto will not run on the basic version of MAMP 4 (https://www.mamp.info/), but will run on MAMP Pro.

This is an edge case, I know, and maybe not even your issue, but I wanted to make sure you were aware of it.

In the past I’ve always used MAMP on a Mac to test Zenphoto. The issue is that since version 4 came out, I have never been able to get it to run and have had to stay back on previous versions of MAMP 3.

I recently filed a bug report with appsolute GmbH, the packagers of MAMP. They were responsive, but did not offer any real help.

This was their reply-

“I was able to get to the first install page using Module PHP and PHP 7. I did have an issue with CGI PHP, but I did see what it was. It may be we don't have a CGI PHP extension this CMS needs. I was using MAMP PRO 4.41.”

So basically it works in their Pro version (which has more options and features), so it must not be an issue.

I have tested it on three different Macs, all running OS X 10.11.6.

When I try to open the Zenphoto site in MAMP I get “The connection was reset” error in Firefox.

If I open the MAMP apache_error.log I get-

[Wed Mar 07 03:00:47 2018] [notice] Digest: generating secret for digest authentication ...
[Wed Mar 07 03:00:47 2018] [notice] Digest: done
[Wed Mar 07 03:00:47 2018] [notice] FastCGI: process manager initialized (pid 919)
[Wed Mar 07 03:00:47 2018] [notice] Apache/2.2.34 (Unix) mod_wsgi/3.5 Python/2.7.13 PHP/7.2.1 mod_ssl/2.2.34 OpenSSL/1.0.2j DAV/2 mod_fastcgi/2.4.6 mod_perl/2.0.9 Perl/v5.24.0 configured -- resuming normal operations
[Wed Mar 07 03:01:22 2018] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/docs-assets
[Wed Mar 07 03:01:25 2018] [error] [client ::1] client denied by server configuration: /Applications/MAMP/htdocs/.DS_Store, referer: http://localhost:8888/MAMP/?language=English
[Wed Mar 07 03:01:49 2018] [notice] child pid 1114 exit signal Segmentation fault (11)
[Wed Mar 07 03:01:49 2018] [notice] child pid 1113 exit signal Segmentation fault (11)
[Wed Mar 07 03:01:49 2018] [notice] child pid 1112 exit signal Segmentation fault (11)
[Wed Mar 07 03:01:49 2018] [notice] child pid 924 exit signal Segmentation fault (11)
[Wed Mar 07 03:01:49 2018] [notice] child pid 923 exit signal Segmentation fault (11)
[Wed Mar 07 03:01:49 2018] [notice] child pid 922 exit signal Segmentation fault (11)
[Wed Mar 07 03:01:49 2018] [notice] child pid 921 exit signal Segmentation fault (11)
[Wed Mar 07 03:01:49 2018] [notice] child pid 920 exit signal Segmentation fault (11)
[Wed Mar 07 03:01:50 2018] [notice] child pid 1142 exit signal Segmentation fault (11)
[Wed Mar 07 03:01:51 2018] [notice] child pid 1144 exit signal Segmentation fault (11)

Here’s the top half of one of the httpd crash logs (I can get you the rest if you think it would help)-

Process:               httpd [1144]
Path:                  /Applications/MAMP/*/httpd
Identifier:            httpd
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        httpd [821]
Responsible:           httpd [1144]
User ID:               501

Date/Time:             2018-03-07 03:01:50.893 -0800
OS Version:            Mac OS X 10.11.6 (15G19009)
Report Version:        11
Anonymous UUID:        D8377318-ECDC-AFAE-453B-68B10F69B167


Time Awake Since Boot: 430 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000110
Exception Note:        EXC_CORPSE_NOTIFY

VM Regions Near 0x110:
--> 
    __TEXT                 000000010c449000-000000010c4aa000 [  388K] r-x/rwx SM=COW  /Applications/MAMP/*

Application Specific Information:
crashed on child side of fork pre-exec

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libdispatch.dylib             	0x00007fff945f06d7 _dispatch_queue_push_queue + 463
1   libdispatch.dylib             	0x00007fff945eeb06 _dispatch_queue_wakeup_with_qos_slow + 126
2   libdispatch.dylib             	0x00007fff945f513f _dispatch_mach_msg_send + 1952
3   libdispatch.dylib             	0x00007fff945f48dc dispatch_mach_send + 262
4   libxpc.dylib                  	0x00007fff912f2fbd xpc_connection_send_message_with_reply + 131
5   com.apple.CoreFoundation      	0x00007fff904a1b8f __66-[CFPrefsSearchListSource generationCountFromListOfSources:count:]_block_invoke_2 + 143
6   com.apple.CoreFoundation      	0x00007fff904a19bd _CFPrefsWithDaemonConnection + 381
7   com.apple.CoreFoundation      	0x00007fff904a0b46 __66-[CFPrefsSearchListSource generationCountFromListOfSources:count:]_block_invoke + 150
8   com.apple.CoreFoundation      	0x00007fff904a08e3 -[CFPrefsSearchListSource generationCountFromListOfSources:count:] + 179
9   com.apple.CoreFoundation      	0x00007fff904a01c4 -[CFPrefsSearchListSource alreadylocked_copyDictionary] + 324
10  com.apple.CoreFoundation      	0x00007fff904a84cf -[CFPrefsSource copyDictionary] + 47
11  com.apple.CoreFoundation      	0x00007fff904a848c ____CFXPreferencesCopyCurrentApplicationState_block_invoke + 28
12  com.apple.CoreFoundation      	0x00007fff904a81a7 +[CFPrefsSearchListSource withSnapshotSearchList:] + 215
13  com.apple.CoreFoundation      	0x00007fff904a806e __CFXPreferencesCopyCurrentApplicationState + 158
14  com.apple.CoreFoundation      	0x00007fff904a7c3c _CFLocaleCopyCurrentGuts + 268
15  libintl.8.dylib               	0x000000010c8b237f _nl_locale_name_default + 47
16  libintl.8.dylib               	0x000000010c8ae0d7 guess_category_value + 87
17  libintl.8.dylib               	0x000000010c8ad512 libintl_dcigettext + 1362
18  libintl.8.dylib               	0x000000010c8a7e49 libintl_dcgettext + 57
19  libintl.8.dylib               	0x000000010c8a7ea7 libintl_gettext + 39
20  gettext.so                    	0x000000010c8a23d9 zif_gettext + 1161
21  libphp7.so                    	0x000000010dcc89ad ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER + 173
22  libphp7.so                    	0x000000010dbf5916 execute_ex + 102
23  libphp7.so                    	0x000000010dbf5fbe zend_execute + 1390
24  libphp7.so                    	0x000000010db40f87 zend_execute_scripts + 615
25  libphp7.so                    	0x000000010da5b68c php_execute_script + 1596
26  libphp7.so                    	0x000000010dd90f1d php_handler + 1917
27  httpd                         	0x000000010c44a55d ap_run_handler + 109
28  httpd                         	0x000000010c44ac92 ap_invoke_handler + 418
29  httpd                         	0x000000010c48352b ap_process_request + 123
30  httpd                         	0x000000010c47f683 ap_process_http_connection + 147
31  httpd                         	0x000000010c46083d ap_run_process_connection + 109
32  httpd                         	0x000000010c460e15 ap_process_connection + 117
33  httpd                         	0x000000010c48ded2 child_main + 1602
34  httpd                         	0x000000010c48cb5e make_child + 414
35  httpd                         	0x000000010c48cf1f perform_idle_server_maintenance + 719
36  httpd                         	0x000000010c48bf4d ap_mpm_run + 1485
37  httpd                         	0x000000010c45387e main + 3278
38  libdyld.dylib                 	0x00007fff962855ad start + 1

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000112001000  rbx: 0x00007fc4d400b540  rcx: 0x0000000000000100  rdx: 0x0000000000000001
  rdi: 0x0000000112000000  rsi: 0x0000000112000080  rbp: 0x00007fff537b4db0  rsp: 0x00007fff537b4d90
   r8: 0x0000000112001000   r9: 0x0000000112000000  r10: 0x00007fff79ce9264  r11: 0x0000000000000206
  r12: 0x0000000000000480  r13: 0x00007fc4d400b540  r14: 0x00007fff79088180  r15: 0x00007fff79087e00
  rip: 0x00007fff945f06d7  rfl: 0x0000000000000206  cr2: 0x00007fff776374d8
  
Logical CPU:     0
Error Code:      0x020000b8
Trap Number:     133

To duplicate the error-

  1. On a Mac install MAMP 4.4.1 (or really any version of 4).
    Make sure to not install the Pro option. When you get to the install location screen click the “Customize” button and deselect MAMP PRO to get only the regular version of MAMP.

  2. Copy Zenphoto into Applications/MAMP/htdocs/ and try to run it. I tried both 1.4.14 and today’s support build. In Firefox I get nothing but “The connection was reset” errors.

In different versions of MAMP 3 in the past I would get similar httpd crashes when trying to run Zenphoto, but they were intermittent, and I could at least run the setup and Zenphoto itself. I believe I recently narrowed the issue down to permission errors. The solution was to do a Get Info on the “htdocs” folder and do an “Apply to enclosed items…” for the permissions. I would also set the permissions to loose during Zenphoto’s setup.

I’ve seen other people have issues with MAMP 4 (different than mine), and going back to 3.5.2 was their only solution, so maybe this is not your problem at all-

https://stackoverflow.com/a/48191391
https://stackoverflow.com/a/47863849
https://stackoverflow.com/a/47757951
https://stackoverflow.com/a/40138299

I also tried the latest version of AMPPS 3.8 and had no issues installing and running Zenphoto. The only drag is that AMPPS does not have Imagick/ImageMagick built-in like MAMP.

As I was just about to post this I noticed someone else was having the same issue and posted about it a few hours ago, so I know it’s not just me-
#100

@acrylian

This comment has been minimized.

Copy link
Member

@acrylian acrylian commented Mar 7, 2018

Sorry, I really cannot reproduce this. MAMP is the main tool to develop Zenphoto locally and I use it myself for years in standard non Pro configuration. Currently MAMP 4.4.1

@RolandTi

This comment has been minimized.

Copy link

@RolandTi RolandTi commented Mar 8, 2018

I've got something from appsolute (mamp dev) :
Hi,

I did get this to work with port 80 on MAMP Free. It didn't work on port 8888. The same was in MAMP PRO. It does seem overall very sensitive. I had several different error messages show up, and once a file was downloaded, so I don't know what is going on.

I will pass this onto the developers. I don't know how much time they will spend on it, because is a MAMP Free issue.

@acrylian

This comment has been minimized.

Copy link
Member

@acrylian acrylian commented Mar 8, 2018

Ah, Zenphoto indeed does not support non web standard ports currently as it is primarily aimed at standard configured web hosts (shared hosting for example).

Sorry that I didn't think of that at all as I since forever set ports to the standard 80 (Apache) and 3306 (MySQL). It makes a lot easier and even the local urls look simpler.

@RolandTi

This comment has been minimized.

Copy link

@RolandTi RolandTi commented Mar 8, 2018

Yippee ki-yay, changing default MAMP 4.4 port to default MySQL (3306) & Apache (80) worked !
Using PHP 7.2.1
👍

@JatB

This comment has been minimized.

Copy link
Author

@JatB JatB commented Mar 9, 2018

I can also confirm that this works. The only thing that needs to be changed for Zenphoto to run in MAMP 4 is for Apache to be set to port 80, not MAMP’s default port 8888.

It doesn’t matter if MySQL is on MAMP’s default port of 8889, or MySQL’s default 3306. It will still run as long as Apache is set to 80.

Which is unfortunate, because I already have something running on OS X’s default Apache server at port 80. I used MAMP’s port 8888 to still be able to test things on the same machine.

I understand that there are only so many hours in a day to fix things. I find it weird that Zenphoto worked in previous versions of MAMP on port 8888, but not in MAMP 4.x.x.

I want to thank RolandTi for the help and the tech support at appsolute GmbH, if they’re reading this, for figuring it out.

P.S.- One thing I noticed that I messed up on above is that I only needed to set my permissions to “relaxed (0664)”, not loose, during Zenphoto’s setup to prevent Apache from crashing in previous versions of MAMP. Just noticed the mistake now that I got it to run in MAMP 4 and was running Zenphoto’s setup again. I wanted to put it here if anyone ever does a search for the issue.

@acrylian

This comment has been minimized.

Copy link
Member

@acrylian acrylian commented Mar 13, 2018

Thanks for the feedback. We'll put investigation on port support on the long list but rather at the end with not much priority.

@HaraldWalker

This comment has been minimized.

Copy link

@HaraldWalker HaraldWalker commented Aug 22, 2018

With MAMP Pro 4 and 5 on macOS HighSierra I can't even run setup.
Apache on port 80.
PHP 7.2.7 (tried other versions as well)
Keep getting FastCGI: incomplete headers (0 bytes) received from server "/Applications/MAMP/fcgi-bin/php7.2.7.fcgi"
ZenPhoto 1.5 and latest from master. Other PHP apps (Wordpress, Bolt, Piwigo) run fine with same configuration. Tried clean MAMP installation and many Apache and PHP settings. Are there any default MAMP settings that need to be changed to make it work? (other than port 80 mentioned in this issue)

@acrylian

This comment has been minimized.

Copy link
Member

@acrylian acrylian commented Aug 22, 2018

Not that we are aware of. I am using MAMP 4 Standard with 7.2.1 on Sierra without any issue currently. Except the ports I just did a few adjustments like memory, enabling imagick and such but nothing that was necessary for anything except my convenience.

Did you google the problem perhaps? There are several finds like disabling xdebug if active among others:
http://documentation.mamp.info/en/MAMP-PRO-Mac/Troubleshooting/General/General5/

@HaraldWalker

This comment has been minimized.

Copy link

@HaraldWalker HaraldWalker commented Aug 22, 2018

@acrylian yes, search and tried various solutions for many hours. Even started debugging. Got as far as line 53 of global-definitions.php and then it stops. Don't understand why. Doesn't throw any kind of error I was able to catch.
I'll try it without MAMP next.

@acrylian

This comment has been minimized.

Copy link
Member

@acrylian acrylian commented Aug 22, 2018

That's really weird. Especially since that line does not really do that much… I have no idea either right now. Just mentioning the obvious but did you check file permissions? Sometimes that causes weird follow up issues.

@HaraldWalker

This comment has been minimized.

Copy link

@HaraldWalker HaraldWalker commented Aug 24, 2018

I've created an Apache/PHP 7.1 docker container that now is able to run ZenPhoto locally. If anyone is interested I'd be happy to share the dockerfile.

@acrylian

This comment has been minimized.

Copy link
Member

@acrylian acrylian commented Aug 25, 2018

Sure, any contribution is welcome. Someone else made a docker file some time ago (https://www.zenphoto.org/news/docker-zenphoto/) which seems not to be maintained so we gladly add another entry on our site's extension.

But I am still curious why it didn't work on your MAMP install…

@HaraldWalker

This comment has been minimized.

Copy link

@HaraldWalker HaraldWalker commented Aug 25, 2018

After I saw it working on MAMP (not PRO) I started comparing php.ini settings. ZenPhoto doesn't work on MAMP PRO when the gettext extension is enabled and FastCGI is being used. Have to run it in module mode (as MAMP does) or turn off gettext extension to use FastCGI. Then it works.
And that matches the reported line 53 of global-definitions.php where it tries to use gettext first.
Seems to be related to set env variables. If I set 'putenv('LC_ALL=en_US');' before calling gettext then it also works with FastCGI.

@acrylian

This comment has been minimized.

Copy link
Member

@acrylian acrylian commented Aug 25, 2018

Thanks for the info. That's sounds a bit weird and like a MAMP setup bug, doesn't it? I don't think that FastCGI and gettext is a that special combination. Best you report that to the MAMP vendor.

Seems to be related to set env variables. If I set 'putenv('LC_ALL=en_US');' before calling gettext then it also works with FastCGI.

That sounds like a locale issue. But I don't think not having e.g. the German one should not break everything, just e.g. German translations etc. should not work.

@HaraldWalker

This comment has been minimized.

Copy link

@HaraldWalker HaraldWalker commented Aug 25, 2018

There were some reports about gettext and FastCGI and generally that gettext is often causing issues if env variables aren't set or not set correctly and related to that there seem to be some differences between FastCGI and Apache module mode. Don't know Zenphoto code good enough to understand if you set LC_ALL before calling gettext for the first time.
As quick fix I now simply added putenv('LC_ALL=en_US'); in global-definitions.php and that solves it for now.

@acrylian

This comment has been minimized.

Copy link
Member

@acrylian acrylian commented Aug 26, 2018

I just looked quickly and we set the locale much later as the internal language related stuff is loaded later as well. It is also dependent of the current user/visitor and whay to early here.

But perhaps it does not harm to set a default here. Or we just remove the gettext call here as anyone should probably understand that error in English, too.

@thany

This comment has been minimized.

Copy link

@thany thany commented Feb 26, 2019

MAMP doesn't seem to want to run anything other than its own dashboard anyway. For me at least. I've put zenphoto in the htdocs, and it would happily still display the dashboard. So please stop using MAMP, as it seems to be fundamentally broken.

Proper development, on a side note, is best supported by a fully portable solution anyway. The one way to NOT get developers to work on zenphoto, is to require hours and hours of initial setup.

@acrylian

This comment has been minimized.

Copy link
Member

@acrylian acrylian commented Feb 27, 2019

So please stop using MAMP, as it seems to be fundamentally broken.

MAMP is not broken and does not require "hours of setup" as otherwise I surely would not be using it. We will continue to use it but no one forces you to do.

Check if you set the ports to the standard ports. Zenphoto indeed does not work with the default setting as discussed above already.
bildschirmfoto 2019-02-27 um 14 56 20

@thany

This comment has been minimized.

Copy link

@thany thany commented Feb 28, 2019

I was actually directing that remark towards the TS, who seemed to be having trouble setting up MAMP.

I had it all default/standard/virgin/vanilla. It wouldn't work, and it wouldn't say why. Especially not wanting to say why something breaks, is unforgivable in my book, especially given that it's technically commercial software.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.