<p>The problem here was the URL in the database was wrong. I had assumed that config was entirely file-based but it seems that the config file is dependent upon the database Site URL. It would be great if this could be avoided as it makes deployment between environments so much easier without paths or URLs in the DB.</p>

CC BY-SA 3.0
2014-10-28T19:56:02.273Z
2014-10-28T19:56:02.273Z
Russ Back
<p>Just deployed to a server which has the following open_basedir setting:</p>

<pre><code>{DOCROOT}/:/usr/tmp:/var/www/vhosts/mydomain.com/httpdocs/
</code></pre>

<p>The webroot is at </p>

<pre><code>/var/www/vhosts/mydomain.com/httpdocs/public_html
</code></pre>

<p>and craft is at</p>

<pre><code>/var/www/vhosts/mydomain.com/httpdocs/craft
</code></pre>

<p>So all standard however I'm still getting this:</p>

<blockquote>
  <p>Could not find your craft/ folder. Please ensure that $craftPath is set correctly in /var/www/vhosts/domain.com/httpdocs/public_html/index.php</p>
</blockquote>

<p>Any suggestions please?</p>

CC BY-SA 3.0
2014-10-23T21:33:34.577Z
You sure it's an open_basedir problem and not a permissions one?  What are the perms on the craft folder?
Brad Bell
CC BY-SA 3.0
2014-10-23T21:42:16.607Z
I've tried 777 and set the right owner. Switching from Apache to CGI or FastCGI works but then I am unable to upload assets as I get a 500 on the ajax upload and nothing in the logs (this is on a Plesk/CentOS box)
Russ Back
CC BY-SA 3.0
2014-10-23T22:20:58.387Z
Did you check the Apache logs and the Craft logs (craft/storage/runtime/logs)?
Brad Bell
CC BY-SA 3.0
2014-10-24T10:22:21.910Z
Nothing in Craft logs, will check Apache. Interestingly, the URL in the control panel on the site name (top left) links to the domain defined in local config, not live, even though the domain config looks correct. The upload destination uses basePath and baseUrl from environmentVariables in config so perhaps that's it?
Russ Back
CC BY-SA 3.0
2014-10-24T12:07:27.300Z
Original problem solved - I had assumed that the config environment variables matched the server URL to config, but seems it is reliant on the siteUrl in the database? I now can't upload - saying files are empty. All PHP settings for uploads, sizes, post size etc should be fine, is there anything else we should be looking for?
Russ Back
CC BY-SA 3.0
2014-10-24T17:07:40.350Z
I'm not sure I'm following... probably worth adding an official answer to this one and starting a new question with more details on what you're seeing.
Brad Bell
<config>
Problem with open_basedir?
# Problem with open_basedir?

(Asked by: username_0 on 2014-10-23)

Just deployed to a server which has the following open_basedir setting:
{DOCROOT}/:/usr/tmp:/var/www/vhosts/mydomain.com/httpdocs/

The webroot is at 
/var/www/vhosts/mydomain.com/httpdocs/public_html

and craft is at
/var/www/vhosts/mydomain.com/httpdocs/craft

So all standard however I'm still getting this:

Could not find your craft/ folder. Please ensure that $craftPath is set correctly in /var/www/vhosts/domain.com/httpdocs/public_html/index.php

Any suggestions please?

**Tags:** config

> **Comments:**
> **username_1**: You sure it's an open_basedir problem and not a permissions one?  What are the perms on the craft folder?  
> **username_0**: I've tried 777 and set the right owner. Switching from Apache to CGI or FastCGI works but then I am unable to upload assets as I get a 500 on the ajax upload and nothing in the logs (this is on a Plesk/CentOS box)  
> **username_1**: Did you check the Apache logs and the Craft logs (craft/storage/runtime/logs)?  
> **username_0**: Nothing in Craft logs, will check Apache. Interestingly, the URL in the control panel on the site name (top left) links to the domain defined in local config, not live, even though the domain config looks correct. The upload destination uses basePath and baseUrl from environmentVariables in config so perhaps that's it?  
> **username_0**: Original problem solved - I had assumed that the config environment variables matched the server URL to config, but seems it is reliant on the siteUrl in the database? I now can't upload - saying files are empty. All PHP settings for uploads, sizes, post size etc should be fine, is there anything else we should be looking for?  
> **username_1**: I'm not sure I'm following... probably worth adding an official answer to this one and starting a new question with more details on what you're seeing.  

---

## 1 answers

### Answer by username_0 on 2014-10-28. Score: 1 | Accepted answer

The problem here was the URL in the database was wrong. I had assumed that config was entirely file-based but it seems that the config file is dependent upon the database Site URL. It would be great if this could be avoided as it makes deployment between environments so much easier without paths or URLs in the DB.


---

