gmmktime Error in WordPress and MagpieRSS
If you’re running PHP 5.1 with your web server, you may encounter the following error in your Apache web server error log file (i.e. httpd-error.log) whenever there are requests to the RSS feed and the Apache need to parse the RSS in PHP:
For Magpie RSS:
PHP Warning: gmmktime() expects parameter 3 to be long, string given in …../magpie/rss_utils.inc on line 35
For WordPress 2:
PHP Warning: gmmktime() expects parameter 3 to be long, string given in /usr/local/www/apache22/data/wordpress-mydigitallife/wp-includes/rss-functions.php on line 788
The error usually only occurs if you are using or upgrading to PHP 5.1.
The resolution is to edit rss_utils.inc in MagpieRSS or rss-functions.php in WordPress and changes the line below:
$epoch = gmmktime( $hours, $minutes, $seconds, $month, $day, $year);
to the following line by adding +0 after the third variables ($seconds):
$epoch = gmmktime( $hours, $minutes, $seconds+0, $month, $day, $year);
Related Articles
- WordPress MySQL SQL Query Error in WPDB Class
- How to Customize, Modify or Change WordPress Database Connection Error Page
- WordPress Call To Undefined Function get_currentuserinfo() PHP Error
- Fix Fatal Error Call to Function get_link() on Non-Object in WordPress 2.8 Dashboard with Technorati Incoming Links RSS
- Paginating or Split WordPress Post or Page with NextPage in WordPress Not Working
- PHP Parse Error: syntax error, unexpected $end
- How to Change the Frequency or Interval WordPress Auto Saves An Editing Post or Page
- 3 Column Relaxation WordPress Theme comments-paged.php for Paged-Comments WordPress Plugin
- WordPress Charset Encoding Problem After Upgrading to Version 2.2
- Download Previous or Old Version of WordPress










































December 18th, 2008 05:43
Words perfectly for me, thx
May 13th, 2008 23:54
thank you so much! saved me alot of time
June 17th, 2007 05:48
Great tips! Thank you very much!
May 21st, 2007 06:22
Glad I found this! I’m surprised they haven’t incorporated this into the version in Sourceforge!
May 22nd, 2006 02:17
The first Google result my own website showing the error. Your’s was #3 or so. I can’t thank you enough for publishing this simple fix.
April 27th, 2006 03:37
Thanks very much for documenting this! You saved me a bunch of time and I really appreciate it.