www.zeroshell.org Forum Index www.zeroshell.org
Linux Distribution for server and embedded devices
 
 SearchSearch  RegisterRegister  UsergroupsUsergroups 
 ProfileProfile  Log inLog in  Log in to check your private messagesPrivate Message 

[solved]php doesn't works

 
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell
View previous topic :: View next topic  
Author Message
odin



Joined: 05 Jan 2016
Posts: 14

PostPosted: Tue Apr 19, 2016 10:34 am    Post subject: [solved]php doesn't works Reply with quote

Php doesn't seems to work, i tried goind on https://xxx.xxx.xxx.xxx/add-ons/phpinfo.php but it gave me http 404.
I checked in /var/www/ and phpinfo.php is there.
Not sure if is a bug or an error i made.


Last edited by odin on Fri Apr 29, 2016 9:37 am; edited 1 time in total
Back to top
View user's profile Send private message
DrmCa



Joined: 12 Apr 2011
Posts: 223

PostPosted: Tue Apr 19, 2016 2:02 pm    Post subject: Reply with quote

is phpinfo.php under /var/www or under /var/www/add-ons?
Back to top
View user's profile Send private message
odin



Joined: 05 Jan 2016
Posts: 14

PostPosted: Tue Apr 19, 2016 3:44 pm    Post subject: Reply with quote

under /var/www
Back to top
View user's profile Send private message
DrmCa



Joined: 12 Apr 2011
Posts: 223

PostPosted: Tue Apr 19, 2016 4:19 pm    Post subject: Reply with quote

Then your URL has an extra directory /add-ons
Back to top
View user's profile Send private message
odin



Joined: 05 Jan 2016
Posts: 14

PostPosted: Tue Apr 19, 2016 4:39 pm    Post subject: Reply with quote

http://xxx.xxx.xxx.xxx/phpinfo.php gives me 404, too.
Back to top
View user's profile Send private message
DrmCa



Joined: 12 Apr 2011
Posts: 223

PostPosted: Tue Apr 19, 2016 4:52 pm    Post subject: Reply with quote

Can you place a .txt or .html file there and try to access? What would happen?

You'll need to check the apache command line, run

ps lmax |grep httpd

for any -f key that may override the default config file location. Then check the config file for the apache home directory, it may not be /var/www

With PHP not working you should not be getting a 404 error. I would expect a PHP file to be served as plain text instead. 404 may mean Apache is using a different directory.
Back to top
View user's profile Send private message
odin



Joined: 05 Jan 2016
Posts: 14

PostPosted: Tue Apr 19, 2016 5:05 pm    Post subject: Reply with quote

I created a txt file, still 404

this is the output
Code:
5  1000  2522  9360  20   0  6968 2820 -      S    ?          0:00 /usr/local/apache2/bin/httpd -k start
5  1000  2523  9360  20   0  7100 4716 -      S    ?          0:00 /usr/local/apache2/bin/httpd -k start
5  1000  2524  9360  20   0  7100 4776 -      S    ?          0:00 /usr/local/apache2/bin/httpd -k start
0     0  7123   598  20   0  2272  580 -      S    pts/0      0:00 grep httpd
1     0  9360     1  20   0  6836 4880 -      S    ?          0:00 /usr/local/apache2/bin/httpd -k start
5  1000  9363  9360  20   0  7104 4868 -      S    ?          0:00 /usr/local/apache2/bin/httpd -k start
5  1000  9364  9360  20   0  7096 4916 -      S    ?          0:00 /usr/local/apache2/bin/httpd -k start
5  1000  9367  9360  20   0  7104 4748 -      S    ?          0:00 /usr/local/apache2/bin/httpd -k start
5  1000 11137  9360  20   0  7100 4892 -      S    ?          0:00 /usr/local/apache2/bin/httpd -k start
5  1000 11160  9360  20   0  7100 4740 -      S    ?          0:00 /usr/local/apache2/bin/httpd -k start
5  1000 11164  9360  20   0  7100 4732 -      S    ?          0:00 /usr/local/apache2/bin/httpd -k start
5  1000 11165  9360  20   0  7100 4920 -      S    ?          0:00 /usr/local/apache2/bin/httpd -k start


What does it mean the -k?
Back to top
View user's profile Send private message
DrmCa



Joined: 12 Apr 2011
Posts: 223

PostPosted: Tue Apr 19, 2016 5:10 pm    Post subject: Reply with quote

Your guess is as good as mine in this respect.
-f key is used to override the default config file IIRC.
so your installation should be using the default config location

Can you post the output of

ls -l /var/www
Back to top
View user's profile Send private message
odin



Joined: 05 Jan 2016
Posts: 14

PostPosted: Tue Apr 19, 2016 5:49 pm    Post subject: Reply with quote

Code:
lrwxrwxrwx    1 root     root           29 Apr 19 19:35 /var/www -> /var/register/system/PHP/www/
Back to top
View user's profile Send private message
DrmCa



Joined: 12 Apr 2011
Posts: 223

PostPosted: Tue Apr 19, 2016 8:02 pm    Post subject: Reply with quote

Oh, it is a symbolic link! Post the output of:

ls -l /var/register/system/PHP/www/
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group