Is PHP broken?

Status
Not open for further replies.

b9kx10ho

New Member
Messages
2
Reaction score
0
Points
1
I just signed up for the free hosting and tried to upload a simple "<?php phpinfo(); ?>" script at this URL: http://b9k.x10host.com/info.php. But, when I go there with the browser I get error 403. The file has 777 for permissions. How can I solve this?
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
How can I solve this?
issue #1 --> phpinfo() is currently (or S/B) disabled for a non-upgraded free-hosting account

issue #2 --> IF 'permissions' set on any folder or file - in your account - are [ 777 ] - that makes a large security risk - so a x10hosting's free-hosting server will throw an immediate "Access Denied" (403 error code) error to protect itself

make sure all file permissions are 0644 (rw-r--r--) and all folder permissions are 0755 (rwxr-xr-x)
 

b9kx10ho

New Member
Messages
2
Reaction score
0
Points
1
issue #1 --> phpinfo() is currently (or S/B) disabled for a non-upgraded free-hosting account

issue #2 --> IF 'permissions' set on any folder or file - in your account - are [ 777 ] - that makes a large security risk - so a x10hosting's free-hosting server will throw an immediate "Access Denied" (403 error code) error to protect itself

make sure all file permissions are 0644 (rw-r--r--) and all folder permissions are 0755 (rwxr-xr-x)

Thanks for the help, it is now working. I was not aware of this limitation (is there some official webpage with it?). Indeed the 403 remained even after correcting file permissions, until I replaced the "phpinfo()" with a "print_r($_SERVER)".

Ps. May I ask how the www and www-less url forms are managed here on x10hosting and what I should prefer? I noticed that somehow files are updated at different times, even with varnish cache turned off.
 
Last edited:

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
The stuff that's already cached needs to age out before it's replaced with files that have a "don't cache me" header on them.

As for the rest, it would be very odd for a shared hosting service to allow 777 file permissions; that's just asking to get pwned. (There is a server configuration that allows it safely, but it has its own set of problems, and you'll rarely see it used outside of schools.) And the Free Hosting servers are locked down pretty tightly; anything that exposes the configuration is verboten, remote access is HTTP-only (though you can call HTTPS as a client), there are some fairly strict mod_security rules, and .htaccess options are limited (see this sticky for more). That's the price you pay for free hosting on a service that doesn't want to be shut down by ISP blocks and blacklists every other day.
 
Status
Not open for further replies.
Top