Sponsored Content
Top Forums Web Development Installing mysql:sudo launchctl: command not found Post 302889972 by iHaveAQuestion on Monday 24th of February 2014 03:13:44 PM
Old 02-24-2014
Hi Again.

This came up again today. ::1.

In my /etc/hosts

Code:
## # Host Database 
# # localhost is used to configure the loopback interface 
# when the system is booting. 
Do not change this entry.
 ## 127.0.0.1 localhost 
255.255.255.255  broadcasthost 
::1 localhost

It says DO NOT CHANGE THIS ENTRY.

The code I am running is checking ip addresses and then blocking one.
The problem is that the language construct die(); does Not Kill the page.
The HTML 'welcome' text still shows.
It is again just a learning exercise so I am echoing and killing the page at certain points to see what shows up on the browser. The following code should die() and not show the word 'welcome' coded between HTML tags but it does show up.


Code:
Index.php

<?php 
require 'conf.inc.php';
foreach($ip_blocked as $ip){
    if ($ip==$ip_address){
     die();
}
}
?>
<h1> welcome</h1>

conf.inc.php

<?php 
$ip_address = $_SERVER['REMOTE_ADDR'];
$ip_blocked = array('127.0.0.1', '100.100.100.100');
?>


I added this code - someone suggested this and I was helpful although I do NOT fully understand how to interpret.


Code:
$ip_address = $_SERVER['REMOTE_ADDR']; 
$ip_blocked = array('100.100.100.100'); 
var_dump($ip_blocked); 
var_dump($ip_address);

Output: I typed this in.
Code:
array(2) { [0]=> string(9)  "127.0.0.1" [ 1] => string(15) "100.100.100.100" } string(3) "::1"  "::1"

see that ::1.... i had that question a while back.
when I use this code....
Code:
foreach($ip_blocked as $ip) { 
echo $ip.'<br>';

i get this output:
Code:
127.0.0.1 100.100.100.100

not ::1

I am confused.
Is this why I am running into trouble with my testing ?

Any clarification will be helpful.
Thanks again.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sudo: command not found

I am totally newbie. I try to login UNIX Solaris 10 through ssh command as user then i use sudo command to login as root: sudo su - but system give me an error sudo: not found. How can i fix this problem and install ssh services for my unix. (1 Reply)
Discussion started by: cthinh
1 Replies

2. UNIX for Dummies Questions & Answers

Unable to use the Sudo command. "0509-130 Symbol resolution failed for sudo because:"

Hi! I'm very new to unix, so please keep that in mind with the level of language used if you choose to help :D Thanks! When attempting to use sudo on and AIX machine with oslevel 5.1.0.0, I get the following error: exec(): 0509-036 Cannot load program sudo because of the following errors:... (1 Reply)
Discussion started by: Chloe123
1 Replies

3. UNIX for Dummies Questions & Answers

sh: sudo: not found

As I am trying to log in, when input my user-name (root), when the password prompt, this is what I got (highlighted in red), before i can put in my password. Please tell my why this happened. console login: root Password: sh: sudo: not found Thank you. (0 Replies)
Discussion started by: iamnew2solaris
0 Replies

4. Solaris

Error in installing the mysql-python-1.2.3.tar.gz

Hi, I followed the step written in README. It got some error message when I type " #python setup.py build" running build running build_py copying MySQLdb/release.py -> build/lib.solaris-2.11-i86pc-2.4/MySQLdb running build_ext building '_mysql' extension /usr/lib/python2.4/pycc -DNDEBUG... (2 Replies)
Discussion started by: AlexCheung
2 Replies

5. BSD

Installing MySQL package

Hey all I'm having a little trouble installing a MySQL database. This is what I tried... export PKG_PATH=ftp://mirror.planetunix.net/pub/OpenBSD/4.9/packages/`machine -a` pkg_add -v mysql-server mysql-client and this is what I get Unknown element: @rcscript /etc/rc.d/mysqld in... (1 Reply)
Discussion started by: desreguard
1 Replies

6. BSD

Installing FreeBsd. No usb device found

Hello, all. My english is not good. I have a problem installing FreeBsd. I have not CD-Roms, so i use program FlashBoot for convert iso-image to USB Device. After, I was beginning to install FreeBsd (Sorry my english) When it's time to choose an installation media, i select 9 USB:... (3 Replies)
Discussion started by: snet
3 Replies

7. Shell Programming and Scripting

ssh foo.com sudo command - Prompts for sudo password as visible text. Help?

I am writing a BASH script to update a webserver and then restart Apache. It looks basically like this: #!/bin/bash rsync /path/on/local/machine/ foo.com:path/on/remote/machine/ ssh foo.com sudo /etc/init.d/apache2 reloadrsync and ssh don't prompt for a password, because I have DSA encryption... (9 Replies)
Discussion started by: fluoborate
9 Replies

8. UNIX for Dummies Questions & Answers

launchctl loads app with icon (OS X)

We are deploying an app to our students that is running as a daemon. It keeps them from using certain software. The problem is that when we initially deploy it we don't want to require a restart. So we decided to use launchctl to load the daemon manually. When we do it this way, though, the... (4 Replies)
Discussion started by: nextyoyoma
4 Replies

9. Red Hat

Problem in installing mysql

Hi i am trying to install mysql rpm package on my linux machine but getting below error : warning: MySQL-embedded-5.5.28-1.rhel5.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 error: Failed dependencies: MySQL-devel is needed by MySQL-embedded-5.5.28-1.rhel5.i386 ... (9 Replies)
Discussion started by: mukulverma2408
9 Replies

10. Shell Programming and Scripting

Error installing MySQL 8 on RHEL 7

My yum install command is failing. I first did yum clean all I even tried with localinstall. Below is the error output: yum install mysql-community-server*.rpm Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager This system is not registered with an... (8 Replies)
Discussion started by: mohtashims
8 Replies
Locale::Codes::LangFam(3)				User Contributed Perl Documentation				 Locale::Codes::LangFam(3)

NAME
Locale::Codes::LangFam - standard codes for language extension identification SYNOPSIS
use Locale::Codes::LangFam; $lext = code2langfam('apa'); # $lext gets 'Apache languages' $code = langfam2code('Apache languages'); # $code gets 'apa' @codes = all_langfam_codes(); @names = all_langfam_names(); DESCRIPTION
The "Locale::Codes::LangFam" module provides access to standard codes used for identifying language families, such as those as defined in ISO 639-5. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 639-5 language family codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying language families. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $lext = code2langfam('apa','alpha'); $lext = code2langfam('apa',LOCALE_LANGFAM_ALPHA); The codesets currently supported are: alpha This is the set of three-letter (lowercase) codes from ISO 639-5 such as 'apa' for Apache languages. This is the default code set. ROUTINES
code2langfam ( CODE [,CODESET] ) langfam2code ( NAME [,CODESET] ) langfam_code2code ( CODE ,CODESET ,CODESET2 ) all_langfam_codes ( [CODESET] ) all_langfam_names ( [CODESET] ) Locale::Codes::LangFam::rename_langfam ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::LangFam::add_langfam ( CODE ,NAME [,CODESET] ) Locale::Codes::LangFam::delete_langfam ( CODE [,CODESET] ) Locale::Codes::LangFam::add_langfam_alias ( NAME ,NEW_NAME ) Locale::Codes::LangFam::delete_langfam_alias ( NAME ) Locale::Codes::LangFam::rename_langfam_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangFam::add_langfam_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangFam::delete_langfam_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.loc.gov/standards/iso639-5/id.php ISO 639-5 . AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 2011-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.16.3 2013-02-27 Locale::Codes::LangFam(3)
All times are GMT -4. The time now is 10:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy