Page 1 of 1
Problem with Include
Posted: Sun Jun 26, 2005 1:31 am
by leomoon
Hello. I'm new here and I don't know much about PHP. And you might laugh at my question but...
I'm having problem with include. I made a php file that has 3 includes in it. If I put this file in root, it runs it. But when I put it in a subdirectory it doesn't want to work. It always gives me the "Internal Server Error"!!!
For example this one is in root and works ->
http://leomoon.net/test.php
But this one which is in a subdirectory doesn't work ->
http://leomoon.net/blog/test.php
Or subdomain version
http://blog.leomoon.net/test.php
My php file is available here if you want to take a look at it. (.txt easy to read) ->
http://leomoon.net/test.txt
Thanks.

Re: Problem with Include
Posted: Sun Jun 26, 2005 1:51 am
by hongco
leomoon wrote:
..
My php file is available here if you want to take a look at it. (.txt easy to read) ->
http://leomoon.net/test.txt
Thanks.

frankly, your test.txt didn't work either

Posted: Sun Jun 26, 2005 1:56 am
by leomoon
Very sorry. Now it should work.

Posted: Sun Jun 26, 2005 3:11 am
by Revan
If its doing a 500 error, I would look at Apaches configuration, or .htaccess, or even the PHP compile.
Posted: Sun Jun 26, 2005 3:18 am
by leomoon
So there is nothing wrong with the test.php file right?
I searched for .htaccess in "blog" directory. Nothing there. Something more interesting. If it's apache or .htaccess, there is another php file called gallery.php but that works!!!
http://blog.leomoon.net/gallery.php
Why this damn test.php which is in the same directory doesn't work?
Because of this problem, I can't rebuilt my Movabletype with php extension!
Posted: Sun Jun 26, 2005 3:53 am
by wwwapu
Take a look at
http://www.php.net/manual/en/function.include.php and especially examble 16-7 and couple of the paragraphs above it. I'm not sure, but you try to include .html through http, and this might cause the problem.
Posted: Sun Jun 26, 2005 1:27 pm
by Revan
leomoon wrote:So there is nothing wrong with the test.php file right?
I searched for .htaccess in "blog" directory. Nothing there. Something more interesting. If it's apache or .htaccess, there is another php file called gallery.php but that works!!!
http://blog.leomoon.net/gallery.php
Why this damn test.php which is in the same directory doesn't work?
Because of this problem, I can't rebuilt my Movabletype with php extension!
If it's linux, the .htaccess is hidden.
Posted: Sun Jun 26, 2005 3:57 pm
by leomoon
The problem was the premissions. It should set to 644. The person who helped me said you shouldn't have this problem but for your server it's like this...
Thanks for all your help.
