I installed XAMPP and started apache service. then i created myprograms folder inside "htdocs" and make a php program (firstphp.php) but when i open localhost/myprograms/firstphp on a browser then it shows "object not found" 404 error.
it means that you XAMPP server is not running. You can run it by going to your start button and look for it on the previewed applications. You can also go to your XAMPP folder (default C:/xampp) the look for the xampp_start which is located below if ever your files are set in alphabetical order.
Related
I want to set up mailhog on my windows laptop.
I downloaded the executable added it to the path.when I'm using the URL localhost:8025, it works just fine, opens up mailhog,but I won't get any messages in the inbox, I think the problem is with mhsendmail, I edited the php.ini file so it is set to the mhsendmail folder where mhsendmail.exe is also I set smtp_port=1025,but it still won't work,what do I need to do ?
I use XAMPP to develop my website, my whole site, and in the httdocs folder of XAMPP, there is no backup.
1) When I try to launch XAMPP: I have an error. Here it is in more detail:
another instance seems to be running at PID 526
I thought about it and I wanted to recover my site first in the htdocs file of XAMPP, but when I go to the source files I can't find this file:
I'm totally lost, I don't know how to recover my site. Please, how to repair XAMPP or especially how to recover my website and my database?
The error is because you don't stop XAMPP application properly, so the old PID is still remains.
To solve the problem, quit XAMPP application, and go to folder:
~/.bitnami/stackman/machines/xampp/tmp
And delete machine.pid file inside.
Then start the XAMPP again.
I uninstalled xampp and installed a newer version with the latest 5.4 php on Windows. When i tried to install the new version of php, the old folder in C://xampp would delete. I deleted everything from that folder except memcached which I can't delete beacuse someone else is using it. So i installed the new xampp version in xampp54 folder.
When i installed the new xampp version, i get this errors for mysql
Expected Path: "c:\xampp54\apache\bin\httpd.exe" -k runservice
MySQL Service detected with wrong path
Change XAMPP MySQL and Control Panel settings or
Uninstall/disable the other service manually first
Found Path: C:\xampp\mysql\bin\mysqld.exe --defaults-file=c:\xampp\mysql\bin\my.ini mysql
Expected Path: c:\xampp54\mysql\bin\mysqld.exe --defaults-file=c:\xampp54\mysql\bin\my.ini mysql
When i try starting apache, i doesn't do anything. Anyone knows how to fix this?
Go to Task Manager Processes tab
search MySql and click
then click End task
After that, you can delete Xampp folder.
I found memcached in the services and disabled it and it all works. Lesson of the day: Install xampp in 'xampp' folder, not 'xampp_me' or 'myxampp' beacuse it seems that both apache and mysql rely on them being installed in 'xampp' folder.
Try this:
Stop the services: mysql and apache
Start > Run > Services.msc
Kill the process 'Xampp Controller' from the Task Manager
In my case, the services were stopped and removed automatically when I
uninstalled the Xampp. So, killing 'Xampp Controller' process worked for me.
To delete the C://xampp old folder we need to stop the mysql service. To stop it, go to start -> run -> type services.msc. Search for mysql & apache and right click & stop. Then you would be able to delete the C://xampp folder.
This is what worked for me: Use the command line (if on Windows) Enter this into the terminal:
rmdir /Q /S none-empty-dir
(e.g. C:\xampp)
See: https://www.windows-commandline.com/delete-directory-from-command-line/
This is worked
Go to resource monitor -> associated handle and search the folder you want to delete and end process
I have same issues with you. But this worked perfectly with me.
Go to task manager, look for details, and search for the items that denies for deleting the folder. (mine is the php) then end task. You can now delete the xampp folder.
I've read other questions regarding this topic. The listed solutions haven't worked.
Installed:
XAMPP 1.7.7
Netbeans 7.1.1
XDebug 2.1.4
phpinfo() shows that Xdebug is installed with all the correct parameters:
zend_extension = C:\xampp\php\ext\php_xdebug-2.1.4-5.3-vc9.dll
xdebug.remote_enable = on
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_port = 9000
However, when I start a Netbeans debug session, it cycles for awhile with no effect. When I stop it, I get the Info box informing me that "No connection from xdebug was detected with in nn seconds. The reasons could be that xdebug is not installed or not properly configured. (their emphasis).
As far as I can tell, I configured everything correctly, restarted the Apache server and it still doesn't work. I'm at a total loss on how to proceed. Any help is appreciated.
Can you believe it!? After spending literally HOURS researching this problem, I finally found the cause which I can only classify as a bug. Now, how do I report a bug? That's the next question.
Here's a summary:
create PHP project and setup NetBeans project site root to subfolder.
(In order to not register for Apache new test site for any new task I
put every new task into subfolder under my local test domain, e.g.
http://test.my/project3/ ). NetBeans will not start debugging session
automatically in this case. You will see a ‘waiting for connection’
message from the image below. Do not worry. Left it as it is. Go to
your browser. I use FireFox 4. And call the script you wish to debug
with additional parameter, e.g.
http://test.my/project3/index.php?XDEBUG_SESSION_START=netbeans-xdebug
When you return to NetBeans you will see that connection with xdebug
is established successfully. To stop XDebug session manually call any
script from the same subdirectory with this parameter
?XDEBUG_SESSION_STOP_NO_EXEC=netbeans-xdebug
The complete solution can be found on my newest hero's blog NetBeans 7.0 for PHP Waiting for Connection to XDebug
Edit: Know what I just discovered? I removed index.php as the index file of my run configuration. Works like a charm without having to manually insert the xdebug section of the url.
I just ran into this with Netbeans 8 and while your answer worked around my problem I think I found the solution that will fix it forever.
Project Properties => Run Configuration => Advanced ...
Ensure that the following entry is selected
Debug URL: 'Default: YOUR URL'
Mine was set to "Do Not Open Web Browser" .....
Now it works as it used to work many months ago :)
I am a .Net programmer and very new to PHP. Recently I was trying to host an open source PHP application on my machine(Windows). After the Struggle for 5-6 days I will list the steps which worked for me.
I uninstalled every previous installations of XAMPP and NetBeans and proceeded with fresh installations.
This might not be the solution for everyone but it worked for me and I hope it helps someone.
install XAMPP
install netbeans for PHP.
Open IIS and stop it. It is running on port 80 by default.(I am running XAMPP on port 80 i.e. default, Running on other port might need additional configuration settings)
Open XAMPP control panel and start Apache. If port 80 is free no problem should arise.
Open localhost in browser in should display XAMPP home page.
open phpinfo() link on the left pane and copy all the contents on page. Go to: http://xdebug.org/wizard.php and paste all the content in TextBox and click Analyze my phpinfo output. It will diplay you the Xdebug file suitable for your configuration.
Download the given Xdebug dll and copy it in C:\xampp\php\ext (Xampp being the default Xampp installation directory)
Goto XAMPP control panel, click on Config button in front of Apache and select php.in,
Find line similar or exacly like,
;zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
(Semicolon means it is commented)
Remove the semicolon and replace the path with the path of dll you just copied like:
zend_extension = "C:\xampp\php\ext\php_xdebug-2.3.2-5.4-vc9.dll"
Similarly find lines
;xdebug.remote_enable = 0 ;xdebug.remote_handler = "dbgp"
remove semicolons in front of both lines and make remote_enable = 1
xdebug.remote_enable = 1 xdebug.remote_handler = "dbgp"
Restart Apache server.
Copy your website code under C:/XAMPP/htdocs/(your_website)/ that means your index.php should be at C:/XAMPP/htdocs/(your_website)/index.php
Open Netbeans select New project -> PHP -> PHP project from existing source and select the folder you just copied in htdocs folder. Set it to run on Local web server.
Set a breakpoint on first line of index.php and debug.
That's it.
Additional settings were suggested on various different posts but above mentioned steps worked perfectly for me.
I think what you might be missing is
xdebug.idekey=netbeans-xdebug
this is the settings I use in my php.ini
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_connect_back=1 # Not safe for production servers
xdebug.remote_port=9000
xdebug.idekey=netbeans-xdebug
xdebug.remote_autostart=false
Read the installation of XAMPP 1.7.7 & Netbeans 7.1 with edditing
the php.ini file as suggested:
http://netbeans.org/kb/docs/php/configure-php-environment-windows.html
Create your PHP project in the local XAMPP directory, c:\xammp\htdocs\*yourproject*
Debug the index.php, you will see that your browser will start with additional parameters:
http://*yourproject*/index.php?XDEBUG_SESSION_START=netbeans-xdebug
Go to your Netbeans, your debugger will be started.
I finished installing Ubuntu 10 for netbooks, and XAMPP. The XAMPP website tutorial made it very easy to install, then left me high and dry. Everything works, but I have no idea where to put my handwritten php files.
After a few hours of googling, and trying to understand the file explorer, I realized I have no idea where anything is in ubuntu. For an answer, please don't just tell me "go to "X" directory. I won't know how to navigate there.
I also did a file search for htdocs with no luck.
in XAMPP the default root is "htdocs" inside the XAMPP folder, if you followed the instructions on the xampp homepage it would be "/opt/lampp/htdocs"
I created my project folder 'phpproj' in
...\xampp\htdocs
ex:...\xampp\htdocs\phpproj
and it worked for me. I am using Win 7 & and using xampp-win32-1.8.1
I added a php file with the following code
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>
was able to access the file using the following URL
http://localhost/phpproj/copy.php
Make sure you restart your Apache server using the control panel before accessing it using the above URL
When in a window, go to GO ---> ENTER LOCATION...
And then copy paste this: /opt/lampp/htdocs
Now you are at the htdocs folder.
Then you can add your files there, or in a new folder inside this one (for example "myproyects" folder and inside it your files... and then from a navigator you access it by writting:
localhost/myproyects/nameofthefile.php
What I did to find it easily everytime, was right click on "myproyects" folder and "Make link..."... then I moved this link I created to the Desktop and then I didn't have to go anymore to the htdocs, but just enter the folder I created in my Desktop.
Hope it helps!!
Look into the httpd.conf and/or httpd-vhosts.conf files and search for the DocumentRoot entry. If you configure multiple virtual hosts, there may be more than one of those, separated in <VirtualHost> tags.
This will work for me:
.../xampp/htdocs/php/test.phtml
The default location to put all the web projects in ubuntu with LAMPP is :
/var/www/
You may make symbolic link to public_html directory from this directory.Refered. Hope this is helpful.