PHP Not Working?


#1

Alright, a friend of mine needed some webspace to set up a temporary website, so I decided to hook them up with a folder and whatnot and some ftp access.

The problem is that for some reason they aren’t able to use PHP? I can use PHP in full on my own page, but their own gives a ‘No input file specified’ and nothing more.

Any way to fix this?

I tried looking on the wiki for information but all it did was confuse me with a bunch of tech-speak about configurations and blah blah. Which just puts me further in the dark.

Any help?


#2

It’s unlikely that PHP is broken. I’d try a very basic script in that folder to see if it’s working. Call this test.php and try to access it from your browser.

<?php echo phpinfo(); echo "\n"; ?>

-Scott


#3

I tried that and still get the no input file specified thing.


#4

Login to shell and issue $ls -lsa

Check the .hidden files and ensure all files are owned by the correct user & group.

Maximum Cash Discount on any plan with MAXCASH


#5

Might I ask what exactly that does?

EDIT: Nevermind.

All of the stuff belongs to who it’s supposed to, so… am I missing something?


#6

Nobody has a solution? I can try to elaborate a bit further.

I can use PHP with no problems at www.mysite.com

A friend of mine needed to host some things, and I set them up an area at www.mysite.com/theirsubdirectory but they can’t use PHP at all, there’s just a “No input file specified.” page when something is attempted to load.

I’ve checked the permissions and whatnot, so it’s not an issue of that. Can anyone think of another solution?


#7

A quick question are you using the DH default php or one you uploaded, or an altered php ini file?
Silk

My website


#8

I don’t know how to use an altered php.ini file.

I looked on the dreamhost wiki and followed the steps to try and use an altered php.ini for their site, but it wouldn’t work. And I’m not even sure how to make it work.


#9

Can you elaborate on how you did this? Did you create a new FTP user for them and re-map the subdir so that it was reachable under your domain?

–rlparker
–DreamHost Tech Support


#10

Yes. In fact that’s exactly what I did.


#11

Then that fully explains why PHP can’t run out of that directory. Note this statement from the DreamHost wiki:

You can use PHP (which runs in CGI mode on DreamHost) in your directories (that you own), but only the user “that CGI runs as” - the one set up in the account panel on the “Domains -> Manage Domains” screen - can run CGI processes on that domain.

This is due to DreamHost’s implementation of suEXEC, which allows increased security in that the webserver, and any CGI process, runs as “your user”, so you do not need to give permission to any other user (or set “loose” permissions). In fact, if you do, they won’t run! This is a "Good Thing"™ :slight_smile:

A much better way to give access to a friend is to just make create a subdomain for him to use! :wink:

–rlparker
–DreamHost Tech Support


#12

Alright, so how would one go about doing such a thing? I’m not entirely illiterate on these things, I just need to get my hands dirty and once the ball gets rolling I get the hang of it. Are there any tutorials specifically for dreamhost or could someone laymans me?


#13

it’s pretty much the same as setting up a full domain. in the panel, add a domain, but name it yourfriend.yourdomain.com instead of yourdomain.com. you can have your friend’s user own this subdomain.

note that if your friend puts something up that violates the dreamhost TOS, you are responsible and could lose your account. be sure this is the kind of friend who wouldn’t put you in that sort of situation.

track7 - my dream-hosted site


#14

Just wanted to quickly mention how helpful it is when Dreamhost tech’s take a moment to answer things in the forum. I was confused for almost an hour about this issue until I finally found this thread, and rlparker’s response. Thank you.


#15

It should be pointed out that what OP was trying is not advisable anyway.

WHM, Cpanel, et al have a lot to blame for people assuming this kind of setup is a good idea.