hello
I faced with a issue with my web server.
my nas model is TS-963 \
im working on single page web project that includes php codes and whenever i want to check it on nas server , my browser download my index.php and when i change it to .html it can not read the php code.
surely web server is working and apache.cofi is as it should be
Thanks for help
any kind of help will be appreciated.
my php codes cant be read and browser download index.php
-
- New here
- Posts: 3
- Joined: Mon Oct 25, 2021 8:46 pm
- Toxic17
- Ask me anything
- Posts: 6469
- Joined: Tue Jan 25, 2011 11:41 pm
- Location: Planet Earth
- Contact:
Re: my php codes cant be read and browser download index.php
this is more of an apache issue and can be fixed using .htaccess file in the root of your webserver folder.
google it.
https://stackoverflow.com/questions/184 ... aying-them
built in webserver is somewhat loocked down so some commands and code in php.ini etc wont work. you should be able to use .htaccess for most. if you want a full Apache/php server then use Stephane's Apache 7.4 or Apache8.0 qpkgs.
viewtopic.php?f=320&t=151456
viewtopic.php?f=320&t=158250
google it.
https://stackoverflow.com/questions/184 ... aying-them
built in webserver is somewhat loocked down so some commands and code in php.ini etc wont work. you should be able to use .htaccess for most. if you want a full Apache/php server then use Stephane's Apache 7.4 or Apache8.0 qpkgs.
viewtopic.php?f=320&t=151456
viewtopic.php?f=320&t=158250
Regards Simon
Qnap Downloads
MyQNap.Org Repository
Submit a ticket • QNAP Helpdesk
QNAP Tutorials, User Manuals, FAQs, Downloads, Wiki
When you ask a question, please include the following
NAS: TS-673A QuTS hero h5.1.2.2534 • TS-121 4.3.3.2420 • APC Back-UPS ES 700G
Network: VM Hub3: 500/50 • UniFi UDM Pro: 3.2.9 • UniFi Network Controller: 8.0.28
USW-Aggregation: 6.6.61 • US-16-150W: 6.6.61 • 2x USW Mini Flex 2.0.0 • UniFi AC Pro 6.6.62 • UniFi U6-LR 6.6.62
UniFi Protect: 2.11.21/8TB Skyhawk AI • 3x G3 Instants: 4.69.55 • UniFi G3 Flex: 4.69.55 • UniFi G5 Flex: 4.69.55
Qnap Downloads
MyQNap.Org Repository
Submit a ticket • QNAP Helpdesk
QNAP Tutorials, User Manuals, FAQs, Downloads, Wiki
When you ask a question, please include the following
NAS: TS-673A QuTS hero h5.1.2.2534 • TS-121 4.3.3.2420 • APC Back-UPS ES 700G
Network: VM Hub3: 500/50 • UniFi UDM Pro: 3.2.9 • UniFi Network Controller: 8.0.28
USW-Aggregation: 6.6.61 • US-16-150W: 6.6.61 • 2x USW Mini Flex 2.0.0 • UniFi AC Pro 6.6.62 • UniFi U6-LR 6.6.62
UniFi Protect: 2.11.21/8TB Skyhawk AI • 3x G3 Instants: 4.69.55 • UniFi G3 Flex: 4.69.55 • UniFi G5 Flex: 4.69.55
-
- New here
- Posts: 3
- Joined: Mon Oct 25, 2021 8:46 pm
Re: my php codes cant be read and browser download index.php
I checked this page and copy all i need . its should be on my htaccess file right ?Toxic17 wrote: ↑Tue Oct 26, 2021 5:12 pm this is more of an apache issue and can be fixed using .htaccess file in the root of your webserver folder.
google it.
https://stackoverflow.com/questions/184 ... aying-them
and nothing changed
by the way, thanks
- Toxic17
- Ask me anything
- Posts: 6469
- Joined: Tue Jan 25, 2011 11:41 pm
- Location: Planet Earth
- Contact:
Re: my php codes cant be read and browser download index.php
htaccess is a classed as a hidden file, name it ".htaccess"
the dot before the name is needed and no file extension. it should work but depends on your html/php coding of your web pages as well.
the dot before the name is needed and no file extension. it should work but depends on your html/php coding of your web pages as well.
Regards Simon
Qnap Downloads
MyQNap.Org Repository
Submit a ticket • QNAP Helpdesk
QNAP Tutorials, User Manuals, FAQs, Downloads, Wiki
When you ask a question, please include the following
NAS: TS-673A QuTS hero h5.1.2.2534 • TS-121 4.3.3.2420 • APC Back-UPS ES 700G
Network: VM Hub3: 500/50 • UniFi UDM Pro: 3.2.9 • UniFi Network Controller: 8.0.28
USW-Aggregation: 6.6.61 • US-16-150W: 6.6.61 • 2x USW Mini Flex 2.0.0 • UniFi AC Pro 6.6.62 • UniFi U6-LR 6.6.62
UniFi Protect: 2.11.21/8TB Skyhawk AI • 3x G3 Instants: 4.69.55 • UniFi G3 Flex: 4.69.55 • UniFi G5 Flex: 4.69.55
Qnap Downloads
MyQNap.Org Repository
Submit a ticket • QNAP Helpdesk
QNAP Tutorials, User Manuals, FAQs, Downloads, Wiki
When you ask a question, please include the following
NAS: TS-673A QuTS hero h5.1.2.2534 • TS-121 4.3.3.2420 • APC Back-UPS ES 700G
Network: VM Hub3: 500/50 • UniFi UDM Pro: 3.2.9 • UniFi Network Controller: 8.0.28
USW-Aggregation: 6.6.61 • US-16-150W: 6.6.61 • 2x USW Mini Flex 2.0.0 • UniFi AC Pro 6.6.62 • UniFi U6-LR 6.6.62
UniFi Protect: 2.11.21/8TB Skyhawk AI • 3x G3 Instants: 4.69.55 • UniFi G3 Flex: 4.69.55 • UniFi G5 Flex: 4.69.55
-
- New here
- Posts: 3
- Joined: Mon Oct 25, 2021 8:46 pm
Re: my php codes cant be read and browser download index.php
yes i did the same for htaccess and the code is correct cause i started simple.
i think it can be cause of rewrite-mode in htaccess