I have xammp up an running with Apache and mysql on. I have attached an image of my settings. settings I notice my PHP Debugger says Server Listening on port 9000. Maybe that's the problem?
you are supposed to copy php files in htdocs folder inside xampp installation folder
then open localhost/filename path in browser to open it
Related
I'm using sftp to reach my folder on a server at uni. Both chrome and firefox would download my simple test.php instead of opening the page.
Is there any suggestion where should I look with the preferences to change this? (Ubuntu 16.04)
Oh, okay I understand it now, my bad.
I literally mounted the server to my local machine with ssh, thus I had no server whatsoever.
I had to reach directly with the url to open it, so I couldn't just open it from editor (VS Code - open with browser).
Your webserver isnt passing the php file to php for processing and is just sending it on as it would any other file. You will need to ensure that your webserver is setup to handle php correctly be it php-fpm for apache and nginx or the php module for apache
What's the webserver? You can start to read here: http://php.net/manual/en/install.php
All the servers are running correctly in XAMPP, and I when I run http://localhost the XAMPP page comes up. However when I try to run a php through xampp by accessing the directory where the file is stored, i.e.,
http://localhost/Applications/XAMPP/xamppfiles/htdocs/gallery.php
I get error 404. I've tried loads of different paths, but here is the path to the file in finder path image
Any ideas?
Thanks!
your webserver is resolving the domain localhost to a specific directory, the so called document root. (this can be adjusted in your server config). I would assume that it points to /Applications/XAMPP/xamppfiles/htdocs. so your file should be accessible via
http://localhost/gallery.php
I downloaded the pdt plugin for eclipse for php development. I have mamp installed , with the web port set at 80. The name of my project is PHPTest.
I have one file in it ,called helloworld.php.
Hello world just echoes A text.
This project is located at
/Users/MYUSERNAME/EclipseProjects
When I run the project by right clicking on it, It shows this error in my browser :
Not Found
The requested URL /PHPTest/helloworld.php was not found on this
server.
So, why does this happen ? Is there some setting that I am missing?
or is the only way to get this running is to change the project's directory to the public html folder of mamp ?
This isn't related to xdebug support. Your HTTP server know nothing about your projects. you can fix this in three way:
Manually copy/paste project to your MAMP document root dir (default is /Applications/MAMP/httpdocs)
Change MAMP document root dir to workspace: /Users/MYUSERNAME/EclipseProjects (easies way)
Move your workspace to document root dir (/Applications/MAMP/httpdocs)
I'm working from a windows 7 PC and my source code is on an Ubuntu PC. I have a shared folder on the Ubuntu computer that I can browse from my Windows computer.
I'm trying to open this directory in PhpStorm via File -> Open Directory. The problem is I can't seem to browse the network using the File browser (shown below) PhpStorm provides. Also entering a path like \my-dev-pc\projects\php\cms just causes it to open my C:\ directory.
Any ideas on how I can solve this? Perhaps some configuration that allows PhpStorm to use the default Windows Explorer file browser?
Since your project files are on network, you should follow below steps:
file > new project from existing source.
Then you will get a pop up with options for connecting to remote machine/server using ftp/sftp.
Select that and then enter your credentials.
There is also an option to select files which are accesile via network.
This should help you.
I have a text file on my Linux website and I'm trying to run my website php code on my Win7 localhost machine.
The text file on the server is located at:
/home/vault/public_html/ssfiles/mysql.txt
On my local machine I'm running Apache/PHP/MySQL and my php files are located in:
C:\wamp\www\
How do I get my php script to open the file with the first folder string and to also work locally with the second folder string?
I'm new to running php on my local machine and have always run my php scripts directly on the Linux server...so I'm not sure how to resolve this?
Is there a php.ini setting that handles this? based on what machine the script is executing on?
Thanks...
If you place the files in htdocs folder in c:\wampp\ you can directly access the file with localhost/folder_name/file_name.php from broswer