Jump to content


Photo

HELP - blank php web page


  • Please log in to reply
5 replies to this topic

#1 cello33

cello33
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 13 September 2006 - 09:34 PM

Hi
I have a web site thats uses mysql and php to display images. The galleries page has stopped working and rather then see links to various areas 2003 2004 2005 etc and a option to upload files I just see a blank white page.

The site is usually managed by a friend but they have gone awol for a few weeks so I am trying to solve the problem  myself. The code should not have been changed and I have checked that mysql dbase is running.

Can anyone else offer a few pointer of what to look for in a aid to fault finding.  All other pages work fine but they are just text/graphics.........HELP

#2 gijew

gijew
  • Members
  • PipPipPip
  • Advanced Member
  • 240 posts
  • LocationCalifornia

Posted 13 September 2006 - 09:47 PM

Well if the code is indeed still there and the database is still working what probably happened is that you're getting some raw data that is trying to be parsed by php.  What I mean is that you probably have an apostrphe or some ugly character that is trying to be displayed and the software wasn't written to accomodate such a thing.  You need to raise your error your reporting to see what kind of errors are being generated.
Off the top of my head you can do this in .htaccess or use php_ini_set() whcih you can look up in the manual.

Good luck and happy debugging, it's fun = /
I'm considered good looking in some countries

#3 cello33

cello33
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 13 September 2006 - 10:05 PM

Hi Thanks for your advice. I must say I am a complete PHP novice , infact all programming is a bit scary and especially when its my live site....oh well its broekn now so i cannot do any  more harm.

I have had a look at the error log and copied a selection. Can you interpret for me ........



[Tue Sep 12 22:49:43 2006] [error] [client x.x.x.x] PHP Fatal error:  (sql->query) Query failed: SQL was "SELECT * FROM pix_index WHERE catid = -1 ORDER BY timestamp DESC\n\tLIMIT -9,9" MySQL said: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-9,9' at line 2". in /home/virtual/site58/fst/var/www/html/lib/sql.php on line 28, referer: http://www.myownsite.co.uk/clients.php


Could it be that the sql or php code has been upgraded by the isp or my admin before he went awol....yours still perplexed!

Thanks

[

#4 HuggieBear

HuggieBear
  • Members
  • PipPipPip
  • Advanced Member
  • 1,899 posts
  • LocationEngland, UK

Posted 13 September 2006 - 10:31 PM

Yeah, MySQL's not happy there.  Possibly by something that's been entered into the database.

If you want to provide the code for just that page, obviously with any passwords taken out, then we'll be happy to take a look for you.  I'm about for the next 30 mins.

Regards
Rich
Advice to MySQL users: Get phpMyAdmin and test your queries work there first, take half the hassle out of diagnosis, also check the reserved words list.

Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools

#5 cello33

cello33
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 14 September 2006 - 08:27 PM

Hi
Tried to paste the code in but there appears to be a problem, browser wont connect with the code. Can I forward via email?

Thanks

#6 HuggieBear

HuggieBear
  • Members
  • PipPipPip
  • Advanced Member
  • 1,899 posts
  • LocationEngland, UK

Posted 14 September 2006 - 08:37 PM

Sure... bighuggybear (at) hotmail (dot) co (dot) uk

Huggie
Advice to MySQL users: Get phpMyAdmin and test your queries work there first, take half the hassle out of diagnosis, also check the reserved words list.

Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users