Question about The PHP Group PHP

1 Answer

PHP Troubleshooting The PHP page keeps loading for ever, it appears to be loading but nothing is happening. Plz help.

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

    MVP:

    An expert that gotĀ 5 achievements.

    Governor:

    An expert whose answer gotĀ voted for 20 times.

    Hot-Shot:

    An expert who has answered 20 questions.

  • Contributor
  • 30 Answers

Most often the problem is caused by loops in your PHP. One common mistake is to forget to actually ++ add to the counter at the end of a loop, so your loop will continue to run forever. Another common mistake is that, you do add to the counter, but then accidently overwrite it again at the start of the next loop, so you never gain any ground.
Depending on what your loops is doing, this can cause your script to continue to output the same information over and over again (continuing to make the page longer and longer and longer) or it can keep processing the same information over and over without outputting anything giving it the appearance of a page that is trying to load but is lagging.

One way to help you spot this is to echo () the current counter number (or other useful information) at the beginning of each cycle. This way you might get a better idea of where the loop is tripping up.

If you're not using loops, you may want to double check that any HTML or JAVA you are using on your page isn't causing the problem, and that any included pages are without error.

Posted on Aug 10, 2008

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Javascript code equivalent to PHP given below.


You can load a XML fie from JavaScript like this:
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
function loadXML(xmlFile)
{
xmlDoc.async="false";
xmlDoc.onreadystatechange=verify;
xmlDoc.load(xmlFile);
xmlObj=xmlDoc.documentElement;
}


http://www.sitepoint.com/article/server-side-xml-javascript/

Apr 30, 2009 | ArcMedia JavaScript Source Code 3000 Pro...

1 Answer

Database talks to code but code won't talk to database


Make sure you are connecting to the database,then just before you call your sql to insert use an echo statement to display the sql and check it for syntax:-
$sql = 'insert into table1 values('.$no.','.$no.',"block","'.$value3.'", "'.$value4.'")';
echo "SQL ==>" STARTOFSQL<br>".$sql." ENDOFSQL<br>";

Jan 18, 2009 | The PHP Group PHP

1 Answer

Clarification


are you saying you're switching from a session variable to a cookie?

delete the cookie altogether by setting the expiration to a time in the past (negative value). don't forget that you'll then have to reload a page in order to reread the cookie data.

so if you have a cookie with a logged_in value = true, and you set it to logged_in value = false, you're still logged_in = true, until you reload that page (or another page) and it rereads the cookie data and now determines that logged_in = false.

make sense? write the logged_in=false to the cookie, then force a url redirection to reload the page is my suggestion.

Jan 13, 2009 | The PHP Group PHP

1 Answer

Integrating JavaScript within PHP....


If you're trying to do this with PHP, you might be more successful creating an initial page with the buttons that should be enabled at the start (New, Update, Delete), and then create a sub-page that displays a different form depending on the action the user selected previously. This way, the user only sees the buttons relevant to his/her current action. Here's some beginning code to help you out:

<?php

$action = $_POST['action'];

if($action == 'new')

{
//display the form for creating a new conference leader
}

else if ($action == '$update')

{
//display the form for updating a conference leader
}

et cetera.


Each sub-form would be processed by a third-level page (e.g. handle_create.php, handle_delete.php, etc.)

Oct 03, 2008 | The PHP Group PHP

1 Answer

PHP Login Problem


We'd have to see the relevant code (not all of it, just the relevant part) to even guess at the problem.

Sep 07, 2008 | The PHP Group PHP

2 Answers

PHP Source


hi,

i would like to tell that the php code doesn't appear when you open the source of the webpage , the server hides the php codes simply ,

thanks !

Sep 03, 2008 | The PHP Group PHP

1 Answer

PHP Blank Screen


Hi,

can you send me the source code of that webpage ?

Thanks.

Sep 03, 2008 | The PHP Group PHP

1 Answer

Error PHP


you have to start with <?php tag before writing your php code and close it with ?> in the end of your php code .

Sep 03, 2008 | The PHP Group PHP

1 Answer

PHP Disappears


To encode a '+' so it will appear as a '+' when decoded
automatically by PHP –
rawurlencode(rawurlencode("+"));

If you just call rawurlencode() once, the resulting "%2B" is converted
to '+' before '+' symbols are converted to spaces, which is not very
useful.

Jul 27, 2008 | The PHP Group PHP

2 Answers

PHP Error


This error means that the program doesn't understand the code you wrote.

If you are lucky the error points to the file and the line number where PHP got confused. Sometimes PHP points directly at the error, but other times PHP is confused as a result of an earlier error in the script.

Welcome to the great world of PHP.

Jul 27, 2008 | The PHP Group PHP

Not finding what you are looking for?
The PHP Group PHP Logo

Related Topics:

105 people viewed this question

Ask a Question

Usually answered in minutes!

Top The PHP Group Compilers & Programming Tools Experts

Robin Hill
Robin Hill

Level 3 Expert

1251 Answers

Mike

Level 3 Expert

4331 Answers

Mishan Kasiparsad

Level 2 Expert

142 Answers

Are you a The PHP Group Compiler and Programming Tool Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...