[HOWTO] Get the php information on your ASUSTOR NAS

Web hosting, MySQL, PHP and all that good stuff.

Moderator: Lillian.W@AST

User avatar
James.W@AST
Posts: 189
youtube meble na wymiar Warszawa
Joined: Wed Jun 06, 2012 12:50 am

[HOWTO] Get the php information on your ASUSTOR NAS

Post by James.W@AST »

1. Open your notepad or text editor
2. Create a new file and enter the following:

Code: Select all

<?php

phpinfo();

?>
3. Save it as "phpinfo.php"

4. Put the phpinfo.php in the [Web] shared folder

5. Log into ADM, go to [Services] -> [Web Server], make sure you have enabled it

6. Open your web browser and enter: http://YOUR_NAS_IP/phpinfo.php, and that's it!
To Infinity and Beyond!

Friends of My AS-606T: (RAID 5 with WD Black 2TB * 4, WD Red 2TB * 2)
MacBook Air (10.8) & Self-assembled Windows PC (Windows 7)
iPhone 4S (iOS 6) & iPad 2 (iOS 6)
Boxee Box, Logitech Squeezebox Duet
SONY HT-CT150 Sound Bar (Connected directly to the NAS via HDMI)
CISCO Linksys E4200
buhuhu
Posts: 120
Joined: Mon Oct 07, 2013 3:33 am

Re: [HOWTO] Get the php information on your ASUSTOR NAS

Post by buhuhu »

Good point...but why not integrated HTML editor or SIMPLE Text Editor in a File Explorer ?

Regards,
User avatar
Tuscck
Posts: 32
Joined: Fri Jul 18, 2014 4:24 am
Location: netherlands
Contact:

Re: [HOWTO] Get the php information on your ASUSTOR NAS

Post by Tuscck »

Why dont make this more common?

These Howto's. Maybe its simple, but it gives people who arent familiar with certain aspects a start.

Kudo's to you.


:lol: :lol:
User avatar
ianinfrance
Posts: 27
Joined: Tue Nov 05, 2013 10:35 pm
Location: Forgès, Corrèze, France
Contact:

Re: [HOWTO] Get the php information on your ASUSTOR NAS

Post by ianinfrance »

It's dumb question time.

You said
James.W@AST wrote:Open your web browser and enter: http://YOUR_NAS_IP/phpinfo.php, and that's it!
But my problem is that when I try to enter my NAS IP address, which is http://blabla.myasustor.com followed by a file in my web shared folder, I get the Asustor's 404.htm Oops message. The only address of this type that works is http://blabla.myasustor:8000 which automatically adds /portal/?nnnnnnnnnA and tries to log me in to the ADM.

If I painstakingly wander through the network to get to the file in its storage location in Asustor and tell my browser to open it, the file is shown but the php isn't interpreted.

I'm sure I'm doing something wrong, but can't work out what.
ATB

Ian in France
User avatar
Kapitein Haak
Posts: 333
Joined: Tue Oct 15, 2013 2:40 pm
Location: Stranded on the Dutch coast.

Re: [HOWTO] Get the php information on your ASUSTOR NAS

Post by Kapitein Haak »

Hello Ian,

Let's see if we can make this work (it does work on my NAS, even though it is not connecting through myasustor.com, but is on a private domain).
First things first:
1. Make sure you have enabled the Web server (ADM, Services, Web Server, Enable Webserver (by default on port 80)). You do not have to enable personal websites, these are user specific websites.
2. Open your browser from a PC able to connect to the NAS and type http://<local.ipaddress.ofyour.nas (ADM, Settings, Network, LAN, IPv4 address if you have a fixed IP address on the NAS)
3. It should open the website index.html located in /volume1/Web on your NAS. Because I have overwritten mine I don't know excatly how it should look, but it should give an Asustor message.
4. Enable SSH access to the NAS (ADM, Services, Terminal, Enable SSH (by default on port 22) and enable sftp service)
5. Download WinSCP (in case you already haven't) and start a new session to your local NAS ip address, use your admin credentials to connect.
6. You will now be able to browse your NAS like a regular drive
7. Copy the .php file to /volume1/Web
8. Open your browser and type http://<local.ipaddress.ofyour.nas/<name of file>.php
It should now give you the PHP information, once this is working it should not be hard to get it working from the internet.

Please let me know how you go and which steps work and which don't.

Best regards,
Kapitein Haak.
"What would the world be like without Captain Hook?"
---
"Homo sapiens non urinat in ventum" (A wise man doesn't piss into the wind), only in Amsterdam:
https://www.google.nl/maps/@52.36289,4. ... 312!8i6656
User avatar
ianinfrance
Posts: 27
Joined: Tue Nov 05, 2013 10:35 pm
Location: Forgès, Corrèze, France
Contact:

Re: [HOWTO] Get the php information on your ASUSTOR NAS

Post by ianinfrance »

Hi Kapitaan!

First, thanks very much for answering.
I've gone through what you suggested.
1. Web server enabled fine.
2 & 3 opened browser and it showed the default index.html page fine Apart from a pretty picture it sais
"You have successfully enabled the Web server on your ASUSTOR NAS" (You may remember seeing that once)
4 SSH enabled on default port 22
5. Downloaded and installed Win SCP (I'm pretty used to FTP programs, so it all seems fairly straightforward)
6. Had a bit of trouble getting my first session to work as - stupidly - I assumed that "name" was the handle I wanted to give the connection and not the actual IP address. However once I put in the address, and my username and password all was fine
7. However I couldn't find /volume1 merely /root
Nearly there, I guess.

Thanks for your help so far.
ATB

Ian in France
User avatar
Kapitein Haak
Posts: 333
Joined: Tue Oct 15, 2013 2:40 pm
Location: Stranded on the Dutch coast.

Re: [HOWTO] Get the php information on your ASUSTOR NAS

Post by Kapitein Haak »

Hello Ian,

You should be able to get to "/" (root) in two seperate places of WinSCP. I am assuming your NAS is in the right pane, in the top of the pane there should be a dropdown menu, you can click this and select the root of the filesystem.
Second way to get to the root is the complete path just above the filelisting, press the first forward slash and the root folder should show.
From there you should be able to see /Volume1/Web and open the folder + upload a file.
WinSCP
WinSCP
WinSCP.JPG (50.2 KiB) Viewed 25277 times
Please let us know if this gets you any further.

Best regards,
Kapitein Haak.
"What would the world be like without Captain Hook?"
---
"Homo sapiens non urinat in ventum" (A wise man doesn't piss into the wind), only in Amsterdam:
https://www.google.nl/maps/@52.36289,4. ... 312!8i6656
User avatar
ianinfrance
Posts: 27
Joined: Tue Nov 05, 2013 10:35 pm
Location: Forgès, Corrèze, France
Contact:

Re: [HOWTO] Get the php information on your ASUSTOR NAS

Post by ianinfrance »

Hi again,

I can get to /root, but nothing shows up there when I click on it. I also don't have a window above, as you did,
Look
winscp.jpg
winscp.jpg (48.76 KiB) Viewed 25274 times
ATB

Ian in France
User avatar
Kapitein Haak
Posts: 333
Joined: Tue Oct 15, 2013 2:40 pm
Location: Stranded on the Dutch coast.

Re: [HOWTO] Get the php information on your ASUSTOR NAS

Post by Kapitein Haak »

Hello Ian,

That does not look correct. Could you connect to the NAS as root (same password as the admin user) and check again?
You did also enable the SFTP service together with SSH?

Best regards,
Kapitein Haak.
"What would the world be like without Captain Hook?"
---
"Homo sapiens non urinat in ventum" (A wise man doesn't piss into the wind), only in Amsterdam:
https://www.google.nl/maps/@52.36289,4. ... 312!8i6656
User avatar
ianinfrance
Posts: 27
Joined: Tue Nov 05, 2013 10:35 pm
Location: Forgès, Corrèze, France
Contact:

Re: [HOWTO] Get the php information on your ASUSTOR NAS

Post by ianinfrance »

Kapitein Haak wrote: That does not look correct. Could you connect to the NAS as root (same password as the admin user) and check again?
You did also enable the SFTP service together with SSH?
I tried to connect to the NAS as root, but got the dreaded wrong user or password message.

Yes SFTP is enabled.

Tricky, isn't it, because I can link to the web server.
ATB

Ian in France
Locked

Return to “Web Hosting”