Tag Archives: PHP

SimpleSAMLphp setup on Windows 2008 – Install PHP

The application runs on PHP, so it will need to be installed on the server for Windows to run the scripts.
You should be able to go here for the latest PHP installer for IIS: http://php.iis.net/
Use the Web Platform Installer to automate the installation and configuration of PHP on your server.  You could do it manually, but it’s a pain.  The installer should be able to be found here;  http://www.microsoft.com/web/downloads/platform.aspx
Version 5.6.0 was used at the time of this writing.
Find the version of PHP you want to install and click the Add button.  Example: PHP 5.6.0.
WebPlatformInstaller
If dependent components are missing, they will be listed to be included with the PHP installation.  Go ahead and click the “I Accept” button.
WpiPrerequisites
After the installation completes, you’ll be presented with a summary page of the pieces that were installed.  Click on Finish.
WpiInstallerWorking.png
Use PHP Manager in IIS Manager to finish configuring PHP:
PhpManagerInIis.png
Set recommendations for adding index.php to default file and automatically reset php when config.php is updated.  Click on the “View recommendations.” link.
PhpSetup
Click on the “Enable or disable and extension” link.
PhpExtensionsLink
Use “Enable or disable and extension” to drill down and enable LDAP Extension:
EnableLdap1
EnableLdap2
LDAP will be the protocol used by SimpleSAMLphp to get user information from Active Directory when authenticating.
Next we will look at installing the SimpleSAMLphp application.

Install phpMyAdmin

phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the Web. Visit the phpMyAdmin website for more information.
At the terminal, enter the following:
Elevate to root access

su -

Install phpMyAdmin

yum install phpmyadmin

Change the the /etc/httpd/conf.d/phpMyAdmin.conf  file to allow remote administration:

#Order Allow,Deny 
#Deny from all
Allow from 127.0.0.1

Restart the apache server

service http restart

From a browser, go to

http:///phpmyadmin">http://<server>/phpmyadmin

Installing LAMP on CentOS

Install Apache HTTP Server (httpd) and PHP 5.3.8

Reposted from Here.
1. Change root user
su –
2. Install Remi repository
## Remi Dependency on CentOS 6 and Red Hat (RHEL) 6 ##
rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm
## CentOS 6 and Red Hat (RHEL) 6 ##
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
3. Install Apache (httpd) Web server and PHP 5.3.8
yum –enablerepo=remi install httpd php php-common
4. Install PHP 5.3.8 modules
yum –enablerepo=remi install php-pear php-pdo php-mysql php-pgsql php-pecl-memcache php-gd php-mbstring php-mcrypt php-xml
5. Start Apache HTTP server (httpd) and autostart Apache HTTP server (httpd) on boot
service httpd start ## use restart after update
chkconfig –levels 235 httpd on
6. Create test PHP page to check that Apache, PHP and PHP modules are working
Add following content to /var/www/html/test.php file.
<?php
    phpinfo();
?>
7. Check created page with browser
Access following address, with your browser. http://localhost/test.php

 Enable Remote Connection to Apache HTTP Server (httpd) –> Open Web server Port (80) on Iptables Firewall (as root user again)
1. Edit /etc/sysconfig/iptables file:
nano -w /etc/sysconfig/iptables
2. Add following line before COMMIT:
-A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT
3. Restart Iptables Firewall:
service iptables restart
## OR ##
/etc/init.d/iptables restart
4. Test remote connection
Access following address, with your browser. http://your.domain/test.php