-1

Since installing Mac OSX El Capitain, I am getting a parse error. The code works fine on the server, but on my development workstation, I get this error consistently.

Parse error: parse error in /Library/WebServer/Documents/website/includes/config.php on line 4

// Calling code snippet:

include("includes/navbar.php");
require_once("includes/config.php");

$servername = DBHOST;
$username = DBUSER;
$password = DBPASS;
$database = DBNAME;

config.php file:

<?php
/* Config File for Common Values */

define ("DBHOST", “127.0.0.1:3306”);  <--- This is line 4
define ("DBUSER", “userid”);
define ("DBPASS", “password”);
define ("DBNAME", “database”);

?>
jpfreire
  • 1,268
  • 16
  • 23
Just4Fun
  • 3
  • 3
  • 2
    that's what happens when you code with a Word Processing app, rather than a code editor. – Funk Forty Niner Nov 12 '15 at 01:28
  • *"<--- This is line 4"*, and 5, and 6, and 7. – Funk Forty Niner Nov 12 '15 at 01:29
  • 3
    @sa-7 that pending edit of yours http://stackoverflow.com/review/suggested-edits/10175384 clearly is changing code. DON'T do that. If the OP's using that, then that's the problem and an answer was given based on it. You can modify tags, spelling etc. but NOT code. – Funk Forty Niner Nov 12 '15 at 01:30

1 Answers1

2

You're using smart quotes ( and ) where you should have straight quotes ("). Replace the smart quotes with straight quotes. For example, change

“127.0.0.1:3306”

to

"127.0.0.1:3306"

Do the same with each of the other define() statements.

elixenide
  • 44,308
  • 16
  • 74
  • 100