PHP Not Working?

PHP Not Working?

Posted by: Serdash
Posted on: 2008-09-24 19:51:00

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?

Re: PHP Not Working?

Posted by: sdayman
Posted on: 2008-09-24 20:04:00

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

Re: PHP Not Working?

Posted by: Serdash
Posted on: 2008-09-24 20:13:00

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

Re: PHP Not Working?

Posted by: sXi
Posted on: 2008-09-24 20:20:00

Login to shell and issue $ls -lsa

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


Re: PHP Not Working?

Posted by: Serdash
Posted on: 2008-09-24 20:27:00

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?Edited by Serdash on 09/24/08 08:41 PM (server time).

Re: PHP Not Working?

Posted by: Serdash
Posted on: 2008-09-24 22:24:00

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?

Re: PHP Not Working?

Posted by: silkrooster
Posted on: 2008-09-24 23:39:00

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

My website

Re: PHP Not Working?

Posted by: Serdash
Posted on: 2008-09-24 23:58:00

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.

Re: PHP Not Working?

Posted by: rlparker
Posted on: 2008-09-25 00:45:00

In reply to:

I set them up an area at www.mysite.com/theirsubdirectory


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

Re: PHP Not Working?

Posted by: Serdash
Posted on: 2008-09-25 01:53:00

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

Re: PHP Not Working?

Posted by: rlparker
Posted on: 2008-09-25 02:01:00

In reply to:

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


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

In reply to:

"The only caveat with this is that CGI and PHP-CGI won't work in that directory (since it'll have a different user than the rest of the domain)."


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"(tm) 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

Re: PHP Not Working?

Posted by: Serdash
Posted on: 2008-09-25 03:50:00

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?

Re: PHP Not Working?

Posted by: misterhaan
Posted on: 2008-09-25 06:43:00

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

Tags: blah blahftp accesswhatnotwiki