core icon indicating copy to clipboard operation
core copied to clipboard

remote.php with Apache CGI not working

Open johndevs opened this issue 14 years ago • 17 comments

I am trying to get OwnCloud 4.5 working on GoDaddy shared hosting. They have apache + FastCGI running on their servers.

The problem I am having is that basically everything going through remote.php gets the response "No input file specified." with a 404 header. This causes all CSS and js not to be loaded and the UI looks totally garbled.

The only workaround I've found to at least be able to use OwnCloud is to use the DEBUG flag in config.php. It at least makes the UI usable but still does not make remote.php work any better.

Has anybody stumbled upon this and if so, is there any workaround?

johndevs avatar Nov 09 '12 10:11 johndevs

This may be related to #195

LukasReschke avatar Nov 09 '12 10:11 LukasReschke

When you call owncloud.server/remote.php/core.css do you see "garbage"? Then it's a dup, like Lukas said, and the hint with FastCGI could be precious.

blizzz avatar Nov 09 '12 12:11 blizzz

I tried following to reproduce it:

  • On my (K)Ubuntu12.10 machine configured PHP to run as fastCGI
  • cleared all cache (browser and ownCloud)
  • made sure the DEBUG is set to false
  • tried with zlib compression on and off, the level with -1 and 8

however, I was not able to reproduce it :( everything works fine.

blizzz avatar Nov 09 '12 13:11 blizzz

might be related to web server config. @bartv2 are there requirements for apache2 for remote.php to work?

blizzz avatar Nov 09 '12 13:11 blizzz

I don't see any garbage, the only content of the request response is "No input file specified." and that is it so it doesn't sound like #195 to me.

There no indication of it either in the apache error logs.

johndevs avatar Nov 09 '12 13:11 johndevs

I removed the debug flag and created some credentials you can try it out on Hope it helps.

johndevs avatar Nov 09 '12 14:11 johndevs

That´s exaclty like my server with deactivated debug, @johndevs! The apache error logs showing me this:

[Fri Nov 09 15:22:16 2012] [error] [client xxx] File does not exist: /var/www/polcustcloud/remote.php/core.css, referer: http://www.xxx.xxx/polcustcloud/?app=files [Fri Nov 09 15:22:16 2012] [error] [client xxx] File does not exist: /var/www/polcustcloud/remote.php/core.js, referer: http://www.xxx.xxx/polcustcloud/?app=files

POLARISFAMILY avatar Nov 09 '12 14:11 POLARISFAMILY

Please double check:

  • mod_rewrite is enabled
  • Apache config: AllowOverride All
  • Apache config: DirectoryIndex index.php

DeepDiver1975 avatar Nov 09 '12 15:11 DeepDiver1975

mod_rewrite is enabled, quickly tested it and it is rewriting the urls just fine.

Couldn't find the apache.conf anywhere on the hosting environment so couldn't check it. What I could do was add them to the .htaccess file but nothing really changed.

I am wondering are the paths correct under PHP Variables. I am serving the pages from an chrooted enviroment if that makes a difference.

johndevs avatar Nov 09 '12 15:11 johndevs

Possibly, the .htaccess cannot be overriden on your hoster?

blizzz avatar Nov 09 '12 16:11 blizzz

"No input file specified" is an error message from GoDaddy. Just do a little google lookup and you will find a few work arounds like cgi.fix_pathinfo = 1

LukasReschke avatar Nov 09 '12 16:11 LukasReschke

Added the cgi fix which did the trick, it is working wonderfully now. Thank you @LukasReschke!

And thanks to all of you helping out, loving OwnCloud and the community around it :)

johndevs avatar Nov 09 '12 17:11 johndevs

Hi guys,

I am experiencing a similar problem:

  1. Installed OwnCloud on GoDaddy/shared server
  2. OwnCloud installed with exceptions: CSS is not displaying correctly and core.css and core.js not generated. Also if I go to core.css url I get a "No input file specified."
  3. I tried cgi.fix_pathinfo = 1 in my php.ini file, but same result

Please help, I'm pretty excited to get going with OwnCloud :)

Regards, James

jamesstar89 avatar Nov 19 '12 03:11 jamesstar89

Did you restart Apache?

blizzz avatar Nov 19 '12 10:11 blizzz

Not yet, can you restart Apache on Godaddy/shared server?

I can email them today.

jamesstar89 avatar Nov 19 '12 18:11 jamesstar89

Found this url of Godaddy's - Why isn't my php.ini not working. http://support.godaddy.com/help/article/5647/why-isnt-my-phpini-file-taking-effect

Inside my Control Panel I can go to System Processes and click end web and this apparently helps to restart/refresh php.ini file, unfortunately didn't work for me.

The other thing I would like to point to is that /owncloud/remote.php/core.css this doesn't point to the correct location of core.css, instead gives me this as an output - No input file specified.

If I go like this however, http://www.bibliostream.com/owncloud/remote.php?core.css it works!

So maybe my problem is do with owncloud resources? Any ideas? I think we're pretty close...

Thanks, James

jamesstar89 avatar Nov 19 '12 21:11 jamesstar89

My Hoster also use CGI for PHP. to get cardDAV/calDAV work on my hoster I Add

RewriteRule ^remote.php/(.*) remote.php?auth=%{HTTP:Authorization}&path=$1 [QSA,L] to .htaccess

and

if ( isset($_GET['auth']) && !empty($_GET['auth']) ) { $_SERVER['HTTP_AUTHORIZATION'] = rawurldecode($_GET['auth']); }

if ( isset($_GET['path']) && !empty($_GET['path']) ) { $_SERVER['PATH_INFO'] = rawurldecode('/' . $_GET['path']); } to remote.php

micemice avatar Jan 13 '14 15:01 micemice