LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-21-2011, 06:53 AM   #1
aocferreira
Member
 
Registered: Feb 2011
Posts: 117

Rep: Reputation: 0
mysql_connect in php file to a different socket path


<?php
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = '123';
$path = '/usr/local/test/mysql.sock'

$conn = mysql_connect($path, $dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
$dbname = 'AHAH';
mysql_select_db($dbname);



mysql_close($conn);
?>

output: Parse error: syntax error, unexpected T_VARIABLE in /a.php on line 7

What's wrong? how do I correct this?
 
Old 04-21-2011, 07:02 AM   #2
aocferreira
Member
 
Registered: Feb 2011
Posts: 117

Original Poster
Rep: Reputation: 0
already fixed it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
php cli can't run php file outside its path asiandude Programming 4 12-11-2008 02:50 PM
PHP not supporting mysql_connect() sunils1973 Linux - Server 5 04-17-2008 11:22 AM
PHP won't recognize my Configuration File (php.ini) path kriezo Programming 4 02-14-2008 02:31 AM
mysql_connect crashes php DavidHB Slackware 4 04-18-2007 08:06 AM
php mysql_connect error compu73rg33k Linux - Software 11 04-02-2005 05:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration