Forum
Amazon S3 buckets.php error
In the admin page, I'm getting an error: Parse error: syntax error, unexpected end of file in /var/www/vhosts/mypath/brandcms/config/buckets.php on line 12
Basically, i'm configuring Amazon S3.
My bukcets.php settings:
<?php
return [
'assets' => [
'type' => 'amazon_s3',
'web_path' => 'https://s3.eu-central-1.amazonaws.com',
'file_path' => 'cdn-central',
],
]
PERCH INFORMATION
Perch Runway: 2.8.31
Production mode: Production (100)
Installed apps: content (2.8.31), assets (2.8.31), categories (2.8.31), perch_forms (1.8.3), perch_members (1.5), perch_backup (1.2)
DB driver: PDO
DB tables: perch2_backup_plans (0), perch2_backup_resources (0), perch2_backup_runs (0), perch2_categories (0), perch2_category_counts (0), perch2_category_sets (0), perch2_collection_index (0), perch2_collection_items (0), perch2_collection_revisions (0), perch2_collections (0), perch2_content_index (676), perch2_content_items (75), perch2_content_regions (11), perch2_forms (0), perch2_forms_responses (0), perch2_members (1), perch2_members_forms (0), perch2_members_member_tags (0), perch2_members_sessions (0), perch2_members_tags (0), perch2_navigation (2), perch2_navigation_pages (1), perch2_page_routes (0), perch2_page_templates (2), perch2_pages (1), perch2_resource_log (344), perch2_resource_tags (3), perch2_resources (67), perch2_resources_to_tags (6), perch2_settings (20), perch2_user_passwords (0), perch2_user_privileges (33), perch2_user_role_privileges (16), perch2_user_roles (2), perch2_users (1)
Users: 1
App runtimes:
<?php
$apps_list = array(
'content',
'categories',
);
Editor plug-ins: markitup
H1: 3e1bd0999223909595121f5107a4928d
L1: 696f824b0a12ded600a38ed45eaee28a
F1: 2edba60ed1f613d6dd804feb202456a2
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
update_2.8.31: done
latest_version: 2.8.15
on_sale_version: 2.8.31
headerScheme: light
hide_pwd_reset: 1
dashboard: 1
content_hideNonEditableRegions: 0
content_frontend_edit: 0
logoPath: /brandcms/resources/bso.png
perch_members_update: 1.4
perch_backup_mysqldump_path:
perch_members_login_page: /members/login.php?r={returnURL}
update_runway_2.8.31: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_SITEPATH: /var/www/vhosts/mypath
PERCH_DB_USERNAME: brandrpid
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: brandrpid_
PERCH_DB_PREFIX: perch2_
PERCH_TZ: Europe/London
PERCH_EMAIL_FROM: eduardo@bluesquareoffices.com
PERCH_EMAIL_FROM_NAME: Eduardo Verzosa
PERCH_LOGINPATH: /brandcms
PERCH_PATH: /var/www/vhosts/mypath/brandcms
PERCH_CORE: /var/www/vhosts/mypath/core
PERCH_RESFILEPATH: /var/www/vhosts/mypath/resources
PERCH_RESPATH: /brandcms/resources
PERCH_HTML5: 1
PERCH_RUNWAY: 1
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /var/www/vhosts/mypath/brandcms/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SESSION_TIMEOUT_MINS: 20
HOSTING SETTINGS
PHP: 5.6.24
Zend: 2.6.0
OS: Linux
SAPI: fpm-fcgi
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $
MySQL server: 5.1.73
Free disk space: 245.18 GB
Extensions: Core, date, ereg, libxml, openssl, pcre, zlib, bz2, calendar, ctype, hash, filter, ftp, gettext, gmp, SPL, iconv, Reflection, session, standard, SimpleXML, sockets, mbstring, tokenizer, xml, cgi-fcgi, mysqlnd, bcmath, curl, dba, dom, enchant, fileinfo, gd, imagick, imap, intl, json, ldap, exif, mcrypt, mysql, mysqli, odbc, PDO, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, redis, soap, sqlite3, sysvmsg, sysvsem, sysvshm, tidy, xmlreader, xmlrpc, xmlwriter, xsl, zip, ionCube Loader, Zend OPcache
GD: Yes
ImageMagick: Yes
PHP max upload size: 2000M
PHP max form post size: 2000M
PHP memory limit: 128M
Total max uploadable file size: 128M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
USER: rpid
HOME: /var/www/vhosts/mypath
FCGI_ROLE: RESPONDER
SCRIPT_FILENAME: /var/www/vhosts/mypath/brandcms/core/settings/diagnostics/index.php
QUERY_STRING: extended
REQUEST_METHOD: GET
SCRIPT_NAME: /brandcms/core/settings/diagnostics/index.php
REQUEST_URI: /brandcms/core/settings/diagnostics/?extended
DOCUMENT_URI: /brandcms/core/settings/diagnostics/index.php
DOCUMENT_ROOT: /var/www/vhosts/mypathk
SERVER_PROTOCOL: HTTP/1.1
REQUEST_SCHEME: http
GATEWAY_INTERFACE: CGI/1.1
SERVER_SOFTWARE: nginx/1.11.1
REMOTE_ADDR: xxx.xxx.xxx
REMOTE_PORT: 52481
SERVER_ADDR: 172.24.16.72
SERVER_PORT: 80
SERVER_NAME: mydomain
REDIRECT_STATUS: 200
HTTP_HOST: maydomain.co.uk
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_REFERER: https://mydomain.co.uk/brandcms/core/settings/diagnostics/
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
HTTP_COOKIE: cmssb=0; cmsa=1; PHPSESSID=3jeftcf7n7p4t518kd3v5qrds2
HTTP_CONNECTION: keep-alive
PHP_SELF: /brandcms/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1470834487.4447
What's on line 12? Do you have a missing semicolon?
There is nothing in line 12, not even a blank space. There is a semicolon after the last ].
FYI. This was Perch upgraded to Perch Runway today. If i remove the settings in Buckets.php, the errors disappear.
What does it look like now?
I don't see anything there that should cause a syntax error.
The reason i have updated is the ability to use our amazon cdn, now it is not working.
Is there a was i can get someone to look at this to rectify the issue?
This is the way to get someone to help you rectify the issue, but you'll need to work with us :)
Can you stick the entire buckets.php file into a pastebin and link to it here https://pastebin.com/
https://pastebin.com/VgxwCfrf
OK, so I have just pasted that into my Runway install and I'm not getting an error.
What else can you tell me, for example how did you transfer this file to your server?
What did you use to edit the file?
Does this happen on your development environment as well as live?
If PHP is saying there is a line 12, that file you showed me doesn't have a line 12 so something is getting onto the end of it somewhere.
I;m using sublime text 3. Filezilla is used to transfer the files to the server. There is no live url, just the dev site.
If your file doesn't have a line 12, then there's something beyond our control happening with your server.
This is embarrassing, I was transferring a file from another folder.
The error is gone, how can you tell if the files are uploaded to Amazon. The folder is still empty.
What happens when you upload?
It shows the image with green progress bar. Then it disappear. It uploads in the resource folder, when i view all.
Have you tested your S3 credentials?