On opensuse 11, Firefox isn't displaying php errors. For exemple, I have correct.php and broken.php :
correct.php
<?php echo("test"); ?>
broken.php
<?php echo("toto ?>
Loading correct.php, displaying "test"
Loading broken.php, displaying "test" again
In fact, the loaded page seems the same.
I tried on Windows 7 Firefox and it's showing :
PHP Parse error: syntax error...
My PC is on Opensuse, I borrowed the Windows one to test this thing...
And I don't have access to the server (only a ftp on a sub-folder of the website)
Thanks a lot if you help me, if you don't thanks anyway cause stackoverflow's helping me a lot (even without asking 8D )
edit : If I'm going to broken.php with a link (), the URL isn't changing on OpenSuse FF, on Windows FF it's going to the page with the php error
at the php.ini check if the display_error = on
if not change it to on then restart the web server
then try again
Try putting this at the top of your file:
error_reporting(E_ALL);
Related
I am trying to write a webpage in php.
I installed wamp64, it has the php7.4 version selected, however when I try to display my page on the navigator it shows the code instead of running it.
I also have the following message when I go on localhost :
Notice: Undefined index: urlAddLocalhost in C:\wamp64\www\index.php on line 33
don't know if this is related.
Am I correct to assume that php is downloaded with wamp and apache when I did instaled wamp?
If not how should I proceed ?
Thanks guys, in the end there was a problem with were I placed my wamp files ... problem solved
I'm sorry in advance for being a noob
So I started taking a php course the instructor told viewers to install mamp or xammp
A quick google search said Wamp is better for windows so I went along with it, the problem I faced was that the php files I created were not being executed whereas the professor's php web application worked perfectly, I did everything correctly. I created a text doc replaced txt with php extension and then wrote a simple code
<?php> echo "hello world" ?>
This was not being executed, the server kept saying unable to handle this request.
So I uninstalled wamp and installed mamp, I deleted the original files from httdocs which were a simple index.php and jpg file.. I pasted two folders, one my professor's web application and the second being my practice lab. And again it displayed the same regardless of the fact that I'm opening the file through the index directory
I don't know what's the error. Can anyone help me?
I am trying to get this run for almost 3 hours
As per the comments above...
Seems like it could be a 500 internal server error. Try <?php echo "Hello world"; ?>
500 internal server errors are shown when your php code has fatal errors that can't be processed.
Your error come from opening and closing tag.
Based on PSR-1
It should be <?php and ?> but not <?php>
PHP code MUST use the long <?php ?> tags or the short-echo <?= ?>
tags; it MUST NOT use the other tag variations.
i am trying to install joomla but it freezes , i used XAMP and i tried a lot of solutions , but they didn't help , and the problem still the same , i changed the xamp\htdoc\my joomla folder\installation\sql\mysql and i opened Joomla.sql file and replace the term "ENGINE=InnoDB" with "ENGINE=MyIsam" ,but didn't help me .
i also tried the following :
in php.ini file i made both output_buffering and display_errors equal to off
Output_Buffering=Off
Display_Errors=Off
and in xamp\htdoc\my joomla folder\installation\sql\mysql\Joomla.sql
replaced all the occurence of "ENGINE=InnoDB" with "ENGINE=MyIsam"
please help :( ,i tried several answers on a question similar to mine but the difference was that they uses WAMP server while i used XAMP , but they didn't help me
Use a browser like Chrome or Firefox and check the developer console (F12 in Chrome) for any errors coming from the AJAX request being made in background.
There is no need to hack installation files. It is important to understand what the error is and when does it occur.
I am attempting to install PHP onto Windows Server 2008 R2. I have followed the instructions here but when I try to load phpinfo.php I get a blank page.
There are no errors in the Event Viewer.
The server is used to host multiple other Asp.Net websites but I am using PHP so that I can install MediaWiki.
UPDATE:
When trying to load simple HTML (with no PHP) it also loads as blank. The fix for this seems to be to enable "Static Content" in the "Turn Windows features On/Off" manager - but this is already in place.
This happened to me as well just running the handy dandy php installer microsoft has on their site using their Web Platform Installer and it turned out in the php.ini file by default short_open_tag by default is off so my code
<?
print("hello world!");
?>
would not work because it was expecting
<?php
print("hello world!");
?>
.... so yea ... just go and change that if this is your problem too!
If copying over an old Wordpress installation from an old server - make sure you copy ALL the files. Oops... <embarassed>
A blank page is also possible when there is an PHP error and error reporting is of. Try to run the script below to see what happens.
<html>
<body>
Hello HTML
<?php
error_reporting(E_ALL);
echo "Hello PHP";
?>
</body>
</html>
You could also try to see if a normal HTML page with PHP extentions runs fine. Perhaps your server is setup to disallow PHP extention.
You have to configure fastCGI for each PHP website, more details you can find here - Best Practices for Configuring FastCGI and PHP
So I found the solution after hours of randomly trying things. I removed and re-added the Static Content role in Windows - still same result. Then I edited the Error Pages feature of the website in IIS to say return Detailed Error Messages. At this point PHP started to complain about the timezone so I set to "Europe\London" - for this to take effect you need to restart IIS.
After that it worked, phpinfo now loads!
I had this issue; at "turn Windows features on or off", I enabled:
HTTP Errors
Server-Side Includes
Directory Browsing
Windows Authentication
I also set these options in C:\Program Files (x86)\PHP\v5.3\php.ini:
display_errors = On
display_startup_errors = On
After that, a 401 Unauthorized error was displayed. I added 'Everyone' and 'Users' groups to the folder to fix.
I have just deployed my CodeIgniter application on to a live Windows ISS7 server, tried to access my root page and all I am getting is blank white. Firebug is telling me it's a '500 Internal Server Error'.
The site worked fine on my development server (linux).
When I echo 'hello' in index.php it displays the text, which suggests the server won't load the controllers.
I have no experience using Windows servers unfortunately, and it's not my choice to use it! How can I access some sort of error log?
Any ideas on how I can at least see what the issue is?
Use the following line to find where the php error log file is located :
phpinfo();
ANSWER
Sorry, this is ridiculous. I had PHP errors switched off, thanks to adrien for the inspiration to look at the PHP info.
The error was an SVN conflict which had written < < < mine etc in my database file.
Sorry, such a simple error. Thanks.