Configuring Mysql to Allow External Connections

Setting up Mysql to allow users to connect externally

1. You have to specifically define how users can connect to the database.

GRANT ALL PRIVILEGES ON dbname.* TO username@'IP' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON dbname.* TO username@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON dbname.* TO username@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON dbname.* TO username@'127.0.0.1' IDENTIFIED BY 'password';

2. Open port 3306 in firewalls

3.) to grant httpd the access to the network. To allow the httpd dameon to connect to port 3306 when you've told zend to connect to the database externally
setsebool -P httpd_can_network_connect=1

Installing Apache on Fedora

  • Restart Apache
    • apachectl restart
  • Edit httpd.conf
    • nano /etc/httpd/conf/httpd.conf
  • Make sure mod rewrite is loaded
    • uncomment mod_rewrite line in httpd.conf
  • When installing php, use installer and add the following lines to httpd.conf
    • LoadModule php5_module "c:/program files/php/php5apache2_2.dll"
    • AddType application/x-httpd-php .php .php5
    • PHPIniDir "c:/program files/php"

Setting Up Eclipse PDT, Subversion and Zend Framework

  1. Download http://www.eclipse.org/pdt/downloads/ PDT all-in-ones that include eclipse and the PDT, and mylyn plugins
  2. Download and install subclipse by adding http://subclipse.tigris.org/update_1.6.x as an update site for eclipse in eclipse under "Help".. "Install New Software"... "Add"
  3. Download and install Zend Debugger by adding http://downloads.zend.com/pdt as an update site
  4. Download and install mysql workbench
  5. In eclipse create a new PHP project and import all of your files into it. Then right click on the project Team->Share->SVN
  6. For other people to get a working copy in eclipse: File->New->SVN->Check out existing project

SVN Management

Managing SVN Server
svnadmin is a management tool that can be used to manage any svn repository. When using svnadmin it is necessary to include the directory of the target repository.

Use:
svnadmin [cmd]
svn [cmd] appears to be for client actions

Setting Up SVN
  • Install subversion.
  • Put the bin folder (C:\program files\subversion\bin) in the path system variable
  • Decide the location of the repository on disk and make the appropriate folders. (mkdir c:\svn\repository)
  • Create the repository (svnadmin create c:\svn\repository)
  • Open the apache configuration file httpd.conf (c:\apache\conf\httpd.conf)
  • Make sure that the module mod_dav is loaded in httpd.conf and that the module file is also present under modules directory.
  • Add the following to the httpd.conf file (if necessary add it under the appropriate virtual host)

    DAV svn
    SVNPath c:\svn\repository
    AuthType Basic
    AuthName "Name of Authentication popup window"
    AuthUserFile c:\path\to\auth\file probable c:\svn\svn_apache_auth
    Require valid-use
  • Create the auth file
    htpasswd -cmd c:\svn\svn_apache_auth {user-name}
    -c
    option creates a new htpasswd file.
    -m
    encrypts the password with an MD5 algorithm.
    -d
    encrypts the password with a CRYPT algorithm.
    **Note don't use -c after the file has been created when wishing to add additional users
Start the subversion server

Your Subversion client software will need a server with which it can talk. This is the svnserve executable. It's also possible to go directly to your file system and not use a server, but we're going to set this up so that you can access your files from other machines on your network. The -d option tells svnserve to run as a daemon.


    echo "I like PHP";
svnserve -d -r c:\svn-repo



Deleting a Repository
the correct way to delete a repository is just to delete the directory it's stored in.