Difference between revisions of "PHP Notes"

From OpenEMR Project Wiki
Line 15: Line 15:
==Configuration==
==Configuration==
*Backup Default Config File
*Backup Default Config File
:<tt style="font-size: 130%">sudo mv /etc/php5/apache2/php.ini /etc/php5/apache2/php.ini.default</tt>
::<tt style="font-size: 130%">sudo mv /etc/php5/apache2/php.ini /etc/php5/apache2/php.ini.default</tt>


*Create Symlink to Desired Settings File
*Create Symlink to Desired Settings File
:<tt style="font-size: 130%">cp -s /usr/share/php5/php.ini-development /etc/php5/apache2/php.ini</tt>
::<tt style="font-size: 130%">cp -s /usr/share/php5/php.ini-development /etc/php5/apache2/php.ini</tt>


<br>
<br>
==Testing==
==Testing==
*Create File "test.php" with:
*Create File "test.php" with:
:<tt style="font-size: 130%"><?php phpinfo(); ?></tt>
::<tt style="font-size: 130%"><?php phpinfo(); ?></tt>


<br>
==Command Line Commands==
{| style="margin: 0 0em 0 0em;"
|-
| width="250" | <tt style="font-size: 130%">php -v</tt>
| width="400" | PHP Version.
|-
| <tt style="font-size: 130%">php -i</tt>
| PHP Info
|-
| <tt style="font-size: 130%"></tt>
|
|} 


<br>
<br>

Revision as of 15:10, 29 May 2014

Files

/etc/php5/apache2/php.ini PHP Config File
/usr/share/php5 Location of sample ini files, ex development, production.


Configuration

  • Backup Default Config File
sudo mv /etc/php5/apache2/php.ini /etc/php5/apache2/php.ini.default
  • Create Symlink to Desired Settings File
cp -s /usr/share/php5/php.ini-development /etc/php5/apache2/php.ini


Testing

  • Create File "test.php" with:
<?php phpinfo(); ?>



Command Line Commands

php -v PHP Version.
php -i PHP Info