Wampserver sql dump - wampserver

I know this has been asked many times before. But I am getting a:
The mbstring extension is missing. Please check your PHP configuration.
First off I am using WanmpServer3.0.0 64 on a Win7 64 VM.
-I tried editing the php.ini file to give an absolute path to no avail
-made sure that the extension=phpmbstring.dll is uncommented
Another problem is that i noticed that whenever i load a php page it has fatal errors for my mysql commands.
When I use the wampmanager from the tray to open the php.ini file instead of through windows explorer I get:
Cannot find the C:\wamp64\bin\apache\apache2.4.17\bin\php.ini file. Do you want to create a new file?
So now I'm thinking something has gone drastically wrong and would like to uninstall/reinstall Wamp. I attempt to use the mysql console to save my databases before deleting the wamp directory. However when I run a mysqldump -all-databases > all_database.sql it just drops down to an empty line and nothing happens.
mysql console screenshot
If I browse around in the C:\wamp64 directory i find the "data" directory within \bin\mysql where it seems all of my databases reside but not in readable form.
Is there anyway to save my databases??
BTW: This whole setup was working fine previously, so I'm not sure what caused the crash and burn.

Was able to figure it out.
I opened the php.ini file from the PHP bin folder and copied all of the contents into a new php.ini file to reside in the apache bin file.
Now everything works again.
I'm not sure this is how wampserver is supposed to work or what changed to start the problem but it's pseudo-resolved now.

Related

Why isn't Drupal recognizing my new twig files?

I want Drupal to recognize my new twig files. Trying to clear the cache with the
drush cr
command gives me a success message. So does manually clicking on "Flush all caches" from the menu. But my new twig files are not being recognized. I was able to clear caches for weeks perfectly fine and it recognized twig files until now. I am using ddev to run my server. I have stopped and restarted the server. Restarted docker. I am using development.services.yml, not services.yml, which from my research I believe is correct. I am also exporting my settings.local.php from my settings.php.
I would like for Drupal to recognize my twig files. Neither clearing the cache by command line with
or manually works. No part of the configuration was changed it just stopped working suddenly.
Most probably, it’s related with permissions.
Resetting permissions, perhaps like described in
After drupal update site throws HTTP ERROR 500
might work,

Cannot open Zip file after creation with tar.exe

I'm trying to use Tar.exe in a Windows 10 command prompt to zip an entire folder and its subdirectories into a .zip file.
After reading different answers on here and this online help, so far I have the following:
tar.exe -cvzf "C:\Users\Me\Desktop\Output.zip" "C:\Users\Me\Desktop\MyFolder"
This appears to work within the command prompt (no errors and all files get listed). The .zip file gets created on the Desktop but when I try to open it by double-clicking on it, I get this error:
Windows cannot open the folder.
The Compressed (zipped) Folder 'C:\Users\Me\Desktop\MyFolder' is invalid.
I dragged the file into Notepad to see if there were any headers that might uncover the problem, but it looks like some kind of oriental affair...!
Can anyone advise what I've done wrong here please?
After much deliberation, I finally opted to use 7-Zip:
"C:\Program Files\7-Zip\7z.exe" a -tzip "C:\Users\Me\Desktop\MyFolder.zip" "C:\Users\Me\Desktop\MyFolder"
The destination machine without 7-Zip could still read the file, but more importantly, the speed of the zip creation was magnitudes faster than Windows's UI or the Tar function.

The command line statement php artisan tinker isn't working

I am using laravel 5.1 and I am following a tutorial that I've followed before without any issues. But today when I ran
php artisan tinker
I got the following error
PsySH history file found at '/home/vagrant/.config/psysh_history'. Please delete it or move it to '/home/vagrant/.config/psysh/psysh_history'.
I have never seen this before and I have been looking for it but dont know where to locate it so can either delete it or remove it. Also another question I have is should I delete it or move it? I don't want to do something that inadvertantly crashes my app. Thanks in advance
So you don't have to answer and accept your own question:
It looks like pshsy_history is a history file for the php debugger psysh, and your php command wants it in a different location from where it is. I'm guessing it was created the first time you followed the tutorial.
I'm thinking it's safe to delete with rm /home/vagrant/.config/psysh_history since your php command seems like it's going to create a new one.
If you want to be on the safe side then to move it like the error message says with mv /home/vagrant/.config/psysh_history /home/vagrant/.config/psysh/psysh_history
If you want to double check the contents of the file before doing either, try head /home/vagrant/.config/psysh_history.
find "psysh_history" manually in "home" folder and than move or remove file
Note: Its a hidden file
For future viewers:
I had a similar issue today. The only difference was I was not running my project on vagrant instead of MAMP.
Few different things I had to do besides what are mentioned above were :
Moved the folder ../.config/psysh/psysh_history and did following :
1) I had to shut down the MAMP
2) Restart terminal
3) php artisan tinker
Note: I was not able to run tinker until I restarted MAMP and terminal.
Faced the same issue but
I didn't find psysh_history file in .config folder.
But because it was asking to move the psysh_history file to .config/psysh, so I just created a folder psysh inside .config folder and it works.

tests/**/*.coffee not matching root files on debian

I have a project which for its tests runs:
./node_modules/.bin/mocha tests/**/*.coffee -r coffee-script/register -c
tests/ looks like this:
_helper.coffee
database-tests.coffee
routers/
index-router-tests.coffee
team-router-tests.coffee
On my windows dev machine it works fine running _helper.coffee first and then the rest of the files.
On my CI server running debian it only tries to run routers/* missing out anything in the root folder.
I am assuming that tests/**/*.coffee isnt right for unix?
Moving Comments to an Answer for others since it appears to have fixed your problem.
I have had the same problems on Windows where it is not returning the files in the same order that you see them listed on the drive. I have therefore used tests/*.coffee and then tests/**/*.coffee.
I found that Windows will retrieve the files in the order they were likely written to the hard drive, while a directory or other list will have them sorted for display. This seemed to be the problem I was encountering.
The parent directory ('tests') does not seem to be included when using tests/** which seams to mean directories under the tests folder, and does not include the tests folder itself.

How can I execute cocos2d-js html file?

I made a cocos2d-js project on OSX.
And I debuged it on WebStorm.
It worked well.
So I just clicked index.html file. but it didn't work. just black screen.
I put all files on the web server and tried again.
Web brower console said http://localhost:8080/html5/project.json 404 not found.
but the file was in same folder.
I want to execute it on local server and just click.
What should I do?
Go to the project directory, start new terminal.
Then: cocos run -p web
This will run your game for Web, as -p stands for platform
Also note, that sometimes you will need to clear the browser's cached images and files after changes that affect files or images.

Resources