Webmaster Forum


Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 05-26-2009, 08:51 AM
Junior Member
 
Join Date: 05-26-09
Posts: 4
iTrader: 0 / 0%
Using MyPHPdirectory - errors after app move

Hi all,

This warning has been coming up ever since we switched servers from a Windows machine to a Linux machine. Something along the lines of this below will show when heading into a category:

Warning: mktime() expects parameter 6 to be long, string given in /xx/yyy/index.php on line X.

The number of these different Warning notices could be anywhere from one or more. Any suggestions would be greatly appreciated!

Thanks,
J
 
Reply With Quote
  #2 (permalink)  
Old 05-26-2009, 10:43 AM
Izzmo's Avatar
v7n Mentor
Latest Blog:
None

 
Join Date: 11-01-03
Location: Kansas
Posts: 1,356
iTrader: 1 / 100%
Well, do you want to get rid of the problem, or just hide it?

If you just want to hide it, put this in a file somewhere where you know it will get executed every page load:

Code:
<?php error_reporting(0); ?>
What this does it suppresses all error messages below critical. So it will suppress warnings and notices.

To get rid of the error (if you do not know how to fix it), go to the line of the code and copy and paste it into here so we can look at it.
__________________
Izzmo
Coding Guru Extraordinaire
ZeroWeb Hosting & Design - Customizable hosting for every type of user!
 
Reply With Quote
  #3 (permalink)  
Old 06-02-2009, 09:46 AM
Junior Member
 
Join Date: 05-26-09
Posts: 4
iTrader: 0 / 0%
The top line is the warning line. I've pasted the top portion of the function, it seems to go on for many lines.
Code:
for ( $i=0; $i<$fetchcounter; $i++ ) { $f = mysql_fetch_array ( $r ); $id = $f["selector"]; $date_day = date ( "d" ); $date_month = date ( "m" ); $date_year = date ( "Y" ); list ( $on_year, $on_month, $on_day ) = split ( '[/.-]', $f["date"] ); $first_date = mktime ( 0,0,0,$on_month,$on_day,$on_year ); $second_date = mktime ( 0,0,0,$date_month,$date_day,$date_year );
Does this help?...
 
Reply With Quote
  #4 (permalink)  
Old 06-03-2009, 12:21 PM
Junior Member
 
Join Date: 05-26-09
Posts: 4
iTrader: 0 / 0%
Aha, looking at this within the cPanel the line is actually:
Code:
$first_date = mktime ( 0,0,0,$on_month,$on_day,$on_year );
This code is listed a few times in the entire php..

Thanks.
 
Reply With Quote
  #5 (permalink)  
Old 06-04-2009, 06:42 AM
Izzmo's Avatar
v7n Mentor
Latest Blog:
None

 
Join Date: 11-01-03
Location: Kansas
Posts: 1,356
iTrader: 1 / 100%
Hmm, interesting error.

PHP.net is saying it should be an integer...

Try doing this and see what the values are coming out as:

PHP Code:
echo $on_month." : ".$on_day." : ".$on_year
And then post them here.
__________________
Izzmo
Coding Guru Extraordinaire
ZeroWeb Hosting & Design - Customizable hosting for every type of user!
 
Reply With Quote
  #6 (permalink)  
Old 06-09-2009, 11:14 AM
Junior Member
 
Join Date: 05-26-09
Posts: 4
iTrader: 0 / 0%
Thanks for the reply - but I'm not too familiar with PHP and did not set this up originally.

Where would I enter that PHP code in? As for values to come out - here is syntax of the warning - see attached screen shot.

Thanks again!
Attached Thumbnails
Using MyPHPdirectory - errors after app move-workplace_err.gif  
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NEED HELP - (( DONE but with errors on page. )) 1234pens Web Design Lobby 7 11-28-2008 12:08 AM
W3C Validation Errors Ryan_m Coding Forum 6 04-14-2008 06:51 PM
need help inserting text and images - myphpdirectory CircleOfLinks Web Design Lobby 12 09-22-2007 11:15 PM
Done with errors on the page.. jclason Web Design Lobby 1 02-23-2006 06:23 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 05:58 PM.
Powered by vBulletin
Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.