Jump to content

jawapro

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jawapro's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. G'day, I am trying to set up a webserver as a backup for our current server. So far its going fine - except for one snag. We use Postgres a LOT - but most of it was written before I arrived, and so our code dosnt have a specfic host=localhost in the pg_connect string. $connection = pg_connect("dbname=??? port=5432 user=???"); This works fine on the old server - and we have a heap of scripts that use it (it would be awefull to try and fix each instance) On the new server it seems to require a host in the string $connection = pg_connect("host=localhost dbname=??? port=5432 user=???"); Is there a way to set it so it uses localhost by default if not specified (as it appear to do in the old server). At the moment all I get is an error saying it cant connect. The error complains that it cant find "/tmp/.s.PGSQL.5432" which isnt on the new server (but is on the old) - but I dont know how to set that up either. Sorry for being such a pain - but any help would be appreciated. Cheers,
  2. Thanks muchly - I knew it was something simple - but I couldnt remember it. Thanks.  ;D
  3. G'day, I'm sure this has been asked - but I couldnt find it here (or even on the net). What I want is a way to strip the first 3 characters in a php string. Thanks in advance.
  4. That one would solve the problems I mentioned  ;D
  5. If that isnt the problem it could be cause [code]’$password'[/code] has one ’ and one ' which seem to be different. That COULD be a problem. Post the lines around the problem line, to see if the problem is in the ones before it.
  6. Somehow you'll also need to check for any users with timeouts that have already passed, have gone away, but are still recorded as being logged in. For example, if someone clicks the CLOSE button on the browser WITHOUT logging out, the database will still think they are logged in. There would be ways around it - but they get sort of complicated.
  7. Are you recording Ad clicks to try and benefit users that click more? If Google finds out - they'll deduct money from your account. You're not even allowed to have things like "Support this website by clicking these ads" sort of messages. I had something about clicking ads in a blog once, and they emailed me and told me to remove it or else they'd deactivate the account. They also get pissed off if you click your own ads. JP
  8. If you were using GET to post the variables and using POST to read them it wouldnt have worked. When you say it outputs everything into one column what do you mean? JP
  9. It says that because when you run SQL from PHP it ADDS a semi-colon at the end. So you'd end up with ;;. But I dont think it kills it - its just not necessary
  10. Try using [code]" "[/code] instead of [code]" "[/code] That is the HTML code to force a space.
  11. Far as I know that should work. The echo "<a href='$German'>German</a >"; part anyway. But in THAT file you need to have a $German = whateveritdoes; statement before that echo line. So something like [code] $yesorno = $_POST['myselector']; if ($yesorno == yes) { $German = 'german.php'; } else { $German = 'notavailable.php'; }[/code] Or something where it gets the data into $German. But the echo code should work fine. Did on my server when I tried it.
  12. Did it fix the problem?
  13. Comment out the SQL part and echo: $name  $price $item $date to make sure you are actually getting the values from the previous script. ------- Modify ------- Not really sure that the semi-colon causes the problem. I know it isnt needed - but I didnt think it killed it either.
  14. Which part dosnt work? What output do you get?
  15. I have no idea really. Could be anything from 20 - 1000 depending on the server and who set it up. The only ways to tell would be to ask whoever was in charge, or just try it at 20, then 40, then 80, then 100, then 150 etc and see when it dosnt work. And when it dosnt work, start going backwards until it works again (with your email at the end - so if you get one, you know it works). You said 3 worked, so at worst you could send three and then recall the same script - but that'd suck.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.