download error

Permalink
Hi all, I'm a c5 noob... I tried downloading an add-on from inside c5 (very slick, BTW.) *But* I got the following error:

Warning: copy() [function.copy]: URL file-access is disabled in the server configuration in .../public_html/allegro/concrete/libraries/marketplace.php on line 85

Here is the offending code from said php file starting at line 85:

if(copy($file, $tmpFile)) {

return $ftime;
}
else {

return Package::E_PACKAGE_DOWNLOAD;
}
}

How should I tweak above code to enable downloads from within c5? Thanks in advance!

Yours With a Song,

Peter J

 
jelthure replied on at Permalink Reply
jelthure
this is happening because of your server, not C5.
I believe it has to do with "allow_url_fopen", some hosts have this disabled. If you have access to a php.ini file for your domains hosting then you can change the allow_url_fopen settting to on. that may or may not work depending on your host.
PeterjVA replied on at Permalink Reply
Thx, jelthure. I have e-mail my host. I will report on progress.

-Pete
PeterjVA replied on at Permalink Reply
Hi All,

My host fixed the php.ini issue... now when I try to download from with C5 I get this:

<<The package could not be installed:

There was an error unpacking your file. Perhaps you have not uploaded a valid zip file, or you do not have zip installed.>>

What do I do? Thx!
jelthure replied on at Permalink Reply
jelthure
Peter,
In the dashboard can you go into the "Sitewide Settings" and then "Debug" and copy/paste all the contents of the "Environment" textarea for me to look at.
PeterjVA replied on at Permalink Reply
Here 'tis!

<<# concrete5 Version
5.4.2

# concrete5 Packages
None

# concrete5 Overrides
None

# Server Software
Apache

# Server API
cgi-fcgi

# PHP Version
5.2.17

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, ctype, curl, date, dbase, dom, exif, filter, ftp, gd, gettext, hash, iconv, imap, ionCube Loader, json, libxml, mbstring, mcrypt, mhash, mime_magic, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, posix, pspell, Reflection, session, SimpleXML, soap, sockets, SPL, SQLite, standard, suhosin, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend Optimizer, zip, zlib.

# PHP Settings
log_errors_max_len - 1024
max_execution_time - 5
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
memory_limit - 128M
post_max_size - 64M
safe_mode - Off
safe_mode_exec_dir - <i>no value</i>
safe_mode_gid - Off
safe_mode_include_dir - <i>no value</i>
sql.safe_mode - Off
upload_max_filesize - 64M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
pcre.backtrack_limit - 100000
pcre.recursion_limit - 100000
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
safe_mode_allowed_env_vars - PHP_
safe_mode_protected_env_vars - LD_LIBRARY_PATH
suhosin.cookie.max_array_depth - 50
suhosin.cookie.max_array_index_length - 64
suhosin.cookie.max_name_length - 64
suhosin.cookie.max_totalname_length - 256
suhosin.cookie.max_value_length - 10000
suhosin.cookie.max_vars - 100
suhosin.executor.include.max_traversal - 0
suhosin.executor.max_depth - 0
suhosin.get.max_array_depth - 50
suhosin.get.max_array_index_length - 64
suhosin.get.max_name_length - 64
suhosin.get.max_totalname_length - 256
suhosin.get.max_value_length - 512
suhosin.get.max_vars - 100
suhosin.log.phpscript.is_safe - Off
suhosin.memory_limit - 0
suhosin.post.max_array_depth - 50
suhosin.post.max_array_index_length - 64
suhosin.post.max_name_length - 64
suhosin.post.max_totalname_length - 256
suhosin.post.max_value_length - 1000000
suhosin.post.max_vars - 1000
suhosin.request.max_array_depth - 50
suhosin.request.max_array_index_length - 64
suhosin.request.max_totalname_length - 256
suhosin.request.max_value_length - 1000000
suhosin.request.max_varname_length - 64
suhosin.request.max_vars - 1000
suhosin.session.max_id_length - 128
suhosin.upload.max_uploads - 25
>>

Thanks so much!!! -Pete
jelthure replied on at Permalink Reply
jelthure
Ok at first glance looks like you have everything you need, what package are you trying to install? You may at this point just need to remove the downloaded package and try grabbing it again.
PeterjVA replied on at Permalink Reply
It happens with anything I try to d/l!
jelthure replied on at Permalink Reply
jelthure
ok I would then double check that the folder permissions are correct for the /packages and /concrete/packages folders. they should be set to 755, but you could also try 777 if 755 doesn't work.

Other then that I have no clue what could be causing the issue.

this link might lead you in the right direction as well:http://www.concrete5.org/community/forums/installation/there-was-an...