Search Results

Search found 5 results on 1 pages for 'danp'.

Page 1/1 | 1 

  • PHPMailer, fsockopen(), possible Apache issue?

    - by danp
    I'm using PHPMailer to send out site contacts. In development, the script works perfectly with the GMail service over smtp. However, in production, inside the client's DMZ, it appears unable to connect to the SMTP service they have there. I have connected to the same service using telnet to port 25, so I know for sure it exists and is available to the server. Are there any circumstances where php might not be able to open a socket connection (fsockopen)...? The php extension openssl is loaded and ok. The error is "Unable to connect to SMTP service". Thanks!

    Read the article

  • Echoing variable construct instead of content

    - by danp
    I'm merging two different versions of a translations array. The more recent version has a lot of changes, over several thousand lines of code. To do this, I loaded and evaluated the new file (which uses the same structure and key names), then loaded and evaluated the older version, overwriting the new untranslated values in the array with the values we already have translated. So far so good! However, I want to be able to echo out the constructor for this new merged array so I can cut and paste it into the new translation file, and have job done (apart from completing the rest of the translations..). The code looks like this (lots of different keys, not just index): $lang["index"]["chart1_label1"] = "Subscribed"; $lang["index"]["chart1_label2"] = "Unsubscribed"; And the old.. $lang["index"]["chart1_label1"] = "Subscrito"; $lang["index"]["chart1_label2"] = "Não subscrito"; After loading the two files, I end up with a merged $lang array, which I then want to echo out in the same form, so it can be used by the project. However, when I do something like this.. foreach ($lang as $key => $value) { if (is_array($value)) { foreach ($value as $key2 => $value2) { echo "$lang['".$key."']"; // ... etc etc } } } ..obviously I get "ArrayIndex" etc etc instead of "$lang". How to echo out $lang without it being evaluated..? Once this is working, can add in the rest of the brackets etc (I realise they are missing), but just want to make this part work first. If there's a better way to do this, all ears too! Thanks.

    Read the article

  • JSON Syntax, what is this?

    - by danp
    I understand concepts of JSON ok, but after starting to use ebay's api, I came across a notation which I've not seen before, and was wondering if anyone could explain what's going on with it? { "findItemsByKeywordsResponse": [ { "ack": [ "Success" ], "version": [ "1.5.0" ], "timestamp": [ "2010-06-16T08:42:21.468Z" ], "searchResult": [ { "@count": "0" } ], "paginationOutput": [ { "pageNumber": [ "0" ], "entriesPerPage": [ "10" ], "totalPages": [ "0" ], "totalEntries": [ "0" ] } ] } ] } What's the "@count" thing? I noticed when I reference it in chrome, it throws an error: But in Firefox not. JSON Lint reports it's valid, as I'd expect... ;)

    Read the article

  • Apache file caching

    - by danp
    How does apache handle caching of certain files, and is it possible to explicitly say that certain files should be aggressively cached more than others, through the standard config files for a given host or virtualhost? To put it in context, I keep a lot of site content in various XML files, and I'd like to be able to say that this file will be used a lot, and therefore cache it as much as possible..? Does apache do this kind of thing intelligently and on the fly..? Will it observe which files are more popular than others and try to match cache hits appropriately..? Lots of questions in one, but the basic idea should be clear enough. edit: to be clear, these are resource files which are loaded and interpreted by PHP - but php as a process is spawned inside apache.. right? Please help!

    Read the article

  • Securing database keys for client-side processing

    - by danp
    I have a tree of information which is sent to the client in a JSON object. In that object, I don't want to have raw IDs which are coming from the database. I thought of making a hash of the id and a field in the object (title, for example) or a salt, but I'm worried that this might have a serious effect on processing overhead. SELECT * FROM `things` where md5(concat(id,'some salt')) = md5('1some salt'); Is there a standard practice for obscuring IDs in this kind of situation?

    Read the article

1