I'm developing my web on Xampp for Linux 1.8.1 on my Linuxmint 14. Everything works fine, except I can't use .httaccess file. I have searched on google, and this problem related to mod_rewrite. So I tried several workaround I found upon Googling, but unfortunately none worked.
I have tried changing
AllowOverride none to All
Options all
Order allow, deny
Allow from all
to related Directory config on my /opt/lampp/etc/httpd.conf file.
But it do nothing..
Some other folks tell me to use this command
$ sudo a2enmod rewrite
But, it results "command not found" on my linuxmint 14.
I also tried to find /etc/apache2/sites-available/default, but there's no such path exist.
Please help, if anybody know what's wrong with my xampp system. I want to use my .httaccess file, that's the essence.
Make sure the apache2 is installed and running.
you can do that by writing the following in terminal:
sudo apt-get install lamp-server^
Related
Currently have an issue where i can not enable the ldap module in homestead. I have changed multiple php.ini files and still nothing seems to be working. Has anyone else had issues with enabling modules in homestead?
Side note: when trying to restart php-fpm i am getting a permission denied issue. They prompt me with a password (which i have tried "secret") but still cant seem to get that to work either.
Have restarted the homestead instance multiple times as well. no prevail.
any thoughts?
Citti
I think this question deserves its own answer as it's pretty easy to install the wrong version of ldap on homestead and not know why things aren't working.
TL;DR: Match the version of ldap to the version of php you're running & install with apt-get.
For example, running homestead v.6.1.0:
cd HOMESTEADFOLDER # on your host
vagrant ssh # access the guest machine
sudo apt-get update # update apt-get package list
sudo apt-get install php7.1-ldap # or whatever version
In my example above, if you switch out php7.1-ldap for php7.0-ldap everything appears to install correctly (it does in fact install correctly) but, in reality, you've installed the module to a version of php that's not actually running. It took me several attempts at rebooting FPM to figure out this is what I had done.
Side note: apt-get will restart php and reload modules so there's no need to try and reboot the server or mess about with .ini files.
While ssh-ed in to the guest machine, you can check that the package is installed with php -m
If ldap is a thing your project needs, it's probably a better idea to handle this in a script. The answer referenced by fh-jashmore in his comment above comment has a simple but solid example: How to automatically enable php extensions in Homestead on vagrant up
I have just installed MariaDB via homebrew on my Mac. At the end of the installation I got the following error:
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall mariadb`
If I run brew postinstall mariadb I get:
==> /usr/local/Cellar/mariadb/5.5.34/bin/mysql_install_db --verbose --user=andrew --basedir=/usr/loca
MariaDB is hosted on launchpad; You can find the latest source and
email lists at http://launchpad.net/maria
Please check all of the above before mailing us! And remember, if
you do mail us, you should use the /usr/local/Cellar/mariadb/5.5.34/scripts/mysqlbug script!
READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting
Which isn't helpful! The tutorial I was following told me to run unset TEMPDIR, then mysql_install_db --user=mysql --basedir=$(brew --prefix mariadb); running those results in the following:
/usr/local/opt/mariadb/bin/my_print_defaults: Can't read dir of '/usr/local/etc/my.cnf.d' (Errcode: 2)
Fatal error in defaults handling. Program aborted
chown: ./data: Operation not permitted
Cannot change ownership of the database directories to the 'mysql'
user. Check that you have the necessary permissions and try again.
I suspect the problem has something to do with the /usr/local/etc/my.cnf.d folder. I've seen this referred to in a couple of things I've tried, but it doesn't exist on my machine. I have tried a few different mysql_install_db commands I've found in other tutorials, but they all throw up a (different) error message.
Thanks for any help!
Just open the config file at /usr/local/etc/my.cnf with your editor and comment out the following line:
!includedir /usr/local/etc/my.cnf.d
Having been unsuccessful with further Googling of the problem I tried manually creating a /usr/local/etc/my.cnf.d and now the mysql_install_db command seems to have worked okay. I'm not sure if this is the appropriate solution or if my.cnf.d not existing is indicative of a deeper problem with the install but, as things seem to be working, I'll mark as resolved.
[Update] As I was a little unsure in my answer whether this was the 'correct' solution I just wanted to confirm that, after a month, everything is still working fine.
None of the solution here helped, I had to do this:
The post-install step did not complete successfully MySQL Mac OS Sierra
in short,
I made a backup of the folder /usr/local/var/mysql , then removed it
removed Mariadb brew remove mariadb
reinstalled Mariadb brew install mariadb
run brew services start mariadb
After that I could access with mysql -u root
You might have an orphaned configuration file. I was able to solve this problem by deleting an old /usr/local/etc/my.cnf. YMMV.
If you're having this problem in 2021
This worked for me:
sudo mysql_install_db
sudo chown -R <YOUR USER NAME HERE> /usr/local/mysql # for example sudo chown -R jperez /usr/mysql
sudo chgrp -R admin /usr/local/mysql
After that, running mysql or mariadb will show the database prompt.
This problem seems to have recently gone away.
A simple bew upgrade resolved the problem for me.
You may want to go
/usr/local/mysql
and delete the old MySQL file and install again
I'm using
mac OS 1.8.3
RVM 1.19.6
Ruby ruby 1.9.3p327
Apache 2.4
Phusion Passenger 3.0.19
After an error free install of Apache I launched the server and it worked.
I wrote a 'start_apache.sh' script:
#!/bin/bash
sudo /usr/local/apache2/bin/apachectl -k start
... which worked.
I then installed phusion passenger without error.
When I ran my start_apache.sh script, I got this error
httpd: Syntax error on line 504 of /usr/local/apache2/conf/httpd.conf:
Cannot load
/Users/perry_mac/.rvm/gems/ruby-1.9.3-p327/gems/passenger-3.0.19/ext/apache2/mod_passenger.so
into server:
dlopen(/Users/perry_mac/.rvm/gems/ruby-1.9.3-p327/gems/passenger-3.0.19/ext/apache2/mod_passenger.so,
10): Symbol not found: _unixd_config\n Referenced from:
/Users/perry_mac/.rvm/gems/ruby-1.9.3-p327/gems/passenger-3.0.19/ext/apache2/mod_passenger.so\n
Expected in: flat namespace\n in
/Users/perry_mac/.rvm/gems/ruby-1.9.3-p327/gems/passenger-3.0.19/ext/apache2/mod_passenger.so
After following ++ a lot ++ of 'Can't loadModule' Q&A's, I tried
cd /usr/local/apache2/bin
sudo apachectl -k start
... and it worked.
Using the script still does not.
Can someone explain why?
Many thanks!
Maybe it has to do with the working directory. Try this:
#!/bin/bash
cd /usr/local/apache2/bin/ && sudo ./apachectl -k start
Maybe this is some issue with user profile. Could you check environmental paramentrs values?
Thank you rzymek.
Your insight lead me to try this:
perrys-MacBook-Pro:bin perry_mac$ ls
ab apxs dbmmanage envvars-std htcacheclean htdigest httpd logresolve
apachectl checkgid envvars fcgistarter htdbm htpasswd httxt2dbm rotatelogs
perrys-MacBook-Pro:bin perry_mac$ pwd
/usr/local/apache2/bin
perrys-MacBook-Pro:bin perry_mac$ which apachectl
/usr/sbin/apachectl
perrys-MacBook-Pro:bin perry_mac$
Here's what happened: I downloaded, built, and installed apache 2.4. Did not know mac OSX 10.8.3 still had a working apache installation. I had read some web posts about how Apple had "removed web sharing" from this OS version. Turns out that means they removed a GUI element, but left the server in place. As you can see, I now have two versions of apachectl and httpd. I am untangling the rest of the mess now. As a follow-up, if anyone has advice on how to best proceed, please comment below. Otherwise I am going to start by modifying $PATH and see how that goes.
ADDENDUM:
Looks like this lead to a component of my confusion:
http://www.modrails.com/documentation/Users%20guide%20Apache.html#_phusion_passenger_is_using_the_wrong_apache_during_installation
... but the link leads to no remedy (as of 5/5/2013). There must be an option to set during the phusion passenger installation to ensure it points to the desired apache installation, but I can't locate it.
In the end, I removed the ver 2.4 of apache that I built and reverted to the ver 2.2 that is included with the OS. So far, it's all working.
I've been trying to figure out this problem for a while now and I thought I'd ask it here on stackexchange in case somebody out there has tried this and successfully got it to work.
I'm trying to install a RAD webapp tool called AppFlower through Xampp for Linux.
I am also experiencing issues with the command below:
symfony afs:init
symfony: command not found
This is the final command used to start up the AppFlower Studio dev environment, but this command doesn't work.
I have tried using:
./symfony afs:init
Same error as above
php ./symfony afs:init
gives a php error saying it isn't installed, but this is Xampp for Linux, so that command won't apply
/opt/lampp/etc/php.ini ./symfony afs:init
it will give a permission denied error, but even with 'sudo' in front, it says 'command not found'
The solution posted on the appflower forum is for xampp itself, but the problem I have is that they use the php.exe command to run the 'symfony afs:init' command, which xampp for linux doesn't have. The closest thing I could think of was to use the php.ini file, but (as seen above) that doesn't work.
Hopefully somebody can assist regarding this issue.
Regards,
Note. The process to run appflower on a manual version of lamp (one in which php, mysql, apache are all downloaded separately) is a lot more complex and the xampp installation is supposed to be much easier (in fact it is) but at the last point of this installation, this 'symfony afs:init' command is the only problem.
If you are already using Linux, why not install AppFlower directly. It's pretty straightforward, maybe i lost something on the way, understanding why you use XAMMP for Linux.
Installation instructions for AppFlower on Ubuntu,
http://www.appflower.com/doc/1_2/learn_install_git_on_ubuntu
I woork on my local site with MAMP. Everything was going right till yesterday. Now, when I run my code, I get a : "Fatal error: Uncaught exception 'PDOException' with message 'could not find driver'..." It seems that I have non installed driver but it worked well until this day. How can I fix this problem ?
Best,
Newben
Have you installed MacPorts? If your answer is "yes" open your Shell and type:
cd ~/
sudo nano .profile
change:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
replace with:
export PATH=/Applications/MAMP/Library/bin/:/Applications/MAMP/bin/php/php5.3.6/bin/:$PATH
close your Shell and re-open it
This is all. I found the solution here: thewebfactory
I had a similar problem. Sfblaauw's solution didn't work but it helped me identify the problem. First I installed php5-mysql using MacPorts:
sudo port install php5-mysql
During installation, I got the following warning:
Your php.ini contains a line that will prevent php5-mysql
and other PHP extensions from working. To fix this,
edit /opt/local/etc/php5/php.ini and delete this line:
extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20090626"
I commented out the line and restarted Apache. Everything seems to work fine now.