Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have a dedicated LAMP server with more than one domains hosted. I want to load a php extension only for a single domain. Is it possible?
Edit your VirtualHost configuration.
Make a copy of php.ini file. Add the extension you need in there. Store it in separate directory.
Use PHPIniDir in your config for the particular site and point to that new dir, containing new php.ini
Restart apache.
Your config will be loaded and will use separate php.ini file.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I'm using isp config but all my larval stuff is in a public folder and iso config points to a web folder.
Does anyone know how I can go about changing this?
In ISPConfig:
1) Select the site
2) Choose options
3) In the Apache Directives box type the full path of your Document Root pointing to /public:
DocumentRoot "/the/absolute/path/of/the/laravel/directory/public"
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have LAMP installed in my server and I use virtualhosts to map domains to subdirectories. I need to allow my customers to upload files (including php) to their server using FTP.
The problem is that a customer using a domain xxx.com.br uploaded a file test.php and executed it like:
xxx.com.br/test.php
The content of test.php if file_put_contents("../../xxx.txt","teste") and it worked! The file xxx.txt was created 2 levels above his domain folder! How do I prevent this from happening?
Don't give the PHP process access to directories it isn't meant to reach.
That's kind of the point of the whole permission system.
In Linux, PHP will generally run as its own user, just make sure that user doesn't have read or write permission to any files you don't want exposed.
For this purpose exists open_basedir configuration directive. More information about it for example here.
Moreover it is good to use FastCGI which allows each script to be run under its owner. More information about it for example here.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
If i write a file into /var/test, how can i access it through the website?
Because from having a look at the directories, the file needs to reside in /var/www/html/ so i can access it through the url.
for example if i were to write into /var/www/html/directory/file.txt all i'd need to do to access it is visit the following url:
www.example.com/directory/file.txt. But i'm not sure how to do this when writing to /var/test/file.txt.
Thanks to anyone who can help.
You can't access it via the website, unless you configure the server to allow it. Which is a good thing so your web server doesn't expose all of your files to the internet.
See the Documentroot and Alias Directives in the Web server configuration (assuming you're running apache).
this is a web-server setting, for apache see http://httpd.apache.org/docs/2.2/urlmapping.html
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I was wondering why my system says it is running the php from the /etc/php5/apache2/php.ini
directory when in fact it was running it from the /etc/php5/cli/php.ini .
When I did a phpinfo() on a file in the directory of the folder, I received this however the changes to the configuration file wasn't impacting the server until I searched the whole system for a php.ini file and found the php.ini file under the cli/ directory:
Hopefully you can see it. I wasn't sure exactly how to put in onto SO.
it's intentional so you can easily have different configuration depending on your runtime environment.
In your environment when php runs in command line mode it uses /etc/php5/cli/php.ini.
When you access it from browser php is running from apache. So then /etc/php5/apache2/php.ini is used.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
Please tell me how to enable all these extension all at once. They are creating a lot of problem.
I want to enable all of them by just one click.
Thanks
Two ways:
1) check them all one by one
2) go to php.ini uncomment them.
3) or thrught ini_set() in php file
For first two you need to restart your apache server.
FoThey are all installed. You only have to check the ones you want, but there is no way you can do it in one click ...