Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

How to enable PHP support on Web Station

#2
Verify PHP Installation:

Make sure PHP 7.x or 8.x is installed and enabled on your NAS. You mentioned PHP is installed, but let's ensure it's configured correctly.
Configure Web Station:

Login to DSM (DiskStation Manager) with admin privileges.
Go to Main Menu > Web Station.
Make sure Web Station is enabled. If not, enable it.
Set Up PHP Settings:

In Web Station, go to PHP Settings.
Check that PHP 7.x or 8.x is selected as the default PHP version.
Ensure the PHP module is enabled for your web server (typically Apache or Nginx).
Create a PHP Test File:

Create a new file named info.php in your web server's root directory (usually /web or /var/services/web).
Edit info.php and add the following line:
php
Copy code
<?php
phpinfo();
?>
Save the file.
Access the PHP Test File:

Open a web browser and navigate to http://your-nas-ip/info.php (replace your-nas-ip with the actual IP address or hostname of your NAS).
If PHP is properly configured, you should see a PHP info page with details about your PHP installation.
Check File Permissions:

Ensure that the file permissions for info.php allow the web server to read and execute it. Typically, permissions should be set to 644 (rw-r--r--).
Clear Browser Cache:

Sometimes, cached content can cause issues. Clear your browser cache or try accessing the PHP test file in an incognito/private window.
Verify HTML Code:

Ensure that in your HTML file (e.g., index.html), PHP code is enclosed correctly within <?php ... ?> tags. The PHP tags <?PHP ... ?> are not valid; use lowercase <?php ... ?>.
Restart Services:

After making changes to PHP settings or configuration files, restart the web server service through DSM to apply the changes.
Review PHP Error Logs:

Check PHP error logs on your NAS (/var/log/phpX.X-fpm.log where X.X is your PHP version) for any errors or warnings that might indicate configuration issues.
Reply


Messages In This Thread
RE: How to enable PHP support on Web Station - by ed - 06-26-2024, 12:15 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)