How do I disable suphp on ubuntu 10.04 server - php

I have put together a small ubuntu 10.04 server with apache2 and php for use only for testing purposes. I am finding suphp keeps getting in my way. Doubtless this is a useful tool for security etc, but right now, as this is only a local testing ground I would like to disable it to prevent it continually throwing errors relating to file ownership etc.
So, as the title says: How do I disable suphp on ubuntu server 10.04.
Thanks

a2dismod suphp -> to disable su php mod

instead of disabling all use virtual hosts conf file or http.conf and add
<VirtualHost ..>
suPHP_Engine off
...

Related

Hide PHP and apache version when inspecting

In a website made with Wordpress, I'm trying to find out how I hide the version of PHP and Apache2 when I inspect the site.
I think that should be in 000-default.conf?
I tried to use
expose_php = Off
in php.ini, but it doesn't work
Apache have /etc/apache2/conf-available/security.conf file for these configurations
You need to edit it and set
ServerTokens from OS to Prod
and
ServerSignature from On to Off
Thats the best way to do that, since this applies to all server configuration
If security conf was not enabled yet, just run ( as super user / root ) on terminal:
a2enconf secutiry; service apache2 restart
To hide the version of apache, you should add in the server configuration file:
ServerTokens Prod
ServerSignature Off

XAMPP Apache Won't Start after PHP Upgrade

Apache won't start on Mac with XAMPP. I tried updating PHP from 5.5.6 to PHP 5.6.8, and since that update XAMPP wouldn't start Apache. I tried completely re-installing XAMPP, but same issue.
Help would be appreciated, I'm more than happy to post any information that is necessary, not sure where to start. I've done a lot of looking around and haven't been able to find anything that points me in the right direction - I checked the Apache error_logs and there aren't any.
Try this -
Solution#1
This solution worked perfectly fine for me..
1) Close XAMPP control
2) Open Activity Monitor(Launchpad->Other->Activity Monitor)
3) Select filter for All processes (default is My processes)
4) In fulltext search type: httpd
5) Kill all httpd items
6) Relaunch XAMPP control and launch apache again
OR, Solution#2
sudo apachectl stop
This command kills Apache server that was pre-installed on MAC OS X.
OR, Solution#3
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
This will disable OSX's built-in Apache server and allows XAMPP to start on 80.
Now once Apache starts successfully modify the .htaccess file
Apache needs to be configured to recognize index.php as an index file. While adding 'DirectoryIndex index.php' to a .htaccess file may work,
NOTE:
In general, you should never use .htaccess files
This is quoted from http://httpd.apache.org/docs/1.3/howto/htaccess.html
Although this refers to an older version of apache, I believe the principle still applies.
Adding the following to your httpd.conf (if you have access to it) is considered better form, causes less server overhead and has the exact same effect:
<Directory /myapp>
DirectoryIndex index.php
</Directory>
I've updated PHP to 8.0 in xampp by renaming old PHP folder to PHP_7.4
and new pasted new php8 folder as php folder, it gave me same error,
SOLUTION
Step1: backup old php folder,
Step2: Paste php8 files in to old PHP folder and overwrite existing files,
Done: Restart Apache it should start

Configure PHP bundled with MAC OS

I want to run my php applications using php bundled with MAC os. I have done some changes and after that i have started my apache server using
sudo apachectl
restart and running localhost now shows pages available at
/Library/WebServer/Documents/index.html.en
where should i keep my custom php application so that it can be viewable by browser on localhost.
Use a Symlink to have a more easily accessible path:
ln -s /Users/NewBee/Desktop/mycustomappinanaccessibleplace /Library/WebServer/Documents/my_app
You may run into permissions problems, make sure you account for that by ensuring the apache user can access the files and symlink.
Your other option is to change the DocumentRoot in your httpd.conf file.

XAMPP Apache not starting because of Apache2.4

So I'm starting to use MySQL and phpMyAdmin and I firstly installed Apache2.4. After installing Apache2.4 there were numerous errors so I decided to install XAMPP instead. Now me not thinking through the consequences deleted the Apache2.4 Folder completely along with all its contents.
So now when I start XAMPP, MySQL runs fine but Apache is stuck on "Attempting to start Apache service..." Now when I look at the services tab Apache2.4 is still on my list, I have disabled it but it's made no difference. I have checked through my computer for any remaining Apache2.4 files but I can't find any.
If anyone can help me with this, it would be extremely helpful!
UPDATE: I have restored Apache24 from my recycling bin, should I attempt a uninstall using cmd?
It appears that an instance of apache 2.4 is running on the system. It is probably locking port 80 which the reason why XAMPP apache is unable to start.
Shutdown apache 2.4 from it's control panel, shutdown the service, and ensure there is no "httpd" process running using task manager. If there is kill it.
Once the above are done you should be able to start xampp.
Follow those steps:
1- Uninstall Apache 2.4
2- Clean Windows Registry with a tool like CCleaner
3- Restart Windows
4- Install XAMPP

Apache unable to startup, ScriptAlias on Windows

I've installed Apache 2.2 on a Windows machine for use in PHP local coding & debugging. Apache is not running however, says running 0 of 1 services.
When I try to restart it it just says "requested operation failed".
The output from the Test configuration says ScriptAlias takes arguments, a fakename and a realname. The actual lines in the script causing the problem -
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
ScriptAlias /php/ ""
Action application/x-httpd-php "php-cgi.exe"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
Has anyone encountered this before?
Make sure port 80 is free, programs like Skype or IIS use it.
XAMPP has a tool for knowing if all ports required are free.

Categories