Staredit Network

Staredit Network -> Computers and Technical -> Wtf, index.php not index
Report, edit, etc...Posted by Doodle77(MM) on 2006-04-08 at 20:55:56
On my site, my index just became a PHP file, but it does not use that as it index.
QUOTE(site index)
index.php              05-Apr-2006 19:40  1.0K 

WTF!
Report, edit, etc...Posted by Gradius on 2006-04-08 at 21:11:11
its 1k. Is it supposed to do something?
Report, edit, etc...Posted by BeeR_KeG on 2006-04-08 at 21:21:02
QUOTE(Doodle77(MM) @ Apr 8 2006, 08:55 PM)
On my site, my index just became a PHP file, but it does not use that as it index.
QUOTE(site index)
index.php              05-Apr-2006 19:40  1.0K 

WTF!
[right][snapback]461549[/snapback][/right]


Can you post the code in order to see if there's a reason for that?
Also, a site will place index.html as a homepage before index.php.
Report, edit, etc...Posted by Doodle77(MM) on 2006-04-08 at 21:22:03
Yes... you can look at it if you want
doodle77.dyndns.org/index.php
Report, edit, etc...Posted by BeeR_KeG on 2006-04-08 at 21:26:08
There are several problems with your php coding, as far as I can see.

CODE
Notice: unserialize() [function.unserialize]: Error at offset 3089 of 9346 bytes in C:\Program Files\Apache Group\Apache2\htdocs\index.php on line 10

Warning: array_slice() [function.array-slice]: The first argument should be an array in C:\Program Files\Apache Group\Apache2\htdocs\index.php on line 12

Warning: implode() [function.implode]: Bad arguments. in C:\Program Files\Apache Group\Apache2\htdocs\index.php on line 20


You have PHP errors in coding lines 10, 12 and 20. There's probably some piece of syntax missing around there.
Post that PHP code so that we can see what's wrong. Also do remember that with Firefox I can only view the HTML output page source and not the PHP server side input.
Report, edit, etc...Posted by Doodle77(MM) on 2006-04-08 at 21:45:09
No, that was due to some random corruption.
right now index.html redirects to index.php(so you dont see my directory listing), so theres still a problem.
Before it was showing my directory listing instead of index.php
Report, edit, etc...Posted by DT_Battlekruser on 2006-04-09 at 14:29:14
I can't get index.py files to show either as default. I think it's somewhere in the server settings which index.* files can be allowed.
Report, edit, etc...Posted by Shmeeps on 2006-04-09 at 17:10:35
Yea, in the Apache settings (Or whatever server program your computer/website uses) there is a setting that basicly says which file to go to if you just go to a directory.

If this is on your computer/server, and you have Apache as your server program, go to Apache/Conf/httpd.conf and search for:

CODE
DirectoryIndex


The line should be something like

CODE
DirectoryIndex index.html index.php


To add another file to search for, just hit space and type in the filename and extension, for instance, if I wanted to add index.py, I would put

CODE
DirectoryIndex index.html index.php index.py


I believe it searches for the first file/extention first, then the next if it can't find it, but I'm not sure. So if there was a index.php and an index.html in a folder, this would show the index.html, not index.php. I think.

If it isn't your server/computer or your using a different program, then try to find the equivlant in your programs settings or contact your webmaster.
Report, edit, etc...Posted by Doodle77(MM) on 2006-04-09 at 17:42:18
I'm running my server on my computer, so i can change everything tongue.gif
Report, edit, etc...Posted by RexyRex on 2006-04-09 at 18:24:54
Good, then you're all set. Furthermore, you can change index to something else like "home.php". smile.gif
Report, edit, etc...Posted by DT_Battlekruser on 2006-04-10 at 00:53:46
QUOTE(Shmeeps @ Apr 9 2006, 02:10 PM)
Yea, in the Apache settings (Or whatever server program your computer/website uses) there is a setting that basicly says which file to go to if you just go to a directory.

If this is on your computer/server, and you have Apache as your server program, go to Apache/Conf/httpd.conf and search for:

CODE
DirectoryIndex


The line should be something like

CODE
DirectoryIndex index.html index.php


To add another file to search for, just hit space and type in the filename and extension, for instance, if I wanted to add index.py, I would put

CODE
DirectoryIndex index.html index.php index.py


I believe it searches for the first file/extention first, then the next if it can't find it, but I'm not sure. So if there was a index.php and an index.html in a folder, this would show the index.html, not index.php. I think.

If it isn't your server/computer or your using a different program, then try to find the equivlant in your programs settings or contact your webmaster.
[right][snapback]462044[/snapback][/right]


Yeah, I kinda knew that tongue.gif It's not my server though and I'm too lazy to contact the webmaster so a dynamic redirect on index.html works fine happy.gif
Report, edit, etc...Posted by Doodle77(MM) on 2006-04-11 at 21:57:05
Just contact the webmaster, I dont think they would mind that much.
Next Page (1)