index.html working but index.php is not?

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

index.html working but index.php is not?

Postby KeepIt100 » 16. January 2013 12:03

so the server is working mysql is working, but for some reason all my .php files are saved as notepad files and when I try and go to my site it wont read them as .php files but if I go to the site and use something like index.html it works fine but index.php no go? anyone know how to change my .php files back to the correct format? I tryed "open with" but don't know what program I should select to open them with. any help greatly appreciated, tried Google can't find anything.
I edited the file with notepad and somehow it turned them all into notepad files and .php files not working now
KeepIt100
 
Posts: 8
Joined: 16. January 2013 11:58
XAMPP Version: 5.6.3
Operating System: Windows Xp

Re: index.html working but index.php is not?

Postby Altrea » 16. January 2013 17:12

PHP files can't be simple opend like html files, they need to be interpreted.
So instead of opening the files, you must request them by your browser.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6610
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: index.html working but index.php is not?

Postby KeepIt100 » 17. January 2013 02:29

The files was working and viewable until I edited one of the files and saved and they all turned into notepad files now when I access the site they don't show up at all, if I access the site via index.html it shows "it works" if I access it by index.php it shows nothing and doesn't load, I can log into phpmyadmin fine as well
KeepIt100
 
Posts: 8
Joined: 16. January 2013 11:58
XAMPP Version: 5.6.3
Operating System: Windows Xp

Re: index.html working but index.php is not?

Postby KeepIt100 » 17. January 2013 03:30

http://ip/index.html works fine http://ip/index.php not working
Last edited by KeepIt100 on 17. January 2013 15:11, edited 1 time in total.
KeepIt100
 
Posts: 8
Joined: 16. January 2013 11:58
XAMPP Version: 5.6.3
Operating System: Windows Xp

Re: index.html working but index.php is not?

Postby KeepIt100 » 17. January 2013 03:38

http://ip/wordpress/index.html is also accessible I created the .html to check but all my files in wordpress not reading?
Last edited by KeepIt100 on 17. January 2013 15:12, edited 1 time in total.
KeepIt100
 
Posts: 8
Joined: 16. January 2013 11:58
XAMPP Version: 5.6.3
Operating System: Windows Xp

Re: index.html working but index.php is not?

Postby KeepIt100 » 17. January 2013 03:42

also my http://ip/xampp/ page working, wordpress is installed and everything but when I edited httpd-xampp.conf windows and saved it changed all my files to notepad and now wont show them when I access my wordpress folder
Last edited by KeepIt100 on 17. January 2013 15:11, edited 1 time in total.
KeepIt100
 
Posts: 8
Joined: 16. January 2013 11:58
XAMPP Version: 5.6.3
Operating System: Windows Xp

Re: index.html working but index.php is not?

Postby Altrea » 17. January 2013 06:15

Let me summarize:
  • phpmyadmin is working
  • The orange XAMPP administration page is running

Both of them are written in php, so: PHP is working perfectly.
Your file is not. So the issue must be something inside your file

KeepIt100 wrote:I edited httpd-xampp.conf windows and saved it changed all my files to notepad and now wont show them when I access my wordpress folder

Windows just changes the default program for files for quick opening, that has absolutely nothing to do with how Apache thinks to act with that file.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6610
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: index.html working but index.php is not?

Postby KeepIt100 » 17. January 2013 06:39

but no php file is assessable, no matter if I make a test page or use one from wordpress
KeepIt100
 
Posts: 8
Joined: 16. January 2013 11:58
XAMPP Version: 5.6.3
Operating System: Windows Xp

Re: index.html working but index.php is not?

Postby KeepIt100 » 17. January 2013 06:41

only thing I edited in httpd-xampp.conf was allow all then saved, I reinstalled 2 times and tried everything again from scratch still no luck
KeepIt100
 
Posts: 8
Joined: 16. January 2013 11:58
XAMPP Version: 5.6.3
Operating System: Windows Xp

Re: index.html working but index.php is not?

Postby hawkmaster » 17. January 2013 08:09

Hello
is it possible that your DirectoryIndex is wrong?

DirectoryIndex index.html
hawkmaster
 
Posts: 94
Joined: 22. January 2004 12:33
Location: Stuttgart

Re: index.html working but index.php is not?

Postby KeepIt100 » 17. January 2013 08:35

no html working fine its .php files having the problem
KeepIt100
 
Posts: 8
Joined: 16. January 2013 11:58
XAMPP Version: 5.6.3
Operating System: Windows Xp

Re: index.html working but index.php is not?

Postby Altrea » 17. January 2013 18:32

KeepIt100 wrote:but no php file is assessable, no matter if I make a test page or use one from wordpress

XAMPP Administration Panel and phpmyadmin are using .php files too.
Test it out yourself: http://localhost/xampp/index.php

Your problem is a third party issue (either from wordpress, rewriting, own files, etc). We can't provide for third party products, sorry.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6610
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 43 guests