php issue

Status
Not open for further replies.

spacresx

Community Advocate
Community Support
Messages
2,199
Reaction score
195
Points
63
Hi all,
Im using php 5.4 on a free account and have a big problem.
normally php works fine in public_html and my sub folders.

But now i need to auto_prepend a php file and I dont have a
php.ini to do it in, so i tried to auto_prepend in htaccess instead.

But adding the auto_prepend to htaccess disabled all php access
or support for sub folders.
No errors are generated, I just get a blank page in sub folders.

If i disabled the auto_prepend in htaccess everything works ok.
but i cant add any file to auto_prepend or the same thing happens.

Anyone have an idea why its doing that ??
Is auto_prepend not allowed ??
or is this a problem Administrators have to fix.
thanks.
 
Last edited:

spacresx

Community Advocate
Community Support
Messages
2,199
Reaction score
195
Points
63
After further testing its looking like a serious php misconfiguration issue.
(not properly configured on x10hostings side)(unless they do it like that deliberately)
even php files will not open in sub directories, they only work in the main public_html folder.

anyone else experiencing this ??
 

spacresx

Community Advocate
Community Support
Messages
2,199
Reaction score
195
Points
63
.
I have php files working fine in sub-directories and sub-directories of sub-directories.
thanks for the reply,
Do you use a free account or paid ??
the problem i have is on a free account.
 

addozone

Member
Messages
64
Reaction score
3
Points
8
Do you use a free account or paid ??
the problem i have is on a free account.
.
I use a free account.

I'm not doing any custom php setup and the only thing I'm doing with my htaccess file is managing custom URLs.
 
Last edited:

spacresx

Community Advocate
Community Support
Messages
2,199
Reaction score
195
Points
63
.
I use a free account.

I'm not doing any custom php setup and the only thing I'm doing with my htaccess file is managing custom URLs.

you can see what i mean, these 2 links show my php info.
this one is in my public_html (root)
(link removed)
this one is in a sub folder
(link removed)
the one in a sub folder is blank to me. the one in the root works fine.
both are the exact same file.
 
Last edited:

spacresx

Community Advocate
Community Support
Messages
2,199
Reaction score
195
Points
63
.
Yes, I get the same behavior as you.
thank you for confirming that,
they are the exact same file only difference is one is in public_html
and one is in a sub folder so technically both should work.
 

spacresx

Community Advocate
Community Support
Messages
2,199
Reaction score
195
Points
63
-
might be you are doing a system call...

see --> [ https://x10hosting.com/support/account/my-website-is-showing-a-blank-page ]
###
thanks for your reply,
im assuming the blank page is an error 500 but there is no information provided to me on that.
ive tried turning error reporting on and error logging but i get nothing just a blank page.
another thing thats odd is even if php was turned off shouldnt the code show as text only??
(like an html file)

also as previously mentioned the 2 files are the same,
why would it do a system call from a sub folder and not the public_html (root) ?
 

addozone

Member
Messages
64
Reaction score
3
Points
8
My guess is that there is a bad address in the php code somewhere, or a file that the php file calls, like an address that assumes it's being referenced from the parent directory and fails when referenced from a subdirectory. PHP failures are far from graceful.
 

spacresx

Community Advocate
Community Support
Messages
2,199
Reaction score
195
Points
63
My guess is that there is a bad address in the php code somewhere, or a file that the php file calls, like an address that assumes it's being referenced from the parent directory and fails when referenced from a subdirectory. PHP failures are far from graceful.
Hi,
part of the problem was a syntax error in the main php script that caused the blank pages.
which was odd because it worked fine in the root directory just wouldnt work from sub folders.
so for now i suppose the problems are solved besides trying to get auto_prepend to work somehow.
as its usually used in the php.ini but have limited access to anything in that file besides what is in the control panel.
would be much easier if we had an actual php.ini file to work with.
 

spacresx

Community Advocate
Community Support
Messages
2,199
Reaction score
195
Points
63
Problems are now solved,
thanks to anyone who helped out.
=)
 
Status
Not open for further replies.
Top