Webmastersite.net
Register Log In

Cache/FTP Issue
expects parameter 1 to be resource, boolean given

Comments on Cache/FTP Issue

impurist
Member

Usergroup: Customer
Joined: Feb 18, 2008

Total Topics: 8
Total Comments: 31
Posted Feb 21, 2008 - 3:54 AM:

Hello,

I am having trouble turning on the cache system. I receive this message when I turn on guest caching:

Warning: ftp_login() expects parameter 1 to be resource, boolean given in /includes/filefunctions.php on line 107

Warning: ftp_chdir() expects parameter 1 to be resource, boolean given in /includes/filefunctions.php on line 108

Warning: ftp_site() expects parameter 1 to be resource, boolean given in /includes/filefunctions.php on line 158


So this looks like a FTP issue I think. I double-checked my ftp login info. Cache folder is set to 777. I am on a shared host running PHP 5 with FTP support enabled. Is there anything else I should be checking?

Thanks for your help
impurist
Member

Usergroup: Customer
Joined: Feb 18, 2008

Total Topics: 8
Total Comments: 31
Posted Feb 22, 2008 - 8:53 PM:

I presented this issue to my host and this was there response:

Please note that it is not possible to enable the php cache for only one domain. Can you please let us know the steps to replicate the problem.


Is this what is causing the problem?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Feb 23, 2008 - 7:26 AM:

The host misunderstands, it's a script-specific cache and not a PHP cache. It's not a hosting issue, except to find out whether you need 777 or 755 permissions.

If the cache directory is already 777/755 (whichever is needed on the host) then FTP shouldn't be getting involved. The FTP warnings suggest that the connection is somehow being lost or not created. To know why I'd have to be able to trace it step by step, but I can't reproduce on my servers or desktop, would have to access yours or that of someone else who can recreate the message.

At any rate, one thing you can ask your host to do is use suExec so that FTP is unnecessary.
impurist
Member

Usergroup: Customer
Joined: Feb 18, 2008

Total Topics: 8
Total Comments: 31
Posted Feb 27, 2008 - 3:08 PM:

Thanks for your help so far Paul.

I removed the server FTP login information from the System Configuration panel, and that supressed the error message I was receiving. My server permissions appear not to allow the script to chmod any files/directories, so I also had to manually chmod 666 the cache-generated files. The cache seems to be working fine now, thanks.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.