I tried to run my Yii2 application on Localhost, XAMPP for PHP 5.6.32 and Windows 8 but I got this error:
How do I resolve this problem.
Thanks
The problem mostly occurs when you don't start the server/Xampp on local with administrative privilege. Try to start Xampp from the control panel if you are on windows.
Alternatively, you can use the option to disable the symlink by adding the assetManager setting under the components section in your config file (for yii-advance app it can be the common/config/main.php or the config/web.php in the yii-basic app)
'components'=>[
'assetManager' => [
'linkAssets' => false
],
]
UPDATE
There could be a possibility that you get the above error while running any of the commands on the terminal like while contributing into the yii2 repo you have to run the command php build/build dev/app basic <fork> during which it creates a symlink and throws the above error, and after trying both of the above you still dont get it to work in that case you might have to use the default command prompt for the windows by starting it as an administrator and then run the above command.
In case you are in development mode I recommend you to leave the 'linkAssets' parameter set to 'true' so you don't have to delete the assets every time you make a change. (In production it is recommended to set it to 'false').
To solve your problem run xampp as administrator:
To run the control panel as administrator, you can right click on the shortcut icon (Start > XAMPP > XAMPP Control Panel) and choose the option "More > Run as administrator". I leave you a link where it is better explained: Execute xampp as admin
Related
I am using behat+mink. I wrote some features and am now running tests.
How can I enable xdebug to to stop on breakpoints in phpstorm when running behat tests ?
I have not tried this with Mink yet, but this is configuration that allows me to step through debugging of behat (with behat running on a remote server):
Configure your server with x-debug
Of note, since this is commandline, you need to edit the cli config under /etc/php5/cli/conf.d/20-xdebug.ini.
Set remote_host to the ip of the computer you're using PHPSTORM from
Set autostart = 1
Disable connect_back, you will initiate debugging from the server so there is nothign to connect back to
You can also do this without editing your ini by exporting values as env variables, just remember to do this each time you start a new shell (or add to your .bash_profile file):
export XDEBUG_CONFIG="remote_host=<YOUR IP>"
Configure PHPStorm's Debugger
It seems by default, PHPStorm doesn't understand remote-cli scripts, so we need to add a configuration that tells it to expect a CLI script to trigger xdebug
Open the Run Menu and select "Edit Configurations"
Click the Green "+" to to add a new configuration and select "PHP Remote Debug"
Name the Configuration (E.G. MyServer-Behat)
Under the Servers: menu, select your remote server.
If you haven't configured your remote server yet, then do this by clicking the "..." button on the right
Click the Green "+" to add a server configuration. Give it a name (E.G. MyServer) and fill in it's address under Host
Configure it's Path Mappings. This is important if the path to your source files is different on your PHPStorm computer from your server. You can see in my example that i'm relating my local checkout (~/Work/Symfony/) to my server install (/var/www/). I specifically added mappings for src, bin, web, app, and vendor by clicking in the space to the right under "Absolute path on the server" and typing in the path. I had issues just mapping the root's, so I had to add these paths to get my debugger to work.
Debug!
Once that is setup, select your configuration from the drop down in the debugging tool bar and click the bug icon (you can also use the Run menu) to start the debugger listening. This is similar to the default Telephone Button (circled in yellow), but it tells PHPStorm to use your new configuration.
Now simply run behat like you normally would from your server and your debugger should connect and stop on any breakpoints you've placed.
If you're having doubts about if it's working or not, try toggling the "Break on First Line" in the Run menu, as this should make the debugger break immediately when you run behat (in the bin/behat file)
I have an application in Openshift free plan with only one gear. I want to change it to scalabe and take usage of all of 3 free gears.
I read this blog post from openshift and I found that there is a way to do it. I should clone my current application to a new one as a scalable which will use the 2 remaining gears and then I will delete the original application. Thus, the new one will have 3 free gears.
The way that blog suggest is: rhc create-app <clone> --from-app <existing> --scaling
I have the following error: invalid option --from-app
Update
After running the command gem update rhc, I don't have the error above but...A new application with the given name has created with the same starting package (Python 2.7) just like the existing one, but all the files are missing. It actually create a blank application and not a clone of the existing.
Update 2
Here is the structure of the folder:
-.git
-.openshift
-wsgi
---static
---views
---application
---main.py
-requirements.txt
-setup.py
From what we've talked on IRC, your problem was around missing SSH configuration on Windows machine:
Creating application xxx ... done
Waiting for your DNS name to be available ...done
Setting deployment configuration ... done
No system SSH available. Please use the --ssh option to specify the path to your SSH executable, or install SSH.
I've double checked it, and it appears to be working without any problem.
The only requirement is to have the latest rhc client and putty or any other
SSH client. I'd recommend going through this tutorial once again and double-check everything to make sure everything is working properly.
Make sure you are using the newest version of the rhc gem with "gem update rhc" to make sure that you have access to that feature from the command line.
The --from-app will essentially do a 'rhc snapshot save & snapshot restore` (amoung other things) as you can see here from the source:
if from_app
say "Setting deployment configuration ... "
rest_app.configure({:auto_deploy => from_app.auto_deploy, :keep_deployments => from_app.keep_deployments , :deployment_branch => from_app.deployment_branch, :deployment_type => from_app.deployment_type})
success 'done'
snapshot_filename = temporary_snapshot_filename(from_app.name)
save_snapshot(from_app, snapshot_filename)
restore_snapshot(rest_app, snapshot_filename)
File.delete(snapshot_filename) if File.exist?(snapshot_filename)
paragraph { warn "The application '#{from_app.name}' has aliases set which were not copied. Please configure the aliases of your new application manually." } unless from_app.aliases.empty?
end
However this will not copy over anything in your $OPENSHIFT_DATA_DIR directory so if you're storing files there, you'll need to copy them over manually.
I am trying to install and run the nodogsplash, I have installed it on my TP-LINK MR3020 Router but not able to configure it I follwed this link for installation
and enabled nodogsplash service. but when I restart my router, my Wifi is not enabled and thus stuck, tried twice the same but no success.
can anyone help me with detail how to of running nodogsplash on MR3020.
Thanks in advance!
I had successful installing nodogsplash on TP-LINK MR3020 & TL-1043ND V2.1
For MR3020, the first thing is make sure your MR3020 is able to connect to internet, I'm follow this link to setup the internet connection.
Next is to install the nodogsplash, enter the following command into your SSH window:
opkg update
opkg install nodogsplash
starting http server
/etc/init.d/uhttpd enable
/etc/init.d/uhttpd start
Log in to Luci web interface to make sure the nodogsplash is started.
Under System->Startup
Look for nodogsplash
It must show Enable under "Enable/Disable" column
Note:
I didn't make any changes to /etc/nodogsplash/nodogsplash.conf. However you may want to set the GatewayInterface to the interface on your router. For my case, I'm using the default value as shown below:
GatewayInterface br-lan
In previous versions of Eclipse I have been able to open a view that presented a serial terminal/console.
How do I do this in Eclipse Juno?
I have a "Terminals" view open and it has text that says:
To open a terminal, right-click the Terminal subsystem under the target. Then select 'Launch Terminal' from the context menu.
I really have no idea what this is talking about and I've been using Eclipse for several years now!
Can someone shed some light on this?
EDIT:
I've discovered that the "Terminal Subsystem under the target", refers to the "Remote Systems" view. I can't find any options for a serial terminal though.
To use a serial terminal in Eclipse Juno.
1: Install the software for serial terminals:
Navigate to: Help -> Install New Software...
Dropdown list for Work with: to say Juno - http://download.eclipse.org/releases/juno
Select: Mobile and Device Development, especially Target Management Terminal which is "An ANSI (vt102) compatible Terminal including plug-ins for Serial, SSH and Telnet connections."
Click Next and anything else to finish the install ...
2: Open the view
Navigate to: Window -> Show View -> Other ... -> Terminal -> Terminal (NOTE: singular Terminal, not plural Terminals)
3: Open a terminal
The rest should be fairly obvious as the view contains icons to Connect, Disconnect, Settings, etc which are related to Serial, SSH and Telnet connections.
Under remote systems, there is "Local" and the remote connection, in my case 192.168.1.12. Click on the "+" to open subfolders. You should see the project you are working on. Right click on it. Select "Launch Terminal", the third one from the bottom.
Load up the Remote Systems perspective to connect to the server. There you will be able to open an SSH terminal.
There is an Incubator project called Local Terminal. You can install it from the Eclipse update site: http://download.eclipse.org/releases/indigo/ under General Purpose Tools->Local Terminal
It says that port 3306 might be busy - i have changed it (Settings>Components Settings) but just nothing?
VertrigoServ → MySQL database server
does not work correctly. Check whether
other applications use the important
port (3306) and terminate them.
Moreover, check firewall settings and
correctness the configuration files.
I was having the similar problem and I have tried it ... but it didn't work for me so I have found another solution ...
In Config files you will find my.ini ... open it and you will find "port = 3306" its on line 4th in my case ... change it to something like "port = 3307" that's what I did and restart.
If it still wont work then go to
"Settings -> Program Settings"
and click "Return to default settings" and click "Save settings and restart server"
after server restarts
again go to "Settings -> Program Settings"
and enable or tick "Run server as service" and "Automatically start servers" in miscellaneous tab on left top of the panel ...
and later always "run as administrator" ...
I forgot to mention that I am using Windows 7 ...
Try to run as administrator .... problem solved!
I found another problem related to this. My installation directory was:
C:\dev\tools\VertrigoServ2_35\Mysql
and watching the event viewer of Windows I saw:
Can't create test file C:\dev ools\VertrigoServ2_35\Mysql\data\IURESTI.lower-test"
To solve the problem I replaced all \\ with \\\\ in:
basedir=C:\\\\dev\\\\tools\\\\VertrigoServ2_35\\\\Mysql\\\\
datadir=C:\\\\dev\\\\tools\\\\VertrigoServ2_35\\Mysql\\data\\\\
inside the file my.ini.
Try in command prompt
telnet localhost 3306
what does it return back to you?