cluce Posted August 13, 2007 Share Posted August 13, 2007 I am trying to run some php code on our web hosting company's server but I keep getting blank pages. He says, "According to my sysadmin it's running both 4 and 5 side by side and will display the earlier version in the phpinfo() which is php 4." All my php pages works on my loacl machine just not the company's web server. The guy that runs the company says he dont know what esle to do in troubleshooting. He says it is usually the syntax error that gives blank pages but I cant see that to be because it works fine locally. Can someone give me any ideas? I keep getting a blank page when I try to run a simple databse connection string that should definiely redirect to the error page but it wont. Which also works on my local machine. <?php $mysqli = @mysqli_connect("server", "username", "password", "database") or die(header("Location: error.html")); ?> But when I use Dreamweaver to connect to the database it connects just this connection string seems to not work and other php code ddealing with the database. But I did get an error to display when it was ttime to execute the mysqli funtion. "Fatal error: Call to undefined function: mysqli_real_escape_string() in /home/content/L/a/n/Langley/html/userlogin_e.php on line 12" Can someone tell me this error is happening becasue mysqli functions is disabled or the $mysqli connection string is not getting executed which it wasn't? Or it could be both reasons? Do you think he is actually running php 5 or mysqli functions and/or disabled? Is it possible to run 4 and 5 at the sametime? Quote Link to comment Share on other sites More sharing options...
cluce Posted August 13, 2007 Author Share Posted August 13, 2007 OK, when I type in phpinfo(); it pulls up php 4. Does this guarantee me I am running php 4 or could I be running php 5 on the side?? Because the guy running the web server says his sysadmin shows 4 and 5 side by side but I pull php 4 from the domain. I am starting to think this guy dont know what he is doing and he has php 4 running but I am still learning this so I am not sure. can someone help me with this? Quote Link to comment Share on other sites More sharing options...
d22552000 Posted August 13, 2007 Share Posted August 13, 2007 do phpinfo('cgi'); that will bring up any side scripts (including the only way to run multiple php ). oh and so you know, you cannot DIE a header. DIE stops the page from loading, not just sending. use header(); exit(1); instead. Quote Link to comment Share on other sites More sharing options...
cluce Posted August 13, 2007 Author Share Posted August 13, 2007 OK. I just did phpinfo(); and phpinfo('cgi'); and the ybot hshow php 4. Does this guarantee me that I am running php 4?? Also, you can die a header I do it all the time. Quote Link to comment Share on other sites More sharing options...
trq Posted August 13, 2007 Share Posted August 13, 2007 Also, you can die a header I do it all the time. No. die() accepts a string. Quote Link to comment Share on other sites More sharing options...
cluce Posted August 13, 2007 Author Share Posted August 13, 2007 Also, you can die a header I do it all the time. No. die() accepts a string. OH.....but it still redirects me to the error page?? Quote Link to comment Share on other sites More sharing options...
cluce Posted August 13, 2007 Author Share Posted August 13, 2007 I figured it out. he is running both versions. So I needed to rename my .php extensions to .php5 so that I can run my mysqli functions. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.