Enable OPCache not working in WAMP - wamp

I tried to enable OPCache for Drupal 8.0.4 in WAMP 3 but it isn't working. So I googled and changed a few things in my php.ini file and here is what I changed:
opcache.enable=0
to
opcache.enable=1
and also
opcache.enable_cli=0
to
opcache.enable_cli=1
But still, the '!' mark appears near the PHP Extension. When I try to get the log it says :
Sorry,
The 'php_opcache' extension cannot be loaded by 'extension=php_opcache.dll' in php.ini. Must be loaded by 'zend_extension='.
Switch cancelled
Press ENTER to continue...
But in the PHP.ini file it says:
zend_extension ="C:/wamp/bin/php/php7.0.0/ext/php_opcache.dll"
What else should I do to enable OPCache?

Go to PHP configuration / php.ini file and add these two lines end of the page
zend_extension=php_opcache.dll
; Determines if Zend OPCache is enabled
opcache.enable=1
You can also increase the max execution time on php.ini configuration file.
max_execution_time=180
Hope it helps.

Related

Coldfusion Plugin In Sublime text

I just moved from ColdFusion Builder to Sublime Text 3 and now I want to add the ColdFusion plug-in into my Sublime. I have googled it and found one solution that says to add the "Package Control.sublime-package " file to the installation package folder and then restart Sublime.
I did this but am not able to find a "restart" option in Sublime. Due to this I am not getting any changes on my Sublime, regarding ColdFusion.
There is no restart button. Just close and re-open sublime.
edit:make sure you are opening the file as a coldfusion file. In the bottom-right corner of sublime, it says what file type is being considered. Changing this to CFML may be your solution.
edit2: removed some bad instructions that were confusing and incorrect
It may help someone else ...
Open the command palette ( CTRL + SHIFT + P on Windows, CMD + SHIFT + P on a Mac) and select Package Control: Install Package . Wait for the list to open and find the CFML entry (subtitled with this github repo github.com/jcberquist/sublimetext-cfml ), then select it to install. Restart Sublime Text 3.

VirtualBox Cannot register the hard disk already exists

I created a virtual disk file VM_1_Ubuntu.vdi. Then I moved it into another folder. I tried to update VM settings (right click on virtual machine -> settings -> Storage -> Controller SATA tab, VM_1_Ubuntu.vdi path). I wanted to set a new path.
It says
Cannot register the hard disk already exists
I found a solution
File -> Virtual Media Manager -> Removed existing images (note, I removed them only from the registry).
I followed these steps.
http://www.webdesignblog.asia/software/virtualbox-moving-vdi-file-re-linking-guest/#sthash.1QOHeiw5.dpbs
After that I could update the path in the VM settings.
It's possible to change the UUID on the VDI file using the command:
VBoxManage internalcommands sethduuid <file.vdi>
It seems this command assigns a new "random" UUID to the file. No much documentation on it, though.
Select File from Oracle VM VirtualBox Manager
Virtual Media Manager
Remove the file (highlighted yellow) from Hard disks tab.
Here is the solution for that
find the UUID of box
vboxmanage list hdds
then delete by
vboxmanage closemedium disk <uuid> --delete
If there is no possibility to remove or change path to a hard disc file using Virtual Media Manager (in my case) then:
Open '.vbox' and '.vbox-prev' (if exist) files in any text editor.
Edit 'location' attribute of the element 'HardDisk' to your path, for example: "d:/VM/VirtualBox/Win10/Win10.vmdk" (screenshot).
In some cases first your need to Release, then Remove and Re-add via Virtual Media Manager
I really appreciate the suggestions here. The Impaler's and Oleg's comments helped me to piece my solution together.
Use the VBoxManage CLI. There's a modifymedium command with a --setlocation option.
I suggest opening the VBox GUI (on VM VirtualBox Manager 6.0)
- select "Virtual Media Manager" (I used the File menu)
- select the "Information" button for the disk giving you this error
- copy the UUID
Note: I removed the controller from the "Storage" setting before the next step.
- open your command prompt and navigate to the location of the .vdi file
It's a good idea to type VBoxMange to see a list of options, but this is the command to run:
VBoxManage modifymedium [insert medium type here] [UUID] --setlocation [full path to .vdi file]
Finally, reattach the controller to any VM--preferably the one you'd like to fix.
1 - Open the files '.vbox' and '.vbox-prev' (if exist) files in any text editor and replace the first character of HardDisk uuid (take note to revert this change on step 6)
Example: nano /home/virtualbox/WindowsServer/WindowsServer.vbox
Change:
<HardDisks>
<HardDisk uuid="{3ebaa9b6-8318-4b81-b853-8f30dd278bdc}" location="/home/virtualbox/WindowsServer/WindowsServer.vdi" format="VDI" type="Normal"/>
To:
<HardDisks>
<HardDisk uuid="{2ebaa9b6-8318-4b81-b853-8f30dd278bdc}" location="/home/virtualbox/WindowsServer/WindowsServer.vdi" format="VDI" type="Normal"/>
2 - Reboot machine
4 - Stop Virtual Machine (if started)
5 - On terminal:
su vbox
cd /home/virtualbox/WindowsServer/
VBoxManage modifyhd WindowsServer.vdi --resize SIZE
exit
exit
change SIZE for a number in Megabytes, example 80000 (80GB)
6 - Open again the files '.vbox' and '.vbox-prev' (if exist) files in any text editor and replace the first character of HardDisk uuid whith the original value
Example: nano /home/virtualbox/WindowsServer/WindowsServer.vbox
Change:
<HardDisks>
<HardDisk uuid="{2ebaa9b6-8318-4b81-b853-8f30dd278bdc}" location="/home/virtualbox/WindowsServer/WindowsServer.vdi" format="VDI" type="Normal"/>
To:
<HardDisks>
<HardDisk uuid="{3ebaa9b6-8318-4b81-b853-8f30dd278bdc}" location="/home/virtualbox/WindowsServer/WindowsServer.vdi" format="VDI" type="Normal"/>
7 - Reboot machine
The solution that worked for me is as follows:
Make sure VirtualBox Manager is not running.
Back up the files ~\.VirtualBox\VirtualBox.xml and ~\.VirtualBox\VirtualBox.xml-prev.
Edit these files to modify the <HardDisks>...</HardDisks> section to remove the duplicate entry of <HardDisk />.
Now run VirtualBox Manager.
Example:
<HardDisks>
<HardDisk uuid="{38f266bd-0959-4caf-a0de-27ac9d52e3663}" location="~/VirtualBox VMs/VM1/box-disk001.vmdk" format="VMDK" type="Normal"/>
<HardDisk uuid="{a6708d79-7393-4d96-89da-2539f75c5465e}" location="~/VirtualBox VMs/VM2/box-disk001.vmdk" format="VMDK" type="Normal"/>
<HardDisk uuid="{bdce5d4e-9a1c-4f57-acfd-e2acfc8920552}" location="~/VirtualBox VMs/VM2/box-disk001.vmdk" format="VMDK" type="Normal"/>
</HardDisks>
Note in the above fragment that the last two entries refer to the same VM but have different uuid's. One of them is invalid and should be removed. Which one is invalid can be found out by hit and trial -- first remove the second entry and try; if it doesn't work, remove the third entry.
After struggling for many days finally found a solution that works perfectly.
Mac OS
open ~/Library folder (in your home directory) and delete (move to a safe place) the VirtulBox folder. This will remove all configurations and you can start the virtual box again!
Others
look for .virtualbox folder in your home directory. Remove it and open VirtualBox should solve your issue.
Cheers!!

wt: Document root was not set, or was set to the empty path.

I am new to wt(Web Toolkit/witty). When I try to execute hello-world example program source code , I got the following exception "Document root was not set, or was set to the empty path. Use --docroot to set the HTML root directory." I set the command arguments as "--http-address=0.0.0.0 --http-port=8080 --deploy-path=/hello --docroot=.". I capture argument values as "Arg C = 1 and Arg V = 0000023C3B649E30" Please help.
I'm not sure if you have got the solution. Just to help others.
here is the list of options which you need to give if you are tyring to run your wt web app from cli/terminal in linux.
./<your_web_app> --http-address=0.0.0.0 --http-port=8085 --deploy-path=/hello --docroot=.
now after go to your browser and open the new tab and give "http://localhost:8085/hello"
should give you your webpage which you are building
Below solution worked for me.
"If you are using Visual Studio you can add them by right clicking on your project, then going to Properties > Configuration Properties > Debugging > Command Arguments.
Open a web browser and go to http://localhost:8080/hello to test your application."
https://andres.jaimes.net/780/how-to-create-a-first-application-using-wt-witty/

Start WebStorm with files/tabs from last session

I want Webstorm to start with the files/tabs, which were open when I quit Webstorm the last time. Where do I find this setting? I'm using Webstorm 11.
Deleting the folder MYPROJECT/.idea solved my problem.
#LazyOne pointed out correctly, that WebStorm starts with the files from the last session by default. My configration files might have been corrupt because of a blue screen which occured yesterday.

Wamp: The configuration file contains a syntax error on line 24

How can I start the wamp server on windows 7 using wamp version 2.4?
Following is the error message I get:
The configuration file contains a syntax error on line 24:
[EParseError][config] section directive "ImageList" already specified.
Error:
The configuration file contains a syntax error on line 7;
[EParseError] No tray icon was specified. Please assign a tray icon by
using on the of the Tray icon directives in the [Config] section.
Caused by:
Computer abruptly shutting down while server is running
Fix:
• Go to the wamp/scripts folder
• Open console/cmd as admin
• run: php refresh.php
• Done!
Make sure you have php in your system environment settings
then go to the wamp/scripts folder
open console
run:
php refresh.php
answer from here solved my issue, referenced above info from this stack answer
ISSUE
You have a duplicate entry on C:\wamp\wampmanager.ini
ImageList=images_off.bmp or something like that.
FIX
Remove one of them (probably line 24)
It sounds like you have been playing with \wamp\wampmanager.tpl
Never play with wampmanager.tpl unless you have taken a copy first!
WAMPServer rebuilds \wamp\wampmanager.ini using a script that uses \wamp\wampmanager.tpl among other files as input, each time you start WAMPServer or when you use the wampmanager menus and click refresh.
So to fix your problem edit of wampmanager.tpl to remove the duplicated line and then do:
rightclick wampmanager icon -> refresh
Or just exit wampmanager and restart it.
to rebuild the \wamp\wampmanager.ini file
Take a backup of your Wampmanager.ini file in your wamp installation directory (in my case it is c:\Wamp64). Then rename it or move it to some other folder.
Get the wampmanager.ini from a new installation or any similar installation if you already have, then paste it in the same path. It will work like charm. This may change any of the settings you had earlier but it will make your wamp working without reinstalling it.
Wamp Manager folder
Wamp Manager configuration file in CMD prompt
It is interesting that this error shows up after initial install of the current version 3.2.6 found on aviatechno (without being able to tamper with any installed configuration file, the .ini in the installation is broken). It reports an error with line 27: WAMPMARIADBOFF.
[Services]
Name: APACHESERVICE
WAMPMARIADBOFFName: MARIADBSERVICE
WAMPMYSQLOFFName: MYSQLSERVICE
Use the new ini repair tool you can find on the aviatechno website
which corrects the lines in the ini file as:
[Services]
Name: wampapache
Name: wampmysqld
Name: wampmariadb
...
Action: service; Service: wampapache; ServiceAction: startresume; Flags: ignoreerrors
Action: service; Service: wampmysqld; ServiceAction: startresume; Flags: ignoreerrors
Action: service; Service: wampmariadb; ServiceAction: startresume; Flags: ignoreerrors
Only do this on new installs
Even after that wampserver does not start or does not start the services. To repair: stop the background process AeTrayMenu, head over to the folder c:\wamp64 removing its content and reinstall.
This did the trick for me.