XAMPP can't see/handle php files

Problems with the Linux version of XAMPP, questions, comments, and anything related.

XAMPP can't see/handle php files

Postby Olwe » 12. June 2010 17:43

I've just installed XAMPP (XAMPP for Linux 1.7.3a) and got to all the welcome screens, phpMyAdmin just fine. I go to my /home/me/public_html/ and it sees the index.html just fine. I go to http://localhost/~me/newdir/ and it sees the index.html there and displays it fine. But when I go to a php file (http://localhost/~me/phptest.php) it gives:
Code: Select all
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
Sat 12 Jun 2010 11:41:37 AM CDT
Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1


What have I done wrong? I stick the same phptest.php in the /opt/lampp/htdocs/ dir and it works....
Olwe
 
Posts: 9
Joined: 11. June 2010 01:19

Re: XAMPP can't see/handle php files

Postby Olwe » 12. June 2010 18:00

Correction. I'm not actually getting to my /home/me/public_html. That was the browser remembering from before. So how do I allow XAMPP to see and work with my /home/me/public_html directory?
Olwe
 
Posts: 9
Joined: 11. June 2010 01:19

Re: XAMPP can't see/handle php files

Postby Radzio » 12. June 2010 18:28

Uncomment loading of mod_userdir. I think it's already configured so you would only have to restart Apache then.
Radzio
 
Posts: 81
Joined: 05. June 2010 12:26

Re: XAMPP can't see/handle php files

Postby Olwe » 12. June 2010 18:32

Yes, but how does XAMPP know who I am? In reality, my home directory is /home/olwe/ Is the httpd.conf supposed to be told that olwe is the user? Right now User is set to nobody and Group to nogroup. Otherwise I can't imagine Apache can know what public_html we're talking about.
Olwe
 
Posts: 9
Joined: 11. June 2010 01:19

Re: XAMPP can't see/handle php files

Postby Radzio » 12. June 2010 19:07

mod_userdir is usually configured to allow access to /home/*/public_html as /~* where * is any name.
Radzio
 
Posts: 81
Joined: 05. June 2010 12:26

Re: XAMPP can't see/handle php files

Postby Olwe » 12. June 2010 19:39

mod_userdir is usually configured to allow access to /home/*/public_html as /~* where * is any name.


How can I check/trouble-shoot this? I wanted to do a command line module dump:
Code: Select all
apache2 -t -D DUMP_MODULES
, but there's no "apache2" with XAMPP, so I put this in a php file in the /opt/lampphtdocs dir:
Code: Select all
<pre>
<?php
print_r(apache_get_modules());
?>
</pre>


and yes, userdir module comes up on the list. Still, apache must need to know/resolve * to my home directory. How?
Olwe
 
Posts: 9
Joined: 11. June 2010 01:19

Re: XAMPP can't see/handle php files

Postby Radzio » 12. June 2010 19:56

* means any name. It will match any directory.
Uncomment the LoadModule line with mod_userdir in httpd.conf and restart Apache.
If you want to check userdir config then find a file similar to httpd-userdir.conf
Radzio
 
Posts: 81
Joined: 05. June 2010 12:26

Re: XAMPP can't see/handle php files

Postby Olwe » 12. June 2010 20:05

Actually, there's a line down in httpd.conf that I uncommented:
Code: Select all
# User home directories                                                                                                           
Include etc/extra/httpd-userdir.conf


Now it works!
Olwe
 
Posts: 9
Joined: 11. June 2010 01:19


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 3 guests