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

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.

Related

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/

Launch a program at login without permissions (fedora 20)

I'm currently developing an application with QT 4.8 with a "Launch on login" option. My main problem currently is that I can't seem to find a proper way to make the program launch itself after login on Linux (Fedora 20 in my case).
My program should be able to run in the background without stopping fedora to launch.
I would also like to avoid having to ask for any sort of admin privilege since my application doesn't require any (except maybe for this option).
Finally found out about "home/.config/autostart/.desktop".
I'll have to create autostart if it's not created but from there I can chose to make or delete the file depending on what my user decided to do.
The .desktop file have to follow a particular syntax (which is not a problem for me)
[Desktop Entry]
Type=Application
Exec=</path/to/binary or command to execute>
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=<Name_to_be_displayed>
Comment=<optional comment>
In my case, I can just remove the "comment" line since just the name of the application should be enough for the user to recognize it.
You can Either keep your executable in side /etc/rc.d/rs or inside /etc/init.d folder, so that it can automatically start once device is up.
Hope this Helps.
Each user has a .bashrc file located in their home directory, you could append a command to run your application to the end of that.
That will run when only that user logs in (I think either with graphical or terminal session)
To run for all users, look at creating a systemd service if you dare, or append a line to the end of /etc/rc.local. You'll need to be root for that though.
EDIT: Don't forget to put an ampersand at the end of the command to run in background.

Child_info_fork error running code on cygwin [duplicate]

I recently reinstalled Cygwin on my computer in order to get access to several command line elements that I was missing. I have never had previous difficulty with Cygwin, but after this reinstallation, an error message continues to appear after (almost) each command entered. For instance:
-bash-4.1$ wc m1.txt
3 [main] bash 2216 child_info_fork::abort: data segment start: parent(0x26D000) != child(0x38D000)
-bash: fork: retry: Resource temporarily unavailable
2013930 4027950 74968256 m1.txt
Generally, the command still runs (as seen above), but not always. Occasionally, the 'error' message occurs several times in a row (the initial number "3" will then change to a "4" or "2", notably if I start a second Cygwin window.
Also, as soon as I start up Cygwin, I get the following message before the prompt:
3 [main] bash 6140 child_info_fork::abort: data segment start: parent(0x26D000) != child(0x36D000)
-bash: fork: retry: Resource temporarily unavailable
-bash: fork: Resource temporarily unavailable
-bash-4.1$
At the moment, I am debating whether to uninstall/reinstall Cygwin again or just live with the error messages, but I was curious if there might be an issue that I am unaware of.
(assuming Cygwin is installed at C:\Cygwin):
Open Task Manager and close any processes that look to be Cygwin related.
Open C:\Cygwin\bin in Windows Explorer
Verify that dash.exe, ash.exe, rebase.exe, and rebaseall exist in this folder
If any of them are missing, re-run Cygwin setup and select the dash, ash, and rebase packages
right-click your C:\Cygwin folder, uncheck Read-only (if its checked), and press OK.
When an error about not being able to switch some files comes up, select "Ignore All". Wait for this process to complete.
Browse to C:\Cygwin\bin in Windows Explorer
Right click dash.exe and click "Run as Administrator". A command Prompt should appear with nothing but a $
Type /usr/bin/rebaseall -v, hit enter, and wait for the process to complete.
If you get errors about Cygwin processes running, try Step 1 again. If that still doesn't work, Restart your computer into safe mode and try these steps again.
A commenter noted that, depending on your settings, you may have to type cd /usr/bin && ./rebaseall -v instead.
Try opening Cygwin again.
This process worked for me. I hope it works for you guys too.
Source: http://cygwin.wikia.com/wiki/Rebaseall
I would like to add the following to the above answers, as it is what I had to do after reinstalling Cygwin:
Navigate to the "/usr/bin" directory (usually, C:\cygwin\bin) and right click, Run as Administrator the file: dash.exe
Then, at the $ prompt type the following, hitting enter after each line:
cd /usr/bin/
/usr/bin/peflags * -d 1
/usr/bin/rebaseall -v
What it does is, it marks the dll's as "rebase-able," and then rebases them. You have to have peflags.exe in addition to the above files (in previous answers). You may have to restart windows after doing this and you will definitely need to make sure that there are no processes nor services belonging to cygwin running. (Use task manager, kill any related processes, and then under the services tab look for any service starting with CYG and stop it.)
After doing this, I was able to get cygwin to run without any errors about dll's being loaded to the wrong addresses aka fork errors, etc.
I hope that this helps others, as it was a pain to find.
SOURCE: http://www.cygwin.com/faq.html#faq.using.fixing-fork-failures
and the rebase README file.
To add on to other answers here, we ran into the same issue but could not run the rebase command from the ash or dash shell. However, when launching the command from the Windows cmd shell, the following worked.
cmd /c "C:\cygwin64\bin\ash.exe /usr/rebaseall -v"
-v is to get verbose output
I found another information here :
http://cygwin.com/ml/cygwin/2014-02/msg00531.html
You have to delete the database at
/etc/rebase.db* and do in a "ash" windows :
peflags * -d 1
rebaseall
It works for me on 2 servers.
I solved this problem by restarting my computer. Probably installed a driver update and kept using sleep instead of shutting down.
Experienced the same issue when loading Cygwin with cygiconv-2.dll forking and not loading successfully in the Cygwin terminal, but after turning off my AntiVirus (it was specifically Ad-aware), the issue resolved, and Cygwin worked properly.
In case you are using babun's Cygwin, after rebaseall, try launching Cygwin by executing .babun\cygwin\cygwin.bat in a Windows command prompt or Windows explorer.
This works for me (while launching babun's default console - mintty results in fork error).
I had the error on win10 and i was trying to rebase to c: before install.
then i saw that the installer was installing it instead to c:/Users/myuser
so i was coping all files from c:/Users/myuser to c:.badun
and then restart plus open badun.bat
not shure if this was wise its now duplicated XD... but then it worked again.
Rebaseing didn't help in my case. In addition to what other people suggested, I noticed that reducing the length of PATH environment variable fixed the issue for me (and for other people as well as can be seen from this answer).
This issue is intermittent in nature & I found this issue when there is network is too slow to connect to remote machine on AWS.... I have Shell script that runs through Gitbash shell & it connects to AWS EC2 instance with ssh..... Most of the time, it ran correctly but 2 out 100 times it get into this issue bash: fork: retry: Resource temporarily unavailable .... Killing the MSYS2 terminal from task manager helps to overcome with this issue....
Negative side is you need to run the scripts from the beginning...
I had the same issue on Windows 10 and the mobaxterm app (which uses cygwin) and I tried all of answers listed here however for me, the solution was to simply delete the "CryptoPro CSP" application.
I started facing this problem after upgrading to windows 10. As of now I do not see that any of the above method working.
What I am noticing is that if you start cygwin with admin right (right click and say "run as admin") then it works fine.
Or you open cmd as administrator and then launch cygwin from there, then also it runs fine.
Just reinstall cygwin and select TCL and activate EXPECT

Eclipse juno c++ debug error 193

This happened the first time I've tried debugging with Eclipse juno C++:
Error in final launch sequence
Failed to execute MI command:
-exec-run
Error message from debugger back end:
Error creating process <full path>... (error 193)
Running the program using "Run" instead of "Debug" works just fine but when I try debug I get this. I googled about a bit and found somewhere that I should remove any spaces from the directory; I did that but it still isn't working.
The version of eclipse I'm running is:
Eclipse IDE for C/C++ Developers
Version: Juno Service Release 1
Build id: 20120920-0800
Edit:
Problem is sorted! It was because I had forgot the space in my user account name. Because I couldn't be bothered to go through a load of mess changing the folder name in users I just moved my workspace folders straight to my C Drive so the path that it follows is now: C:\eclipse\WorkspaceC++
Thank you very much to john in the comments :)
From OP edit: Problem is sorted!
It was because I had forgot the space in my user account name.
Because I couldn't be bothered to go through a load of mess changing the folder name in users I just moved my workspace folders straight to my C Drive so the path that it follows is now: C:\eclipse\WorkspaceC++