Not able to upload files

Permalink
Hi all,

Trying to upload some files [ images ] and keep getting this error message ;

d4.png
Declaration of Carbon\Carbon::setTime($hour, $minute, $second = 0) should be compatible with DateTime::setTime($hour, $minute, $second = NULL, $microseconds = NULL)

Any thoughts ??

Thanks !!!

melange
 
hutman replied on at Permalink Reply
hutman
What version of C5 are you using? It looks like PHP 7 made some updates which aren't compatible with certain versions of the Carbon plugin. A C5 upgrade might fix this problem if you're not on the newest version.
melange replied on at Permalink Reply
melange
Hey Hutman,

[ see version below] The issue is when I upgrade to Version 8 the entire site breaks. I am just now re-building it well copying CC5 to another server so I can trouble shoot the upgrade.
# concrete5 Version
Core Version - 5.7.5.13
Version Installed - 5.7.5.13
Database Version - 20160615000000

# concrete5 Packages
ABC Auto Reply forms (1.0.4), Age Verification (0.9.6), Amplica (1.0.7), Automatic Email Obfuscator (2.0.1), Background Image and Overlay (0.9.9), Buttons Factory Pro (2.2), C5DK Blog (1.4.4), Call Me (0.9.6), Colorpicker Attribute (0.4), Contact Form (No Links) (1.0), Customize Editing Interface (1.0.1), Daily Message (1.1), DiscussionES Facebook Comments (1.1), Documents (1.0.1), Dynamic Images (1.2), ExchangeCore reCAPTCHA (1.1.1), EZ Bio (1.0), EZ Event (1.0), EZ Paypal (1.1.1), Form - MailChimp Subscribe (2.0), HonestWebsites Simple testimonials (1.0.0), Lazy Footer (0.9.6), Like This (0.9.1), Live Chat (1.0.1), Login/Logout Link (1.0), More Block Templates (0.9.6), Page password (0.9.3), Page Transitions (1.4), PDF Viewer (1.0.1), Quick Pay (1.0.1), Ronyd Expanded Search Bar (2.0), SCALA Clear Cache (1.1), Share Me (0.9.1), Simple Backup (2.0.1), Simple Blog setup (1.0.0), Smooth Link Scrolling (1.2.1), Social Share Lite (2.1.3), Social Stream (1.2.1), Spacer (0.9.3), Stupid Slider (0.9.1), Stylish Ordered Lists (1.0), Tallacmans Copyright (0.9.3), Vimeo Video (1.0.2), Wave Text (3.0)

# concrete5 Overrides
blocks/date_navigation/templates/melange_date_navigation/view.php, blocks/date_navigation/templates/melange_date_navigation/view.css, blocks/date_navigation/templates/melange_date_navigation, blocks/date_navigation/templates, blocks/date_navigation, blocks/html/view.php, blocks/html, blocks/topic_list/templates/melange_blog_topic_list/view.php, blocks/topic_list/templates/melange_blog_topic_list/view.css, blocks/topic_list/templates/melange_blog_topic_list, blocks/topic_list/templates, blocks/topic_list, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/tr_TR/LC_MESSAGES/messages.mo, languages/tr_TR/LC_MESSAGES, languages/tr_TR, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/cs_CZ/LC_MESSAGES/messages.mo, languages/cs_CZ/LC_MESSAGES, languages/cs_CZ, languages/es_PY/LC_MESSAGES/messages.mo, languages/es_PY/LC_MESSAGES, languages/es_PY, languages/fr_FR/LC_MESSAGES/messages.mo, languages/fr_FR/LC_MESSAGES, languages/fr_FR, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE, languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, blocks/date_navigation/templates/melange_date_navigation/view.php, blocks/date_navigation/templates/melange_date_navigation/view.css, blocks/date_navigation/templates/melange_date_navigation, blocks/date_navigation/templates, blocks/date_navigation, blocks/html/view.php, blocks/html, blocks/topic_list/templates/melange_blog_topic_list/view.php, blocks/topic_list/templates/melange_blog_topic_list/view.css, blocks/topic_list/templates/melange_blog_topic_list, blocks/topic_list/templates, blocks/topic_list, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/tr_TR/LC_MESSAGES/messages.mo, languages/tr_TR/LC_MESSAGES, languages/tr_TR, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/cs_CZ/LC_MESSAGES/messages.mo, languages/cs_CZ/LC_MESSAGES, languages/cs_CZ, languages/es_PY/LC_MESSAGES/messages.mo, languages/es_PY/LC_MESSAGES, languages/es_PY, languages/fr_FR/LC_MESSAGES/messages.mo, languages/fr_FR/LC_MESSAGES, languages/fr_FR, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE, languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK

# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache

# Server API
cgi-fcgi

# PHP Version
7.1.8

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imap, intl, json, ldap, libxml, mbstring, mcrypt, mysqli, mysqlnd, odbc, openssl, pcntl, pcre, PDO, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, SourceGuardian, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 3000
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - -1
max_input_vars - 1000
memory_limit - 512M
post_max_size - 128M
sql.safe_mode - Off
upload_max_filesize - 128M
ldap.max_links - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 1440
soap.wsdl_cache_limit - 5
opcache.max_accelerated_files - 10000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5
hutman replied on at Permalink Reply
hutman
You could do what this person did temporarily until you're able to upgrade -https://www.concrete5.org/community/forums/5-7-discussion/php-7.1-er...
melange replied on at Permalink Reply 1 Attachment
melange
Hey Hutman,

Thanks for the link. I am not real sure I understand it though. I was about to ask you about the other option available in file manager called [ upload via [ add remote files ].

[ attached ].

Can you break down that link you sent a bit more simply for me ?

Thanks :)

p.s This is the error message I got when I just tried to copy a file in file manager
{"error":{"message":"Declaration of Carbon\\Carbon::setTime($hour, $minute, $second = 0) should be compatible with DateTime::setTime($hour, $minute, $second = NULL, $microseconds = NULL)"},"errors":["Declaration of Carbon\\Carbon::setTime($hour, $minute, $second = 0) should be compatible with DateTime::setTime($hour, $minute, $second = NULL, $microseconds = NULL)"]}
melange replied on at Permalink Reply
melange
I can see reading that suggestion it states ;

"I managed to get this working again by changing line 671 of concrete/vendor/nesbot/carbon/src/Carbon/Carbon.php from this
public function setTime($hour, $minute, $second = 0)

To this
public function setTime($hour, $minute, $second = NULL, $microseconds = NULL)"

Does that mean I need to find "
concrete/vendor/nesbot/carbon/src/Carbon/Carbon.php

There I will find
public function setTime($hour, $minute, $second = 0)

Then this gets replaced with
public function setTime($hour, $minute, $second = NULL, $microseconds = NULL)

This is done in the server?? I am any where close Hutman ??
hutman replied on at Permalink Reply
hutman
Yes, that's exactly right.
melange replied on at Permalink Reply
melange
Hi Hutman,

I am about to go forward and apply suggested fix for the upload of files. Can I just confirm that the script you outlined is EXACTLY word by word letter by letter what I will be looking for. Or is the script you posted just an example.

Thanks Hutman
melange replied on at Permalink Reply
melange
HI again :)

Well I have managed to get as far as getting myself Filezilla and logging into the server vi FTP.
However at this point I am totally lost on how to navigate it to find the lines you suggested to edit.

Find in the server this > [concrete/vendor/nesbot/carbon/src/Carbon/Carbon.php]

2.This I am guessing will have a sub-set line of;
[public function setTime($hour, $minute, $second = 0)]

Then what I need to do is replace that line;
[public function setTime($hour, $minute, $second = 0)]

With this line;
[public function setTime($hour, $minute, $second = NULL, $microseconds = NULL)]

Probably not an easy one to advise on ??
melange replied on at Permalink Reply 1 Attachment
melange
Well ,one step forward I think

I have managed to navigate as far as;

SRC>CARBON & found Carbon.php

Yet from what ive read I need to find

public function setTime($hour, $minute, $second = 0)

and replace with

public function setTime($hour, $minute, $second = NULL, $microseconds = NULL)

Am I clearly in the wrong directory ???

Thanks!
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
look at line 671 in the carbon.php file
melange replied on at Permalink Reply
melange
Thanks Weyboat.

Was not even aware of lines and text text editor etc.

I have open on local machine on that line and see what needs to be changed. This question might seem obvious. But is the correct way to replace the existing .php file on the server with updated one . 1. Delete the existing one on server , 2 upload edited .php file from local machine to server and drop back in the same location I deleted the original one ??

Thanks
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Yes you can do it that way.
Or..
Edit the file and upload it to the same location, when you are asked if you want to replace the existing file, choose yes..
Or,
Rename the existing file to Carbon-old.php and upload the edited Carbon.php file.
This last option gives you the opportunity to 'roll_back' to the previous version, if required.
melange replied on at Permalink Reply 1 Attachment
melange
Does this look correct ?
melange replied on at Permalink Reply
melange
Anyway, I am sure I did it correctly, unfortuanly this has not been the solution this time around. :(

Still getting the;

[1234.png
Declaration of Carbon\Carbon::setTime($hour, $minute, $second = 0) should be compatible with DateTime::setTime($hour, $minute, $second = NULL, $microseconds = NULL)]

When trying to upload a file via file manager
Thanks for taking the time anyway !! Any more suggestion short or address the purple elephant in the room, my issue with an upgrade of CC5 breaking the site
melange replied on at Permalink Reply 1 Attachment
melange
Hey sorry for the barge of posts!

Is there another way I can upload files to the file manager. E.g using [ see screen shot ] ?
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Are you running your site out of the root/updates folder?
If so, that is where you will find the Carbon.php file that needs editing..
melange replied on at Permalink Reply
melange
Hi,
RE: " Are you running your site out of the root/updates folder?
If so, that is where you will find the Carbon.php file that needs editing.."

I am not sure what " Are you running your site out of the root/updates folder" means.

I found the Carbon.php via this path

concrete/vendor/nesbot/carbon/src/Carbon/Carbon.php

I used text editor and made the changes to the line mentioned with the correct line identified.

Uploaded back to server into correct location and prior to doing this I named the current Carbon.php file to Carbon-old.php as per your suggestion .

I would assume those steps are corrupt and there is not another Carbon.php file in server
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Text removed as it appears looking into a directory is beyond your skills level.