Plesk relative path issues

Hello Everybody,

Recently I have faced an issue in one installation. I could not complete the installation due to the relative path issue.

My control panel is plesk.

How can I solve this issue in server side.

This is the sample url.

$GLOBALS['THRIFT_ROOT'] = '/usr/local/thrift/thrift-0.8.0/lib/php/src';

Could you please help me to solve this issue.
JacobbabyAsked:
Who is Participating?
 
Ray PaseurCommented:
These look like two very different file paths to me.  Why not try listing the files in the directory that works?  You might find your way to a working file path!
0
 
joomla_phpCommented:
What is the error?
0
 
Ray PaseurCommented:
Install this script on your server (shown here in its entirety) and post a URL link to it here.  You can take it down later.  This will help us find the document root and other useful information.
<?php phpinfo();

Open in new window

0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
LinuxGuruLinux Server AdministratorCommented:
Hi,

We would be able to assist you better if you could provide more details regarding the error and the steps followed by you. Whats the application name? Are you installing through browser? At which part its throwing the error?

Cheers!!!
0
 
JacobbabyAuthor Commented:
I am trying to install Hypertable in my server. I have tested with "echo"  I get response above the require_once() function . When I put full path its's working. But it is not possible to put full path in everywhere.  I am trying to install it through browser. Here is the phpinfo().
http://indexdevice.com/test.php
0
 
joomla_phpCommented:
What is the response you get? I don't see it printed here.
0
 
Ray PaseurCommented:
This may be helpful.  All of your web site originates in this root directory.  The relative paths will be "relative" to here.
$_SERVER["DOCUMENT_ROOT"]      /var/www/vhosts/indexdevice.com/httpdocs
0
 
JacobbabyAuthor Commented:
At first my one line of code is like this

require_once '../php/ThriftClient.php';

I changed it like this

require_once '/var/www/vhosts/indexdevice.com/httpdocs/php/ThriftClient.php';
It's working at that point. But What I have to add for the following lines

$GLOBALS['THRIFT_ROOT'] = '/usr/local/thrift/thrift-0.8.0/lib/php/src';

require_once $GLOBALS['THRIFT_ROOT'].'/Thrift.php';

This is not working. How can I rewrite this lines.
0
 
joomla_phpCommented:
Why go from
/var/www/vhosts/

to
/usr/local/thrift/

I guess that's what Ray_Paseur is saying.

The path is just wrong.
0
 
JacobbabyAuthor Commented:
ok thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.