Unlimited Shared hosting & Unlimited Disk Space from $5.95 - Dreamhost
Solid Managed VPS with 4 IP's from $60 - Liquid Web
Lightning Fast Dedicated Servers & 1GB RAM from $149 - Liquid Web
#1 Domain Registration with WHOIS Privacy - Just $9.95
This Dreamhost support thread was started by Fixer on 2009-11-16 09:48:13:
Post Reply? Hi, I have the next php script and, this always work very well (loading time before 1 second) but about two or three days to now, I get the 500 Internal Server Error or this simple function spend more than 20 seconds to load. My dreamhost server is “Burke”, I use mysqli to connect to the database. In error.log I get: Premature end of script headers: menu.php… Who can I put this working? Move to another webhost? Please help me!!! The php script is: <?php header(”Content-Type: text/xml”); ini_set(’display_errors’,'On’); ini_set(’display_startup_errors’,'On’); error_reporting(E_ALL & ~E_NOTICE); // db properties to mysqli class define (”DB_SERVER”, ‘mysql.domain.com’); define (”DB_NAME”, ‘db_name’); define (”DB_USER”, ‘db_user’); define (”DB_PASSWORD”, ‘db_pass’); include_once ‘library/mysql.php’; // simple mysqli class function getRows ($sql){ $data = false; $myDB = new MySQL(); $myDB->Query($sql); if ($myDB->TotalRows() > 0) { while( $row = $myDB->FetchArray() ) { $data[] = $row; } } $myDB->Close(); return $data; } function mostraMenuXML($pid=0, $isMulti=false) { if ( $isMulti ) $menu = getRows(”SELECT id, titulo FROM artigos WHERE menuid = $pid ORDER BY ordem, data”); else $menu = getRows(”SELECT id, nome, publicado, tipo FROM menu WHERE parentid = $pid ORDER BY ordem”); if ( !$menu ) return “”; if ($pid==0 ) $xml = “n<item name=”principal”>n”; else $xml = “”; if ( $isMulti ) { foreach ($menu as $item) { $xml .= “n<item “; $xml .= “name=”". stripslashes(html_entity_decode($item['titulo'], ENT_COMPAT, “UTF-8″)) .”" action=”openPage” m=”".$pid.”" id=”".$item['id'].”">”; $xml .= “</item>n”; } } else { foreach ($menu as $item){ $xml .= “n<item “; switch ( $item['tipo'] ) { case “GALLERY”: $accao = “”; $isMulti = true; break; case “MAIL”: $accao = “openMail”; break; case “NEWS”: $accao = “openNews”; break; default: $accao = “openPage”; } $xml .= “name=”". $item['nome'] .”" action=”$accao” m=”".$item['id'].”" >”; if ( $item['id'] != $pid ) $xml .= mostraMenuXML($item['id'], $isMulti); $xml .= “</item>n”; } } if ($pid==0 ) $xml .= “</item>n”; return $xml; } echo mostraMenuXML(); ?>
Join in on the original post at the Dreamhost Forum, Get a Dreamhost Plan or view our Dreamhost Review.
Related Web Host Reviews
- Multiple Flash Videos On Same Page
- Problems between Joomla, Dreamhost and Hotmail
- mod_security silliness
- roundcube: if i switch, do i lose addresses?
- updating the content of my website
- Identifying awry processes
- BOM in php script output
- MJPEG PRoxy
- Connecting my FTP Server and Site
- Problem installing Bugzilla v3.6
Hosting Discounts
All Hosts
- 1&1
- A Small Orange
- Aplus
- Bluehost
- BurstNET
- CalPOP
- CariNet
- CheapVPS
- DailyRazor
- Dreamhost
- DynDNS
- Eapps
- EasyCGI
- Eleven2
- Elief
- Engine Yard
- Exmasters
- Fastservers
- Fat Cow
- Fluid
- Fused Network
- Future Hosting
- Geek Storage
- Globat
- GoDaddy
- GoGrid
- Good Avocado
- HiVelocity
- HostDime
- Hostgator
- HostICan
- Hostmonster
- HostV
- HostWay
- ICDSoft
- InMotion
- iWeb
- IX
- Joyent
- JustHost
- KnownHost
- Laughing Squid
- Layered Tech
- Limestone Networks
- LiquidWeb
- Litespeed
- LunarPages
- Media Temple
- Micfo
- MidPhase
- Mosso
- Myriad Network
- NetDepot
- Netfirms
- Peer1
- ProVPS
- Rackspace
- Razorservers
- ResellerZoom
- Right Scale
- SeeksAdmin
- Servage
- ServerBeach
- ServerPronto
- ServINT
- SilverRack
- Singlehop
- SiteGround
- Slhost
- Slicehost
- Softlayer
- SolarVPS
- Steadfast Networks
- TekTonic
- The Planet
- TheNYNoc
- Thinkhost
- Ultra Hosting
- Ultra Website Hosting
- Umbra Hosting
- URLJet
- Velcom
- VolumeDrive
- Voxtreme
- VPSLand
- WebHostingPad
- WiredTree
- WireNine
- XLHost
- Yahoo
- Yourserving

