October installation - php

I have installed october via console interface page. Backend works fine but UI gives error:
The "Cms\Facades\Cms" extension is not enabled.
I couldn't figure out whats wrong with it.Could anybody help?

Appears to be composer loading a too new version of Twig -
https://github.com/octobercms/october/issues/2908#issuecomment-306431036
fixed by opening composer.json in the root directory, adding to the require object this value:
"twig/twig": "1.33.*",
Then perform composer update to rectify the breaking package. This will be fixed in Build 420+ as we move to Twig 2.0. This upgrade won't occur for at least 1-2 months. Leaving this open until then.

Related

VS Code can not reach Symfony\Component and Symfony\Bundle

I am trying to create a simple symfony project.
I run this on console:
composer create-project symfony/skeleton myProjectName
php -S 127.0.0.1:8000 -t myProjectName/public
Project succesfully run at localhost:8000. However, when I begin to inspect the code, I realized VS Code editor is indicating "Undefined type" error in projectDirectory/src/Kernel.php file. Do you have any ideas why this happens and any suggestions towards solution?
I use PHP v7.4.32 and Symfony 5.4 for development. My helper extentions are PHP Intelephense v1.8.2 and PHP IntelliSense v1.0.11.
projectDirectory/src/Kernel.php
The Error
Since it runs succesfully on browser, I dubted that the classes exist somewhere but the VSCode could not solve the relative paths. Then, I tried a couple of extensions. Installation of PHP v1.22.11089 created by DEVSENSE and PHP Namespace Resolver v1.1.9 created by Mehedi Hassan has solved the problem.

Class 'MongoDB' not found in fatfree (f3)

Iv recently been trying to upload my php application from xampp which i have installed on my home machine to a server. Now the code works perfectly on xampp at home and the mongodb driver works as expected, however after migrating it to the LAMP server, the f3 framework throws this error :
Fatal error: Class 'MongoDB' not found in /nfs/fs0/home/dhu/www/fatfree/lib/db/mongo.php on line 107
Internal Server Error
Fatal error: Class 'MongoDB' not found
In reference i looked up the line it is complaining about and its this one :
$this->db=new \MongoDB(new $class($dsn,$options?:array()),$dbname);
And after looking up solutions on stack and other websites they said to check the version of mongo etc installed so i look it up on the php side to see what was enabled and it returns :
PHP INFO ()
PHP Version 5.6.24-0+deb8u1
mongodb
mongodb support enabled
mongodb version 1.1.8
mongodb stability stable
libmongoc version 1.3.5
libbson version 1.3.5
So since mongo is both installed and enabled on the php server im unsure what exactly the issue is with line 107 in the fatfree framework, does anyone have any idea's? Any help would be appreciated.
So after no real solutions been found here im gonna update to see if i can get more help.
Update
Note the server settings can be found here:
http://lamp0.cs.stir.ac.uk/
and the error here:
http://lamp0.cs.stir.ac.uk/~dhu/
The line its referring too is:
$this->db=new \MongoDB(new $class($dsn,$options?:array()),$dbname);
Within the MONGODB library, mongo.php. After looking at various ways to set the DB up and trying to rewrite the setup code nothing seems to work....
Update 2
$manager = new MongoDB\Driver\Manager("mongodb://mydetails:27017");
If i removed the fatfree framework this line does not throw an error during setup which is surprising as i expected it to be unable to find MongoDB\Driver however it had no problem, its main problem seems simply to be that one line in the fatfree framework and im unsure why...
You need to add MongoDB as dependency in the composer.json file of your Fat-Free Framework.
Just add MongoDB to the require dependency list, if it is not there create one like below.
"require": {
"mongodb/mongodb": "^1.0"
},
Then run composer install again. Now you can reference MongoDB classes inside your code.
First install autoload class for mongodb in your project.Then try with below code
$client = new MongoDB\Client("mongodb://localhost:27017");

Cannot redeclare composerRequire... - Composer issue?

My development env is OS X Mavericks using MAMP and NetBeans.
I'm experimenting with a CakePHP plugin (CakeResque) and after installing via Composer, the following error is being logged:
Fatal error: Cannot redeclare composerRequiref2c9cc1d84da6e308a0f610da161cf55() (previously > declared in .../app/Vendor/composer/autoload_real.php:47) in
.../app/Vendor/composer/autoload_real.php on line 50
Others are using this plugin and at this point, I don't think it is related to the plugin. The developer of the plugin has been kind enough to help me troubleshoot it through a github issue but with no luck. In my core config file, I have:
require_once dirname(__DIR__) . '/Vendor/autoload.php';
I'm not requiring Vendor/autoload anywhere else in my application.
I found this stackoverflow question but it was never answered - this is the exact same issue I am having.
Because I am using MAMP, I have pointed my local php to the MAMP php bin - now when I run which php it is pointing to my MAMP directory. This may have nothing to do with it but I'm trying to include everything.
Running composer self-update says everything is up to date.
Any help is appreciated.

What version of doctrine-mongodb-odm should I use with Symfony2 v2.0.12?

After some trial and error (ok, just error) I figured out that c089b69c3d contained something that broke my code, causing
Fatal error: Interface 'Doctrine\Common\Persistence\Proxy' not found
but the commit before that worked.
Is there any general recommendation of which version of doctrine-mongodb-odm should be used with the Symfony2 standard distribution v2.0.12?
Check your deps and deps.lock files for any version fixes on doctrine-common.
The doctrine-mongodb master branch sub-modules doctrine-common at commit fc26d10
See https://github.com/doctrine/mongodb/tree/master/lib/vendor.
Also see this question and answer for more information - Manually updating Symfony2 deps file to get Doctrine 2.2?
add in your deps.lock:
doctrine-mongodb-odm 2239012af4d7f9954898068e8458d7e1a0f6143f

Problems opening php files in Eclipse

I've just set up PDT in eclipse (Galileo), but get the error below when opening any .php file.
Does anyone know how I can fix this?
Thanks in advance
TAO.
PHP FILE:
<?php
echo "test"
?>
ERROR:
Could not open the editor: Editor could not be initialized.
Details:
java.lang.AbstractMethodError: org.eclipse.php.internal.core.compiler.ast.parser.PHPSourceParserFactory.parse(Lorg/eclipse/dltk/compiler/env/IModuleSource;Lorg/eclipse/dltk/compiler/problem/IProblemReporter;)Lorg/eclipse/dltk/ast/parser/IModuleDeclaration;
at org.eclipse.dltk.core.SourceParserUtil.parse(SourceParserUtil.java:137)
at org.eclipse.dltk.core.SourceParserUtil.getModuleDeclaration(SourceParserUtil.java:197)
at org.eclipse.dltk.core.SourceParserUtil.getModuleDeclaration(SourceParserUtil.java:183)
at org.eclipse.dltk.core.SourceParserUtil.getModuleDeclaration(SourceParserUtil.java:174)
at org.eclipse.dltk.core.AbstractSourceElementParser.parse(AbstractSourceElementParser.java:42)
at org.eclipse.dltk.core.AbstractSourceElementParser.parseSourceModule(AbstractSourceElementParser.java:26)
at org.eclipse.dltk.internal.core.AbstractSourceModule.buildStructure(AbstractSourceModule.java:507)
at org.eclipse.dltk.internal.core.Openable.generateInfos(Openable.java:185)
at org.eclipse.dltk.internal.core.ModelElement.openWhenClosed(ModelElement.java:182)
at org.eclipse.dltk.internal.core.BecomeWorkingCopyOperation.executeOperation(BecomeWorkingCopyOperation.java:45)
at org.eclipse.dltk.internal.core.ModelOperation.run(ModelOperation.java:698)
at org.eclipse.dltk.internal.core.ModelOperation.runOperation(ModelOperation.java:764)
at org.eclipse.dltk.internal.core.SourceModule.becomeWorkingCopy(SourceModule.java:68)
at org.eclipse.dltk.internal.ui.editor.SourceModuleDocumentProvider.createFileInfo(SourceModuleDocumentProvider.java:1251)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.connect(TextFileDocumentProvider.java:478)
at org.eclipse.dltk.internal.ui.editor.SourceModuleDocumentProvider.connect(SourceModuleDocumentProvider.java:1484)
at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4134)
at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:203)
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1413)
at org.eclipse.ui.editors.text.TextEditor.doSetInput(TextEditor.java:166)
at org.eclipse.wst.sse.ui.StructuredTextEditor.doSetInput(StructuredTextEditor.java:1712)
at org.eclipse.php.internal.ui.editor.PHPStructuredEditor.doSetInput(PHPStructuredEditor.java:2208)
at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3115)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2579)
at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3133)
at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3160)
at org.eclipse.wst.sse.ui.StructuredTextEditor.init(StructuredTextEditor.java:2321)
at org.eclipse.php.internal.ui.editor.PHPStructuredEditor.init(PHPStructuredEditor.java:1151)
at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:798)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:644)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:462)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1256)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1209)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1608)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:499)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:485)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112)
at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63)
at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225)
at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213)
at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:778)
at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:677)
at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:638)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2854)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2762)
at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2754)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2705)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2701)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2685)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2676)
at org.eclipse.dltk.internal.ui.editor.EditorUtility.openInEditor(EditorUtility.java:405)
at org.eclipse.dltk.internal.ui.editor.EditorUtility.openInEditor(EditorUtility.java:166)
at org.eclipse.dltk.internal.ui.actions.OpenActionUtil.open(OpenActionUtil.java:45)
at org.eclipse.dltk.ui.actions.OpenAction.run(OpenAction.java:259)
at org.eclipse.dltk.ui.actions.OpenAction.run(OpenAction.java:240)
at org.eclipse.dltk.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:259)
at org.eclipse.dltk.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:235)
at org.eclipse.dltk.internal.ui.scriptview.ScriptExplorerActionGroup.handleOpen(ScriptExplorerActionGroup.java:304)
at org.eclipse.php.internal.ui.explorer.PHPExplorerActionGroup.handleOpen(PHPExplorerActionGroup.java:103)
at org.eclipse.dltk.internal.ui.scriptview.ScriptExplorerPart$4.open(ScriptExplorerPart.java:667)
at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:842)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.runtime.Platform.run(Platform.java:888)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:840)
at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1101)
at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1205)
at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
I've had the same problem too when upgrading DLTK to 2.0 M5.
Switching back to M4 seems to have solved the problem for me:
Download the DLTK 2.0 M4 plugin archive:
http://download.eclipse.org/technology/dltk/downloads/drops/R2.0/S-2.0M4-200912141114/
(Core Frameworks line)
Extract the zip archive
Locate your eclipse plugin directory (on my Ubuntu, in /.eclipse/org.eclipse.platform_3.5.0_155965261/plugins).
Make sure eclipse is closed. Erase or rename the faulty jar file:
$ mv org.eclipse.dltk.core_2.0.0.v20100212-1450.jar org.eclipse.dltk.core_2.0.0.v20100212-1450.jar.bak
copy org.eclipse.dltk.core_2.0.0.v20100201-1709.jar from the archive version to your plugin directory.
rename the copied file to the M5 version one:
$ mv org.eclipse.dltk.core_2.0.0.v20100201-1709.jar org.eclipse.dltk.core_2.0.0.v20100212-1450.jar
Hope it helps.
For those of you coming to this older post, I just wanted to let you know that there is another option that brings the PHP intelligence of VS Code to Eclipse Neon and later. It's a plug-in called CodeMix and provides support for PHP in addition to many other dynamic languages through the many available extensions. You can find out more about it on the CodeMix page, or install it into Eclipse directly from the Eclipse marketplace.
Sadly, following the latest updates to the DLTK, Benoit's recipe no longer works for me. However, downloading the nightly build of PDT did. Here's what you do:
Download the nightly PDP build: N201003021518/pdt-Update-N201003021518.zip
(by the time you follow this recipe, the latest stable build might have moved on, so check under https://build.eclipse.org/hudson/view/Athena%20CBI/job/cbi-pdt-2.2-helios/lastStableBuild/ - expand the "Build Artifacts" link until you find the zip file.)
Create a local update site:
mkdir /tmp/eclipse
cd /tmp/eclipse_pdt
unzip ~/Downloads/pdt-Update-N201003021518.zip
In Eclipse, select Help -> Install New Software -> Work With: Add -> Local… -> /tmp/eclipse_pdt
(Click OK and give it a name such as "PDT Nightly Build")
In the main window, select the features you want to install (I selected all but PDT Mylyn Feature)
Next
Finish
When asked whether to accept “unsigned” content, say OK. Restart Eclipse when prompted.
I had the same problem. I started of by downloading "Eclipse Classic 3.5.2", deciding it was time to bid farewell to 3.3. The first plugin I installed was the PDT 2.1, which left me wading through a series of errors, including:
"Editor could not be initialized"
"Semantic Highlighting Job"
"Processing Dirty Regions"
Benoit's jar fix sorted out the editer initilisation problem, but I was still left hunting for fixes for the other errors. In the end I decided to back out the upgrade by simply deleting the 3.5.2 folder (thank you Eclipse developers for not filling my registry with junk), and downloaded the "Eclipse for PHP Developers" package, as it includes PDT. So far everything appears to be working.

Categories