Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP script not running on browser

Tags:

php

I have installed XAMPP server on my system to be able to use PHP. But after installation, when I run any php script on the browser it does not run. I do not see any ouput. No checking the phpinfo() from local host I see that version 5.3.5 is installed Even when running a a simple php file like where I echo a line;

I do not see anything on my browser. So, my question is do I need to make any configuration changes to my browser or system to get PHP running.

like image 573
Hozefa Avatar asked Apr 01 '26 13:04

Hozefa


2 Answers

Put your scripts into /XAMPP/htdocs and then point your browser to: http://localhost/your_script.php

like image 165
Spec Avatar answered Apr 04 '26 03:04

Spec


Your best bet is taking a look at your log files, and perhaps turning error reporting on. Put a simple script in your webroot that simply echo's a string, for example:

<?php echo "Hello World!";

with the above there is very little that can go wrong. Work from there. Take a look at your phpinfo, and see where your log files are located. Search for

error_log

for the path to your PHP error log file and maybe see if

display_errors

is on.

This is something that has a multitude of possibilities that can be the cause of your problem.

like image 34
josef.van.niekerk Avatar answered Apr 04 '26 03:04

josef.van.niekerk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!