MAMP server configuration error + PHP & MySQL error - php

I'm attempting to use MAMP on a windows laptop, so I can run a JavaScript experiment for my Phd. Unfortunately I can't seem to get past startup.When I open Mamp and select 'Start Servers' the following message pops up:
MAMP could not start servers as configuration is not valid. Please check logs...
Despite this message the Apache Server and My SQL Server boxes turn green to suggest they are active.
After looking through a few logs I find the following errors, but I'm not sure how to address or fix them.
Apache_error.log
[Sat Mar 03 08:10:15 2018] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
Php_error.log
[02-Mar-2018 21:10:22 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'D:\MAMP\bin\php\php7.1.7\ext\php_imagick.dll' - The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.
in Unknown on line 0
Mampapp.log
textMessage:The description for Event ID '-1073741724' in Source 'MySQL' cannot be found. The local computer may not have the necessary registry information or message DLL files to display the message, or you may not have permission to access them. The following information is part of the event:'D:\MAMP\bin\mysql\bin\mysqld.exe: ready for connections.
Version: '5.6.34-log' socket: '' port: 3306 MySQL Community Server (GPL)
'
Source:MySQL
Category:(0)
EntryType:Information
EventID:100
Thanks, any help is appreciated.

MAMP is for mac specific. You would better take Xamp cross-platform (personal recommendation) or Wamp that is windows specific.

Related

Symfony local server start

I have a very weird error with symfony. If I create a project with the default project creation command and go into the new folder to start the local webserver I get an error:
Jan 27 17:51:00 |DEBUG| PHP Reloading PHP versions
Jan 27 17:51:00 |DEBUG| PHP Using PHP version 7.4.2 (from default version in $PATH)
Jan 27 17:51:00 |DEBUG| PHP unable to find an available port error="lookup localhost on AN_INTERESTING_IP: no such host" path="/usr/bin/php" php="7.4.2"
Jan 27 17:51:00 |INFO | SERVER shut down, bye!
lookup localhost on AN_INTERESTING_IP: no such host
Yesterday I had no problems to start the local webserver.
Additionally, the interesting thing is, if I start the local webserver in an other non-symfony-directory the webserver starts without an exception.
Maybe someone has experience with this problem?
Kind regards!
I had the same problem today and for some reason the file /etc/hosts lacked an entry for localhost. So I added
127.0.0.1 localhost
After that it worked just fine.

Error 500 after php upgrade to 7.2(Wordpress/Virtualmin)

I let my host upgrade php version to 7.2 and after that I am getting error 500 message(Internal Server Error) on my wordpress page.
I am using Virtualmin.
When opening error log I get the following:
[Mon Jan 06 16:04:41 2020] [error] (13)Permission denied: exec of '/etc/httpd/bin/suexec' failed
[Mon Jan 06 16:04:41 2020] [error] Premature end of script headers: php7.2.cgi
I searched for the solution elsewhere but didn't find any solution.
How can I solve this?
You can go to >>> virtualmin >>> serve configuration >> website options
And make the change to
FCGI, fpm or what your system is available
I can't figure out the exact solution, but the web host told me that because this server had somehow been accessed by malware, this whole thing had to be closed down and the domain moved to a new address.
Moving domain to a new server solved this problem.
This would be something to ask your Hosting Provider, Potentially they have changed the PHP Handler (Eg from suPHP to FastCGI)
you have upgraded PHP, but your Virtualmin is not configured to use it correctly.
On Virtualmin go to system settings -> Re-check configuration, Virtualmin will detect new PHP version and configure it to use on your server.

Xdebug Problems with Eclipse PHP/PDT

I am having some difficulty using PHP Xdebug with the PHP's internal server provided by later releases of Eclipse. I am running Eclipse for PHP Developers Version: Oxygen.3a Release (4.7.3a). Interestingly enough Xdebug is working quite well with Apache 2, but not the internal PHP server.
Note that the PHP internal server is running. I can use ‘Run As – 1Run on Server’ to run a phpinfo PHP script and a helloworld PHP script. In these cases, the PHP internal server is started with the expected operands. The Linux ps command returns:
/usr/bin/php -S 127.0.0.1:8000 -t /home/peter/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/htdocs
Note that port 8000 is used to start the internal PHP server (correctly as best I can tell) and no –n operand is specified. This causes the /etc/php/7.0/cli/php.ini file to be processed (correctly as best I can tell).
Note that port 80 was originally used to run this server. Of course, port 80 is restricted to root applications. The change to port 8000 was required to get the internal PHP server to start at all.
Also note that checking ‘Use system default php.ini configuration’ and clearing the PHP ini file (optional) field in the PHP Executable preferences was required to get rid of the –n operand.
Also note that I am having some difficulty switching between ‘Run As’ and ‘Debug As’. In some cases I get a message showing that the required port (8000) is already in use. However, I have not found a way to reproduce this problem so far.
Using the procedures described above, the debug internal PHP server was started without the –n operand and is processing the php.cli file. The Linux ps command returns:
/usr/bin/php -S 127.0.0.1:17278 -t /home/peter/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/htdocs
One question is why port 17278 was specified, rather then the expected port (8000). Running phpinfo() shows that Xdebug appears to be installed in the debug internal web server. A few settings include:
xdebug support – enabled
IDE Key – peter (my userid on this machine)
DBGp – Common DeBuGger Protocol - $Revision: 1.145 $
xdebug.remote.enable – on
xdebug.remote.port – 9000
I tried to debug helloworld.php. The console has the following two messages. The first shows a 404 code. The second shows a 200 code:
[Sun Apr 22 17:36:20 2018] 127.0.0.1:50358 [404]: /?start_debug=1&debug_fastfile=1&use_remote=1&ZRayDisable=1&send_sess_end=1
&debug_session_id=1003&debug_start_session=1&debug_port=10137 - No such file or directory
[Sun Apr 22 17:36:20 2018] 127.0.0.1:50362 [200]: /Server-docroou/helloworld.php?start_debug=1&debug_fastfile=1&use_remote=1&ZRayDisable=1&send_sess_end=1
&debug_session_id=1003&debug_start_session=1&debug_port=10137
Note that the debug port is specified as 10137. Perhaps this is causing the problem. Port 10137 is normally used by the Zend Debugger which I am not using.
Does anyone have any ideas? Thank you in advance.
Problem fixed in PDT 6.0 : https://bugs.eclipse.org/bugs/show_bug.cgi?id=533928 ;)

Apache error log with mmap cache errors

I found many errors like this one
[Wed Nov 06 14:34:01 2013] [warn-phpd] mmap cache can't open C:\www\somefile.php (pid 4484 th 1668)
in my Apache error.log file. I tried to pinpoint the source of the error for some time but with no luck so far.
I find out that PHP Opcache is not the culprit.
error_log did not help. I think that my PHP source codes do not affect the error.
My stack: Apache 2.4.6, Windows, PHP 5.4.20
Did anyone encounter the same error?
Note: The error message I get is not the same as, for example, the error:
Mon Dec 1 21:08:20 2008] [warn-phpd] mmap cache can't open /var/www/vhosts/domain.com/httpdocs/file.php - Permission denied (pid 7831)
where there is a reason why mmap can't open the file.
This is caused by the total number of files that are opened by the server. If this is on a hosting company then they would be able to resolve this for you, if you are on your own system then try these steps:
Edit the apache startup script, \Program Files\Apache Software Foundation\Apache2.2\etc\init.d\httpd (may be different on your system) and add this before anything else:
ulimit -n 20480 #Raise the ulimit to a higher value then you have
Then Restart apache using httpd.exe restart
Hope this points you in a general direction
Disable MMAP. It's not supported on Windows.
It's an efficient method to map files to memory, to work on their content. Similar story with sendfile, an efficient method to send the content of a file as a response.
# https://httpd.apache.org/docs/2.4/en/mod/core.html#enablemmap
EnableMMAP On
EnableSendfile Off
Mon Dec 1 21:08:20 2008] [warn-phpd] mmap cache can't open
/var/www/vhosts/domain.com/httpdocs/file.php - Permission denied (pid
7831)
It seems that mmap doesn't has the rights to open the file, check file's folder rights .
Check file's folder properties .

Is it posible to use symfony 2.0 with WAMP server reliably?

This is my setup:
Windows XP SP2
WAMP 2.2 (php 5.3.9, apache 2.2.21, mysql 5.5.20)
Symfony 2.0
I run into a problem which is basically this:
Symfony-2.0 vendors Apache
Everything seems to be fine:
Running mysqltest.php connects OK to the database.
localhost/web/config.php is OK (just recommends setting up intl and APC)
"php app/bin doctrine:schema:create" creates the schema successfully.
But, when I try to:
"localhost/web/app.php"
"localhost/web/app_dev.php"
Apache crashes (windows popup saying something about php5ts.dll) and the only meaningful thing on the log says:
[Fri Apr 27 05:03:54 2012] [notice] Child 3528: Starting thread to listen on port 80.
[Fri Apr 27 05:07:00 2012] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Fri Apr 27 05:07:01 2012] [notice] Apache/2.2.21 (Win32) PHP/5.3.9 configured -- resuming normal operations
The solution to the question I referenced previously is to use php 5.4, well, as stated in
How do I get PDO to work on WAMP with PHP 5.4?
besides 5.4 not being officially supported by WAMP, many extensions don't work on 5.4 (APC, PDO maybe?).
Older versions of php are also ruled out. Official WAMP addons exist only for php 5.3.0 and 5.3.1, while symfony2 requires at least 5.3.2.
I also tried this on a Windows Server 2003 machine, with the same results.
This is taking so much time I'm even considering throwing in a Linux VM on the server with my usual symfony setup.
So I need to know whether it's posible to have a stable symfony2/WAMP2.2 environment which does not imply losing extensions and symfony2 functionality such as doctrine.
Any ideas are welcome.
I could not manage to make wampserver work.
I have also tried XAMPP 1.7.7 (php 5.3.8) and other distributions as well and ran into the same issue over and over.
Apparently the error message I have been receiveing is not useful at all, as suggested here, it's just a "something crashed" message.
I couldn't find any other message out of the logs in any of the installations, so I can't tell wether this is a symfony2 bug, a php bug or an apache bug.
Anyway, the error message I got being completely useless, all I could do is moving away from Windows. I setup a LAMP(Linux) environment in virtual machine and run it from a Windos host, it's been some months and I haven't had any issues so far.
I added the following lines at the end of my 'httpd.conf' file of the running Apache server based on the explanation given here:
<IfModule mpm_winnt_module>
ThreadStackSize 8888888
</IfModule>
And so far didn't get any issues.

Categories