Community Support for OpenDocMan (Deprecated)
Config.php - datadir - Printable Version

+- Community Support for OpenDocMan (Deprecated) (https://forum.opendocman.com)
+-- Forum: OpenDocMan Community Discussion (https://forum.opendocman.com/forum-5.html)
+--- Forum: OpenDocMan Support - Community Based (https://forum.opendocman.com/forum-6.html)
+--- Thread: Config.php - datadir (/thread-156.html)

Pages: 1 2 3


Re: Config.php - datadir - saketh - 07-09-2010

Hi,
i had a problem when i want view the added file..
when i press on view its showing the "below error";
"file doesnot exit"

even when i tried to download the same error is coming
plz tell me the solution.......
Thank You......


Parse error: parse error, expecting `')'' - SOLVED - hoffman16148 - 11-17-2010

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]


Re: Config.php - datadir - Stephen - 11-18-2010

The config.php in 1.2.5.7 is:
Code:
// 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/',

What version are you using?


Parse error: parse error, expecting `')'' - SOLVED - hoffman16148 - 11-18-2010

Hi Steve,
I'm using version 1.2.5.2 because im running PHP 4 on my servers. The commented line in your script should read "forwardslash"
instead of "backslash" for Windows users. If you could, make the modification the the earlier versions of opendocman so that
less Windows users have issues when installing the script. I also ran into an issue during installation with the "Grant" permissions
in MySql. The installer script wasnt able to set the "Grant" permissions so I had to manually install the database. I found a solution
to that problem as well. The syntax in the installer script needs to be modified for users installing on a windows based server. I'll
post that later.


Re: Config.php - datadir - Stephen - 11-19-2010

Christopher,

The windows path issue has been resolved for quite some time now. The code is two posts up. Most users are on 1.2.5.7 now, if not 1.2.6.

The grant issue has been resolved as well (by basically requiring the user to manually create the db user prior to installing).


Parse error: parse error, expecting `')'' - SOLVED-All Versi - hoffman16148 - 11-19-2010

Hi Steve,
I downloaded version 1.2.5.7 and installed it on my beta server. The config file has the same instructions
in the comments that poses the same error. Here is the code that came from the config.php file in version
1.2.5.7:

(OpenDocMan v.1.2.5.7 config.php file)
// 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 commented instructions has the right symbol "/" but it still says backslash. If a user follows the instructions
as written the script comes up with the parse error. If the user does exactly what I did and follow the instructions they'll
rack their brain trying to figure out what they did wrong. I just happened to notice the backslash I put there because I
followed the instructions and knew that windows didn't read the syntax in that manner. I noticed that there are thousands
of people that looked at the posts that have to do with this exact parse error so there are thousands of people that ran
into the same exact error probably because of the same mistake I made by following your instructions in the comment section
for windows users. This could have been avoided if the line comment instructions were correct not only the 'datadir' line.
I changed this path just like everyone else probably did and didn't pay attention to how it was before I changed it.

The commented section of script should be changed to:

// Uncomment this one for WINDOWS - Don't forget the trailing frontslash "/"
'dataDir' => 'c:/document_repository/',

// Uncomment this one for LINUX - Don't forget the trailing slash "/"
//'dataDir' => '/var/www/document_repository/',

I've attached the corrected config.php file to this post for OpenDocMan v.1.2.5.7. If you installed OpenDocMan v.1.2.5.7 and
your getting this error "Parse error: parse error, expecting `')'' then download the attached config.php file and edit the
necessary lines according to your installation and server settings. This fix also works for all versions of OpenDocMan. All versions
still instruct you to end with a trailing backslash when it should be a trailing front slash...


Re: Config.php - datadir - Stephen - 11-19-2010

Ah, I got ya. The wording needs to be changed. I just updated 1.2.6 SVN version to reflect that change.

I am working on a web-based config page right now that is almost complete, so future dataDir configuration will be done there, and the config.php file will only be used for database settings.


Re: Config.php - datadir - bhambooster - 02-07-2011

paddyilos Wrote:I am having this same problem with configuring the datadir folder. i have setup the database etc.
When ever i login I get the "There is a problem with your dataDir. Check to make sure it exists and is writeable" error message. Following the example of the previous post, i created a subdomain (<!-- m --><a class="postlink" href="http://www.ilos.paddy.com">http://www.ilos.paddy.com</a><!-- m -->) and created a folder using that sub domain (<!-- m --><a class="postlink" href="http://www.ilos.paddy.com/docs/">http://www.ilos.paddy.com/docs/</a><!-- m -->).

Now in the config_local.php file, I used this:
$GLOBALS['CONFIG']['dataDir'] = 'www.ilos.paddy.com/docs/';

I get the same "There is a problem with your dataDir. Check to make sure it exists and is writeable" error message. I set the permission of the folder to 777. Am i doing something wrong.

Did you ever get this sorted out? I have the same symptoms and have tried similarly with no luck.