Re: PMA Errors
On Wed, Aug 18, 2010 at 11:10 PM, Ryan Schmidt ryandes...@macports.orgwrote: On Aug 18, 2010, at 13:20, Jasper Frumau wrote: On Wed, Aug 18, 2010 at 10:07 PM, Ryan Schmidt wrote: I guess ! has special meaning. You could try: grep -r -- ':q!' . (where . is the directory you want to search) Thank! jaspersmbp:www jasper$ grep -r -- ':q!' phpmyadmin phpmyadmin/config.inc.php:??5:q! jaspersmbp:www jasper$ cd phpmyadmin jaspersmbp:phpmyadmin jasper$ sudo vim config.inc.php Found the culprit as you expected. Did not exit properly using vim. All good now. Thanks a lot Ryan! So I guess -- makes grep look for ! instead of using its special meaning? Well, -- means treat everything that follows as a filename / directory, not a flag, even if it begins with a dash so that wasn't really very relevant here after all. I understand now. Thanks. You started by using double quotes, in which special characters like ! get interpreted. Like PHP I guess. Makes sense now. (! is special to Bash, not to Grep.) Since you didn't want that, using single quotes is the solution to suppress the special meaning. You also weren't specifying what to search, hence stdin was being searched, being standard input as far as I have found out. So it started looking for any input. hence grep's warning that you asked for a recursive search (which is applicable only to directories) but you didn't specify any directories. OK. Thanks a lot for teaching me something new Ryan. I appreciate it a lot! ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PMA Errors
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/18/10 14:07 , Ryan Schmidt wrote: On Aug 18, 2010, at 13:03, Jasper Frumau wrote: On Wed, Aug 18, 2010 at 7:38 PM, Ryan Schmidt wrote: :q! looks familiar as the command you would use to exit vi(m) without saving. Perhaps you somehow managed to insert that into your phpmyadmin config file, or another phpmyadmin file you edited. You could grep recursively in your document root for :q! and see what turns up. Good call. Not good at grep just yet. Tried: jaspersmbp:www jasper$ grep -r q! -bash: !: event not found jaspersmbp:www jasper$ grep -r 'q!' grep: warning: recursive search of stdin ^C which did not work. Still playing with it... I guess ! has special meaning. You could try: Most modern shells use it for history. (Since I prefer other interfaces to shell history, I usually disable it; see the manual for your shell.) Backquoting also works to disable its use as a history search. - -- brandon s. allbery [linux,solaris,freebsd,perl] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxtboAACgkQIn7hlCsL25XufwCfe0azrPkJYDkR1Zts+G/gmFws C3MAnikslsLPWWe2wfNGJriSY6c0GHEs =62/5 -END PGP SIGNATURE- ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PMA Errors
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/19/10 17:26 , vincent habchi wrote: Le 19 août 2010 à 19:48, Brandon S Allbery KF8NH a écrit : I guess ! has special meaning. You could try: Most modern shells use it for history. (Since I prefer other interfaces to shell history, I usually disable it; see the manual for your shell.) Backquoting also works to disable its use as a history search. Tcsh does not. A grep -r 'q!' works like a charm on my terminal. You can try that, if you're not awfully terrified by going C-shell like! :) [mress:~] allbery% grep !q /etc/passwd q: Event not found. [mress:~] allbery% grep !q /etc/passwd q: Event not found. [mress:~] allbery% grep '!q' /etc/passwd q: Event not found. [mress:~] allbery% Are you zapping histchars, like I usually do? (Admittedly, I haven't checked to see if OSX does it globally.) - -- brandon s. allbery [linux,solaris,freebsd,perl] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxtqHUACgkQIn7hlCsL25XaLwCfYeg3VCehDrNfPQZbrpPDjcdo MCMAn1fx/iWtCCBCOJ9NN4o85SGQ4J4G =CiRe -END PGP SIGNATURE- ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PMA Errors
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/19/10 17:26 , vincent habchi wrote: Tcsh does not. A grep -r 'q!' works like a charm on my terminal. You can try that, if you're not awfully terrified by going C-shell like! :) Oh, it occurs to me tcsh may well be smart enough these days to recognize and ignore an illegal history substitution (!') instead of barfing Illegal history substitution.. Just be aware that you will get an unpleasant surprise if it *does* look like a valid history substitution. - -- brandon s. allbery [linux,solaris,freebsd,perl] allb...@kf8nh.com system administrator [openafs,heimdal,too many hats] allb...@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxtqdQACgkQIn7hlCsL25WkaACeIseTC3jH/zjwF6LEdlY94Bq+ vyoAn3XK0plPusDX55hRuvBjqO7h7Dna =QZRt -END PGP SIGNATURE- ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PMA Errors
Hi! Le 19 août 2010 à 23:56, Brandon S Allbery KF8NH a écrit : [mress:~] allbery% grep !q /etc/passwd q: Event not found. [mress:~] allbery% grep !q /etc/passwd q: Event not found. [mress:~] allbery% grep '!q' /etc/passwd q: Event not found. [mress:~] allbery% Are you zapping histchars, like I usually do? (Admittedly, I haven't checked to see if OSX does it globally.) You're right with grep !q, the initial message was about grep q!… However, grep \!q seems to work fine. I would not put my hand in fire, though, as the French saying goes. Cheers, Vincent ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PMA Errors | Odd redirect to localhost
On Aug 18, 2010, at 00:52, Jasper Frumau wrote: 1/I Installed PHPMyAdmin using MacPorts. When I go to localhost/phpmyadmin I get the logon screen where I can login as root. But after logging in I only see ��5:q! Very odd. Here the access log: :q! looks familiar as the command you would use to exit vi(m) without saving. Perhaps you somehow managed to insert that into your phpmyadmin config file, or another phpmyadmin file you edited. You could grep recursively in your document root for :q! and see what turns up. (I changed DocumentRoot about a week ago as I prefer things to be in www and I wanted to start working with virtualhost as well..) Ok, just make sure your cgi-bin directory isn't inside your DocumentRoot. (By default, MacPorts would put a cgi-bin inside /opt/local/www.) And these are the CHMOD/CHOWN right on phpmyadmin and all files is www for that matter: jaspersmbp:www jasper$ ls -l | grep phpmyadmin drwxr-xr-x 100 jasper admin 3400 Jul 29 12:11 phpmyadmin Should I change the group pma is in and all files for that matter? I don't think it matters. As long as the web server can read, but not write, the web files, you can use whatever permissions and ownership pleases you. 2/When I enter gmail in the address bar or Facebook the browser - Firefox - now redirects me to localhost instead of forwarding me to Google. This is my hosts file: jaspersmbp:extra jasper$ cat /etc/hosts ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1localhost 127.0.0.1jaspersmbp 255.255.255.255broadcasthost ::1 localhost fe80::1%lo0localhost Any ideas how this could happen? Hard to know. If I remember correctly, when you type something into the Firefox address bar that is not an address, Firefox does a Google search for you. You can turn this off in Firefox's about:config. If you turned it off, or are using a browser like Safari that doesn't do this anyway, then the browser just hands what you typed to the DNS server; in that case, perhaps your DNS server is responding with the IP address of some HTTP server instead of telling you what you typed is not a valid hostname. These types of helpful DNS servers are becoming more popular, and usually the HTTP server whose IP address they give you will then display a search page of its own. But maybe it is misconfigured and redirecting to localhost. Or maybe your DNS server is handing you the IP address of localhost in the first place. You can test this by doing some DNS lookups of nonexistent servers and seeing what IP addresses you get back, and what happens when you visit those IPs in a web browser. ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PMA Errors
On Wed, Aug 18, 2010 at 7:38 PM, Ryan Schmidt ryandes...@macports.orgwrote: On Aug 18, 2010, at 00:52, Jasper Frumau wrote: 1/I Installed PHPMyAdmin using MacPorts. When I go to localhost/phpmyadmin I get the logon screen where I can login as root. But after logging in I only see ��5:q! Very odd. Here the access log: :q! looks familiar as the command you would use to exit vi(m) without saving. Perhaps you somehow managed to insert that into your phpmyadmin config file, or another phpmyadmin file you edited. You could grep recursively in your document root for :q! and see what turns up. Good call. Not good at grep just yet. Tried: jaspersmbp:www jasper$ grep -r q! -bash: !: event not found jaspersmbp:www jasper$ grep -r 'q!' grep: warning: recursive search of stdin ^C which did not work. Still playing with it... ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PMA Errors
On Aug 18, 2010, at 13:03, Jasper Frumau wrote: On Wed, Aug 18, 2010 at 7:38 PM, Ryan Schmidt wrote: :q! looks familiar as the command you would use to exit vi(m) without saving. Perhaps you somehow managed to insert that into your phpmyadmin config file, or another phpmyadmin file you edited. You could grep recursively in your document root for :q! and see what turns up. Good call. Not good at grep just yet. Tried: jaspersmbp:www jasper$ grep -r q! -bash: !: event not found jaspersmbp:www jasper$ grep -r 'q!' grep: warning: recursive search of stdin ^C which did not work. Still playing with it... I guess ! has special meaning. You could try: grep -r -- ':q!' . (where . is the directory you want to search) ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PMA Errors
On Aug 18, 2010, at 11:03 AM, Jasper Frumau wrote: On Wed, Aug 18, 2010 at 7:38 PM, Ryan Schmidt ryandes...@macports.org wrote: On Aug 18, 2010, at 00:52, Jasper Frumau wrote: 1/I Installed PHPMyAdmin using MacPorts. When I go to localhost/ phpmyadmin I get the logon screen where I can login as root. But after logging in I only see ��5:q! Very odd. Here the access log: :q! looks familiar as the command you would use to exit vi(m) without saving. Perhaps you somehow managed to insert that into your phpmyadmin config file, or another phpmyadmin file you edited. You could grep recursively in your document root for :q! and see what turns up. Good call. Not good at grep just yet. Tried: jaspersmbp:www jasper$ grep -r q! -bash: !: event not found jaspersmbp:www jasper$ grep -r 'q!' grep: warning: recursive search of stdin ^C which did not work. Still playing with it... Try: cd localhost/phpmyadmin grep -R -e q\! . // Brad___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PMA Errors
On Wed, Aug 18, 2010 at 10:07 PM, Ryan Schmidt ryandes...@macports.orgwrote: On Aug 18, 2010, at 13:03, Jasper Frumau wrote: On Wed, Aug 18, 2010 at 7:38 PM, Ryan Schmidt wrote: :q! looks familiar as the command you would use to exit vi(m) without saving. Perhaps you somehow managed to insert that into your phpmyadmin config file, or another phpmyadmin file you edited. You could grep recursively in your document root for :q! and see what turns up. Good call. Not good at grep just yet. Tried: jaspersmbp:www jasper$ grep -r q! -bash: !: event not found jaspersmbp:www jasper$ grep -r 'q!' grep: warning: recursive search of stdin ^C which did not work. Still playing with it... I guess ! has special meaning. You could try: grep -r -- ':q!' . (where . is the directory you want to search) Thank! jaspersmbp:www jasper$ grep -r -- ':q!' phpmyadmin phpmyadmin/config.inc.php:??5:q! jaspersmbp:www jasper$ cd phpmyadmin jaspersmbp:phpmyadmin jasper$ sudo vim config.inc.php Found the culprit as you expected. Did not exit properly using vim. All good now. Thanks a lot Ryan! So I guess -- makes grep look for ! instead of using its special meaning? ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
Re: PMA Errors
On Aug 18, 2010, at 13:20, Jasper Frumau wrote: On Wed, Aug 18, 2010 at 10:07 PM, Ryan Schmidt wrote: I guess ! has special meaning. You could try: grep -r -- ':q!' . (where . is the directory you want to search) Thank! jaspersmbp:www jasper$ grep -r -- ':q!' phpmyadmin phpmyadmin/config.inc.php:??5:q! jaspersmbp:www jasper$ cd phpmyadmin jaspersmbp:phpmyadmin jasper$ sudo vim config.inc.php Found the culprit as you expected. Did not exit properly using vim. All good now. Thanks a lot Ryan! So I guess -- makes grep look for ! instead of using its special meaning? Well, -- means treat everything that follows as a filename / directory, not a flag, even if it begins with a dash so that wasn't really very relevant here after all. You started by using double quotes, in which special characters like ! get interpreted. (! is special to Bash, not to Grep.) Since you didn't want that, using single quotes is the solution to suppress the special meaning. You also weren't specifying what to search, hence stdin was being searched, hence grep's warning that you asked for a recursive search (which is applicable only to directories) but you didn't specify any directories. ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
PMA Errors | Odd redirect to localhost
Hi there again everyone, Been having two problems I need to solved to run my MAMP server perfectly using MacPorts. I have two problems as far I can see: 1/I Installed PHPMyAdmin using MacPorts. When I go to localhost/phpmyadmin I get the logon screen where I can login as root. But after logging in I only see ��5:q! Very odd. Here the access log: jaspersmbp:logs jasper$ tail access_log 127.0.0.1 - - [18/Aug/2010:09:20:12 +0400] GET /phpmyadmin/themes/original/img/b_help.png HTTP/1.1 200 229 127.0.0.1 - - [18/Aug/2010:09:20:12 +0400] GET /phpmyadmin/themes/original/img/s_notice.png HTTP/1.1 200 247 127.0.0.1 - - [18/Aug/2010:09:20:23 +0400] POST /phpmyadmin/index.php HTTP/1.1 302 6 127.0.0.1 - - [18/Aug/2010:09:20:23 +0400] GET /phpmyadmin/index.php?token=a3a481deda5d9b796a79bf3785271014 HTTP/1.1 200 7671 127.0.0.1 - - [18/Aug/2010:09:20:23 +0400] GET /phpmyadmin/phpmyadmin.css.php?token=a3a481deda5d9b796a79bf3785271014js_frame=rightnocache=3841169428 HTTP/1.1 200 21391 127.0.0.1 - - [18/Aug/2010:09:20:24 +0400] GET /phpmyadmin/themes/original/img/s_error.png HTTP/1.1 200 272 127.0.0.1 - - [18/Aug/2010:09:20:28 +0400] POST /phpmyadmin/index.php HTTP/1.1 302 6 127.0.0.1 - - [18/Aug/2010:09:20:28 +0400] GET /phpmyadmin/index.php?token=a3a481deda5d9b796a79bf3785271014 HTTP/1.1 200 2405 127.0.0.1 - - [18/Aug/2010:09:20:28 +0400] GET /phpmyadmin/js/common.js HTTP/1.1 200 13230 ::1 - - [18/Aug/2010:09:28:59 +0400] POST /phpmyadmin/index.php HTTP/1.1 302 6 I did not find a any significant errors in the error log. In PHP logs I found this: jaspersmbp:bin jasper$ tail /var/log/php-scripts.log [18-Aug-2010 09:46:18] PHP Warning: Cannot open 'extra/php_browscap.ini' for reading in Unknown on line 0 I doubt it is related pma is located in /opt/local/www/phpmyadmin as my DocumentRoot is: jaspersmbp:conf jasper$ cat httpd.conf | grep DocumentRoot # DocumentRoot: The directory out of which you will serve your DocumentRoot /opt/local/www # This should be changed to whatever you set DocumentRoot to. # access content that does not live under the DocumentRoot. (I changed DocumentRoot about a week ago as I prefer things to be in www and I wanted to start working with virtualhost as well..) And these are the CHMOD/CHOWN right on phpmyadmin and all files is www for that matter: jaspersmbp:www jasper$ ls -l | grep phpmyadmin drwxr-xr-x 100 jasper admin 3400 Jul 29 12:11 phpmyadmin Should I change the group pma is in and all files for that matter? Anyone ever had this problem with PMA and knows how to solve this? 2/When I enter gmail in the address bar or Facebook the browser - Firefox - now redirects me to localhost instead of forwarding me to Google. This is my hosts file: jaspersmbp:extra jasper$ cat /etc/hosts ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1localhost 127.0.0.1jaspersmbp 255.255.255.255broadcasthost ::1 localhost fe80::1%lo0localhost Any ideas how this could happen? ___ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macports-users