- Check If Php Suexec Installed Updates
- Check If Php Is Running
- Check If Php Array Is Empty
- Check If Php Function Exists
I set up a virtual host that uses mod_suexec to run PHP scripts as a different user than www-data. I need to check if my shared host has suexec or suphp.
Active1 year, 8 months ago
Check what is installed; first Apache. Now we need to back-up the installed suexec and put this new. I was searching the net for how to install suexec for PHP. I've just reinstalled my server's OS (Ubuntu 10.04 LTS) and installed Virtualmin using the install script (install.sh). Everything on the server is completely vanilla - the only thing I've done after.
Check If Php Suexec Installed Updates
Is there a way to check if PHP is installed on an Apache or IIS server within the PHP environment itself?
If so, how?
Eric Leschinski96.7k4343 gold badges342342 silver badges293293 bronze badges
Oliver SprynOliver Spryn9,5323030 gold badges8282 silver badges172172 bronze badges
5 Answers
create a file (say info.php) with the following content on an accessible path and try to browse it:
@Alfabravo is correct: don't forget to delete the file from the server after using it!
alfasinalfasin45.2k1010 gold badges5858 silver badges100100 bronze badges
Create a PHP script called php.php with the content:
and run it from your browser. Or from command line, run:
j08691j08691173k2121 gold badges206206 silver badges222222 bronze badges
I don't know with what PHP version it became available, but try this:
Check If Php Is Running
untilluntill
The virtually most definitive answer possible (there are other similar possibilities) is:
Now, just use
Gabriel Ryan NahmiasGabriel Ryan Nahmiason_iis()
whenever you want to know.1,51511 gold badge1919 silver badges3939 bronze badges
You can also find out via the $_SERVER['DOCUMENT_ROOT'], sort of:
Read http://www.helicron.net/php/
(Basically, according to the article, Apache sets the document root with a valid variable, and IIS does not). Driver for hp v125w flash drive.
jbnunnjbnunnCheck If Php Array Is Empty
4,40844 gold badges3131 silver badges5858 bronze badges
Not the answer you're looking for? Browse other questions tagged phpapacheiis or ask your own question.
Active3 years, 4 months ago
I successfully managed to make mod_fastcgi work with fpm, which enables me to set the user:group running the scripts via fpm pools definition. However, there is no similar alternative for, say, a python script run through mod_fastcgi, so i'm trying to learn how to use suexec to run whatever script through mod_fastcgi with the user:group i choose.
I'm starting from this working configuration: Free download bluetooth driver for hp pavilion g4.
I put a
phpInfo()
inside /var/www/test1/index.php
, which shows the correct php.ini
path.Now, to activate
suexec
i:- Installed
apache2-suexec
:sudo apt-get install apache2-suexec
- Activated
mod_suexec
:sudo a2enmod suexec
- Changed files' permissions:
sudo chown -R michele:michele /var/www/test1
- Added this line to the vhost configuration:
SuexecUserGroup michele michele
- Reactivated the site and restarted apache:
sudo a2dissite test1 && sudo a2ensite test1 && sudo service apache2 restart
The user:group
michele:michele
exists in the system. When running test1.slothcompany.net
i see the phpInfo()
output exactly as before, and echo exec('whoami');
prints www-data
instead of michele
.sudo /usr/lib/apache2/suexec -V
tells me that the log file should be in /var/log/apache2/suexec.log
, but no such file exists. Then, i know that apache should log in the error.log file the activation of the suexec wrapper, as a notice, but in the error.log no such notice is found as well. So, i suspect that for some reason suexec isn't starting at all.I read here the list of checks suexec doesto decide if the call is successfull, but i don't know how to check what the results of these checks are.it says they should be written in the suexec log file, but this file is never created, as it seems.
Check If Php Function Exists
https://powerupnews397.weebly.com/install-mac-os-x-on-hp-probook-4540s-screen.html. So, what i'm doing wrong?
Thank you all so much.
swahneeswahnee1,07111 gold badge1515 silver badges2828 bronze badges
![Check if php suexec installed programs Check if php suexec installed programs](https://d22rw8pyewxbkl.cloudfront.net/wp-content/uploads/2014/05/web1-php55-fastcgi.jpg)
1 Answer
I finally managed to make it work, with the help of this post. There were two big issues with my first configuration: the first was that i didn't enable suexec to work with fastcgi (this requires to edit the fastcgi.conf configuration file); the second was that in my first virtual host i wasn't using fastcgi at all! I got this when i realized that the system worked the same after disabling fastcgi.
However, these are the final steps that worked for me (i tried them inside a Debian virtual machine created just for this):
- Install packages (after adding
non-free
to/etc/apt/sources.list
forlibapache2-mod-fastcgi
): - Add a global fastcgi configuration:
- Enable suexec inside fastcgi configuration (remove the
#
from theFastCgiWrapper
line): - Enable apache modules:
- Create test site files:
- Create apache virtual host:
- Restart apache
![Php Php](https://www.tonido.com/support/download/attachments/9569674/Licenses.png?version=2&%3bmodificationDate=1424661595000&%3bapi=v2)
1,07111 gold badge1515 silver badges2828 bronze badges
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.