Warning: Division By Zero In /home/lvfoo0/public_html/handle_oocalc.php On Line 33


Mar 15, 2010

I am writing a calculator script for a friend of mine but keep getting an error. I need to pass some values to the handle.php script and then do more calculations in that script. I am new to php and never written a script like this.

The HTML page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>

[Code]....

Warning: Division by zero in /home/lvfoo0/public_html/handle_oocalc.php on line 33

Here are the results:

0.00 gallons needed for the trip.
0.00 is the total fuel cost.
1,000.00 is your net profit.
0.83 is the dollar per mile.

View 6 Replies


ADVERTISEMENT

Warning: Session_start() [function.session-start]: Cannot Send Session Cache Limiter - Headers Already Sent (output Started At /home/user/public_html/index.php:8) In /home/user/public_html/nmdeluxe/index.php On Line 2

I'm having a problem with one of my files. I keep on getting the following error:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/user/public_html/index.php:8) in /home/user/public_html/nmdeluxe/index.php on line 2

The second line of the nmdeluxe/index.php file has the session_start(); code. There aren't any spaces before the <?php line. The file is in ANSI form. I'm also including this file in one of my other files using PHP includes.

<? include("/home/user/public_html/nmdeluxe/index.php") ?>

The public_html/index.php has that code in it. The nmdeluxe/index.php does include itself into the public_html/index.php file, but I that error message appears at the top of the page. How can I fix this?

View 5 Replies

Warning: Session_start() [function.session-start]: Cannot Send Session Cookie - Headers Already Sent By (output Started At /home/comm/public_html/local_dynamic/br.php:6) In /home/comm/public_html/local_dynamic/br.php On Line 168

A visitor selects some options from a page and press the submit button,then the second page shows his selected options and there he fill his details and again press the submit button then the selected options with his details is stored in db

i have used sessions to move the data from one page to another.with localhost it is working good but when i upload the scripts to my site it is showing following warnings.how to overcome with this.

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/comm/public_html/local_dynamic/br.php:6) in /home/comm/public_html/local_dynamic/br.php on line 168

View 1 Replies

Warning: Cannot Send Session Cookie - Headers Already Sent By (output Started At /home/hkia/public_html/09archive/list1.php:11) In /home/hkia/public_html/09archive/list1.php On Line 53

i add session_start() on the top of a php file, the first time i visit the page is ok, but when i visit it the second and after, the following error is output. what should i do for that?? Quote:

Warning: Cannot send session cookie - headers already sent by (output started at /home/hkia/public_html/09archive/list1.php:11) in /home/hkia/public_html/09archive/list1.php on line 53

Warning: Cannot send session cache limiter - headers already sent (output started at /home/hkia/public_html/09archive/list1.php:11) in /home/hkia/public_html/09archive/list1.php on line 53

View 9 Replies

Warning: Invalid Argument Supplied For Foreach() In /home/pokerint/public_html/test.php On Line

<?php
$feedID = '28241415';
$oddsArray = array();
$source = file_get_contents("https://www.bwin.com/partner/xml/query.aspx?source=events&lid=1&xpath=/ROOT/EVENTS/E[@LID=46%20and%20@RID=14%20and%20@SID=4]");...........

The error I am receiving is:

Warning: Invalid argument supplied for foreach() in /home/pokerint/public_html/test.php on line

View 2 Replies

Warning: Mysql_fetch_array(): Supplied Argument Is Not A Valid MySQL Result Resource In /home/scaspco/public_html/testing/reviews.php On Line 41

I'm trying to outtput records from a mysql table and I get an error here

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/scaspco/public_html/testing/reviews.php on line 41
in

PHP Code:

<?php
$i = 0;
while ($result = mysql_fetch_array($query)) {
    if($i++ % 2) {
        $bgcolor = "category";
    } else {
        $bgcolor = "#DFE6EF";
    }
    print "<tr bgcolor="$bgcolor">";
    print "<TD>".$result['ASP_Name']."</TD>";
    print "<TD>".$result['Username']."</TD>";
...............

View 3 Replies

Warning: Mysql_fetch_row(): Supplied Argument Is Not A Valid MySQL Result Resource In /home/dyingtwi/public_html/functions/matchdb.php On Line 61

1: Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/dyingtwi/public_html/functions/matchdb.php on line 61

2: Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/dyingtwi/public_html/functions/playerdb.php on line 69

3: Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/dyingtwi/public_html/functions/teamdb.php on line 71

View 8 Replies

Warning: Mysql_fetch_array(): Supplied Argument Is Not A Valid MySQL Result Resource In /home/szauerne/public_html/sites/yourcapecoral/wizard/listings.php On Line 364.

PHP Code:

$number = mysql_query("SELECT * $housesTable WHERE house_id='".$select."'");
$row = mysql_fetch_array($number);

returns

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/szauerne/public_html/sites/yourcapecoral/wizard/listings.php on line 364.

View 2 Replies

Swf Files And Ffmpeg / Error Warning: Can't Open Movie File /home/public_html/1.swf?

i use now ffmpeg to take snaphot image of swf file using php , but there is a problem that ffmpeg can't deal with swf file , and it's give me this error message :

Code: Warning: Can't open movie file /home/**/public_html/1.swf
but when i tried ffmpeg with .flv file , it's did successfully

i use this php code:

PHP Code:

$mov = new ffmpeg_movie(dirname(__FILE__)."/1.swf");
$ff_frame = $mov->getFrame(30);
$gd_image = $ff_frame->toGDImage();
imagepng($gd_image, 'mythumbnail.png');
imagedestroy($gd_image);

so what's the problem and how to solve it ?

View 13 Replies

Error, Unexpected $end In /home/cyberweb/public_html/lst/add.php On Line 94

Makes no sense, anyone?

Parse error: syntax error, unexpected $end in /home/cyberweb/public_html/lst/add.php on line 94

Line 94 is the end. "?>"

View 7 Replies

Error - Unexpected '=' In /home/xxxxxx/public_html/rma/view.php On Line 28

I keep getting this error when trying to load this page: Parse error: syntax error, unexpected '=' in /home/xxxxxx/public_html/rma/view.php on line 28

I've been trying to check it, but it looks fine to me...

<?php
$username="xxxxxxxx";
$password="xxxxxxxx";
$database="xxxxxxxx";
$con=mysql_connect(localhost,$username,$password);
if (!$con) { die('Could not connect: ' . mysql_error());
}
mysql_select_db($database, $con);

[Code]...

View 2 Replies

Error: Cannot Break/continue 1 Level In /home/netgame2/public_html/index.php On Line 7

I'm trying to detect if the user is a guest or is logged on. If the user is logged on, they will be redirected to the main page. If the user is a guest it'll stay on the front page.

here's my code.

6. if ($context['user']['is_guest']) {
7. break;
8. } else {
9. header("Location:http:main_page.php");
10. }

When I run the page I get the error:

Fatal error: Cannot break/continue 1 level in /home/netgame2/public_html/index.php on line 7

View 6 Replies

Parse Error T_ELSE In /home/smileits/public_html/space/webmin/install.php On Line 15?

Parse error: syntax error, unexpected T_ELSE in /home/smileits/public_html/space/webmin/install.php on line 15Code...

Code:
<?if ($_GET['a'] == "") {?><br><br><div align="center"><h2>Welcome to aWebBB</h2><br><br>After editing the configuration file located at /forum/config.php and created a database named 'awebbb_forum' (or different) please click <a href="install.php?a=install">here</a> to install.<br></div><?} else { }if ($_GET['a'] == "install") {echo "Installing MYSQL Tables...<br>";include "../config.php";$db =
[code]........

View 10 Replies

Notice: Undefined Index: Username In /home/spaodesi/public_html/preview/index.php On Line 23

Quote: Notice: Undefined Index: username in /home/spaodesi/public_html/preview/index.php on line 23 Quote:

Notice: Undefined Index: pass in /home/spaodesi/public_html/preview/index.php on line 24.

View 2 Replies

Parse Error: Syntax Error, Unexpected T_CONSTANT_ENCAPSED_STRING In /home/lizzieni/public_html/data.php On Line 3

i'm getting an error on my third line. the error is:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/lizzieni/public_html/data.php on line 3 Code:

View 14 Replies

Parse Error: Syntax Error, Unexpected T_CONSTANT_ENCAPSED_STRING In /home/westco00/public_html/includes/page_header.php On Line 568

This is a phpbb forum i am working on. After installing the mod, i been getting this error:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/westco00/public_html/includes/page_header.php on line 568

Code:

View 1 Replies

Creating A Registration Function - Appearing Parse Error: Syntax Error, Unexpected '<' In /home/fr03thee/public_html/register. On Line 88?

I am trying to do what I thought would be a simple job of creating a registration function that allows users to register to my site. The software I used had a basic version built in with instructions to modify it manually which I followed but not wel enough obviously as I just get errors.

Parse error: syntax error, unexpected '<' in /home/fr03thee/public_html/register.php on line 88

The offending line just seems to be the start of the "normal" HTML bit of the page so I dont understand why is is creating an error. The demo code I coy looks identical to me and seems to work but I have been through this 100 times and cant see any difference.

PHP Code:

<?php
$error_message = "";
if ($_SERVER['REQUEST_METHOD'] == 'POST')[code]...

View 5 Replies

Get This Error "Parse Error: Syntax Error, Unexpected $end In /home/a1408362/public_html/members.on Line 114?

I am programming a php site and have a problem that i just cant find out how to fix. When i run it i get this error "Parse error: syntax error, unexpected $end in /home/a1408362/public_html/members.php on line 114".

Here's the code:

Code: [Select]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Radio Ilam | Radio of the Suburbs</title><meta name="keywords" content="music note, free template, website template, CSS, XHTML" /><meta

[code]....

View 3 Replies

Warning: Ereg_replace(): REG_BADRPT In /home/user/www/www/folder/file.php On Line 133

What is wrong with this line of code?

$picture1 = ereg_replace("+","", $picture1);
it returns

Warning: ereg_replace(): REG_BADRPT in /home/user/www/www/folder/file.php on line 133

View 1 Replies

Warning: Undefined Offset: 1 In /home/vhosts/mydomain/httpdocs/cla/depart.php On Line 166

I have a script with the following code. When I run it I get a warning: Notice: Undefined offset: 1 in /home/vhosts/mydomain/httpdocs/cla/depart.php on line 166

Line 166 is: preg_split('#(?<=[a-z]) (?=d)#i', $RemarksWithTimeTemp);

The content of "$RemarksWithTimeTemp" could be "Arrived 10:30", "Departed 11:21". There is always a number a alpha chars followed by a time.

PHP Code:

if(empty($record["FLIGHT-REMARKSWITHTIME"])){
$RemarksWithTime = "";
}else{

[code]....

View 3 Replies

Unexpected T_STRING In /home/mycashbo/public_html/install/?

I keep getting this it is a script I downloaded, Can't figure out the error! I loaded it on one site and it worked fine!

PHP Code:
<?php
MySqlHostname = "localhost"; //the name of your host - if its local leave it as is.
[code].....

View 1 Replies

Warning: Mysql_connect(): Can't Connect To Local MySQL Server Through Socket '/tmp/mysql.sock' (2) In /home/custcare/dbconn.inc On Line 2

It's really strange. I downloaded the latest 4.0.16 RPM from mysql.com
and installed it to my Fedora system, and did *not* do anything else
(Actually I am completely new to mysql).

I wrote a test php script to test mysql (ftp_connect('localhost',
'root');), but got the following error:

Warning: mysql_connect(): Can't connect to local MySQL server through
socket '/tmp/mysql.sock' (2) in /home/custcare/dbconn.inc on line 2

I ran phpBB2 installation page, got the same error. But it can connect
to mysql using my computer name.

View 3 Replies

Error, Unexpected T_VARIABLE In /home/a6490674/public_html/Mafia

$time = rand(30,90);

$jailtime="INSERT INTO jail (username, time, length) VALUES ('".$username."', NOW(), '"$time"')";
$jailresult = mysql_query($jailtime);

error:Parse error: syntax error, unexpected T_VARIABLE in /home/a6490674/public_html/Mafia/crime.php on line 60

I know it means usually a semi-colon is missin but I can't see one missin here...any ideas?

EDIT: Title edited to be more descriptive

View 3 Replies

Unexpected T_IF In /home/repairyo/public_html/shop/includes/content/viewOrders?

get this error Parse error: syntax error,

unexpected T_IF in /home/repairyo/public_html/shop/includes/content/viewOrders.inc.php on line 57

I have no idea what ive done wrong, may be I am stupid for attempting it.This is the original code

Code:[Select]$view_orders->assign('VAL_STATE',$lang['glob']
'orderState_'.$orders[$i]['status']]);

This is the modified code

Code:[Select]$view_orders->assign('VAL_STATE',$state = $results[$i]['status']
if ($state == '1') {
"<font color='#ff9900'>".$lang['glob']['orderState_'.$results[$i]['status']]."

[code]...

View 14 Replies

Warning: Move_uploaded_file(httpdocs/fliers/Request.log): Failed To Open Stream: No Such File Or Directory In /home/httpd/vhosts/kabalkc.com/httpdocs/Class/uploadClass.php On Line 39.

my Error:

Warning: move_uploaded_file(httpdocs/fliers/Request.log): failed to open stream: No such file or directory in /home/httpd/vhosts/kabalkc.com/httpdocs/Class/uploadClass.php on line 39.

View 1 Replies

Warning: Division By Zero

Warning: Division by zero in /usr/local/plesk/apache/vhosts/certifyexpress.com/httpdocs/exam/checkpoint/index.php on line 1108 PHP Code:

View 14 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved