Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
Putty executes my php script without error but no results. This script is supposed to run a query on the database and the send those results as excel file. Does anyone know what could cause this?
Try prepending your script with:
<?php
error_reporting(E_ALL);
?>
to output all errors. Failing that, you could put some debug in the code to find where it keeps failing.
Sometimes there is something in the PHP error log (/var/log/php_errors on Centos).
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I try to make my files as small as possible and wonder why the following php code works in my Wordpress Installation
<?php
$mark_count = get_post_meta($post->ID, '_wpb_post_mark_count', true);
?>
and the following (same) php code not
<?php $mark_count = get_post_meta($post->ID, '_wpb_post_mark_count', true); ?>
When i put the code in one row, my site gets blank. No Error or else in the firebug console. It is a new WP Installation and there is no conflict between plugins. The installation is on a Apache Server and runs the latest PHP 7 version. Any idea how to fix this problem or why this happens?
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I'm wondering why I cannot display the simple "hello world" using php language.
This is how my code looks like:
<?
echo "Hello world";
?>
and this is how the output come out in the browser, nothing display:
You need to make sure following things for executing php file.
Php tag should be properly open and close <?php ... ?>
You xampp server is properly running.
You are accessing file by putting correct path.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
i would like to ask if someone had the same problem or know any workaroundto fix it.
I have a large file (15MB) full of array values which i find and read them.
On xampp the code with preg_match_all works correcly (for large and small files).
on the server Current PHP version: 5.5.9 (2 vcpu 2GB ram)
preg_match_all stop execution of the code (if i test with small file it gives correct results).
Try using:
ini_set('memory_limit','1024M');
In the beginning of the script.
Also, if you're calling the script from your browser, print an empty space on that loop to keep your browser alive.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
Sorry for changing the question
I'm trying to include another php file inside php, my code is like this
Ajax mysqli not working
The difference is
I change "$con = new mysqli("localhost", "root", "", "whatever");" with "include 'admin/connection.php';"
Without include it's working, but, after adding include it's keep giving me error :(
Is it just me, my code is wrong or ajax didn't support php include?
if 'admin/connection.php' contains Connection code to DB
use require require PHP instead of include
require will halt the script whereas include only emits a warning (E_WARNING) which allows the script to continue.
require('admin/connection.php');
and if your server is not connected to db how can you expect to run sql query
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I started learning PHP today and I've been trying to make a "Hello World" program, but when I type the code into the editor it does not appear in the browser, it's commented. What might be the issue ? I have XAMPP installed, and enabled Apache.
Code: http://i.imgur.com/khOPvSD.png
Browser: http://i.imgur.com/uQd25Qb.png
You are having
<?echo
Change to <?php
Every code that is PHP must be within the <?php ?> tags.