Re: [PHP] Lost, need help debuggin....
Do you have display_errors ON in your php.ini ?? ---John Holmes... - Original Message - From: Chuck PUP Payne [EMAIL PROTECTED] To: PHP General [EMAIL PROTECTED] Sent: Monday, June 24, 2002 3:24 PM Subject: [PHP] Lost, need help debuggin Hi, I am trying to debugging this script. But, I can see what the issue is, it not listing errors on any of the mysql stuff but this what I see when I view source -- -- -- -- Here is the code. -- -- html head titleBrowse A Movie in My Movie Database/title meta name=generator content=BBEdit 6.1.2 /head body ?php //How many should be displayed on per page $display_number = 25; //Connect to the database $db_connection = mysql_connect ('localhost', 'user', 'gateway') or die ('Could not connect'); $db_select = mysql_select_db ('media') or die (Couldn't not access database); //If we don't know how many pages there are, make that calculation. print before the first if; if (!isset($num_pages)) { // Determine the query. if(isset($letter)) { // Browsing a particular letter or the whole shebang? $query1 = SELECT library.title FROM media.library WHERE library.title LIKE '$letter%' ORDER BY library.title ASC; } else { $query1 = SELECT library.title FROM media.library ORDER BY library.title ASC; } //Query the database $query_result1 = @mysql_query ($query1) or die (Could not run query); //Calculate the number of pages required. $num_results = @mysql_num_row ($query_result); if ($num_results $display_number) { $num_pages = ceil ($num_results/$display_number); } elseif ($num_results 0) { $num_pages = 1; } else { echo 'There are no movies in this selection'; } $start = 0; // Current at item 0 } if(isset($letter)) { // Browsing a particular letter or the whole shebang? $query = SELECT library.title FROM media.library WHERE library.title LIKE '$letter%' ORDER BY library.title ASC LIMIT $start, $display_number; } else { $query = SELECT library.title FROM media.library ORDER BY library.title ASC LIMIT $start, $display_number; } // Table that shows movies... echo table align='center' cellpadding='2' cellspacing='2' border='1'; echo tr align='center'; echo td align='center'bTitle/b/td; echo /tr; // Print My list $query_result = @mysql_query ($query); while ($row = @mysql_fetch_array ($query_result)) { print tr align='center'; print td align='center'ia href='testlist.php?row[title]'$row[title]/a/i/td; print /tr; } // Make the links to others pages, if nessessary. if ($num_pages 1) { print tr align='center'; print td align = 'center' colspan = '2'; // Determine what page the script is on. if ($start == 0) { $current_page = 1; } else { $current_page = ($start/$display_number) + 1; } // If it's not the make a back button... If($start !=0) { echo 'a href=browse_movie.php?start=' .($start - $display_number) . 'num_pages=' . $num_pages . 'lettter' . $letter . 'Back/a '; } // Make all the numbered pages. for ($i = 1; $i = $num_pages; $i++) { $next_start = $start + $display_number; if ($i != $current_page) { // Don't link the current page print 'a href=browse_movie?start=' . (($display_number * ($i-1))) . 'num_pages=' . $num_pages . '$letter=' .$letter . '' .$i . '/a '; } else { echo $i . ' '; } } // If it's not the last page, make a next buttton. if($current_page !=$num_pages) { print 'a href=browse_movie?start=' . ($start + $display_number) . 'num_pages=' . $num_pages . 'letter=' . $letter . 'Next/a '; } print /td; print /tr; } ? /table /body /html -- -- Thanks a head of time if you can show the error(s) in my code. Chuck Payne Magi Design and Support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Lost, need help debuggin....
Not sure I am on my laptop, an iBook running php/apache. So I am not sure where php.ini is. Chuck On 6/24/02 3:29 PM, 1LT John W. Holmes [EMAIL PROTECTED] wrote: Do you have display_errors ON in your php.ini ?? ---John Holmes... - Original Message - From: Chuck PUP Payne [EMAIL PROTECTED] To: PHP General [EMAIL PROTECTED] Sent: Monday, June 24, 2002 3:24 PM Subject: [PHP] Lost, need help debuggin Hi, I am trying to debugging this script. But, I can see what the issue is, it not listing errors on any of the mysql stuff but this what I see when I view source -- -- -- -- Here is the code. -- -- html head titleBrowse A Movie in My Movie Database/title meta name=generator content=BBEdit 6.1.2 /head body ?php //How many should be displayed on per page $display_number = 25; //Connect to the database $db_connection = mysql_connect ('localhost', 'user', 'gateway') or die ('Could not connect'); $db_select = mysql_select_db ('media') or die (Couldn't not access database); //If we don't know how many pages there are, make that calculation. print before the first if; if (!isset($num_pages)) { // Determine the query. if(isset($letter)) { // Browsing a particular letter or the whole shebang? $query1 = SELECT library.title FROM media.library WHERE library.title LIKE '$letter%' ORDER BY library.title ASC; } else { $query1 = SELECT library.title FROM media.library ORDER BY library.title ASC; } //Query the database $query_result1 = @mysql_query ($query1) or die (Could not run query); //Calculate the number of pages required. $num_results = @mysql_num_row ($query_result); if ($num_results $display_number) { $num_pages = ceil ($num_results/$display_number); } elseif ($num_results 0) { $num_pages = 1; } else { echo 'There are no movies in this selection'; } $start = 0; // Current at item 0 } if(isset($letter)) { // Browsing a particular letter or the whole shebang? $query = SELECT library.title FROM media.library WHERE library.title LIKE '$letter%' ORDER BY library.title ASC LIMIT $start, $display_number; } else { $query = SELECT library.title FROM media.library ORDER BY library.title ASC LIMIT $start, $display_number; } // Table that shows movies... echo table align='center' cellpadding='2' cellspacing='2' border='1'; echo tr align='center'; echo td align='center'bTitle/b/td; echo /tr; // Print My list $query_result = @mysql_query ($query); while ($row = @mysql_fetch_array ($query_result)) { print tr align='center'; print td align='center'ia href='testlist.php?row[title]'$row[title]/a/i/td; print /tr; } // Make the links to others pages, if nessessary. if ($num_pages 1) { print tr align='center'; print td align = 'center' colspan = '2'; // Determine what page the script is on. if ($start == 0) { $current_page = 1; } else { $current_page = ($start/$display_number) + 1; } // If it's not the make a back button... If($start !=0) { echo 'a href=browse_movie.php?start=' .($start - $display_number) . 'num_pages=' . $num_pages . 'lettter' . $letter . 'Back/a '; } // Make all the numbered pages. for ($i = 1; $i = $num_pages; $i++) { $next_start = $start + $display_number; if ($i != $current_page) { // Don't link the current page print 'a href=browse_movie?start=' . (($display_number * ($i-1))) . 'num_pages=' . $num_pages . '$letter=' .$letter . '' .$i . '/a '; } else { echo $i . ' '; } } // If it's not the last page, make a next buttton. if($current_page !=$num_pages) { print 'a href=browse_movie?start=' . ($start + $display_number) . 'num_pages=' . $num_pages . 'letter=' . $letter . 'Next/a '; } print /td; print /tr; } ? /table /body /html -- -- Thanks a head of time if you can show the error(s) in my code. Chuck Payne Magi Design and Support -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Lost, need help debuggin....
On Tuesday 25 June 2002 03:31, Chuck \PUP\ Payne wrote: Not sure I am on my laptop, an iBook running php/apache. So I am not sure where php.ini is. Did you ask Sherlock ? -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* This is your fortune. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Lost, need help debuggin....
Search?? If you don't find it, look for a php-ini.dist or php-ini.recommended in the php folder. Modify one of those to your needs and save it as php.ini. I don't know where it would go in a Mac, though... ?? ---John Holmes... - Original Message - From: Chuck PUP Payne [EMAIL PROTECTED] To: 1LT John W. Holmes [EMAIL PROTECTED]; Chuck PUP Payne [EMAIL PROTECTED]; PHP General [EMAIL PROTECTED] Sent: Monday, June 24, 2002 3:31 PM Subject: Re: [PHP] Lost, need help debuggin Not sure I am on my laptop, an iBook running php/apache. So I am not sure where php.ini is. Chuck On 6/24/02 3:29 PM, 1LT John W. Holmes [EMAIL PROTECTED] wrote: Do you have display_errors ON in your php.ini ?? ---John Holmes... - Original Message - From: Chuck PUP Payne [EMAIL PROTECTED] To: PHP General [EMAIL PROTECTED] Sent: Monday, June 24, 2002 3:24 PM Subject: [PHP] Lost, need help debuggin Hi, I am trying to debugging this script. But, I can see what the issue is, it not listing errors on any of the mysql stuff but this what I see when I view source - - -- - - -- Here is the code. - - -- html head titleBrowse A Movie in My Movie Database/title meta name=generator content=BBEdit 6.1.2 /head body ?php //How many should be displayed on per page $display_number = 25; //Connect to the database $db_connection = mysql_connect ('localhost', 'user', 'gateway') or die ('Could not connect'); $db_select = mysql_select_db ('media') or die (Couldn't not access database); //If we don't know how many pages there are, make that calculation. print before the first if; if (!isset($num_pages)) { // Determine the query. if(isset($letter)) { // Browsing a particular letter or the whole shebang? $query1 = SELECT library.title FROM media.library WHERE library.title LIKE '$letter%' ORDER BY library.title ASC; } else { $query1 = SELECT library.title FROM media.library ORDER BY library.title ASC; } //Query the database $query_result1 = @mysql_query ($query1) or die (Could not run query); //Calculate the number of pages required. $num_results = @mysql_num_row ($query_result); if ($num_results $display_number) { $num_pages = ceil ($num_results/$display_number); } elseif ($num_results 0) { $num_pages = 1; } else { echo 'There are no movies in this selection'; } $start = 0; // Current at item 0 } if(isset($letter)) { // Browsing a particular letter or the whole shebang? $query = SELECT library.title FROM media.library WHERE library.title LIKE '$letter%' ORDER BY library.title ASC LIMIT $start, $display_number; } else { $query = SELECT library.title FROM media.library ORDER BY library.title ASC LIMIT $start, $display_number; } // Table that shows movies... echo table align='center' cellpadding='2' cellspacing='2' border='1'; echo tr align='center'; echo td align='center'bTitle/b/td; echo /tr; // Print My list $query_result = @mysql_query ($query); while ($row = @mysql_fetch_array ($query_result)) { print tr align='center'; print td align='center'ia href='testlist.php?row[title]'$row[title]/a/i/td; print /tr; } // Make the links to others pages, if nessessary. if ($num_pages 1) { print tr align='center'; print td align = 'center' colspan = '2'; // Determine what page the script is on. if ($start == 0) { $current_page = 1; } else { $current_page = ($start/$display_number) + 1; } // If it's not the make a back button... If($start !=0) { echo 'a href=browse_movie.php?start=' .($start - $display_number) . 'num_pages=' . $num_pages . 'lettter' . $letter . 'Back/a '; } // Make all the numbered pages. for ($i = 1; $i = $num_pages; $i++) { $next_start = $start + $display_number; if ($i != $current_page) { // Don't link the current page print 'a href=browse_movie?start=' . (($display_number * ($i-1))) . 'num_pages=' . $num_pages . '$letter=' .$letter . '' .$i . '/a '; } else { echo $i . ' '; } } // If it's not the last page, make a next buttton. if($current_page !=$num_pages) { print 'a href=browse_movie?start=' . ($start + $display_number) . 'num_pages=' . $num_pages . 'letter=' . $letter . 'Next/a '; } print /td; print /tr
Re: [PHP] Lost, need help debuggin....
If you don't find it, look for a php-ini.dist or php-ini.recommended in the php folder. Modify one of those to your needs and save it as php.ini. I don't know where it would go in a Mac, though... ?? Open Terminal.app and type sudo find / -name 'php.ini' -print and enter your password when it asks for your password. Be patient as it searches, you'll get no visual confirmation that the search is running until it's done or until it finds something. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Lost, need help debuggin....
On Monday, June 24, 2002, at 03:51 PM, Erik Price wrote: sudo find / -name 'php.ini' -print Clarification: substitute the search string with 'php-ini.dist' if you haven't yet configured it. Note that Macs, although they ship with PHP pre-installed, are missing this file and you should probably download it from the PHP source tree, if you're using the pre-installed PHP. (If you've compiled your own, then you have it in the 'lib' directory of wherever you installed PHP, such as /usr/local/lib/php-ini.dist). Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Lost, need help debuggin....
Look, I am glad that we are clear on php.ini, but I post my message in hopes that someone could look at it and say there your problem and go away, I've turn on error part no help. Same things. So somewhere there is a sytax error that is stopping it. PLEASE HELP! Chuck Payne On 6/24/02 3:54 PM, Erik Price [EMAIL PROTECTED] wrote: On Monday, June 24, 2002, at 03:51 PM, Erik Price wrote: sudo find / -name 'php.ini' -print Clarification: substitute the search string with 'php-ini.dist' if you haven't yet configured it. Note that Macs, although they ship with PHP pre-installed, are missing this file and you should probably download it from the PHP source tree, if you're using the pre-installed PHP. (If you've compiled your own, then you have it in the 'lib' directory of wherever you installed PHP, such as /usr/local/lib/php-ini.dist). Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Lost, need help debuggin....
U...what was the question again? John you're not paying us Holmes -Original Message- From: Chuck PUP Payne [mailto:[EMAIL PROTECTED]] Sent: Monday, June 24, 2002 7:46 PM To: PHP General Subject: Re: [PHP] Lost, need help debuggin Look, I am glad that we are clear on php.ini, but I post my message in hopes that someone could look at it and say there your problem and go away, I've turn on error part no help. Same things. So somewhere there is a sytax error that is stopping it. PLEASE HELP! Chuck Payne On 6/24/02 3:54 PM, Erik Price [EMAIL PROTECTED] wrote: On Monday, June 24, 2002, at 03:51 PM, Erik Price wrote: sudo find / -name 'php.ini' -print Clarification: substitute the search string with 'php-ini.dist' if you haven't yet configured it. Note that Macs, although they ship with PHP pre-installed, are missing this file and you should probably download it from the PHP source tree, if you're using the pre-installed PHP. (If you've compiled your own, then you have it in the 'lib' directory of wherever you installed PHP, such as /usr/local/lib/php-ini.dist). Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php