I'm having a strange problem with my vagrant setup: changing characters in a file and saving it doesn't reflect the change in the vm. But if I add/remove some characters or add in a few blank links, everything works fine.
I have already checked if I have opcache enabled on my PHP5.5 and "php -i | grep opcache" get any result ... so I imagine it's no.
Already tested too another vagrant (1.7.2) version, same result.
My configuration is :
Windows 7 Pro
Vagrant 1.6.3 with plugin WinNFSd
VirtualBox 4.3.12
Centos6.5 Box
PHP 5.5.19
Apache 2.4.10
PhpStorm 8 (but problem is same with SublimeText 3 and Notepad++)
Here is a video of a test from me for show you the problem :
https://www.dropbox.com/s/k70fiwfw6mopjs7/2015-03-24%2020-47-07.mp4?dl=0
Two weeks I work on this problem, it will make me crazy ...
I already tried Rsync and Samba or default vagrant synch folder but it doesn't meet my needs.
I really appreciate your help guys!
The problem on sublime was atomic_save setting being true. Not sure if there is an equivalent setting for PHPStorm/Notepad++
https://github.com/mitchellh/vagrant/issues/3888
Related
I am taking a Udemy class for WordPress. I can create a function just fine. However, when I started using the variables and array it will not work. I get a message saying there is no "php.validate.executablePath" and "php.executablePath" via settings.json.
So I downloaded the zip file of PHP 7.3 (7.3.17) VC15 x64 Non Thread Safe and extracted it to C:\php7.3. I then added the path to the settings.json: "php.validate.executablePath": "C:\php7.3\php.exe", "php.executablePath": "C:\php7.3\php.exe"
I then restarted my VSC and nothing happened. I even restarted my computer. The notification never popped up again but I still cannot run PHP. In replace of the \, I used one \, then one /, then two / but it did not change anything. I looked this issue up - found others who had the same issue - and have not found anything that has worked for me so far.
I also tried downloading the xampp but there was an issue at port 443. That's when I downloaded the PHP file directly and uninstalled xampp.
EDIT: Do I have to have something like xampp or wamp to execute the PHP? If so, I would just need to figure out how to fix that error.
Here is a screenshot of the code I used: http://prntscr.com/sahb1f
Here is a screenshot of the settings.json: http://prntscr.com/sahbk0
I am on Windows 10 x64. A tool extension for VSC costs money, which I do not want to spend.
Any help?
Thanks!
You are missing the echo in front of the $names[0] array element access.
change your line to this <p>Hi, my name is <?php echo $names[0]; ?></p> and it should work however your error to do with executablePath might be because of something else.
I have MAMP & MAMP PRO. MAMP is working okay, this can successfully start Apache and MySQL and performs normally. MAMP PRO will refuse to start MySQL. I have tried the following setting:
innodb_recovery_force = 1
This was not effective, even when set to level 6. I've tried deleting the two log files contained within the MySQL DB folder. This was also not successful.
I do not care about the databases, I want a fresh clean start. However MAMP PRO refuses to work.
Below is the error log out put:
2017-11-24 20:52:31 10804 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace macs2014_internal/btcontentlocal uses space ID: 358 at filepath: .\macs2014_internal\btcontentlocal.ibd. Cannot open tablespace tripeasi_whitelabel_mobile/authtypeconcretecookiemap which uses space ID: 358 at filepath: .\tripeasi_whitelabel_mobile\authtypeconcretecookiemap.ibd
InnoDB: Error: could not open single-table tablespace file .\tripeasi_whitelabel_mobile\authtypeconcretecookiemap.ibd
I have tried completely reinstalling MAMP multiple times however it still appears to be looking for these databases which no longer exist. As I said before, I do not care about saving data.
Do you have other MySQL processes or Server running at the same time that you are trying to start the MySQL server on MAMP? (this can be checked using te "top" command in terminal)
When I first installed MAMP Pro, MySQL Server (MAMP) could not start, that because a MySQL server was already running. (configured to start automatically with the OS)
If so, you can kill all MySQL processes (don't forget to stop the MAMP servers before) using following command in the terminal: sudo killall -9 mysqld.
An other thing you can try, is:
Quit MAMP
In the finder go to Library/Application Support/appsolute/MAMP PRO/db/mysql56/
Delete the log files
Restart MAMP
I hope that your problem is solved after trying one of those things.
Kind regards,
Dakta
So, the folder on windows located in your public documents for MAMP PRO. This is why none of my settings were working correctly and why these phantom databases were appearing.
I went to:
C:\Users\Public\Documents\Appsolute\MAMPPRO\db
and deleted the databases from there, restarted my server and voila - it works. This is a very confusing place to put the settings for MAMP PRO and I don't really understand why they are there and not where you'd expect them to be in your program files.
We have a Local-Server that runs Ubuntu 15 LTS (Virtual-Host-System).
We use VirtualBox as VM-Software.
We have many Virtualservers in Virtualbox (Virtual-Guest-System).
All of this VM-Servers are Ubuntu-Server 16 LTS (with PHP (5.3,5.6,7), Apache, and so on).
For the different Php-Versions we use:
https://launchpad.net/~ondrej/+archive/ubuntu/php/
Each Server has only one Php-Version running.
Php executed by apache mod = a2enmod php5.6
On the Virtual-Host-System we have ONE shared Folder (/media/daten/server) with all Web-Server-Folders (for the different VM-Guest-Servers).
Each VM-Guest-Server has this folder including as (/media/sf_server) -> with VM-Guest-Additions
Our Employments using Windows (7 and 10). All Employments including the Serverfolder as Networkfolder. If an Employment copies and pastes files to the Server-Directory all the files get automatic USER: nobody | Group: nogroup.
This is the Reason why we config Apache as USER: nobody | Group: nogroup. (/etc/apache2/envvars). Thats works fine. Apache can run/write/delete all files without any Problems.
But when we use a phpscript for upload/upgrade (upload, wordpress, typo3) then these uploaded-files get User: Root | Group: User
echo exec('whoami'); = nobody |
echo get_current_user(); = root
Ftp is not running on the VM's.
All Scripts started from Webbrowser/Php/Apache2.
Example 1:
Default Wordpress Updatescript can't create a wp-config-sample.php
(updates without ftp - FS_METHOD: direct)
Example 2:
Typo3 upload an image:
Uploaded file could not be moved! Write-permission problem in "fileadmin/img/"?
How can we run all PHP-Tasks (Upload, etc) as USER: nobody | Group: nogroup???
Or what is the best/secure way to make this solution working??
thanks a lot
When using TYPO3, you can configure which group should be set for created or uploaded files. You have to set the following configuration variable.
$GLOBALS['TYPO3_CONF_VARS']['BE']['createGroup'] = 'nogroup';
However, this only works for uploads that are actually handled by the TYPO3 api. Have a look at
\TYPO3\CMS\Core\Utility\GeneralUtility::upload_copy_move()
to get an impression on how TYPO3 handles file uploads.
EasyPHP don't start.
When clicking on start server or start DB nothing happens.
No error logs whatsoever....
I had a lot of trouble to make this all work.
First I had to get rid of all old Easyphp versions!
Make sure you have the right runtimes installed, both x86 & x64 if you have a 64bit system!
I had to shutdown Malwarebytes Anti-Malware, EasyPHP wont start if this is running, you even can get a Riskware message from it!
After all this I could get EasyPHP 16.1 to start, now I needed to activate Curl.
Follow all instructions I could find here.
Copied libeay32.dll, libsasl.dll, ssleay32.dll from php dir to c:\windows\system, c:\windows\system32 and even to c:\windows\sysWOW64.
removed the ';' from the 'extension=php_curl.dll' line in all three ini files in both php dirs.
But the trick that finally make Curl worked for me was to add the path to each php directory to the global 'Path' variable via (rightclick startmenu)System->advancedsettings->globalvars, dubbelclick on 'Path' and add the complete path to your php dir, one line for each php dir!
Maybe not every step is needed for you but for me this finally worked. If you still have trouble then maybe there is some antimalware or antivirus program running what for some reason stops EasyPHP from running!.
There are so many questions about this so I decided to put this in here as it is.
I installed wamp server 2.2 with php 5.3.10 and apache 2.2.21. But when I want to execute some symfony command the response from my Windows 7 Home Premium is:
php -> CLI has stopped working
I had this error for a long time. It turned out I was on a slightly older version of Xdebug (php_xdebug-2.2.0-5.4-vc9.dll).
I replaced that file with "php_xdebug-2.2.2-5.4-vc9.dll" and it magically started working immediately.
I'm on wamp, and I updated both php.ini files (one is for cli, one for normal use) with the latest filename.
"zend_extension = c:\wamp\bin\php\php5.4.3\ext\php_xdebug-2.2.2-5.4-vc9.dll"
Then dropped the new file into the php ext folder and instant success. Hope this helps.