• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

PHP Problem

lozina

Lifer
Ok, so over the past few months I built a php based web app for my cousin to keep track of sales and inventory. I got it working great on my machine and I deployed it to one of his machines and it works great there. Once I downloaded the software, installed php, apache, mysql and deployed my app it worked great first try.

Now we got a web host for him (hostgator.com) which has php, mysql etc.. and I uploaded my files and importing my database and tried to run the app but it's not working. I just get a blank screen.

I wrote a separate php page to do some basic tests to narrow down whats wrong because php obviously works but something else is breaking. I narrow it down to the following call:

$db = DB::connect($url);

any echo statements after this never show up, but an echo statement immediately prior does.

since no lines seem to be called immediately after that line even the error checking I used:

if (PEAR::isError($db)) {
// handle error
}

never gets processed either.

I even tried putting a try/catch around the line, and tried setting the PEAR::setErrorHandling a function that just echos out a word and none of them are showing up/being processed.

It's like everything just dies on that one line trying to connect.

any suggestions on how to diagnose this?
 
Do a phpinfo() and see what version of PHP and MySQL they're running on the server. Hostgator offers PHP 5 and MySQL 5, but you have to explicitly tell them you want MySQL 5 running (I believe) via e-mail.
 
Yeah I found that out this morning, I noticed it is PHP4 by default and they told me how to enable PHP5 by editting the htaccess file and adding a line. So I got PHP5 on it now but that was before I started trying to run my application and ran into this problem

Edit: but now that you mentioned mysql I went and checked that just now and noticed they gave me mysql 4.... this must be the problem now then because I've developed on mysql 5
 
Back
Top