I have an earlier Synology device (DSM v5.2-5967 Update 4, phpmyadmin v4.4.7-0103) which has some local websites with working php pages. I want to transfer this to my new Synology device (DSM V6.1.3-15152 Update 1, phpmyadmin v4.6.6-0172). When installing the new version of phpmyadmin from the package processing center, I also need to download Maria DB and PHP 5.6, while this is not a requirement in DSM 5. In addition, DSM 6 now supports settings in Web Station, where I can configure the http server and PHP version. I installed this on 5.6, the one that is installed with phpmyadmin.
Here is the code that worked for me in the old DSM:
<?php
define ("DB_HOST", "localhost");
define ("DB_USER", "root");
define ("DB_PASS", "");
define ("DB_NAME", "groceries");
$link = mysql_connect(DB_HOST, DB_USER, DB_PASS) or die("Couldn't make connection.");
$db = mysql_select_db(DB_NAME, $link) or die("Couldn't select database");
?>
" ". , , 500. localhost Synology, . PHP , . Maria DB , , - . , root.
Apache 2.4 - NAS. phpyadmin - "nginx/1.11.10" -. , NAS Apache -, Apache.
. - mysql Synology DSM 6 , ?