04-19-2016
localhost is not a command nor is it a valid path.
If you want to execute choice.php use the command /var/www/choice.php, assuming it can be executed.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
When I run "xntpdc" I get an error saying "can not find local host". If I run a "host <hostname>" and exit "xntpdc", upon returning to "xntpdc" the program gives me the same error. :confused: (1 Reply)
Discussion started by: Jahnathan
1 Replies
2. UNIX for Dummies Questions & Answers
I am writing a program that need to be run on several machines. I am running UNIX and wanted to know if there is a command similar to ipconfig (in DOS) that would return the IP Address of the machine that I am working on. (Not just the loopback address of 127.0.0.1). (1 Reply)
Discussion started by: hazard0007
1 Replies
3. Linux
Hello,
I am ltrying to find the config file to modify a parameter for apache (I guess). Here, when sending mail using php web form I get a copy of all mail sent from that form, but here is a sample of what I get :
From : apache@localhost.localdomain
To : myemail@host.com
Subject : Mail ... (2 Replies)
Discussion started by: qfwfq
2 Replies
4. UNIX for Advanced & Expert Users
hello guys,
this morning when I start my pc (gentoo) I get some strange errors about localhost.
"Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName" ... Apache
the same for my aplications, I have to use the full address of my pc instead of... (1 Reply)
Discussion started by: georgeplus
1 Replies
5. UNIX for Dummies Questions & Answers
Hi,
Rcping a file to localhost fails due to echo statement in .login file on a machine with RH 5.5
However, the same rcp is successful on another machine with Suse 9.2 (with the same .login). I cannot change .login file and was wondering at what could be causing this ?
Command that I am... (2 Replies)
Discussion started by: coolket
2 Replies
6. IP Networking
Can someone PLEASE explain to me and advise on fix with the following error message ?
# nslookup localhost
Server: 192.168.1.1
Address: 192.168.1.1#53
** server can't find localhost: NXDOMAIN
my /etc/hosts file contains the following:
# cat /etc/hosts
# Do not remove... (2 Replies)
Discussion started by: jxh461
2 Replies
7. UNIX for Dummies Questions & Answers
I'm trying to connect to my linux server but I'm having some major problems. The server had OEL 5 installed and my local pc is running Windows XP. I'm using PuTTy to connect to the server with Xming running on my loacl machine. I login as root and run the following command -
export... (5 Replies)
Discussion started by: garethnsolomons
5 Replies
8. UNIX for Advanced & Expert Users
Hi,
I have these entries in the /etc/esolv.conf:
------------
domain xxxxxx
search yyyyyy
nameserver 127.0.0.1
nameserver aaaaaaaaaaaaaaaa
nameserver bbbbbbbbbbbbbbbb
-------------
When I use 'dig' or 'nslookup' command, like 'dig yahoo.com' it uses the localhost as the server.
I... (2 Replies)
Discussion started by: chaandana
2 Replies
9. Solaris
Hi All!
I having an issue when trying to run snmpwalk, so the following command it returns an error:
bash-3.00# /usr/sfw/bin/snmpwalk -v 2c -c public localhost sysDescr.0
Timeout: No Response from localhost
bash-3.00#
I have checked also:
bash-3.00# svcs -a | grep sma
online ... (2 Replies)
Discussion started by: fretagi
2 Replies
10. Debian
I am getting the message - waiting for localhost.
Here are some diagnostic steps I have tried ....
root@meow:/home/ethan# cat /var/www/cgi-bin/httpd.conf
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/jkj
ServerName 127.0.0.1:80
Listen xx.xx.xx.xx:80
Listen 127.0.0.1:80
... (1 Reply)
Discussion started by: Meow613
1 Replies
LEARN ABOUT PHP
pdo_mysql-dsn
PDO_MYSQL-DSN(3) 1 PDO_MYSQL-DSN(3)
PDO_MYSQL DSN - Connecting to MySQL databases
The PDO_MYSQL Data Source Name (DSN) is composed of the following elements:
o DSN prefix
- The DSN prefix is mysql:.
o host - The hostname on which the database server resides.
o port - The port number where the database server is listening.
o dbname - The name of the database.
o unix_socket - The MySQL Unix socket (shouldn't be used with host or port).
o charset - The character set. See the character set concepts documentation for more information. Prior to PHP 5.3.6, this element
was silently ignored. The same behaviour can be partly replicated with the PDO::MYSQL_ATTR_INIT_COMMAND driver option, as the fol-
lowing example shows.
Warning
The method in the below example can only be used with character sets that share the same lower 7 bit representation as
ASCII, such as ISO-8859-1 and UTF-8. Users using character sets that have different representations (such as UTF-16 or Big5)
must use the charset option provided in PHP 5.3.6 and later versions.
Example #1
Setting the connection character set to UTF-8 prior to PHP 5.3.6
<?php
$dsn = 'mysql:host=localhost;dbname=testdb';
$username = 'username';
$password = 'password';
$options = array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
);
$dbh = new PDO($dsn, $username, $password, $options);
?>
+--------+-----------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+-----------------------------------------------+
| 5.3.6 | |
| | |
| | Prior to version 5.3.6, charset was ignored. |
| | |
+--------+-----------------------------------------------+
Example #2
PDO_MYSQL DSN examples
The following example shows a PDO_MYSQL DSN for connecting to MySQL databases:
mysql:host=localhost;dbname=testdb
mysql:host=localhost;port=3307;dbname=testdb
mysql:unix_socket=/tmp/mysql.sock;dbname=testdb
Note
Unix only:
When the host name is set to "localhost", then the connection to the server is made thru a domain socket. If PDO_MYSQL is compiled
against libmysqlclient then the location of the socket file is at libmysqlclient's compiled in location. If PDO_MYSQL is compiled
against mysqlnd a default socket can be set thru the pdo_mysql.default_socket setting.
PHP Documentation Group PDO_MYSQL-DSN(3)