Page 1 of 2

[HOWTO] Get the php information on your ASUSTOR NAS

Posted: Thu Mar 14, 2013 6:58 pm
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!

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

Posted: Thu Oct 24, 2013 10:57 pm
by buhuhu
Good point...but why not integrated HTML editor or SIMPLE Text Editor in a File Explorer ?

Regards,

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

Posted: Thu Jul 24, 2014 2:54 pm
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:

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

Posted: Sun Mar 29, 2015 1:33 am
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.

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

Posted: Mon Mar 30, 2015 2:35 pm
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.

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

Posted: Mon Mar 30, 2015 5:08 pm
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.

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

Posted: Mon Mar 30, 2015 6:16 pm
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 25500 times
Please let us know if this gets you any further.

Best regards,
Kapitein Haak.

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

Posted: Mon Mar 30, 2015 8:54 pm
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 25497 times

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

Posted: Mon Mar 30, 2015 9:34 pm
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.

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

Posted: Tue Mar 31, 2015 6:14 am
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.