Apache not starting on MAMP Pro - mysql

Apache wont start and it throws an error:
OR
Apache couldn't be started. Please check the log file for more information.
dyld: Symbol not found: _iconv
Referenced from: /usr/lib/libmecabra.dylib
Expected in: /Applications/MAMP/Library/lib/libiconv.2.dylib
in /usr/lib/libmecabra.dylib
/Applications/MAMP/Library/bin/apachectl: line 80: 2799 Trace/BPT trap: 5 $HTTPD "$
This is the same for multiple ports. The reccomended MAMP ports AND the regular apache ports.
MySQL starts perfectly fine.
Any suggestions?

Locked. Comments on this answer have been disabled, but it is still accepting other interactions. Learn more.
I updated to the latest version of yosemite last night.
You apparently have to go to your MAMP folder in Applications. Go to bin -> apache2 -> bin.
Then rename the file from envvars to _envvars.
I also came across another problem of it not working correctly. Make sure the ports are Apache defaults, NOT MAMP defaults (port 80 etc). If it works straight away, this should not apply to you.

Installing the latest release of MAMP 3 Version 3.0.7.3 in my case seems to solve this issue.

Related

configure mysql and apache2 module in webmin

This question might not be appropriate to ask in this forum but unfortunately the linux stack forum is not as active as here.
I installed mysql and apache2 successfully on my linux (kaliv2 x64 on vmware) and used it. I decided to use webmin as well but I have been facing some problems:
for mysql it says
The MySQL startup script (/usr/bin/safe_mysqld was not found on your system. Maybe MySQL is not installed, or your module configuration is incorrect
I can not find safe_mysqld in my directories. apparently safe_mysqld has been changed to mysqld.sock (/var/run/mysqld/mysqld.sock) however when I change /usr/bin/safe_mysqld to mysql.sock I still facing the error.
for apache2
The Apache configuration file /etc/apache2 does not exist. If you have Apache installed, adjust the module configuration to use the correct path.
I should mention that Apache Webserver is located in unused modules
Use locate command to find mysqld_safe, apache2 and maybe apachectl. In case you couldn't find mysqld_safe, look for mysqld. As for apache2 look for BOTH file and directory with this name - the first one is a command to start and stop the service, the second one is the server root directory which contains bin/httpd and bin/apachectl.
Apparently all configuration for MySQL is correct except
"Command to start MySQL server" : /etc/init.d/mysql
And for Apache I did as below
"Apache server root directory" :/etc/apache2
"Path to httpd executable" :/etc/init.d/apache2
"Path to httpd.conf or apache2.conf" :/etc/apache2/apache2.conf
"Path to access.conf" : Automatic

MySQL with MAMP does not work with OSX Yosemite 10.10

[EDIT]
The last version of MAMP with the last version of OSX Yosemite works fine.
I installed the beta of Yosemite two month ago, no problem with MAMP.
With the last release of OSX, Apache and MySQL did not work.
I found a solution for Apache by using the default port 80 and renaming the file envvars to _envvars in Applications/MAMP/Library/bin but have not been able to solve the problem with MySQL.
Per the Knowledge Base at MAMP for "Apache will not start - Yosemite Beta":
Rename the file envvars located in /Applications/MAMP/Library/bin into _envvars
You can also try this workaround posted at http://community.bitnami.com/t/mysqld-doesnt-start-in-mac-os-yosemite/25153
/Applications/XAMPP/xamppfiles/xampp
Look for:
$XAMPP_ROOT/bin/mysql.server start > /dev/null &
And add unset DYLD_LIBRARY_PATH on top of it. It should look like:
unset DYLD_LIBRARY_PATH
$XAMPP_ROOT/bin/mysql.server start > /dev/null &
I hope it helps
On MAMP, I was able to get MySQL to work by editing /Applications/MAMP/bin/startMysql.sh and unsetting DYLD_LIBRARY_PATH. So the updated script looks like this:
# /bin/sh
unset DYLD_LIBRARY_PATH
/Applications/MAMP/Library/bin/mysqld_safe... etc.
It also required killing all MySQL processes previously started by MAMP.
Had same issue today (running last version of Yosemite preview), Apache of XAMPP for OSX didn't work / start. Apache's log files contained no errors.
Finally I've solved this issue by removing XAMPP for OSX and installing latest version of AMPPS (http://www.ampps.com/downloads).
I don't know what's the different or what's the initial problem causing this behaviour - but with AMPPS everything just runs fine.
Hopefully this will work also for you.
This solved my problem with mysqld and apache on XAMPP:
As you can see, Yosemite DP 5 changes a few things in its library. Probably if you’re running XAMPP server on DP5 it won’t start mysqld (MySQL database daemon).
What you should do?.
STEP 1
. Download Homebrew. Open your terminal and then type:
. . . ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
STEP 2:
. Download LIBICONV, you have to type the following lines at terminal:
. . . brew install libiconv
. . . brew link libiconv —force
STEP 3
. Download SQLITE3, you have to type the following lines at terminal:
. . . brew install sqlite3
. . . brew link sqlite3 —force
STEP 4
. Go to Applications/XAMPP/xamppfiles/lib and then delete the following files (remember to empty your trash).
. . . libsqlite3.dylib (it is an ALIAS)
. . . libsqlite3.0.8.6.dylib
. . . libiconv.2.dylib
. . . libiconv (it is an ALIAS).
STEP 5
.Restart you “manager-osx.app” then try to turn on your mysql database.
Via: http://exequielplaza.com/funstuff/xampp-dp5-yosemite-mysqlfix.html
OP question was about MAMP.
I had this issue after installing OSX Yosemite and fixing the envvars to _envvars in the bin/apache2/bin folder.
Then I was getting this socket error. So I checked the error logs for mysql and noticed this:
InnoDB: Unable to lock ./ibdata1, error: 35
InnoDB: Check that you do not already have another mysqld process
gee I love error logs.
I found the process mysqld in Activity Monitor and killed it. Restarted MAMP and bingo! It all seems to hook up now!
I have resolved the situation by changing the default Port of Apache 2.4 updated after upgrading to MAC OS Yosemite.
The file is located in: /etc/apache2/httpd.conf
Change
Listen 80
to
Listen 8080
Restart your MAC, and try to launch again MAMP Services.
I fixed this by uninstalling XAMMP and reinstalling. If you go with this approach make sure to back up any content you may have saved in the XAMPP folder.
I am also running into the same problem with MAMP.
Absolutely clueless but with the other responses pointing toward a recent update in OSX I can believe that the problem stems from here. Uninstalled and reinstalled MAMP and MySQL is the only operation able to run...Apache still hangs. Will be downloading AMPPS to see if this corrects things.
I still needed to use envars so I was able to work around this by removing the following from the file. Found some errors when launching through terminal related to this
if test "x$DYLD_LIBRARY_PATH" != "x" ; then
DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib:$DYLD_LIBRARY_PATH"
else
DYLD_LIBRARY_PATH="/Applications/MAMP/Library/lib"
fi
export DYLD_LIBRARY_PATH
I have had the same issue and none of the above worked.
The Apache server in MAMP wouldn't work on port 80, or 8080 (The default Apache ports).
The issue is with Apache being enabled by default in Yosemite.
Either: change the Apache port in MAMP (Not preferable if you want to use the default port), or unload the launch Daemon by typing the following into the terminal:
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
Edit the below file, with this command on Terminal.app:
sudo vim /Applications/XAMPP/xamppfiles/mysql/scripts/ctl.sh
On line #59, delete this:
/Applications/XAMPP/xamppfiles/xampp startmysql > /dev/null &
and put this
/Applications/XAMPP/xamppfiles/bin/mysql.server start > /dev/null &
(save the file: ESC :wq!)
Restart All Servers on XAMPP.app (manager-osx)
Just to add to this thread, for those running Bitnami MAMP I had the same issue when upgrading to Yosemite (Mampstack-5.4.28-0). I solved it by going to
Applications/Mampstack-(your version)/mysql/scripts/ctl.sh
and adding the following
MYSQL_PIDFILE = ....
unset DYLD_LIBRARY_PATH <==== Add this
MYSQL_START = ....
MYSQL spun like silk. Hope this helps someone with the same problem.
I've found this video. This works for me.
Go to MAMP in Applications
then, bin > apache2 > bin and rename 'envvars' to '_envvars'
https://www.youtube.com/watch?v=brpKAM2WXhk
Above solutions didn't work for me as I had no conflicting mysqld instances running. After check the mysql error logs in MAMP, it was obvious msqld was having all sorts of issues starting. The main error was:
[ERROR] /Applications/MAMP/Library/bin/mysqld: unknown option '--//skip-networking'
Which pointed me to an option in my.conf file. Somewhere along the line with debugging another issue I had added:
//skip-networking
As an option or I had commented it out. Removing that line allowed mysql in MAMP to start correctly.

PhpStorm is not starting up

I just downloaded PhpStorm 5 on my quite fresh ubuntu.
During the first start I installed a couple of plug-ins.
Now - after the installation of those plug-ins - PhpStorm is not starting up anymore.
No splash screen is showing up. No error gets written on the terminal:
gue#ubuntu:~$ phpstorm
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
gue#ubuntu:~$
What shall I do with that drunken sailor?
I can't find any logfiles, no configuration file/directory in my home directory.
Since I'm used to Eclipse I've no clue where to look for a trace in this IntelliJ derivate...
If you're on Windows deleting the following directory helped me:
C:\Users\<user>\AppData\Roaming\JetBrains\
Some plug-ins can cause problems and prevent IDE from starting, if it happens, you should delete the directory containing plug-in manually. Location of this directory depends on the system and product, details are available in the FAQ.
For PhpStorm on Linux it would be ~/.WebIde50/config/plugins.
This happend to me too, I had created a custom vmoptions file, and entered incorrect values. I fixed it by deleting it in ~/.WebIde50/phpstorm.vmoptions
i had the same problem , i fixed it just with removing the file C:\Users\.PhpStorm2016.2
In linux, I fixed it by deleting vmoptions file of PhpStorm and then launching it again:
mv ~/.config/JetBrains/PhpStorm*/phpstorm64.vmoptions ~/.config/JetBrains/PhpStorm*/__phpstorm64.vmoptions
It might be possible if openjdk is installed then phpstorm not opened.
So remove first then follow steps that given in below link.
I solve the problem same way.
wiki.jetbrains.net/intellij/Installing_and_running_PHPStorm_on_Ubuntu
Here is how you fix this: Rename C:\Users\USERNAME.PhpStorm2016.3 to something else (anything, like PhpStorm2016.whatever) , it will start the program if you click on the phpStorm icon, then choose to import settings, and you're good to go ;)
I am using PhpStorm2020.2.1. I referred to Configuration directory. I accessed the folder %AppData%\JetBrains\PhpStorm2020.2, renamed it just in case I may need some files in future.
Voila! I can start my PhpStorm2020.2.1 again!
I had this problem yesterday and my OS is windows 10. phpStorm suddenly did not work and when I click on it nothing happened. I just downloaded JDK from this link (https://www.oracle.com/java/technologies/javase-downloads.html) and after installation, I set the environment value in the system setting for my java directory. You can use this link to set the environment (https://javatutorial.net/set-java-home-windows-10)
For me I had to remove all cache for the IDE located in:
~/.cache/JetBrains/
I have changed the VMOptions under the Help menu on MacOS and it just would not start up again. It just silently failed every time. I found the file at /Applications/PhpStorm.app/Contents/MacOS/phpstorm and ran it in the terminal, which gave me an output with the following error:
Invalid ReservedCodeCacheSize=3072M. Must be at most 2048M.
Luckily, it also gave me the path to the VMOptions file in one of the rows of the output, parseVMOptions: /Users/barnabas/Library/Application Support/JetBrains/PhpStorm2022.3/phpstorm.vmoptions in my case, so I could change it back to a valid configuration. Crisis averted.
Simple
Go to your task manager
end any task on php-storm
and restart the ide again
it will work
Open Terminal Linux Ubuntu 20.10
YOU#USER:~$ cd ~/.config
YOU#USER:~/.config$ ls
Obs: Locate the >>> JetBrains <<< folder, after that delete it your default app settings will disappear more it will open again
YOU#USER:~/.config$ sudo rm -rf JetBrains/
Open PHPSTORM

Mac OS X, MySQL Preference Pane doesn't work

I downloaded and installed MySQL 5.1.47 for OS X 10.6 using the DMG archive:
mysql-5.1.47-osx10.6-x86_64.dmg
I also installed MySQL.prefPane and MySQLStartupItem.pkg. MySQL.prefPane is a Preference Pane. The problem is, whenever I attempt to start/stop MySQL from the Preference Pane, System Preferences just hangs. It runs at about 50% CPU forever, eventually I have for force quit System Preferences. The same thing happens if I toggle "Automatically Start MySQL Server on Startup". Basically the MySQL Preference Pane is not functional.
Note that I have no problem starting MySQL from the command line:
sudo /usr/local/mysql/bin/mysqld_safe
I have tried reinstalling MySQL and the Preference Pane. I'm using the standard installation location, nothing out of the ordinary. Every time the MySQL Preference Pane just hangs.
I'm doing this on a Macbook Pro (Intel) running OS X 10.6.3. There are no old versions of MySQL on this machine.
Follow-up: Well it's now January 2012 so I figure I'd check to see if this has been fixed. I tried the latest MySQL 5.5.20 on OS X 10.6.8 and it's still broken - same behavior, it just hangs (had to force quit). I tried Jamie Wong's and carloandaya's suggestions, both did not work.
Under OS X Lion the following worked for me:
edit /usr/local/mysql/support-files/mysql.server
change lines ~ 46 & 47
basedir=
datadir=
to
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
For anyone still encountering this problem, see: http://bugs.mysql.com/bug.php?id=53232
Specifically, here's Rembert Oldenboom's response:
Issue still exists with mysql 5.5.8 on
brand new on mbp i7 2.8. With the
comments of others the fix was easy:
Edit
/usr/local/mysql/support-files/mysql.server
Search for "Set some defaults" about 4
lines down, replace the line
basedir=.
with
basedir=/usr/local/mysql
Then search for "Set pid file if not
given" about 3 lines down, replace the
line
mysqld_pid_file_path=$datadir/`hostname`.pid
with
mysqld_pid_file_path=$datadir/`/bin/hostname`.pid
Now the prefPane will work.
old stack overflow post! The world has changed a great deal, and I wanted to share my solution to this problem. The issue for me was the time zone tables AND Stephen's answers.
I did:
edit /usr/local/mysql/support-files/mysql.server
change lines ~ 46 & 47
basedir=
datadir=
to
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
AND updated my my.cnf.
I had a default-time-zone set to UTC. I had to comment out that line.
default-time-zone = UTC
to
# default-time-zone = UTC
Start server using plist file (check your plist path/name!):
sudo launchctl load -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
I then loaded MySQL time zone tables from Mac OS time zone files:
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root --password="YOUR_PASSWORD_HERE" mysql
I then stopped MySQL and restarted using my plist file.
sudo launchctl unload -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
sudo launchctl load -w /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
After that, I was able to stop/start using the preference panel!
I've installed and re-installed MySQL 5.5.15 using some of the tips that I found on the net. I found that selecting "install for all users of this machine" rather than "install only for current user" after double-clicking the preferences pane installation from the .dmg file makes it work. It's the only step that I changed in my many installations of MySQL on Snow Leopard.
Are you sure that panther supports 64 bits apps ?
Seems that when a I'm trying to open a 32 bits preference pane on snow leopard, the preference pane says "well this pane is 32bits, and you've got a 64bits macos, I'm restarting this pane"
Maybe it's hanging because it's the opposite ? getting 32bits preference pane and trying to open a 64bits pane ?
I had this problem too. It turned out that I installed the 32 bit MySQL server on my 64 bit Mac on accident. Woops! I would recommend verifying your processor type (32 or 64 bit) and reinstalling the according MySQL DMG.
It took me a couple of days to figure this out! MySQL was still running fine in the background, it's just the preference pane and connecting to it via terminal that would not work.
I hope this works for you!
This worked for me :
sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start
Problem I recognised was of permission to mysql.server
Other solutions here didn't work for me, but I cobbled together my own solution with the help of this bug ticket: https://bugs.mysql.com/bug.php?id=28854 (specifically the comment by BuB Javier)
The trick was twofold:
Create a /bin/pidof file using the code from http://www.cs.cmu.edu/~benhdj/Mac/unix.html
#!/bin/sh
ps axc|awk "{if (\$5==\"$1\") print \$1}"|tr '\n' ' '
Make sure it's executable.
Create a /etc/my.conf or ~/.my.conf file with the pid-file option specifying the path to the PID file (e.g. /usr/local/mysql/data/`hostname`.pid). (This is easy to do within MySQLWorkbench.)
I discovered this after trying to stop the server in MySQLWorkbench and it throwing "PID file not found!" error messages. Apparently specifying the pid-file location in the mysql.server file doesn't work.
I did change some permissions to _mysql:wheel here and there as frequently suggested, but I'm not sure that mattered in my case. After doing the two steps above, the preference pane was working again. If it doesn't work for you, try changing some file permissions.
MySQL 5.6.25 Community Server (64bit)
Mac OS X Mavericks (10.9.5)

"193: %1 is not a valid Win32 application" bug with a new Rails Application

I have a new rails application which I have created under Windows 7 by going into a directory and typing "rails newapp". The creation went fine, and when I access the root page, all is well. However, when I try to access a page that would access the database, I get this:
193: %1 is not a valid Win32 application.
In the developer.log. Mysql is running fine on my machine, and I have other applications which I have running in here in other directories, it's just this one that doesn't work. Any thoughts?
Here's the answer that worked for me. Turns out it was an issue of x64 vs. x32 issue and Rails 2.3.2.
The answer I got from here (http://osdir.com/ml/RubyonRailsTalk/2009-06/msg01775.html):
In case anyone else has the same
problem after a lot of struggling on
my Windows XP x64 machine, with MySQL
5.1.30 (x64) and Rails 2.3.2 installed, this above suggestiong
helped me.
Download libMySql.dll from here (http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/)
and putting it in ruby\bin solved the
problem.
Solved by following the directions on this blog here: http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/
which involves using the non installer version of the MySQL Connector http://dev.mysql.com/downloads/connector/c/
I could not get webrick to run on x64 Windows 7 system -- got the same error
"193: %1 is not a valid Win32 application”
If I just replaced the file libmysql.dll (as suggested in posts above), I got a different error.
"Incorrect MySQL client library version!"
My Path set like this: C:\Ruby187\bin;C:\Program Files\MySQL\MySQL Server 5.5\bin;C:\Ruby187\lib\ruby\gems\1.8\gems\rails-3.1.1\bin
(didn't need to change the path again)
This error occurs if you have a file with name "Program" in the root of your drive. Say for example you are trying to execute "C:\Program Files\SomeApp\Bin\SomeExe.Exe" it tries to execute "C:\Program" if it exists. In some situations a file with this name get created if you forget to quote "C:\Program Files..." with some commandline commands. This of course also applies for you D: drive, etc.
This error often occurs if you try to start services, but may occur in other situations.
Simply deleting the file C:\Program or D:\Program etc. solves the problem.
Having run into multiple issues setting up MySQL with Rails on Windows x64 my recommendations are:
Install the 32-bit version of MySQL, do not try to use the 64-bit version.
Install into a path with no spaces, do not accept a default like "C:\Program Files\MySQL\MySQL Server 5.5\"
Install the MySQL gem with an invocation similar to:
gem install mysql -- --platform=ruby --with-mysql-dir="D:\Programs\MySQL\MySQL-Server-5.5" --with-libmysqllib="D:\Programs\MySQL\MySQL-Server-5.5\lib\"
Be sure to uninstall/reinstall the gem whenever you install a new version of MySQL.
Make sure D:\Programs\MySQL\MySQL-Server-5.5\lib is included in your path, as well as D:\Programs\MySQL\MySQL-Server-5.5\bin. Make sure other copies of libmysql.dll are not being picked up from elsewhere on your path or your ruby installation directories.
This worked for me with mysql-5.5.15-win32, mysql-2.8.1-x86-mingw32 and Windows 7 x64.
Copy the file libmysql.dll from your MySQL installation directory and paste it into your Ruby installation's bin directory. You may need to download a zip archive from http://dev.mysql.com/downloads/mysql/ if your MySQL installation directory doesn't already include the file libmysql.dll.
Using Ruby (1.8.7) with MySQL(5.5) on Windows 7 and also getting error 193.
Copying the libmySQL.dll to ruby /bin worked fine for me.
C:\Work\redmine-2.4.1\config\database.yml content:
# Default setup is given for MySQL with ruby1.9. If you're running Redmine
# with MySQL and ruby1.8, replace the adapter name with `mysql`.
# Examples for PostgreSQL, SQLite3 and SQL Server can be found at the end.
# Line indentation must be 2 spaces (no tabs).
production:
adapter: mysql
database: redmine
host: localhost
username: root
password: "pwd#123"
encoding: utf8