Monkuar Posted November 8, 2011 Share Posted November 8, 2011 For some reason this stupid code is bringing up a white blank WSOD, no apache logs or nothing, running php 5 on my server. function fetch_row($query_id = "") { if ($query_id == "") { $query_id = $this->query_id; } $this->record_row = mysql_fetch_array($query_id, MYSQL_ASSOC) ; return $this->record_row; } How can I make this php5 compatible? Thank you Link to comment https://forums.phpfreaks.com/topic/250721-this-code-is-php-4/ Share on other sites More sharing options...
Psycho Posted November 8, 2011 Share Posted November 8, 2011 The only PHP function that code is mysql_fetch_array and that function works in both PHP4 and PHP5. So, it is already compatible for PHP5. http://php.net/manual/en/function.mysql-fetch-array.php Link to comment https://forums.phpfreaks.com/topic/250721-this-code-is-php-4/#findComment-1286324 Share on other sites More sharing options...
Monkuar Posted November 8, 2011 Author Share Posted November 8, 2011 Quote The only PHP function that code is mysql_fetch_array and that function works in both PHP4 and PHP5. So, it is already compatible for PHP5. http://php.net/manual/en/function.mysql-fetch-array.php Okay, Sorry I think I might have gave the wrong information, I am still getting WSOD though, and I get no apache error logs, or nothing. Really making me eager to learn more about this php. Link to comment https://forums.phpfreaks.com/topic/250721-this-code-is-php-4/#findComment-1286327 Share on other sites More sharing options...
requinix Posted November 8, 2011 Share Posted November 8, 2011 You probably have a syntax error somewhere. But not in that code you posted. Open up your php.ini and set display_errors=on. Then restart the server, try the page again, and look for an error message. Link to comment https://forums.phpfreaks.com/topic/250721-this-code-is-php-4/#findComment-1286356 Share on other sites More sharing options...
xyph Posted November 8, 2011 Share Posted November 8, 2011 Quote The only PHP function that code is mysql_fetch_array and that function works in both PHP4 and PHP5. So, it is already compatible for PHP5. http://php.net/manual/en/function.mysql-fetch-array.php This is partially incorrect. PHP5 is no longer bundled with MySQL - that doesn't mean it wasn't enabled when PHP was built. http://www.php.net/manual/en/faq.databases.php#faq.databases.mysql.php5 Again though, this would throw an error message, which would probably be found using requinix's solution. Link to comment https://forums.phpfreaks.com/topic/250721-this-code-is-php-4/#findComment-1286413 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.