Cannot access created plugins through the builder plugin on OctoberCMS 419 Build - php

I've recently moved an OctoberCMS project that I've had stored locally over to a server. Due to the server running PHP 5, I had to downgrade the project to an OctoberCMS version of 419. After getting it running on the server, I try to access any installed plugins through the builder plugin and when I click on one of them in the builder plugin, it outputs the following error:
"syntax error, unexpected ':', expecting ';' or '{'"
This error occurs on line 154 in "vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php".
I mean I'm fairly certain that I installed PHP 5 via composer for the CMS, but it looks like the file is based on PHP 7. Any ideas as to why this could be happening? And if it is because of a PHP version issue, then how would I go about fixing that? Apologies if I seem vague. I've been trying to figure it out for a few days now.

hmm I see as october/rain is of version 1.0.419 and it uses "doctrine/dbal": "~2.4", but unfortunately its not updated to old version. during that php version update.
can you try one thing from your installation just remove vendors folder and modules folder
make sure if you change any core code in modules first take a backup of that file then delete that folder.
Backup your database.
also config files if needed.
remove vendors folder and modules folder
after that remove your composer lock file
replace your package.json file with this content https://github.com/octobercms/library/blob/v1.0.419/composer.json which is of built .419
now from that directory run composer intsall
it will install all new files based on correct dependency.
[Current issue is may be due to some dependencies are not updated to old version]
now just restore all you config file [not sure not needed may be as all stuff will be untouched by these process so just check if needed]
now do database migration with this command - php artisan october:up
this should start your site.
if you find any problem please comment.

Related

How to make wamp/apache to use htaccess?

I forked a working php project from github to create some json files to it, but i can't test it because js and css won't load, i have never used php in my life, so i followed what the install guide said.
composer install
edit .env
php artisan migrate:refresh --seed -vvv
testing vendor/bin/phpunit
This was the guide.
What i did step by step.
installed wamp64
cloned the repo into www
installed composer
ran the composer install command on the right folder
created virtual host for the folder with wamps add a virtual host option, named targygraf.test
created a db with phpmyadmin and set pw
edited the .env file to targygraf.test and to use the db and pw i created
ran php artisan migrate:refresh --seed -vvv
It did what it should i suppose because the database built up, and i was able to access the page with the server.php file, except that css and js didn't load.
Checked with the inspector and they were linked like this http://targygraf.test/server.php/assets/js/targygraf.js, i have visited a TON of forums about the problem, every single one said that i have to turn rewite_module on and set AlloweOverride to All so i did. But still nothing, and as i said earlier, the app was working on another pc and is working online right now, so i'm guessing i did something wrong.
This is the original github link: https://github.com/valentinxxx/targygraf
Edit1: corrected step 5 and 7, added original link
this is a Laravel project, so if it's your first time with php, it becomes a little more complicated.
In a few words:
laravel uses the routes at /routes/web.php, so: it's using: Route::get('/', 'HomeController#getIndex')->name('index'); for the home
/app/Http/Controllers/HomeController#getIndex calls layouts.index view .
this view uses /resources/views/template.blade.php. You can check your css and js there.
You can replace {{ url('assets/css/style.css') }} for '/assets/css/style.css' and see if this way the browser finds the file.
Anyway, there are other possible problems, keep in mind your Apache server should open "[project_folder]/public"
What I did to resolve this problem
reinstalled wamp and composer
forked a clean repo of the project
ran composer install
set phpmyadmin pw
created mysql table
created virtual host, this time pointing to [project_folder]\public instead of [project_folder] (This is the important part as with pointing to [project folder] the page will load but without css, but with the address pointing to [project_folder]\public the page works perfectly)
ran php artisan migrate:refresh --seed -vvv

Laravel on shared hosting issue

I'm a fairly new laravel developer, I am developing my website in laravel 5.5 and I've been trying to get my website online for a few days now. it kept giving me error message like:
Warning: require_once(/dirpath/htdocs/vendor/composer/autoload_static.php): failed to open stream: No such file or directory in /dirpath/htdocs/vendor/composer/autoload_real.php on line 28
Fatal error: require_once(): Failed opening required '/dirpath/htdocs/vendor/composer/autoload_static.php' (include_path='.:/usr/share/pear/') in /dirpath/htdocs/vendor/composer/autoload_real.php on line 28
since it is a free shared hosting server without SSH (I cant run laravel command there), I did make sure to do everything from paying attention to folder structure (placing the content of public outside) and every project files/folders in the htdocs content (I know it can be insecure, I just wanted to show the client the progress of the website for a few days before I took it down). I also did composer install, composer update, composer dump-autoload, various artisan command to clear the cache before I push it to the server, but as you can see, the error persist.
a bit of inspecting on my end, and I keep seeing the autoload_static that autoload_real has been trying to require, kept disappearing along with the autoload classmap. What is the reason that is causing this and what should I do to make the error go away?
Thanks in advance, I tried all I know and did some research but I just stuck, hope you guys can help with this.
also: I can't really get myself a vps or a paid hosting right now.
Update 25/04/2018 : I did composer update --no-dev and re-upload the whole thing again to the vendor, but it is still the same error, anybody has a suggestion? I really am stuck at this point.
In this situation you can't do anything on the server without SSH. In your local copy run composer update --no-dev. Then delete server's vendor folder & copy your local's vendor folder to the server.
load psr-4 instead:
inside autoload_real.php, please find the code like shown below:
$classMap = require DIR . '/autoload_psr4.php';
At least this is a dirty trick to make it work. Once you have the money, then may be moved to a well-equipped server later.

Magento 2 failed to open stream: No such file or directory 'vendor/magento/framework/registration.php'

I am not sure what's going on with my magento installation.
I downloaded the latest version of Magento 2.1.1 as zip.
Extracted, setup a database then tried running the install but I keep on getting this stup*d error and I could not find any answers online.
Can someone help me on this one please? Its been a while since I used magento since I got used to working with Wordpress websites.
I tried looking for the file manually, but just like the error said, it does not exist. Where can I find this registration.php file under magento/framework/ folder?
Try run this command in your magento root folder.
composer dumpautoload
Then reload page you've got this error.
Still not working ?. Fell free to reply :)
If you are using composer to Install, the solution is simple re run the commands from the Magento Root Folder.
Inside /vendor/autoload.php there is a Base Path Global Variable that take the path to execute the vendor_path.php, and, in my case, it take the path where I am and not the Root.
I hope this is helpful for someone.
Have a nice coding day
please run
composer dump-autoload
to reload composer autoload files this issue mostly when you update a library and then fall back to original but magento composer files doesn't fall back to original so you need to generate files again.

EasyPHP starting error after trying to change PHP

I have been using EasyPHP-12.1 for some years now but, foolishly, tried to add a different version of PHP. (I had backed up the www files but not the whole installation). I added a new version (5.6.21) to the PHP folder, selected it in the admin but it didn't work. Now the server doesn't start. It comes up with the error:
Error in Apache configuration file: AH00526: Syntax error on line 185
of C:/Server/EasyPHP/apache/conf/httpd.conf: invalid command "PHPIniDir",
perhaps misspelled or defined by a module not included
in the server configuration.
I would like to go back to the original PHP (5.4.6) or, at least, reinstall the program and copy the MySQL databases to the new installation. As I said, I have copies of all the working php pages - it's the databases that I am worried about losing.
I hope someone can get me up and running again.
I seemed to have managed to get it all working again. I found an earlier dated backup in the conf folder, renamed it and restarted. Phew!
(Made sure I am backing up all the databases and EasyPHP folder now.)

Netbeans 8.0.2 + Laravel - Multiple errors when creating project

I haven't been able to configure Netbeans 8 and Laravel correctly. Whenever I try to create a new php file all my syntax is highlighted as in the following image:
The same happens when I create simple PHP file (not in Laravel project)
I have so far:
Installed Composer
Downloaded from command line
Updated path environment variables
created new blog in laravel
Modified permissions to files under the bootdstrap/cache and storage folders
Downloaded Laravel IDE helper from:
https://github.com/barryvdh/laravel-ide-helper
Yet I still get errors such like 'unable to parse file' and the following error
in phpunit/php-token-stream/tests/fixture/class_with_method_that_declares_anonymous_class2.php
My PHP version is 5.5.12, Apache 2.4.9 and I'm using Wamp. I would very much appreciate any input on this so as to try to resolve it without having to switch IDEs. Thank you!

Categories