• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

base_dir error when running a PHP

J

jsktech

Guest
I get a base_dir error when running a PHP script, how can I fix this?

The program is iDevAffiliate, I have talked with the support there and they are saying it is a PHP problem.

PHP Info:
Current PHP Version: 4.3.8
safe_mode: Off
register_globals: On

Warning: copy(): open_basedir restriction in effect. File(/home/httpd/vhosts/domain.com/httpsdocs/idevaffiliate/banners/banner_88x31_1.gif) is not within the allowed path(s): (/home/httpd/vhosts/domain.com/httpsdocs:/tmp) in /home/httpd/vhosts/domain.com/httpdocs/idevaffiliate/admin/banner_add.php on line 29

Warning: copy(/home/httpd/vhosts/domain.com/httpsdocs/idevaffiliate/banners/banner_88x31_1.gif): failed to open stream: Operation not permitted in /home/httpd/vhosts/domain.com/httpdocs/idevaffiliate/admin/banner_add.php on line 29
 
I ran phpinfo.php and I see that pen_basedir is set to: home/httpd/vhosts/domain.com/httpsdocs:/tmp

I need to change this to a different location how do I do that?
 
Open (or create) the vhost.conf file in the domain's conf directory. Add the following to it:

Code:
<Directory /home/httpd/vhosts/domain.org/httpdocs>
        php_admin_value open_basedir "/path/to/include/from:/other/path/to/include/from"
</Directory>

Restart apache.

See this page for more information on open_baesdir.
 
I did this and restarted Apache and I am getting the same error, same path. Do I need to chmod the file for the system to be able to read it?
 
Unacceptable...

This issue has been covered about 3 million times on these forums, and is very well documented as well. A simple search would give you nearly hundreds of threads dedicated to writing vhost.conf files.

You need to use the websrvmng to force PSA to reconfigure that domain, and THEN restart the webserver. What it does is it finds the conf file, and then places in include line in your site configuration. After that, restart apache and you are good to go.
 
I'm having a similar issue with the vhost.conf - and there is no file named websrvmng on my server!

And chickenbak, before you go off like that again - i looked inside /usr/local/psa/admin and there is no such file there! Neither did the system find one with find or whereis...

So what to do?
 
Originally posted by reiberjoe
So what to do?

Reinstall Plesk!

If you dont have a websrvmgn file, Plesk can't configure your virtual hosts and Plesk is almost useless...

(but I suspect that if your Plesk is working, that you just don't use the correct way to locate your file... try using locate)
 
Originally posted by reiberjoe
I'm having a similar issue with the vhost.conf - and there is no file named websrvmng on my server!

And chickenbak, before you go off like that again - i looked inside /usr/local/psa/admin and there is no such file there! Neither did the system find one with find or whereis...

So what to do?

type updatedb, once it is finished type locate websrvmng...

you will find that there are actually 3 locations for websrvmng...which you could also have found by searching these forums...

/usr/local/psa/admin/bin/websrvmng
/usr/local/psa/admin/sbin/websrvmng
/sbin/websrvmng

If you don't have those present...your Plesk wouldn't even be working, period.

I think this kind of post substantiates one of my other points to the umpteenth degree. Don't try to administrate a server if you don't know what in the hell you are doing. And yes...not knowing how to find a file CERTAINLY constitutes as not knowing what in the hell you are doing.
 
Whoa, thanks for the <3 chickenbak, think you have a real attitude problem here :)

I located the file finally and did everything as written in the other post. Restarted apache from CP but nothing has changed. I try to figure out why myself now before asking again in a forum which is uhm.. intended for .. uhm asking questions? :roll:
 
Originally posted by reiberjoe
Whoa, thanks for the <3 chickenbak, think you have a real attitude problem here :)

I located the file finally and did everything as written in the other post. Restarted apache from CP but nothing has changed. I try to figure out why myself now before asking again in a forum which is uhm.. intended for .. uhm asking questions? :roll:

Read my other posts, the point is...why are you trying to administrate a server, when you have no idea what you are doing. You just substantiated that you don't by admitting you didn't know how to locate the file. Fact of the matter is, you shouldnt' be using Plesk as a replacement for what you can't do...but rather a panel to help you with what you know how to do. If you have customers running on the server, you are doing your customers a disservice but claiming you know what you are talking about.

The point is, the forums are inundated with threads that are the SAME question over and over again. If you don't feel like "wasting your time" to make sure the question hasn't been answered, don't expect us to waste ours. The websrvmng question comes up at LEAST 1-2 a month. There are probably hundreds of threads asking the exact same question...but yet no one ever bothers to take a look. These forums are intended for asking questions, yes...but there are two sides...you have to do your part too. Oh...and learn about what in the hell you are doing.
 
Originally posted by reiberjoe
Whoa, thanks for the <3 chickenbak, think you have a real attitude problem here :) [...] I try to figure out why myself now before asking again in a forum which is uhm.. intended for .. uhm asking questions? :roll:

Have you ever given the thought, that it's not about attitude in the answers, but more in your questions?

As Chickenbak writes, your question is covered by litteraly hundreds of threads though this forum. It's covered in the documentation - even in the httpd.include file in every single PSA virtual host on your system.

If you can't deduce a helpfull solution by reading the many threads covering this issue, you could start by writing what you have done, what you wrote in your vhost.conf etc., things that actually might get someone to care enough to answer your question, even though... it's covered over and over again....

My point in saying this: yes, it does work, if it dosen't on your server... You 99,999% sure has written something wrong in your vhost.conf - and nobody can help you without seeing what you wrote...

Be more specific when you write questions in a support forum like this - and by all means.... USE THE SEARCH button - its included to help, not just to look nice and fill up space...
 
Dude.. i didn't find the file cause i mistyped it. Yes, slap me, my bad.. and i should've checked it three or four times. I can post you my vhost.conf now and tell you that i restarted apache via CP and it's still not working with the register_globs, but i rather try to figure that out on my own or rewrite the scripts since i know it's better to anyways.

And i used the search function, why would you think i didn't. Actually it's not even right to reply - i wanted to reply on chicenbaks post earlier but since the forums get spamed tooo much .. i didn't.

Just answer so that it won't get spammed with ot stuff anymore.

I get your points - but there are different ways to point ppl to something. Eg... a polite and a non polite way :roll:

And you might be right ten million times - it's just about how you say it!
 
Originally posted by reiberjoe
And i used the search function, why would you think i didn't.

As pointed out before - because the answer to your question has been posted over and over.

And I know it might sound rough to you when it's pointed out, but if you look at the threads in this forum for about the last couple of months, you'll see most threads are all related to the same question - again, again and again...

It seems that more and more "new" users don't even bother to read the forum, read the manual, use the search function etc. before they blindly post their question. That could explain the "polite or non polite" way of answering your questions here.
 
Originally posted by Whistler
As pointed out before - because the answer to your question has been posted over and over.

And I know it might sound rough to you when it's pointed out, but if you look at the threads in this forum for about the last couple of months, you'll see most threads are all related to the same question - again, again and again...

It seems that more and more "new" users don't even bother to read the forum, read the manual, use the search function etc. before they blindly post their question. That could explain the "polite or non polite" way of answering your questions here.

Couldn't have said it better myself. People just don't understand that when a forum is inundated with duplicate questions and posts over and over, that it dilutes the utility of the forum as a resource, and makes it harder to get real discussion through. The expectation that for some reason the people who are answering the question should put in more effort than the person asking it is ridiculous.

It isn't personal, I think this topic is just ridiculous though truthfully. Anyone who frequents these forums knows that a RIDICULOUS amount of threads dedicated to this very question exist...because people are far too lazy to research it on their own, or RTFM. I think the only thing that anyone is asking is that you do your homework...thats all.
 
chickenbak / Whistler,

Perhaps instead of fanning the flames you could politely point out that the information the questioner required was available within the documentation, FAQ or forums if they searched. It would help to ensure you dont come across as a pair of arrogant pricks.

We all start somewhere. Personally I dont run a server that has clients, my server is for personal use, will you shout me down when I need to ask a question?
 
Originally posted by Wythrol
chickenbak / Whistler,

Perhaps instead of fanning the flames you could politely point out that the information the questioner required was available within the documentation, FAQ or forums if they searched. It would help to ensure you dont come across as a pair of arrogant pricks.

We all start somewhere. Personally I dont run a server that has clients, my server is for personal use, will you shout me down when I need to ask a question?

Perhaps instead of condoning despicable behavior, and laziness, you could also help rebuke those individuals that have little regard for the integrity of the forums as a resource. How many times do we have to point out that it is in the documentation...would you like to take over as lead newbie "concierge" and enlighten all of them to the location of the answers. Fact of the matter, your argument is devoid of any logic whatsoever...the harm is already done, and I am personally hoping that by seeing the reaction by some of the more prominent members of this board, that individuals will think twice before making the same mistake. Your suggestion in no way alleviates the problem...but hey, whatever works.

What I am trying to prevent is the dillusion of this resource, by people asking the same questions OVER AND OVER. If this question was obscure, even if idiotic, I don't think that anyone would have a problem with it. Rather, since the individual had absolutely no regard for doing anything on their own, we have yet another thread that we have to dig through to get to the real content. Thank you very much Wythrol for your great contribution.

As far as you runing your own personal server...good for you...but that doesn't mean my point isn't valid that you shouldn't be using Plesk to make up for your own lack of experience or skill. Would a pilot take a plain up with barely a knowledge of flying because he can put the plane on "autopilot". Don't be ridiculous...arrogant prick or not...at least I didn't post making myself look like an imbecile. If you are going to argue, at least try to substantiate a point that has merit with at LEAST a semblance of a solution. Try again numbnuts.

And trust me, I am not alone in my sentiments, there are many more on this board that are sick of individuals just like you and reiber. Don't think so...do a search...I am sure you have used it extensively.
 
I have little regard for those that dilute the value of any forum, hence my confusion as to why you insist on spewing mutilple paragraphs that are ultimately void of any argument.

Its a simple thing .... "this problem has been answered elsewhere ..[link] ..." there is no need for a verbal diatribe telling them how **** they are. Despicable? do you own a dictionary or did you swallow it?

"Dillusion" (you mean dissalution) it doesnt matter if the question is stupid or even idiotic, you treat the "newbie" as you would like to be treated when you have to ask a question. And if you are so in favour of stopping the weakening of this forum then stop flooding it with playground arguments like this.
Plain or Plane? As a UKPPL this scares me. One is a type of flour, the other I 'drive'.

Why is it if you are so fervourent about the purity of the forum you are one that is first to come out with diatribes like this
 
To make a long story short...because I am hoping that the influx of imbeciles such as yourself will cease.

I was going to respond...but the fact of the matter is...you had to stoop low enough to insult my typos...yet if you were so "fervourent" in that regard...you would at least have come close to spelling "fervourent"...but I think you just didn't even know that the word you were looking for was fervent...because you didn't even come close...so what was that about a dictionary monkey boy?

I also like how you have absolutely no room to speak since you have added nothing to the forum...once at become an actual contributing member...than you can say something. Whether I post extensively to one post has nothing to do with the dilution of these forums, now if I was creating many threads about the subject, so people have to sift through it, that would be another thing altogether. Oh that's right...you don't understand that...it is too logical.

Originally posted by Wythrol
I have little regard for those that dilute the value of any forum, hence my confusion as to why you insist on spewing mutilple paragraphs that are ultimately void of any argument.

Its a simple thing .... "this problem has been answered elsewhere ..[link] ..." there is no need for a verbal diatribe telling them how **** they are. Despicable? do you own a dictionary or did you swallow it?

"Dillusion" (you mean dissalution) it doesnt matter if the question is stupid or even idiotic, you treat the "newbie" as you would like to be treated when you have to ask a question. And if you are so in favour of stopping the weakening of this forum then stop flooding it with playground arguments like this.
Plain or Plane? As a UKPPL this scares me. One is a type of flour, the other I 'drive'.

Why is it if you are so fervourent about the purity of the forum you are one that is first to come out with diatribes like this
 
You drink a lot dont you.

Fervent is a good word, the word you are still grubbing around for is fervourant.

I appreciate that there may be some confussion as to the correct spelling as you are in the USA and I am in the UK. However, you are still wrong. Your grammar is also shocking.

You have yet to make one logical statement in the 2 posts I;ve had to uncode from you.

I think you are saying that because you post losts of **** you should be taken more seriously than someone that doesnt resort to letting his belly rumble.
 
Originally posted by Wythrol
chickenbak / Whistler,

Perhaps instead of fanning the flames you could politely point out that the information the questioner required was available within the documentation, FAQ or forums if they searched. It would help to ensure you dont come across as a pair of arrogant pricks.

We all start somewhere. Personally I dont run a server that has clients, my server is for personal use, will you shout me down when I need to ask a question?

For starters, it's not about shouting anybody down... It's about the fact that why should I search for the answer to your question, while you could have entered the same search yourself at the first place?

There's a lot of very expirenced users reading and helping out for free every single day in this forum. I really apreaciate this help and their many hints and tweaking tricks etc. Unfortunately I everyday (I read this supportforum also on a daily basis) - see that more and more threads (often in a row) releates to the same question and it's most sure, that people REALLY!!!! diden't bother to at least look at the last 5-10 threads before posting.

It's filling this forum with spam, taking a lot of everybodys time, and as also discussed in http://forum.sw-soft.com/showthread.php?s=&threadid=19520 we tend to spend more time learning people how to use their OS, which by all means - I really think is not within the scope of this supportforum.

It's so easy to use the search function, I do it allmost every time I answer a question. And as most people reading here on a frequently basis - hopefully acknowlege, I usually always provide a link to previeous answered question, the manual or some external page when I answer a question.

I gladly help others - again: free of any charge - as I know - and really apreciate - the others here spending much time helping me; and I really think it's sh*tting on those people when you at least don't use time looking for an answer to your question, but they end up using more time answering and creating a solution to your problem.

:(
 
Back
Top