Server / PHP
Install PHP: yum install php php-mysql
Run "service httpd start" and "service mysqld start" and then check that why are running with these commands "service httpd status" and "service mysqld status" Edit the /etc.php.ini file: replace the 30 for max_execution_time with 120
replace the 2M for max_upload_size with 50M
replace the 8M for post_max_size with 50M
Create a simple MySQL databas wih PHP Code in the html dir (named it mysqltest.php): <?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_passwd');
if (!$link)
{
die('Could not connect: ' .mysql_error());
}
$sql = 'create database my_db';
if (mysql_query($sql, $link))
{
echo "Database created successfully\n";
}
else
{
echo 'Error creating database: ' .mysql_error() . "\n";
}
?> |