On VPS I have phpmyadmin on Apache2.
On every computer and IE n my computer works fine, but on Chrome on my computer it shows the source code of phpmyadmin index. Why? Is there any settings or what?
This is just happening only on this page on Chrome on my PC.
The error "shows the source code of phpmyadmin index" you are describing implies that your apache cannot run the php file. This can be happen for 3 reasons
You are pointing your web browser to the folder something/ and apache does not know that it has to search for the index.php file. Fix your apache configuration or point directly your web browser to this file something/index.php
Your apache is not configured to use the php interpeter
You don't have php installed to your machine
Think that found solution, but don't know what cause it.
I used CCleaner to clean all Chrome browser data
- the simplest solution xD
Related
I just installed xampp from www.apachefriends.org.
Per the instructions I ran
sudo ./xampp-linux-*-installer.run
Then xampp started and I saw the gui control panel. Everything great so far.
I verified it works by going to localhost in Firefox. I saw the welcome screen.
Then,I navigate to my test html. It is a contact which runs a php file when clicking submit.
Then firefox sends a message what to do with my php script, sendeail (save or select an application). sendeail is a no-brainer php script for email which I found on the internet years ago. It works when running from my server and has been for ages. Just now running locally with xampp started, Firefox doesn't know what to do with it.
What should Firefox do with this file?
Do I have to configure xampp somehow?
I couldn't test in Opera or Chrom(ium), the submit form doesn't appear for some reason on my local computer, but whose browsers work fine when accessing the page on the server.
I am running in Linux Ubuntu 16.4 LTS, Firefox 65.0.1 64-bit
--- edit ---
Specifically, the question is that the web browswer sees the .php file and tries to open it, what must I do for the web browser to be passed the code within the .php file, instead?
.apachefriends.org has no explanation of this. I found another page which explains, https://www.fayazmiraz.com/how-to-run-your-first-php-code/.
One has to put their php code into /etc/xampp/htdocs
That's so counter-intuitive!!! OMG why can't I keep my files in my development directory. Yeah, I can test this way, but I'll have to keep updating that directory whenever I have a program change! Thank you
I have been developing a php project and the wamp server was seems
working fine but suddenly it stops working and i don't know what to do
because when i check its status it says server online and green icon is also
showing but it just does not work whenever i run .php files, Mr. browser
just write it down as i did in notepad++ but before some days it was working
fine, please help me I'm kinda stuck?
I also want to mention that in the mean while I installed tomcat server for some other work is it anything to do with fault because i'm pretty sure both operating on differnet port numbers
use <?php instead of <?or left click wamp > php > settings > short_open_tags
and make sure you are running your scripts through localhost and not just opening the php file in the browser
Read More about wamp problem
If you're definitely viewing the script through your MAMP setup (if your URL bar starts with http:// instead of file://) and it is showing the contents of the PHP file instead of executing the script, it sounds like Apache is running fine, but PHP-FPM is the issue or a misconfiguration between the two. Apache should detect it is a PHP script and ship it to the PHP-FPM process, accept a response then ship it to your browser.
I would recommend checking PHP-FPM logs first. All logs are in MAMP/logs - scroll to the bottom of each one for latest entries. Ensure the service is running as expected and logging hits when Apache serves a .php file. PHP-FPM may be using a socket file (which can hit permission problems) or on a network port (which can be in use/require admin privileges/etc). Otherwise check your config files, or re-install MAMP for fresh config files.
If Apache cannot start, common reasons are;
The port is in use by another application
The port is a low number and you do not have administrator privileges to use that port
Switching from wired to wireless / switching network adapters / changing hostname, etc
Apache is already running, or Apache thinks it is
You must sign out from Skype it'll occupied the port of Apache or you should turn down the server and then restart you pc and turn it on. It will work fine.
Im pretty new to php, Ive got a linux server running php 5.5.9 , and all I want it to do is take whatever is sent to it in an http post, and dump it to a file.
Currently the code I have is this
<?php
file_put_contents("outputfile.txt", file_get_contents('php://input'));
It works 100%, does exactly what I want when its on my own server.
When I upload it to my web server (HostGator) it gets a 500 error. The web server is running php 5.4, Im not sure if thats the issue.
Basically what Im trying to learn is why doesnt this work, and how do I fix it, its a pretty simple script.
John and Louis pointed me to the right answer, it was entirely the permissions on the folder the files were in. The folder was 777 for some reason, and switching it to 755 like the files were fixed it.
I had no idea that could even cause a 500 error
I have recently installed a LAMP server running ubuntu server 11.04. I am trying to run a private mediawiki engine online, version 1.17.0. For some odd reason it works perfectly on the LAN only, when I use an external network, it would continue load forever and proceed to being timed out. Other folders I have seemed to be doing fine externally so I believe my network configuration should be ok. Sometimes when I do get lucky (like 10% of the time), it will load normally for a few pages and resume once again to hanging. If I stop the page load it would appear but the skin would be missing.
I used firebug and found that 2 processes with something like load.php/debug=false....style:skin=vector that is hanging while all the other files load fine. If I stopped all the extensions, killed both common.js and common.css, and prevent the use of javascript on the site, it would work fine (relatively speaking, it would load everything quickly). I think it is a javascript problem but I am not sure where to look for an error log for java.
When checking the firefox error console I also noted the same error location had a "message: expected '}'". However, when running in the LAN it has the same message but it still works fine. I tried looking through all possible resources but to no avail.
Finally found the solution to this problem: it was a networking issue afterall. I checked all the logs and could not find anything. But found that the problem was that the ubuntu was running under a dchp setting so I changed it into a static ip mode and now it works perfectly. Althought I don't understand why it would make a difference between broadcasting via LAN only vs. external, it works perfectly now. Thanks to anyone who tried
Recently my ISP switched our website to an IIS7.0 high availibility cluster. The website is running on PHP5.2.1 and I can only upload files (so no registry tweaks). I had tested the website before and everything seemed to be working, but now the checkout page fails with:
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
As error messages go, this isn't very informative. I've tried:
ini_set('display_errors', 1);
ini_set('error_log', $file_php_can_write_to );
but both don't seem to do anything.
Anyone know how to get better debugging output?
Edit : Looks like we have a similar question in serverfault. Check it out
Turning off IIS7 custom errors will allow error responses from your application to be sent to remote clients without being censored by the IIS7’s custom errors module.
You can do this from the IIS7 Admin tool by running “Start>Run>inetmgr.exe”, selecting your website/application/virtual directory in the left-hand tree view, clicking on the “Error Pages” icon, clicking “Edit Feature Settings” action, and then selecting “Detailed Errors”
Source
It's very common when you change server you cannot load your apps. I have solved this problem running php.exe instead of loading your apps on the browser:
1) Run it using the Command line > C:\php\php.exe OR
2) Run Windows Explorer, look for it, and double click on c:\php\php.exe.
3) You are gonna see what DLL's are having conflicts and causing the 500 error.
4) Solve the conflicts finding the right DLL's for your windows version and you should be able to see your apps through the browser.
The best of the lucks.
IIS does this, it's really annoying and I could not find a fix, which is what caused me to switch to an Apache server for my local machine. Unfortunately, if you don't have control over your server, the best you can do is either test it locally on an apache set up or ask your host to allow the error messages.
I did some googling, thisthis looks like what you need. Wish that was around when I was trying to get IIS running.