Netbeans and Xampp - php

I installed netbeans with php plugin.I also installed XAMP.My problem is how to configure /opt/lampp/htdocs/ to my netbeans application so that I can debug and run that from the application.Problem is when I try to make a project inside from netbeans it does not allow me to create files on that localhost.I guess netbeans doesn't have write access to the file system. What to do?any help??

Open your UNIX Terminal
Run the sudo chmod 777 /opt/lampp/htdocs command and give sudo your password when prompted
Your htdocs directory should now be rewritable.

You could set up a virtual host to point to your project directory which needs to reside in a directory that is writable. Here's a link to a tutorial for setting up a virtual host using XAMP:
Setting Up Virtual Hosts for XAMPP

Related

xampp-vm on mac cannot found the '/opt/lampp' directory after mounted this in stack manager

When I installed the 'New XAMPP with PHP 7.2.2 & 7.1.14' and followed steps in this tutorial XAMPP-VM for Mac - tell us what you think
.At this time I can see the phpmyadmin at my localhost 8080 port, however, when try to change my working directory to the lampp. I got the err no such directory in /opt? Can anyone help?
xampp lampp mount
can not found /opt/lampp
but the lampp file do existed in shared
Like jayson said, clicking the button "Open Terminal" pops up a terminal that connects to the XAMPP-VM with SSH.
The folder "/opt/lampp" you are looking for is "inside" the VM, not in Mac.
Image:
open the xampp application -> general. select the open terminal button
You can mount it yourself (replace with your local IP):
hatem#Mac:/opt$ sudo mkdir lampp
hatem#Mac:/opt$ sudo mount -t nfs -o resvport,rw 192.168.64.2:/opt/lampp /opt/lampp
Then ls and you will find the entire lampp from the VM mounted locally.

Yii2 unable to write to assets folder

I have just installed a fresh copy of Yii2 advanced and am having trouble getting the style sheets to load. The error seems to be that Yii (or webserver) cannot create path /var/www/frontend/web/assets/1ecfb338/css despite doing so in the same http request that it errors. Even after reinforcing file permissions of 777 from without and outside the VM, Yii doesn't seem to make further attempts to write the stylesheet.
If I just refresh the page loads without error but the stylesheet bootstrap.css has not been created in the directory.
This is most frustrating. Does anyone have any ideas?
If it matters I am running Yii in a Vagrant VM with Virtualbox. Debian is the VM OS and Ubuntu is the host.
This is quite strange at not experienced this before. I was able to correct this by changing the mode to 777 as the super user from outside the virtual machine. From doing the same thing inside the virtual machine made no difference.
I have worked on many projects before with this kind of setup but not had this before. Software that I'm using that may be responsible is:
Host machine:
Ubuntu 14.04
Vagrant 1.7.4
Virtualbox 4.3.30
Virtual machine:
Debian Jessie
Nginx 1.6.2
PHP 5.6.14
Edit: I found that I had defined the sync folder incorrectly. I had to change to rule this this:
config.vm.synced_folder "./", "/var/www", id: "vagrant-root", :group=>'www-data', :mount_options=>['dmode=775,fmode=775']
You just give permission for particular directory like:
sudo chmod -R 777 /var/www/frontend/web/assets
The solution for me was adding
sed -i 's/www-data/vagrant/g' /etc/apache2/envvars
to the Vagrantfile like written here
Vagrant file_put_contents permission denied

Why can't PHPMyAdmin write to my config directory on my AWS Ubuntu 12.04 LTS instance?

I know that this is a very common question to find asked, but I'm having serious difficulty with this on my AWS Ubuntu 12.04 instance.
I installed PHPMyAdmin using apt-get with the command sudo apt-get install phpmyadmin and it installed just fine. I can use PHPMyAdmin as it is on the instance.
I'm trying to generate a config file using the setup wizard, and I followed the steps as documented on the PHPMyAdmin website to set that up. I created the config directory in /usr/share/phpmyadmin and gave it world write access using sudo chmod 777 config. Despite all of this, PHPMyAdmin still tells me that my config directory is not writable.
I then tried to create a config directory in /etc/phpmyadmin which also had world write access and I'm still not having any luck!
Can anyone please tell me if I'm missing something here? I don't know what else I can try to get this working.
I found it!
My config directory is actually /var/lib/phpmyadmin.
I found this from the index.lib.php file in /usr/share/phpmyadmin/setup/lib. There's a function in there called check_config_rw() which checks the Config directory based on the currently used config.inc.php file. Changing the permissions on this folder and its contents to make it www-data writable solved my problem!

Lamp Server 403 Forbidden

Hi I just installed ubuntu alongside my Win 7 and I have been using xampp and am very familiar with it, but I just installed lamp and am using the apache2, php, and mysql from terminal and I copied a web folder over from my xampp side and it is saying that I do not have permission to access that file.
I know that on my pc I had some htaccess files but on Ubuntu I am yet to figure out how to view those. Is this a product of those .htaccess files or something else?
That happens if you install WAMP/XAMMP on system partition.
so you copied the files form windows to linux?
sounds like a classic file permissions problem.
per default the www folder is in /var/www, so you can simply set the owner of this folder to the apache user which is called www-data, run this in terminal:
sudo chown -R www-data:www-data /var/www
but now you will no longer be able to write to those files yourself, because they are owned by www-data. checkout this answer for more details and how to get write access: https://askubuntu.com/a/51337
or you make it writeable for everyone (which is a bad idea): sudo chmod -R 777 /var/www
about editing .htaccess files:
I don't use linux with a graphical user interface, but you can edit them with the terminal editor of your choice, on ubuntu you have nano installed by default:
nano /var/www/.htaccess
or if you want a more advanced editor, I suggest vim https://help.ubuntu.com/community/VimHowto
vim /var/www/.htaccess

xampp development: creating project(folders and files) in htdocs folder

I've been using xampp to develop on windows with success but as recently I decided to make a change and start developing on Linux. I successfully installed xampp onto my linux machine. and the Apache sever is running "localhost". opt/lampp/htdocs is where Apache project resources are stored. the htdocs folder permission is restricting read and write, and i can't create folders and files to start my projects. I tried change permission for the folders but to no success.
How do i start developing on xampp severe and add files to /opt/lampp/htdocs
please advice ! ! !
cd /opt/lampp
sudo chmod 777 -R /opt/lampp/htdocs `
777 is the permission where you,group and other get all permission -R is any changes will affect in subdirectories and directories of subdirectories htdocs. where adding read=4;write=2 and execute=1 makes it 7.

Categories