How To Configure Open_basedir
Sep 26, 2007
I want to include script wpisz.php from /srv/www/vhosts/default/htdocs into /srv/www/vhosts/domena.pl/httpdocs/, but i recive this error:
Code:
Warning: main() [function.main]: open_basedir restriction in effect. File(/srv/www/vhosts/domena.pl/httpdocs/wpisz.php) is not within the allowed path(s): (/srv/www/vhosts/default/htdocs:/tmp) in /srv/www/vhosts/default/htdocs/index.php on line 3
Warning: main(/srv/www/vhosts/domena.pl/httpdocs/wpisz.php) [function.main]: failed to open stream: Operation not permitted in /srv/www/vhosts/default/htdocs/index.php on line 3
Warning: main() [function.include]: Failed opening '/srv/www/vhosts/domena.pl/httpdocs/wpisz.php' for inclusion (include_path='.:/usr/share/php') in /srv/www/vhosts/default/htdocs/index.php on line 3
So, I ask you to help me to set it up (propably open_basedir) in that way in which will it work fine. But please.. use a simple language and describe the solution step-by-step because I'm not doing well whith this..
View 3 Replies
ADVERTISEMENT
Apr 20, 2009
I have dedicated server and my panel is lxadmin.
Anybody know how can i make off on php.ini the open_basedir ?
I have to install one script on my server this open_basedir have to be disable.
View 5 Replies
View Related
Apr 25, 2007
I've just upgraded my apache install to Apache 2.0.59 and PHP 4.4.6 and suddenly open_basedir has stopped working. I have an open_basedir setting in each vhost configuration that used to work fine on php 4.3.9, now upgraded it thinks there is no path specified and I'm getting the usual failures where my scripts are not allowed to write to a directory.
Has anyone else seen this or knows what's happening? I'm on 64-bit Centos 4.4
View 4 Replies
View Related
Apr 14, 2009
I got a VPS with CentOs installed and it is using LxAdmin and i got this problem:
I installed Squirrelmail but it isn't working because open_basedir is enabled.
I do not want to disable open_basedir,
View 0 Replies
View Related
Dec 9, 2008
Assuming that an account on my server is hacked into, is open_basedir enough to protect other users on the same server? I would assume so, since php would not have access to those other accounts? Why is suphp needed?
Ofcourse, I also disabled dynamic loading of modules (apache) and added some disable_functions list.
View 3 Replies
View Related
Feb 1, 2008
when I make open_basedir effect in whm > security center
I have in my script this problem :
Warning: tempnam() [function.tempnam]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/xxxx/:/usr/lib/php:/usr/local/lib/php:/tmp) in /admincp/misc.php on line 685Warning: fwrite(): supplied argument is not a valid stream resource in /admincp/misc.php on line 688Warning: fclose(): supplied argument is not a valid stream resource in /admincp/misc.php on line 689
when I disable it I have this other one problem :
Warning: fopen() [function.fopen]: SAFE MODE Restriction in effect. The script whose uid is 32010 is not allowed to access /tmp/vbthumbLTfVOk owned by uid ..
View 2 Replies
View Related
Mar 31, 2008
How can I turn off open_basedir completely from within .htaccess?
I'm finding conflicting advice on how this can be done, or even if it can.
View 13 Replies
View Related
Jun 3, 2007
to append the directory that the accounting.php.inc file is located in to the open_basedir line.
How do i do it, where n how do i make these changes.
View 6 Replies
View Related
May 17, 2007
I can't correct configure the open_basedir. Safe_mode on server is enabled. Now path to accounts is: /var/www/webx/ . I would like change this path to /webx/ On server are some accounts. How can I do it?
What I did:
-> I set path in php.ini file (/etc/php4/apache2) in open_basedir = line to:
/webx/ and /var/www/webx/ too. Without effect.
-> I added
<Directory /webx/>
php_admin_value open_basedir /webx/
</Directory>
in /etc/apache2/apach2.conf and /etc/apache2/confixx_mhost.conf
Without effect.
After any change I was restarting the apache service through /etc/init.d/apache2 restart, of course.
View 1 Replies
View Related
Oct 14, 2007
About the 29th of last month my crons quit working properly, they are still ran but they did nothing.. I finally found out that its giving me an open_basedir error...
I am trying to run the crons from /home/<user>/crons/...
The first few lines of the PHP Code includes some required files that are used by the rest of the site...
PHP Code:
$root_path = "/home/<user>/public_html/";
include($root_path . "includes/common.php");
However, when the cron is ran I get the following email...
Quote:
X-Powered-By: PHP/5.2.1
Content-type: text/html
Warning: include() [function.include]: open_basedir restriction in effect. File(/home/<user>/public_html/includes/common.php) is not within the allowed path(s): (0) in /home/<user>/public_html/live.php on line 7
Warning: include(/home/<user>/public_html/includes/common.php) [function.include]: failed to open stream: Operation not permitted in /home/<user>/public_html/live.php on line 7
Warning: include() [function.include]: Failed opening '/home/<user>/public_html/includes/common.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/<user>/public_html/live.php on line 7
test
Notice: Undefined variable: db in /home/<user>/public_html/live.php on line 11
Fatal error: Call to a member function query() on a non-object in /home/<user>/public_html/live.php on line 11
WHM 11.11.0 cPanel 11.15.0-R17665
CENTOS Enterprise 4.5 i686 on standard - WHM X v3.1.0
Apache version1.3.39 (Unix)
PHP version5.2.1
MySQL version4.1.22-standard
(Paths have the correct username, I replaced the usernames with <user>...)
View 5 Replies
View Related
Oct 8, 2007
I'm running a apache2 webserver with php5 and vhost_alias.
I like to use open_basedir virtual:
VirtualDocumentRoot /www/%0
php_admin_value open_basedir "/www/%0:/usr/share/php:/tmp"
View 0 Replies
View Related
Aug 10, 2009
How to disable open_basedir in plesk enabled server. I want to disable it server wide.
View 7 Replies
View Related
Jan 18, 2008
I am going to run a free host, yes I know I should post this in FWHT but well, they dont answer very fast if at all.
It is very dangerous to have Safe Mode OFF on a free host, but someone was telling me about open_basedir, which makes it so they cant touch any files set outside of open_basedir. Would this be suffiecient to keep them from touching others files? I know I need to disable other functions like exec() and stuff but would open_basedir keep hackers away from others files and hacking them...
View 7 Replies
View Related
Feb 5, 2008
I am trying to do open_basedir in my httpd.conf file using wildcards so I dont have to set it up for EACH account.
Here is my Virtual Host part in my conf:
<VirtualHost *>
VirtualDocumentRoot /www/%2+/%1.1/%1.2/%1.3/%1/htdocs/
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www..*$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^www.(.+) http://$1 [P]
RequestHeader unset Accept-Encoding
RequestHeader unset Content-Encoding
</VirtualHost>
I have tried putting:
php_admin_value open_basedir /www/%2+/%1.1/%1.2/%1.3/%1/htdocs/
But I get this error looking at ANY PAGE:
Fatal error: Can't load /www/fatehost.net/a/l/d/aldo/htdocs/{FILE_IM_ON}, open_basedir restriction. in Unknown on line 0
View 4 Replies
View Related
May 10, 2008
if i enable PHP open_basedir Tweak in cpanel, it disables all sites and none load, do note that the other tweak called Apache mod_userdir Tweak is also enabled.
Now i am wondering is if they both clash with each other to compete for the security ?
Anyone else noticed this also?
Info :
WHM 11.15.0 cPanel 11.18.6-S24255
CENTOS Enterprise 5 i686 on standard - WHM X v3.1.0
View 4 Replies
View Related
Oct 23, 2007
Is there a way to configure the open_basedir to allow cURL to FOLLOW_LOCATION? I'd like to keep the open_basedir enabled for security but at the same time, I need my site to function properly and that's not a possibility with FOLLOW_LOCATION not working.
View 6 Replies
View Related
Feb 21, 2008
I am trying to use chdir() in one of my scripts. However, I am getting an open_basedir restriction error. I have checked the php.ini and the value is not set (which as I understand should disable open_basedir).
View 4 Replies
View Related
Jul 13, 2008
I've installed CRE Loaded 6.2 on one of my client accounts and am receiving the following error when trying to edit the language files:
Warning: tempnam(): open_basedir restriction in effect. File() is not within the allowed path(s): (/hsphere/local/home/hrtire:/tmp:/var/tmp:/usr/local/lib/php) in /hsphere/local/home/hrtire/hrtire.net/store/admin/edit_textdata.php on line 151
I've asked for support from my host and they told me that it can be fixed using .htaccess. They said to use:
php_value open_basedir /hsphere/local/home/hrtire/hrtire.net/store/admin/
That doesn't fix the problem and I'm not getting any more responses from them. I've tried variations (e.g. .../store/, .../store/tmp/) and nothing works.
View 6 Replies
View Related
Mar 27, 2008
some of my sites works good and some didn't work!
i check my site on checkdns.com and its show me this Error Report
CheckDNS.NET is verifying if NS are alive[url] NS list mismatch: registration authority reports that domain is hosted on the following servers: 'ns.sitename.com; ns1.sitename.com', but DNS server ns.sitename.com reports domain to be hosted on 'ns.sitename.com'. Please make sure that you configure the same DNS servers in registrar database and on your DNS
i saw the
PHP Code:
[root@secure ]# cat /etc/resolv.confnameserver xxx.xxx.xx.xxxnameserver xxx.xxx.xx.xxxnameserver xxx.xxx.xx.xxx[root@secure ]#
i have 2 ip just
View 2 Replies
View Related
Feb 16, 2008
I have a question on how to set up (clone) two nameservers.
I have two VPS' with two IPs that are totaly independent of each other. Both running ispCP with Apache2, mail, ftp, mysql, AND bind9 as DNS managment.
So. I want these two server to be as independent as they are, BUT they should share NameServers with each other.
Something like this:
host1:
ns1.domain.com = host1
ns2.domain.com = host2
host2:
ns1.domain.com = host1 (or host2?? = inverted)
ns2.domain.com = host2 (or host1?? = inverted)
A lot of domains are running more then one NameServer, but I could not find any tutorial on how to "clone" the NS from one to an other. Is it enough to just add some kind of "transfer to IP setting" in bind, or do I have to have scripts that download settings and files from one server to an other regularly?
View 2 Replies
View Related
Mar 15, 2008
I have a problem in the last apache upgrade (apache 2.2.8 + php5) step .
exactly in "Configure Suexec and PHP"
I found this option doesn't have multi values as CGI or Suphp just I found none :
PHP 5 Handler none
PHP 4 Handler none
I must to return to build apache1 with php4 for I can see suphp and cgi in "Configure Suexec and PHP" "PHP 4 Handler" option .
View 5 Replies
View Related
Jun 17, 2008
On my server I'd like to keep sites as fast as possible and not drain too much on the server. I don't have many users, but I'd like to get it right the first time. What's the best DB engine to use? What about other settings? I'm not sure I should run caching yet, I'm not under much load.
The server is running on Windows.
View 5 Replies
View Related
Jul 14, 2008
how come I can't route all traffic through openvpn.
1. I was able to ping my client and server ip no problem. So the tunnel connection is fine.
The problem is i can't route internet traffic through openvpn.
I was able to ping from tun0 interface after i add below command
iptables -t nat -A PREROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
root@host188 [/etc/openvpn/config]# ping -I tun0 4.2.2.2
PING 4.2.2.2 (4.2.2.2) from 10.8.0.1 tun0: 56(84) bytes of data.
64 bytes from 4.2.2.2: icmp_seq=1 ttl=55 time=8.94 ms
64 bytes from 4.2.2.2: icmp_seq=2 ttl=55 time=8.65 ms
64 bytes from 4.2.2.2: icmp_seq=3 ttl=55 time=8.90 ms
However, my client can't ping 4.2.2.2 from vpn tunnel and I use tcpdump I saw the traffic coming.
View 2 Replies
View Related
Mar 3, 2007
downloaded WAMP5_1.7.0. Prior to downloading I was freaking out wondering if I was going to screw up my computer with software conflicts, but I pressed on. I read the Apache information regarding IIS / Apache conflicts. The tutiorial told me to check the services installed on my computer. The tutorial told me to look for a service titled "World Wide Publishing" The service (WWP) did not exist so I proceeded to the WAMP installation wizard. I installed it. Apache does not display in the services window. As if it does not exist. Apache will not fire up. From what I got from the instructions at Apache, it seems there are alot of modifications I can perform to setup Apache correctly. The long and short of it is I connot see my see what my HTML/PHP code is spitting out because Apache never fires up. Can anyone give me some pointers on setting WAMP up in plain ENGISH? Just a note, when I float my mouse over the Apache icon, a little mouse over windows comes up saying "one of two servers running". Is ISS enabled on my computer? I'm frustrated. Any help regarding this matter is worth a beer (or 12).
View 0 Replies
View Related
Feb 7, 2007
I purshased a web hosting and I uploaded just one folder to it with my email contact form. The fact is that Google is already listing my site but it is showing the full content of my HTML public folder! Everyone could search my site like an FTP! I don't really want that. How can I avoid that? I just want web browsers to show my web pages, not the folders neither my HTML public folder with all my files: scripts, photos, etc.
Google is showing all this:
Index of /[DIR] Parent Directory 15-Jan-2007 07:58 - [DIR] cgi-bin/ 15-Jan-2007 02:37 -. Apache/1.3.37
Maybe the solution is too easy but for me it is a nightmare right now.
View 6 Replies
View Related
Oct 3, 2007
Between our Linux servers, I can get speed up to 80Mbps when transferring big files. However, between Linux and Windows, it's just around 800Kbps - 2Mbps. It shows in network connection properties that connected at 100Mbps, but not sure why it's so slow
Is there any setting I should pay attention? Running Windows 2003 on that box.
View 7 Replies
View Related
Aug 7, 2007
I would like to configure RAID 1 setup. Do I need extra hardware or if I have 2 hard drives can I set it up?
View 3 Replies
View Related
Aug 1, 2007
This is a instructional overview thread for those developers who are getting into setting up their own server with a LAMP (Linux Apache MySQL PHP) setup. The linux distro referred to in this thread is a centOS (fedora|redhat) setup.
Before Anything
- Make sure that your actual RAM is the same amount that is displayed by the server (there could be some BIOS restrictions on RAM so check for that).
Linux OS Installation
- Use a server system for the type of install.
------------------------------
- Setup you partitions with care:
- Make sure that everything other than /swap is an ext3 partition type.
- /swap (usually double the amount of space that your ram has but never larger than 4 gigs.
- /tmp (700meg is ok).
- /boot (100meg is ok).
- / (leave rest of the available space in the harddrive for this).
------------------------------
- Use GRUB boot loader
- Use DCHP only if your IP address changes due to the network. If not, then assign the IP address of the box.
- Assign the netmask if DCHP is not in use.
------------------------------
- When setting up the packages, select only what you need. Most of the time it's better to just install no packages and then install everything you need by yum (yellowdog update manager). If you do not select any packages, only the 1st CD of the linux install will be needed.
Linux OS Customizing
- Create a new user and provide it a password (with # passwd). Do not create a user with a generic or commonly known names used in any daemon programs (ex. mysql, apache, admin, user, php, postgresql).
- Disable the ROOT login in SSH (this means that when you login using the other user with SSH, you'll have to $ su to the root user).
- Install "Development Tools" with yum using group install if you plan to compile your own apache. If not then install apache with yum install apache.
Apache Settings
- Disable the extensions that you're not using for your website. If the server is only hosting one website, then there is no use for Virtual Hosts.
- Set the ServerLimit value to a suitable value so that users won't get locked out of the website.
- Change the User and Group directives to the newly created user.
- Set Options +Indexes to Options -Indexes so that the contents of directories w/o an index file will not be displayed.
- Change the DocumentRoot setting to the newly created user's home (~) directory. Or if you plan to use the default (/var/www/htdocs or /var/www/html) then assign the permissions of the user to that directory.
- Add apache as a start up program when the operating system boots up (this can be set in /etc/rc.d/local).
- Setup logs accordingly. If you setup image logging and your server has 20+ images per page then your website performance can suffer.
- Setup Error Logs to a suitable level.
- If any web pages are not displaying and the web server appears to be on when accessing it from the localhost (wget http://localhost) then disable or flush the iptables (/usr/sbin/iptables --fliush). You should also set this as a start up option for the OS.
- Use mod_rewrite to use modern URLs.
MySQL Settings
- Use --skip-name-resolve.
- Use --skip-bdb (if you're not using it).
- Use --skip-innodb (if you're not using it).
- Set a log for slow queries.
- Set the max_connections to a high value.
- Do not set a user with a wildcard ip-address. Only setup users with a specific ip.
- Use Query Caching for frequently used queries.
PHP Settings
- Disable Magic Quotes.
- Disable Register Globals.
- Disable Short Tags.
- Disable ERROR REPORTING if the website is not in development mode.
- Enable HTTP Only Session Cookies.
- Set Session Cookies to only be cookies (and not URL's).
- If sessions do not work, then set the session save path to a directory where the apache user has access to.
- Use Gzip Compression.
Optimizing Concepts
- Use an optcode cache for PHP (Eaccelerator).
- Consider using a static domain for CSS and JS files (this way the same cookies for the website won't be sent on each request).
- If your website uses alot of CSS and JS files per page, bundle all of them together into one request using mod_rewrite and php [url]
- For Apache, use the lingerD module (this reduces the amount of resources that are used when an apache connection is closed).
Here are some links for optimizing your server build:
- [url]
- [url]
- [url]
View 1 Replies
View Related
Feb 22, 2007
I am running IIS 6 for testing & developing web sites offline before uploading the.But i am having little problem reagarding name server and how to configure sub-domain in name server,
View 2 Replies
View Related
Feb 9, 2007
I have 2 servers, 1 has its DNS sorted out, and I have a domain on it. The other is an unmanned dedicated server. I need to configure plesk, and I understand it needs a valid DNS to function.
What I want from the second server is simply for its pages, content etc to be accessed via the IP address, not a domain, as it is purely a media server. So how can I configure this? I created a virtual domain but the plesk server shows the default folder content and not the virtually created one, how can I get the server to point to my virtually created folder content?
View 5 Replies
View Related
Nov 27, 2007
when i set the Backup Destination to ( /home/cpbackup/daily/) this error appear to me
Quotas cannot be built! Your cpbackup destination is on a filesystem which has quotas enabled. Please move it to a filesystem which does not have quotas turned on or a separate partition/disk slice mounted at /backup.Backup has been disabled to prevent quota problems...
i have only one 500 GB HDD
PHP Code:
Filesystem Size Used Avail Use% Mounted on/dev/sda5 9.9G 386M 9.0G 5% //dev/sda1 99M 21M 73M 23% /bootnone 2.0G 0 2.0G 0% /dev/shm/dev/sda7 426G 2.1G 403G 1% /home/dev/sda8 1012M 112M 849M 12% /tmp/dev/sda3 9.9G 2.5G 6.9G 27% /usr/dev/sda2 9.9G 716M 8.7G 8% /var/tmp 1012M 112M 849M 12% /var/tmp
View 7 Replies
View Related