Connect To Oracle Database

Mar 14, 2001

I am running a PHP script on unix. I am trying to connect to Oracle database. Before i start using the functions like Ora_Logon etc, what steps do i have to take in order to make PHP talk to Oracle database?


Warning: Pg_connect() []: Unable To Connect To PostgreSQL Server

Feb 24, 2011

I want to connect to remote database from php to postgres but it could not connect and says

Warning: pg_connect() []: Unable to connect to PostgreSQL server:could not connect to server: No route to host (0x00002751/10065) Is the server running on host "xxxxxxxxx" and accepting TCP/IP connections on port 5432? in C:xampphtdocsest.php on line 4 Wrong CONN_STRING

$db = pg_connect(' port=5432 dbname=postgres user=postgres password=') or die('Wrong CONN_STRING');
if (!$db) {..................

The same database I can access from pgadmin client which is running over same machine where apache is running, I could not understand that pgadmin can access db but apache webserver's php could not access ?

View 2 Replies View Related

Facebook Connect Examples - Connect.registerUsers And Login/logout Processes?

Oct 28, 2009

example PHP code (preferably using the FB PHP library) that does the following:Let my website connect to my FB account when i log into FB connect.Store my facebook credentials (email hash and FBID?)locally Log me out of Facebook connect when I
log out of my website Automatically log me back into FB connect without the connect dialog when I log back into my site using the stored credentials.

Basically trying to do what sites like digg do with FB connect but I can't find a good (basic) example of exactly what I need.(which I'd of assumed to be a common need to FB connect websites).

View 2 Replies View Related

Facebook Connect: Thumbnail Images Broken Up In FB, Connect.streamPublish Pop-up Prompt, And On Wall For A Few Minutes?

Feb 18, 2010

facebook connect so that users can publish comments they are leaving on my site on their facebook wall as well.It works as intended, except that in the confirmation pop up, the thumbnail image i provide is broken.Looking at the source, I can see that facebook prepended my image url like this:


The image on the facebook user's wall has the same prepended url, and is also broken for a couple of minutes, after which it's showing up correctly.But obviously, having a broken image in the confirmation window and on your wall for a couple of minutes is not a good experience.PS:here's the part of the js call, if it's of any use.

attachment = {
'media': [{ 'type': 'image', 'src':


View 1 Replies View Related

Facebook Connect Using FB Connect.showFeedDialog Without Fb Login-button?

Jul 20, 2009

I have a facebook application set as a iframe and i'm trying to use FB.Connect.showFeedDialog to publish stories to a users feed. I'm working from this example which doesn't work until you login using the fb:login-button.

I've been attempting to modify the code for several days and I was wondering if it's even possible to do without this login button if its a Facebook Iframe applicaiton.

View 1 Replies View Related

Warning: Socket_connect() [function.socket-connect]: Unable To Connect [0]: A Socket Operation Was Attempted To An Unreachable Host

Sep 5, 2010

// Create a new socket
$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
// An example list of IP addresses owned by the computer
$sourceips['kevin'] = '';
$sourceips['madcoder'] = '';
// Bind the source address
socket_bind($sock, $sourceips['madcoder']);
// Connect to destination address
socket_connect($sock, $sourceips['madcoder'], 80);.........

I am getting an error Warning: socket_connect() [function.socket-connect]: unable to connect [0]: A socket operation was attempted to an unreachable host. in C:wampwwwsockertsockert.php on line 13

View 3 Replies View Related

Fsockopen() Won't Connect But Can Connect Manually?

Dec 11, 2009

Quote:Warning: fsockopen() [function.fsockopen]: unable to connect to /home3/futureg2/public_html/habbo/includes/radio.php on line 8 radio.phpCode:

// Variables
$ip = "";
$port = "8638";


View 7 Replies View Related

Warning: Mysql_connect() [function.mysql-connect]: Can't Connect To MySQL Server

Aug 27, 2008

I'm having a new problem regarding posting an edited record in edit_form.php where the page contains mysql update functionality. For me, I seems to have no problem for mysql database connection in conncection.php dunno what to do with my coding as I have no idea regarding the problem shown as below:

Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10048) in C:Program Filesxampphtdocs otification_systemconnectionconnection.php on line 8 Could not connect: Can't connect to MySQL server on 'localhost' (10048) The Update form coding is shown in below:


View 7 Replies View Related

"Warning: Mysql_connect() [function.mysql-connect]: Can't Connect To MySQL

Dec 10, 2010

will refresh a page every second will cause some crash or error?? cause when i try this, it sometimes display this error "Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL " this is occur when i run it in my local server. I am so worried if this might also happen when i run it online.

View 10 Replies View Related

Could Not Connect To MySQL: Can't Connect To Local MySQL Server Through Socket

Dec 31, 2006

To connect to a MySQL database, hosted on my machine, an iMAC G5 with OS 10.4, I am using the following code:

$dbc = mysql_connect ('localhost', 'guestuser', &#65533;')
OR die ('Could not connect to MySQL: '.mysql_error() );

However, I receive an error message: Could not connect to MySQL: Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2). MySQL server is running, and user name/password are valid.

View 1 Replies View Related

Connect To MySQL - Can't Connect To Local MySQL Server Through Socket

Mar 27, 2006

I've finished coding php, run it localhost and uploaded to my Apache server with Linux OS. However, I'm seemingly unable to connect to mysql at the server side. and received the following message: Could not connect to database: Can't connect to local MySQL server through socket '/tmp/mysql.sock'(111) What's this message abt? I tried to get into MySQL without php on the server. and received the same message at the console.

View 11 Replies View Related

Facebook Connect: Error When Clicking The Facebook Connect Button?

Jun 14, 2010

I am getting this error when I click on the facebook connect button:API Error Code: 100API Error Description: Invalid parameterError Message: next is not owned by the application.I am not too sure how to do this, but I've read all the documentation for facebook connect and came up with this:

define('FACEBOOK_APP_ID', '##################');

View 1 Replies View Related

Can't Connect With Mysql - Warning: "mysql_connect() [function.mysql-connect]: Unknown MySQL Server Host 'DB_HOST' (11004)"

Jan 1, 2010

I try to connect to mysql but it doesnt worká and I get this error "Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'DB_HOST' (11004) in C:xampphtdocsprojectprojectindex.php on line 35 Could not connect to DB_HOST" Here is the code for my index. php

Code: [Select]<?php

View 5 Replies View Related

PHP Warning: Mysql_connect() [<a Href='function.mysql-connect'>function.mysql-connect</a>]

Apr 25, 2006

I am getting the following error

PHP Warning: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Too many connections in /usr/share/pear/adodb/drivers/ on line 340

Can anyone tell me the possible reasons for this.

View 4 Replies View Related

TCP Connect

Mar 30, 2002

What I want to do is take the content of one PHP file on one server and include it in another. The trick is I need server 1 to parse or translate the file before it is included in page on server 2. I can do this in another language and it is called TCPConnect. Code:

View 2 Replies View Related

Cannot Connect?

Jul 15, 2005

I just set up PHP, MySQL, and PHPMYADMIN. PhpMyAdmin is working so both applications must be working. When I run a phpscript to connect to the database, i get "cannot make conection". Did I do something wrong? Heres the connection script im using to connect.
PHP Code:

View 1 Replies View Related

How To Connect?

Jul 17, 2005

Let's say I got

$db_name = "your_database";
$username = "your_user";
$password = "your_MySQL_password";

I'm not sure about

$db_server = "";

Although I got a domain name. How to find out what is SQL hostname?
If I had that hostname, would that be enough to connect to the mySQL
database (if I dont got access to the server itself, i.e. no FTP access or

View 4 Replies View Related

Can't To Connect To DB

Aug 2, 2005

This happens to be my first foray into php-mySQL connections and I am failing miserably. I am working on a military aviation site in which the data on each plane is stored in a mySQL database which I have already created.

There are two tables in the database, one called "list" which has the general info on each plane (like for example, a P-51), and another called "data_ww2" which has the data on each plane sub-variant (P-51B, P-51D, P-51H). Code:

View 3 Replies View Related

Connect To A Different DB

Oct 10, 2007

On my site In a header file I use something like below PHP Code:

<? if(!isset($_SESSION['auto_id'])){?>
<li class="active_menu"><a href="">Home</a></li>
<? } else {?>
<li class="active_menu"><a href="?p=home">Home</a></li>
<? } ?>

this works on my whole site where I am connected to my member DB but as soon as I go into a folder where I connect to a different DB, this sessions is not showing up on these pages.

View 3 Replies View Related

Connect More Then One Db?

Mar 25, 2010

how to connect more then one DB in php... but the DB servers are same . but the DB is different. same single page i need to fetch the result from all the 3 db to display.

View 4 Replies View Related

Connect To SQL Db?

Jul 16, 2009

I'm working on a project where I have to query an SQL database (Microsoft SQL 2000) with PHP. The SQL database is on an external server. I have all the connect info and am told the server's enabled in the firewall. I've googled this several times and am quite confused with the response. Was wondering if anyone could point me to a reliable ODBC driver that's preferably free or open source. -or- If there's a better way for PHP to link up to the SQL database. My server is a Linux box with Apache2 running php 5.

View 18 Replies View Related

Can't Connect To Db

Jun 18, 2007

i'm trying to connect to database for the first time and having a little trouble. this is what i have

$host=; // Host name
$username= d; // Mysql username
$password= r; // Mysql password
$db_name= db20; // Database name
$tbl_name= guestbook; // Table name

the problem is with the host do i kind of confused as you can see. i have everthing working using wamp and my "localhost" when i upload it to the site folder it won't connect even with the info i was ginin from my webhost.

View 5 Replies View Related

How To Connect To Oracle?

May 28, 2002

Ok so I config PHP with:

./configure --prefix=/usr/orion/php/php --with-mysql --with-apxs=/usr/orion/php/apache/bin/apxs --with-oci8=/d0/app/oracle/product/8.1.6 --with-oracle=/d0/app/oracle/product/8.1.6

However in my httpd.conf I do not have a place to change my SID (instance) or ORACLE HOME

Anyone know why and maybe post the lines to add that to httpd.conf

View 3 Replies View Related

How To Connect On MS SQL Database

Mar 10, 2003

How can I connect to a MS SQL server using PHP running under LINUX on different machine? u see, I have an NT server (where my MS SQL server is installed) and another server where I installed my MySQL and PHP (this is under Linux) is there a way to access Ms SQL via PHP ? if so, how can i do it? so they say i need to download an odbc driver?

View 12 Replies View Related

Php/mysql - How To See If They Can Connect?

Oct 17, 2007

I have installed php and mysql but i am not sure the 2 are able to talk to
each other.

i have created a database in mysql called test / user: test / pw: test and
given the user select privelges. The table has one field column called test.
Can anyone tell me a simple php script to try to see if a connection can be...

View 1 Replies View Related

How Do I Connect To A Table?

Feb 13, 2007

I am try to connect to my table I made in PHP Admin and for some reason I can't connect to it! Is it supposed to be something like: Yourusername_mytable? If you are using a hosting provider? PHP Code:

View 14 Replies View Related

Connect To MySQL

Jul 17, 2005

PHP 4.3.4 installed manually from package *.zip and Apache 2. I have a
problem with this simple code:

$link = mysql_connect("","","")
or die("Could not connect: " . mysql_error());
echo "Connected successfully";

And this error occurs:

Warning: mysql_connect(): Can't connect to MySQL server on ïv.0.0.1'
(10061) in C:usrApache2htdocsfriko.plindex.html on line 18
Could not connect: Can't connect to MySQL server on 'localhost' (10061)

The settings are:

Active Persistent Links 0
Active Links 0
Client API version 3.23.49

Directive Local Value Master Value
mysql.allow_persistent On/On
mysql.connect_timeout 60/60
mysql.default_host localhost/localhost
mysql.default_password no value/no value
mysql.default_port no value/no value
mysql.default_socket no value/no value
mysql.default_user no value/no value
mysql.max_links Unlimited/Unlimited
mysql.max_persistent Unlimited/Unlimited
mysql.trace_mode Off/Off

View 20 Replies View Related

What Is Php's Behavior When Connect To A Db?

Nov 9, 2005

What is php's behavior when connect to a db?

I've been told that php was once a dominant web programing language.
I've read a few chapters of a php book.

I was wonder what's php's performance.

Perl was once for a while a popular programming language for cgi.
But start very process per one web visit cause serioius problem to
system performance.

And then FASTCGI born.
I was impressed by its performance.

But recently i learn to do some php program which connect a mysql db.
It seems that the program run's very slow.

So, I have 2 questions:
1. does the os need to fork a php interpreter for every single web
2. does the php connects to mysql all the time? that is does it need to
connect mysql
100 times when a user request the url 100 times?

If the answer if yes, i think that php's performance is unacceptable.

View 1 Replies View Related

Connect To The Mysql Already?

Jul 17, 2005

Hope you guys can help me out~~ I have a config.php file. I want to
conncet to my own mysql version. When i run the config.php file as
below, i get all successful message. However, when i take a look the
database information in doc environment, I don't see any database or
table created.

<head><title>Create Database and table</title></head>

//connect to the database, write, and execute the query
$linkID = mysql_connect("localhost", "", "") or die ('I cannot connect
to the
database because: ' . mysql_error());

if (!$_GET['linkID'])

print("The connection to the server was made successfully.<br>");
print("The connection to the server failed.<br>");


$TableName = "Employee";

//connect to the database, write, and execute the query
$Link = mysql_connect("localhost","","");

mysql_select_db("Krista", $_GET['Link']);

$resultID = mysql_query ("CREATE table Employee(EmployeeID INT
Employee_Name TEXT",$_GET['Link']);

print("The query was successfully executed!<BR>
print("The query could not be executed!<BR>



In addition, i change the global_register to on. However, I still need
to use $_GET['username'] like this. I want to use $username instead of

View 3 Replies View Related

Php Informix Connect

Jul 5, 2007

I want to connect my intranet server (with php/apache) to the other
informix database server,
But I didnt it. I dont know how i can do it?

Can i use php_informix extensions for example ifx_connect();

I was read this article:
and doing step one step but i was not success.

Firstly I reading this page and copy PDO_INFORMIX to Php.5.3/ext/
pdo_informix directory.
Before i was download Php.5.2.3 source code and compiled Php.5.2.3
from the source code ./configure --enable-pdo --with-pdo-informix=/opt/
informix bla bla... then make / make install it.
But that not found informix driver to /opt/informix
shuold I download and setup Informix Client SDK ? to /opt/informix

My Intranet Server Fetaures
Fedora Core 6 and Php 5.2.3 and Apache 2

View 14 Replies View Related

Connect() Is New Function Of Php?

Jul 23, 2001

i've always used connect() as the name of my mysql connect functions. But now - in one particular server - it does not allow using connect() as a function name, it says:
Fatal error: Cannot redeclare connect() in /home/mysite/public_html/test.php on line 2
i made this file to be sure, that it's not my mistake. the file is: PHP Code:

View 3 Replies View Related

Pconnect And Connect

Jun 2, 2001

I have been hearing about using pconnect in PHP to keep a "persistant", or on-going connection to the MySQL server. Using pconnect, does the connection carry over to the other pages or does it keep a connection until the page is done loading the PHP code?

View 4 Replies View Related

Cannot Connect To Postgresql

Aug 24, 2006

I am running on Win XP. I have installed Apache 2.2. Works fine.
I have installed php-4.4.4-Win32 manually.
Apache to php connection is working fine, I tested a couple of trivial
php scripts.

I have installed PostGreSQL v8. I can do stuff (create table, populate
data) thru pgAdminIII tool, so I think that is also fine.

I want to install phpBB. When I try to do the set up I get message
"The PHP configuration on your server doesn't support the database type
that you chose"

So it tells me the issue is with php and PGSQL, hence my question here.

I have modified php.ini to uncomment the line
and restarted the server. No good.

I tried running this script that I copied from a site
<title>PHP Test</title>
<?php echo '<p>Hello World</p>' ?>
<?php $conn = pg_connect("host=localhost port=5432 dbname=postgres
user=postgres password=mypasswd");
$sql = "SELECT current_date AS today;";
$result = pg_query($conn, $sql);
$row = pg_fetch_object($result, 0);
echo "Today is: " .$row->today;
<?php phpinfo(); ?>

It prints out the Hello World line. Doesn't print the phpinfo. Nor
the current date.

Needless to say, I know no php, just want to get the bulletin board up
and running on my PC.

View 4 Replies View Related

How Do I Connect To MySQL In A Url

May 21, 2002

I am building a website which is using a database which will give users access to dynamic information. Once the user has enter user and password, what is the best way of connecting to other pages with MySQL? If I want to use url links to other pages with MySQL how do I parse varibles to other pages including connection to MySQL.

View 4 Replies View Related

Connect To Mysql?

Jun 29, 2006

I have a question. I have installed php and mysql on an apache-server on
windows and I can't connect to the server.

I tried to create a database (since I am trying to learn howto). My manual
said I should write this at the shell:
c:mysqlin>mysqladmin -u root creare mindb

I did this and got this error:
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

I then tried to use -p and wrote this instead:
c:mysqlin>mysqladmin -p -u root creare mindb

The database was created!

Then I tried to write mysql in cmd at c:mysqlin but I get this error:
Access denied for user 'ODBC'@'localhost' (using password: No)


I have used earlier versions of mysql and php and got it to work. In earlier
versions "my.ini" looks very different and user and password were written
there, but not anymore. Why, or is it me who have done something wrong? When
I log in to phpmyadmin I have to root-accounts there, one with
host=localhost and one the host=%.

All I want, is to make mysql work, so I can test things and to learn!

My configuration

Windows XP pro

Netgear router (I have opened port 3306)


no-ip (For my domain,

Apache 2.2.2

The exe-files are in c:apache2in

(All I did was to fill in domain=localhost, servername=localhost and my

PHP 5.1.4

The exe-files are in c:php

(I used the zip package)


At the row below "#LoadModule ssl_module modules/" I wrote:

LoadModule php5_module "c:/php/php5apache2_2.dll

At the row below "AddType application/x-gzip .gz .tgz" I wrote:

AddType application/x-httpd-php .php

At the row below "DocumentRoot" I wrote:

PHPIniDir "C:/php"

At the row below "DocumentRoot" I wrote:

PHPIniDir "C:/php"

At the row "DirectoryIndex index.html" I wrote:

DirectoryIndex index.htm index.html index.php

View 5 Replies View Related

My Php Can't Connect The Mysql

Aug 16, 2007

A question : why my php can't connect the mysql.

my php version is 5.014 and my mysql version is also 5.0,
but i run them on the windows xp system.
who knows the real problem?

I searched this at google,but I still haven't got the way to deal with
my problem.

View 2 Replies View Related

How To Connect 2 Strings Together With PHP

Oct 29, 2003

I know how to do it in Javascript but its not the same for PHP. What i am trying to do is connect 2 strings together. Like the string "index" and ".php". For javascript, id probably write it like this ...

name = "index";
name2 = ".php";
name3 = name + name2;

that would connect them and put them into one variable. I tried that with PHP but it didnt work.

View 5 Replies View Related

Cannot Connect To Mysql

Jul 17, 2005

when I run it localhost/config.php, it cannot display any message such
as connect successfully or failed. Do u guys have any idea?

<head><title>Create Database and table</title></head>


$linkID = mysql_connect("localhost","","");
print ("hello"); <---can print

if($linkID != "FALSE") <--i think
fail here
print("The connection to the server was made successfully.)";
print("The connection to the server failed");



am I right? do i need to put username and password in
mysql_connect("localhost","","")? i dont know where i can find it, or
how can I find it in mysql.

View 2 Replies View Related

Unable To Connect

Jan 4, 2005

Here is the setup:

-SQL 2000 SP3 on a win2k box
-Firewall set up to allow connections for all ports
ntwdblib.dll version 2.8.0 (newest)

XP Pro SP2
Apache 2.0.52
ntwdblib.dll version 2.8.0 (copied from server)
extension=php_mssql.dll uncommented

i am unable to connect to MSSQL, PHP4 through Windows XP.

View 4 Replies View Related

Connect PHP 5 And MySQL 5

Apr 8, 2006

I've tried on two different systems. Both windows but I haven't found any information on the actual linkage. I've decided to stick with the newer MySQL and an older version of PHP (4.3) but would like info on this link. What is the best combination of PHP/MySQL/Apache?

View 1 Replies View Related

Connect From Shell

Nov 22, 2005

Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by

server; consider upgrading MySQL client in /var/docs/lib.php on line 100
Could not connect: Client does not support authentication protocol requested by server; consider upgrading MySQL client

I can connect from shell, cant' from php.

View 1 Replies View Related

Connect To A Database

Sep 23, 2005

how to create memership sitesyou know where people can sign up, and a page is displayed based upon what they entered username and password etc. so far, I know how to use php to submit a form to email. But that is It. I'd really like to learn php syntax, and be able to connect to a database. I have asked programer friends, to help me, but they are too busy. Does anyone know of someone who could help, or perhaps there is a site I could go to?

View 1 Replies View Related

Pear DB::connect

Jul 29, 2005

I've just transfered a site from my local test server, to a client's server, and am now getting blank pages, where I was once fine. I believe I've isolated it to the Pear db connection script. Is there any reason why this code would cause a blank page in php 4.3.4? Code:

$db =& DB::connect($dsn);

View 3 Replies View Related

DB Connect And Insert

Dec 18, 2006

What I want is a html page that I can simply load in my browser. Page requires a form with some fields; I'll post the SQL code that I need to issue from the web. Code:

INSERT INTO `prefix_table1` VALUES (7, '', &#397;', 'Clan Donation', '', &#391;', '', 'MEMBERNAME', &#390;.00', 'Reveal Name?', 'Yes', '', '', '', 'Completed', &#55614;&#57158;-12-17 01:01:01', 'web_accept', &#395;.00', &#390;.00', 'USD', '', '', 'FIRST', 'LAST', '', '', '', '', '', '', 'EMAIL', '');

Items in red is what I need to be able to input in the form, then click on submit and it should import that entry into the database. The number &#397;' in the code is the transaction number and needs to increment, but I can live without that. Everything else is manually put in by hand. 5.00 in the code is the amount, generally can change from 5.00 to something else.

I know for some of you it may be a 5 minute trick so please I'd like to get some help in this matter. I can provide more information if I know what's needed. So far I've only been able to succesfully establish a connection and disconnect.

View 7 Replies View Related

Connect To Ma Database

Feb 7, 2006

i need a scripts that can connect to ma database and select email and send an mass email to everone thats on the database.

View 1 Replies View Related