It is currently Wed Dec 02, 2020 2:53 am
All times are UTC + 8 hours

[HOWTO] Get the php information on your ASUSTOR NAS

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

[HOWTO] Get the php information on your ASUSTOR NAS

Postby James.W@AST » Thu Mar 14, 2013 6:58 pm

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
User avatar
James.W@AST
 
Posts: 189
Joined: Wed Jun 06, 2012 12:50 am

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

Postby buhuhu » Thu Oct 24, 2013 10:57 pm

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

Regards,
buhuhu
 
Posts: 120
Joined: Mon Oct 07, 2013 3:33 am

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

Postby Tuscck » Thu Jul 24, 2014 2:54 pm

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
Tuscck
 
Posts: 31
Joined: Fri Jul 18, 2014 4:24 am
Location: netherlands

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

Postby ianinfrance » Sun Mar 29, 2015 1:33 am

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
ianinfrance
 
Posts: 27
Joined: Tue Nov 05, 2013 10:35 pm
Location: Forgès, Corrèze, France

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

Postby Kapitein Haak » Mon Mar 30, 2015 2:35 pm

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
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

Postby ianinfrance » Mon Mar 30, 2015 5:08 pm

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
ianinfrance
 
Posts: 27
Joined: Tue Nov 05, 2013 10:35 pm
Location: Forgès, Corrèze, France

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

Postby Kapitein Haak » Mon Mar 30, 2015 6:16 pm

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.JPG
WinSCP
WinSCP.JPG (50.2 KiB) Viewed 13784 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
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

Postby ianinfrance » Mon Mar 30, 2015 8:54 pm

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 13781 times
ATB

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

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

Postby Kapitein Haak » Mon Mar 30, 2015 9:34 pm

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
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

Postby ianinfrance » Tue Mar 31, 2015 6:14 am

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
User avatar
ianinfrance
 
Posts: 27
Joined: Tue Nov 05, 2013 10:35 pm
Location: Forgès, Corrèze, France

Next

Return to Web Hosting

  • You cannot post new topics in this forum
    You cannot reply to topics in this forum
    You cannot edit your posts in this forum
    You cannot delete your posts in this forum
    You cannot post attachments in this forum
  • Who is online

    Users browsing this forum: No registered users and 1 guest

cron