Jump to content

Dumps

Members
  • Posts

    27
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Dumps's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Answering my own question... This seems to break after I added some further classes to the models directory. In hindsight these should have been elsewhere, and, now they've been moved, the console command works again. Some kind of message would be nice though, rather than silent death.
  2. I'm experiencing issues with the console commands in Doctrine 2. During first set up of my project I could run the console commands to update the db from my annotated models without a problem e.g. doctrine orm:schema-tool:update --force Since then I've been diligently working away on the project and now need to run this again. However, now when the above runs nothing happens. No error message, no report on success - the command just completes silently. I'm presuming that I've done something that's broken this but I've no way of knowing without some kind of error report so I'm stumped. How can I work out what the problem is????
  3. At last I've solved this, and it was, as expected, quite simple. <?php session_start(); $test = "at last this works!!!"; session_register('test'); ?> and to use the session variable $test <?php session_start(); print_r($HTTP_SESSION_VARS['test']); ?>
  4. Nope no joy with that - it just returns an empty array. This is somewhat perplexing. ???
  5. register_globals is on so I've tried turning them off: <?php session_start(); ini_set('register_globals', 0); global $HTTP_SESSION_VARS; $HTTP_SESSION_VARS['tester'] = 'This is a test'; ?> and it makes no difference - other pages just return an empty array. I thought globals should be on anyway. Yes, upgrading would be the simplest option but its a work box (I certainly wouldn't pay for 4.0.1) and IT are reluctant to upgrade for some reason. I am working on them, but in the meantime....... This is a strange one as I've got HTTP_POST_VARS working fine, its just the session array thats the problem.
  6. According to the documentation that directive only became available with version 5 and I'm unfortunately having to use 4.0.1. Thanks anyway but no joy there. Hmmmm, this is a knotty one.....
  7. I didn't think you could use $_SESSION on anything earlier than PHP 4.1.0. and I have to use 4.0.1 (this is beyond my control). Still stuck - I'm sure there must be a simple explanation / something basic I'm missing....?
  8. Hmmm had tried that so have tried again: session_start(); global $HTTP_SESSION_VARS; $HTTP_SESSION_VARS['tester'] = 'This is a test'; and session_start(); global $HTTP_SESSION_VARS; print_r ($HTTP_SESSION_VARS); but still nothing. I just get Array() for the empty array. Cheers anyway but any other ideas?
  9. I have used $_SESSION successfully in the past, but the server I have to use for a project is using PHP 4.0.1 so I have to use HTTP_SESSION_VARS instead. I can't seem to get it to return a value for some reason. I've checked and register_globals is on. If I assign a value to a HTTP_SESSION_VARS variable I can return it on the same page ok: <?php session_start(); $HTTP_SESSION_VARS['tester'] = "This is a test"; print "{$HTTP_SESSION_VARS['tester']}"; ?> outputs: This is a test However, obviously this is not much use and I want to be able to use the variable on other pages - ie use it globally. If I try this on another page: <?php session_start(); print "{$HTTP_SESSION_VARS['tester']}"; ?> nothing is returned. Essentially I've used it in the same way as I would $_SESSION without success. Clearly I'm missing something - I've checked the docs and as far as I can make out this should work. Can anyone point me in the right direction please?
  10. I've used AddEmbeddedImage as detailed in the PHPmailer documentation to embed an image in an email: ...$mail->IsHTML(true); $mail->AddEmbeddedImage("images/$picciename", "my", "PropertyID_$propid", "base64", "image/jpeg"); $mail->Subject = "Property details for property $propid"; $mail->Body = "Embedded Image: <img src=\"cid:my\" >";... The email is sent successfully but the image is attached rather than embedded in the body of the email which is my objective. Can anyone help?
  11. I have Apache 2.0.59, PHP 5.2.1 and Postcast sever free edition v.2.6.0. I can send mail using Thunderbird to Postcast without a problem. Postcast has the hostname set as localhost and the port set as 25. My problem is that I cannot send mail using the phpmailer class. My test code is as follows; <?php require("class.phpmailer.php"); require("class.smtp.php"); require("phpmailer.lang-en.php"); $mail = new PHPMailer(); $mail->IsSMTP(); // telling the class to use SMTP $mail->Host = "127.0.0.1;localhost"; // SMTP server $mail->From = "Richard@richandclaire.net"; $mail->AddAddress("pilsdumps@gmail.com"); $mail->Subject = "first mailing"; $mail->Body = "hi ! \n\n this is First mailing I made myself with PHPMailer !"; $mail->WordWrap = 50; if(!$mail->Send()) { echo "Message was not sent"; echo "Mailer Error: " . $mail->ErrorInfo; } else { echo "Message has been sent"; } ?> This returns the following error message; Warning: fsockopen() [function.fsockopen]: unable to connect to 127.0.0.1:25 (An established connection was aborted by the software in your host machine. ) in C:\Web\Webserver\Apache\Apache2\htdocs\tests\phpmailer\class.smtp.php on line 105 Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:25 (An established connection was aborted by the software in your host machine. ) in C:\Web\Webserver\Apache\Apache2\htdocs\tests\phpmailer\class.smtp.php on line 105 Message was not sentMailer Error: SMTP Error: Could not connect to SMTP host. Any ideas why this doesn't work? This is my work machine and its frustrating because I have this successfully working at home.
  12. A colleague has presented another solution. Appending a randomly created number to the end of the picture eg. <img src="./images/{PICTURE}?sdjfs={myrand}"/> fools the browser into thinking that it is a different image and refreshes accordingly. A bit of a cadge, but works just fine.
  13. Will look into the javascript option, although I'm a bit confused as to why the update would work sometimes but not always....? Anyway, thanks a lot.
  14. I thought it may have something to do with the cache. Any idea how I might go about fixing this so the updated picture is always displayed?
×
×
  • 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.