11-17-2010, 08:33 PM
Everyone thats having an issue with this error: Parse error: parse error, expecting `')''
(Parse error: parse error, expecting `')'' in D:\vhosts\yoursite.com\httpdocs\document\config.php on line 83)
the fix is simple. It has to do with setting the 'dataDir' in the config.php file. The instructions in the comments are
wrong.
In the config file this is what they have listed:
// Uncomment this one for Windows - Don't forget the trailing backslash "\"
'dataDir' => 'c:\document_repository\',
// Uncomment this one for Linux - Don't forget the trailing slash "/"
//'dataDir' => '/var/www/document_repository/',
The problem is with line for setting the 'dataDir' for Windows has incorrect instructions. Where it says don't forget the backslash "\"
is incorrect. A windows server recognizes trailing backslashes as an internal network command so the file doesn't parse correctly.
In a windows server environment wether you're using Apache or IIS the trailing slash has to be a forwardslash "/". This will solve the
Parse error: parse error, expecting `')'' error and the script will work fine as long as the directory you set in this line actually
exists somewhere on the server.
Once I changed the backslash to a forwardslash the script worked great!
Also, if you absolutely have to have the document repository located in the same directory as the
script you can and it will work fine. I would just strongly suggest you create a robot text file that excludes the directory from being
crawled by search engines and bots. This will keep the directory contents from being indexed by search engines.
Here is the correct configuration for setting the 'dataDir' configuration lines for Windows:
// Uncomment this one for Windows - Don't forget the trailing backslash "\" (Should be "Don't forget the trailing frontslash "/")
'dataDir' => 'c:\document_repository/', (This can be any directory on your webserver or host: Example: C:/www/http/opendocman/documentrepository/)
// Uncomment this one for Linux - Don't forget the trailing slash "/"
//'dataDir' => '/var/www/document_repository/',
Stephen, you might want to change the download to correct the issue. I noticed there are a few thousand people that viewed these posts
looking for a fix for the "[b]Parse error: parse error, expecting `')''" problem. Most of the time they probably give up because they don't realize
that the backslash should be a frontslash.[/b]
(Parse error: parse error, expecting `')'' in D:\vhosts\yoursite.com\httpdocs\document\config.php on line 83)
the fix is simple. It has to do with setting the 'dataDir' in the config.php file. The instructions in the comments are
wrong.
In the config file this is what they have listed:
// Uncomment this one for Windows - Don't forget the trailing backslash "\"
'dataDir' => 'c:\document_repository\',
// Uncomment this one for Linux - Don't forget the trailing slash "/"
//'dataDir' => '/var/www/document_repository/',
The problem is with line for setting the 'dataDir' for Windows has incorrect instructions. Where it says don't forget the backslash "\"
is incorrect. A windows server recognizes trailing backslashes as an internal network command so the file doesn't parse correctly.
In a windows server environment wether you're using Apache or IIS the trailing slash has to be a forwardslash "/". This will solve the
Parse error: parse error, expecting `')'' error and the script will work fine as long as the directory you set in this line actually
exists somewhere on the server.
Once I changed the backslash to a forwardslash the script worked great!
Also, if you absolutely have to have the document repository located in the same directory as the
script you can and it will work fine. I would just strongly suggest you create a robot text file that excludes the directory from being
crawled by search engines and bots. This will keep the directory contents from being indexed by search engines.
Here is the correct configuration for setting the 'dataDir' configuration lines for Windows:
// Uncomment this one for Windows - Don't forget the trailing backslash "\" (Should be "Don't forget the trailing frontslash "/")
'dataDir' => 'c:\document_repository/', (This can be any directory on your webserver or host: Example: C:/www/http/opendocman/documentrepository/)
// Uncomment this one for Linux - Don't forget the trailing slash "/"
//'dataDir' => '/var/www/document_repository/',
Stephen, you might want to change the download to correct the issue. I noticed there are a few thousand people that viewed these posts
looking for a fix for the "[b]Parse error: parse error, expecting `')''" problem. Most of the time they probably give up because they don't realize
that the backslash should be a frontslash.[/b]