Daily Archives

Articles indexed Saturday January 15 2011

Page 3/28 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to solve Python memory leak when using urrlib2?

    - by b_m
    Hi, I'm trying to write a simple Python script for my mobile phone to periodically load a web page using urrlib2. In fact I don't really care about the server response, I'd only like to pass some values in the URL to the PHP. The problem is that Python for S60 uses the old 2.5.4 Python core, which seems to have a memory leak in the urrlib2 module. As I read there's seems to be such problems in every type of network communications as well. This bug have been reported here a couple of years ago, while some workarounds were posted as well. I've tried everything I could find on that page, and with the help of Google, but my phone still runs out of memory after ~70 page loads. Strangely the Garbege Collector does not seem to make any difference either, except making my script much slower. It is said that, that the newer (3.1) core solves this issue, but unfortunately I can't wait a year (or more) for the S60 port to come. here's how my script looks after adding every little trick I've found: import urrlib2, httplib, gc while(true): url = "http://something.com/foo.php?parameter=" + value f = urllib2.urlopen(url) f.read(1) f.fp._sock.recv=None # hacky avoidance f.close() del f gc.collect() Any suggestions, how to make it work forever without getting the "cannot allocate memory" error? Thanks for advance, cheers, b_m update: I've managed to connect 92 times before it ran out of memory, but It's still not good enough. update2: Tried the socket method as suggested earlier, this is the second best (wrong) solution so far: class UpdateSocketThread(threading.Thread): def run(self): global data while 1: url = "/foo.php?parameter=%d"%data s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(('something.com', 80)) s.send('GET '+url+' HTTP/1.0\r\n\r\n') s.close() sleep(1) I tried the little tricks, from above too. The thread closes after ~50 uploads (the phone has 50MB of memory left, obviously the Python shell has not.) UPDATE: I think I'm getting closer to the solution! I tried sending multiple data without closing and reopening the socket. This may be the key since this method will only leave one open file descriptor. The problem is: import socket s=socket.socket(socket.AF_INET, socket.SOCK_STREAM) socket.connect(("something.com", 80)) socket.send("test") #returns 4 (sent bytes, which is cool) socket.send("test") #4 socket.send("test") #4 socket.send("GET /foo.php?parameter=bar HTTP/1.0\r\n\r\n") #returns the number of sent bytes, ok socket.send("GET /foo.php?parameter=bar HTTP/1.0\r\n\r\n") #returns 0 on the phone, error on Windows7* socket.send("GET /foo.php?parameter=bar HTTP/1.0\r\n\r\n") #returns 0 on the phone, error on Windows7* socket.send("test") #returns 0, strange... *: error message: 10053, software caused connection abort Why can't I send multiple messages??

    Read the article

  • Configuring zend to use gmail smtp: Windows Apache dev-environment: "Could not open socket" error - repeatedly - going mad

    - by confused
    My dev environment is Win XP SP2 / Apache 2.something PHP 5.something_or_other My prod env is Linux Ubuntu / Apache 2.something_else PHP 5.something_or_other_else The code is all Zend Framework Version: 1.11.1 I can telnet to: smtp.gmail.com 465 from the PC. I have Mercury configured on my PC to use gmail as it's smtp host and it works just fine. (MercuryC SMTP Client). Mercury is set to use port 465 and SSL on smtp.gmail.com -- No problem. Zend mail works just fine on my production environment using the production mail server to send out mail. It's the same basic application.ini but with different values in the mail variables. On my local PC dev setup, my application.ini contains: (same values as I use in Mercury) mail.templatePath = APPLICATION_PATH "/emails" mail.sender.name = "myAccount" mail.sender.email = "[email protected]" mail.host = smtp.gmail.com mail.smtp.auth = "login" mail.smtp.username = "[email protected]" mail.smtp.password = "myPassWord" mail.smtp.ssl = "ssl" mail.smtp.port = 465 I have been doing trial and error for hours trying to get a single email out with no success. In every case, regardless of server or port settings it throws an error and reports: Could not open socket. Both Apache and Mercury Core are exceptions in my Windows Firewall config. Mercury seems to be having no problem. I have searched stackoverflow before posting this and have been googling for hours -- with no success. I am slowly losing my mind I would be very much obliged for any tip as to what might be wrong. Thanks for reading. =================== BTW When I use the SAME application.ini values on my local PC as on the production host, I get the same "Could not open socket" error. Those values are: mail.templatePath = APPLICATION_PATH "/emails" mail.sender.name = "otherUser" mail.sender.email = "[email protected]" mail.host = smtp.otherServer.com mail.smtp.auth = "login" mail.smtp.username = "[email protected]" mail.smtp.password = "otherPAssWord" mail.smtp.ssl = "ssl" mail.smtp.port = 465 I know these work in the production (Ubuntu) environment. I'm utterly baffled.

    Read the article

  • Determining when stringByEvaluatingJavaScriptFromString has finished

    - by alku83
    I have a UIWebView which loads up an HTML page. This page has two buttons on it, say Exit and Submit. I don't want users to be able to click the Exit button, so once the page has finished loading (ie. webViewDidFinishLoad is called), I use stringByEvaluatingJavaScriptFromString to remove one of these buttons, by manipulating the HTML. I also disable user interaction on the UIWebView on webViewDidStartLoad, and enable it again on webViewDidFinishLoad. The problem I am finding is that stringByEvaluatingJavaScriptFromString takes a second or two to complete, and it seems to be done in it's own thread. So what is happening is that webViewDidFinishLoad is called, user interaction is enabled on the UIWebView, and if the user is quick, they can click the Exit button before stringByEvaluatingJavaScriptFromString has finished. As stringByEvaluatingJavaScriptFromString seems to be on it's own thread with no way to know when it's finished (it doesnt call webViewDidFinishLoad), the only way to completely prevent users from tapping the Exit button that I can see is to only enable user interaction on the UIWebView after some delay, which is unreliable (how can I really know how long to delay for?). Am I correct in that stringByEvaluatingJavaScriptFromString is done on it's on thread, and I have no way of being able to tell when it's finished? Any other suggestions for how to get around this problem? EDIT: In short, what I want to know is if it is possible to disable a UIWebView while stringByEvaluatingJavaScriptFromString is executing, and re-enable the UIWebView when the javascript is finished. EDIT 2: There's an article here which seems to imply you can somehow poll the JS engine to see when it's finished, but I can't find any other references saying the same thing: http://drnicwilliams.com/2008/11/10/to-webkit-or-not-to-webkit-within-your-iphone-app/ EDIT 3 Based on the answer from Brad Smith, it seems that I actually need to know when the UIWebView has finished loading itself after the javascript has executed. It's looking more and more like I just need to put a delay of sorts in there.

    Read the article

  • Can't boot from CD

    - by Jason Swett
    I installed Ubuntu on a PowerBook G4 and it only works about 10% of the time. For this reason I decided to re-install OS X, but my machine won't boot from CD. It also won't boot Ubuntu the vast majority of the time, so I'm kind of screwed. After a ton of tries, I finally got my machine to boot a Linux command line. Is there anything I can do at this point to make my machine more runnable, just for the sake of installing OS X?

    Read the article

  • Why is it possible to deploy a hypervisor within a hypervisor?

    - by blade3
    Hi, Why is that a hypervisor, which alledgedly needs to be on physical hardware, can be deployed within a VM? For example, XenServer (the actual hypervisor) can be deployed in an ESX VM? Why is this possible (Although not a good idea for many reasons, but still works). Also, why do people say a hypervisor needs physical hardware (from an architectural point of view, rather than obvious performance reasons). Thanks

    Read the article

  • WGet from one site on a server to another site on the same server

    - by JoshReedSchramm
    Hey all, I've recently been asked to administer a couple ubuntu boxes running web servers. I'm a dev by trade so if this question is fairly noob please forgive. We have about a dozen sites running on this box. 2 of our sites need to talk back and forth over a restful api. Unfortunately we are having issues with the sited connection to each other via wget. When we try and run wget manually from the command line from the server pointing to a site also on that server it hangs and eventually times out. If we do the same thing from outside the server to the same site on the server it works. Is there something that could be preventing sites on the same server from communicating with each other? The same thing happens pinging the site from the server.

    Read the article

  • SSH Server Timeout on port 22 but not on higher port

    - by mikelberger
    If I run an SSH server on my Windows 2008 server box on the default port 22 I always get Operation Timed Out on the client. If I run it on another port (say 2222) it works fine. I've opened up the firewall. Netstat shows that the server is listening on the correct port. I have used two different Windows SSH servers (freeSSHd and WinSSHD) and they both have the same result. What else could be causing the difference between running the SSH server on port 22 versus port 2222?

    Read the article

  • Capture the build number for a remote-triggered Hudson job?

    - by EMiller
    I have a very simple inhouse web app from which certain Hudson builds (on another server) can be triggered remotely. I have no problem triggering the builds, but I don't know how to capture the associated build number for later reference. I'm using the buildWithParameters trigger, and the actual result of that call is just a mess of HTML - I don't believe it gives me back the build number. I started down the path of pulling the whole build list for the job (via the api), and then attempting to reconcile that list against my records - but that's much more complicated than I'd like it to be. I also considered sleeping for a few seconds after launching the job, and then grabbing the latestBuild from the Hudson api - but I'm sure that's going to go wrong at some point (someone will fire off two jobs quickly, and I'll get the association wrong).

    Read the article

  • Python/Lesta.A worm

    - by Hanks
    My Nod32 have been catching something that is apparently identified as Python/Lesta.A worm. No matter how many times I tell Nod32 to delete and quarantine the file, it always re-appear, the situation will repeat about 3-4 times a day. This thing has been creating a folder called "pamela" in one of my drives, it sometimes also creates a "xxx.folder" file, which Nod32 identifies as "Exploit/CodeBase virus". I have Googled, and done pretty much everything related to this: a full scan in safe mode with no networking turned on, and also ran Ad-Aware, SpyBot, SpyHunter, ComboFix and cleaned the registry. Any idea how I can completely get rid of this annoying virus/worm?

    Read the article

  • How do you do ASP.Net performance testing?

    - by John
    Our team is in need of a performance testing process. We use ASP.Net (both web forms and MVC) and performance testing is not currently built into our projects. We occasionally do some ad-hoc analysis, such as checking the load on the server or SQL Server Profiler, but we don't have a true beginning to end, built into the project performance testing methodology. Where is a good place to start? I'm interested in both: Process - General knowledge, including best practices. Essential list of tools. I'm aware of a few tools, such as what's built into the pricier versions of VS 2010 and JetBrains products, though I haven't used them.

    Read the article

  • PHP Comparing 2 Arrays For Existence of Value in Each

    - by Dr. DOT
    I have 2 arrays. I simply want to know if one of the values in array 1 is present in array 2. Nothing more than returning a boolean true or false Example A: $a = array('able','baker','charlie'); $b = array('zebra','yeti','xantis'); Expected result = false Example B: $a = array('able','baker','charlie'); $b = array('zebra','yeti','able','xantis'); Expected result = true So, would it be best to use array_diff() or array_search() or some other simple PHP function? Thanks!

    Read the article

  • How does this If conditional work in Python?

    - by Sergio Boombastic
    from google.appengine.api import users from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app class MainPage(webapp.RequestHandler): def get(self): user = users.get_current_user() if user: self.response.headers['Content-Type'] = 'text/plain' self.response.out.write('Hello, ' + user.nickname()) else: self.redirect(users.create_login_url(self.request.uri)) application = webapp.WSGIApplication( [('/', MainPage)], debug=True) def main(): run_wsgi_app(application) if __name__ == "__main__": main() I don't understand how this line works: if user: self.response.headers['Content-Type'] = 'text/plain' self.response.out.write('Hello, ' + user.nickname()) else: self.redirect(users.create_login_url(self.request.uri)) I'm guessing the users.get_current_user() return a boolean? Then, if that is the case how can it get a .nickname() method? Thanks for the guidance.

    Read the article

  • Using long polling with WinForms Clients in .NET

    - by user544538
    Hi We need to develop a .NET application, basically a WinForms client, which needs to be notified of changes only from the server to update the UI only in case of necessity and not every time. We initially thought of NetTCPBinding but understood that it has problems with firewalls across domains and secure networks. We now consider long-polling as a viable option but we could only find this being used with WPF and XAML clients. For example, http://code.msdn.microsoft.com/duplexhttp But we could not find anything with WinForms. My opinion is that long-polling has to do with WCF and does not matter what UI technology is used (within .NET). Do you think it is possible to use long-polling with a custom WCF channel for WinForms? I am on the way to develop a POC but dont have much time. Any help in the right direction is much appreciated. Thanks much Charles

    Read the article

  • OpenCV in Python can't scan through pixels

    - by Marco L.
    Hi everyone, I'm stuck with a problem of the python wrapper for OpenCv. I have this function that returns 1 if the number of black pixels is greater than treshold def checkBlackPixels( img, threshold ): width = img.width height = img.height nchannels = img.nChannels step = img.widthStep dimtot = width * height data = img.imageData black = 0 for i in range( 0, height ): for j in range( 0, width ): r = data[i*step + j*nchannels + 0] g = data[i*step + j*nchannels + 1] b = data[i*step + j*nchannels + 2] if r == 0 and g == 0 and b == 0: black = black + 1 if black >= threshold * dimtot: return 1 else: return 0 The loop (scan each pixel of a given image) works good when the input is an RGB image...but if the input is a single channel image I get this error: for j in range( width ): TypeError: Nested sequences should have 2 or 3 dimensions The input single channel image (called 'rg' in the next example) is taken from an RGB image called 'src' processed with cvSplit and then cvAbsDiff cvSplit( src, r, g, b, 'NULL' ) rg = cvCreateImage( cvGetSize(src), src.depth, 1 ) # R - G cvAbsDiff( r, g, rg ) I've also already noticed that the problem comes from the difference image got from cvSplit... Anyone can help me? Thank you

    Read the article

  • Argument passing regarding ivars

    - by StoneBreaker
    I am passing an iVar into a function. The iVar is a double. The value of the iVar inside the function is correct, but the value of the iVar outside the function is not changed. This must have something to do with the way that I am receiving the iVar into the function. How do I pass a double iVar in so that its value is changed in the object and not only in the function? I do the same thing with pointers and the results are as expected, so I think I am not understanding scalar argument passing in c/objective-c.

    Read the article

  • J2EE and alternatives

    - by Ilya K
    Hello, I am J2SE developer but I have rich web-background (php, perl/cgi and so on) and now I am starting new project. It will have web interface, spaghetti business logic, relational database as storage and connections to other services. I do it from the scratch. My colleagues told me to use spring, spring security and struts. I look briefly at J2EE spec and found that it covers almost all aspects of enterprise application. I asked my colleagues why do they need spring and struts, but looks like they use technologies simply because they are familiar with them and not familiar with classic J2EE stack. So, my question is: what is bad about J2EE? Why do I need spring if there are JNDI lookups? It will take a day or two to create fake InitialContext for unit-tests. And that is all: I stand with out of external tools like spring. Why do I need spring-security if there is a security built in Servlets spec? I can map any request to any servlet using web.xml, no struts.xml is needed. I can use servlet-filters instead of struts interceptors. There is RMI, so I do not need spring-remote. And so on.. Why should I bother my self with all that fancy stuff if there is J2EE? I really want to find situation when J2EE is not enough. Do you have any? Thanks!

    Read the article

  • Firefox HTML5 video playback inconsistancy

    - by Daniel Redwood
    Hey all, I've got an HTML5 video on a page. When tested locally, Chrome, Safari, and Opera work beautifully. Firefox plays it, but doesn't loop as efficiently as the others. The real problem is when it's tested off a server. Firefox doesn't play the video, but recognizes there is one there. I was wondering if all that open ended three-different-ways syntax can be swung in Firefox's favor. Thanks! HTML: <video id="vid_home" width="780" height="520" autoplay="autoplay" loop="loop"> <source src="Video/fernando.ogv" type="video/ogg" /> <source src="Video/fernando.m4v" type="video/mp4" /> Your browser does not support this videos playback. </video>

    Read the article

  • Execute a line in a text file

    - by apophis
    Hi I have a program that reads text files filled with code designed to be executed line by line by the program, like a script file. The problem is that I don't no how to do the line executing part. Here is my code, I thought using the \r would fool the console. But it just shows me a list of lines in the file. if (tok[0] == "read" && length == 2) { try { StreamReader tr = new StreamReader(@"C:\Users\Public\"+tok[1]+".txt"); while (!tr.EndOfStream) { Console.WriteLine(tr.ReadLine()); } } catch { Console.WriteLine("No such text file.\n"); } Prompt(); If I knew what to search for to fix my problem in Google, I would have. But I've got no idea. Thanks

    Read the article

  • Servlet response wrapper has encoding problem

    - by John O
    A servlet response wrapper is being used in a Servlet Filter. The idea is that the response is manipulated, with a 'nonce' value being injected into forms, as part of defence against CSRF attacks. The web app is using UTF-8 everywhere. When the Servlet Filter is absent, no problems. When the filter is added, encoding issues occur. (It seems as if the response is reverting to 8859-1.) The guts of the code : final class CsrfResponseWrapper extends AbstractResponseWrapper { ... byte[] modifyResponse(byte[] aInputResponse){ ... String originalInput = new String(aInputResponse, encoding); String modifiedResult = addHiddenParamToPostedForms(originalInput); result = modifiedResult.getBytes(encoding); ... } ... } As I understand it, the transition between byte-land and String-land should specify an encoding. That is done here, as you can see, in two places. The value of the 'encoding' variable is 'UTF-8'; the alteration of the String itself is standard string manipulation (with a regex), and never specifies an encoding (addHiddenParamToPostedForms). Where am I in error about the encoding? EDIT: Here is the base class (sorry it's rather long): package hirondelle.web4j.security; import javax.servlet.ServletOutputStream; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponseWrapper; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintWriter; /** Abstract Base Class for altering response content. (May be useful in future contexts as well. For now, keep package-private.) */ abstract class AbstractResponseWrapper extends HttpServletResponseWrapper { AbstractResponseWrapper(ServletResponse aServletResponse) throws IOException { super((HttpServletResponse)aServletResponse); fOutputStream = new ModifiedOutputStream(aServletResponse.getOutputStream()); fWriter = new PrintWriter(fOutputStream); } /** Return the modified response. */ abstract byte[] modifyResponse(byte[] aInputResponse); /** Standard servlet method. */ public final ServletOutputStream getOutputStream() { //fLogger.fine("Modified Response : Getting output stream."); if ( fWriterReturned ) { throw new IllegalStateException(); } fOutputStreamReturned = true; return fOutputStream; } /** Standard servlet method. */ public final PrintWriter getWriter() { //fLogger.fine("Modified Response : Getting writer."); if ( fOutputStreamReturned ) { throw new IllegalStateException(); } fWriterReturned = true; return fWriter; } // PRIVATE /* Well-behaved servlets return either an OutputStream or a PrintWriter, but not both. */ private PrintWriter fWriter; private ModifiedOutputStream fOutputStream; /* These items are used to implement conformance to the javadoc for ServletResponse, regarding exceptions being thrown. */ private boolean fWriterReturned; private boolean fOutputStreamReturned; /** Modified low level output stream. */ private class ModifiedOutputStream extends ServletOutputStream { public ModifiedOutputStream(ServletOutputStream aOutputStream) { fServletOutputStream = aOutputStream; fBuffer = new ByteArrayOutputStream(); } /** Must be implemented to make this class concrete. */ public void write(int aByte) { fBuffer.write(aByte); } public void close() throws IOException { if ( !fIsClosed ){ processStream(); fServletOutputStream.close(); fIsClosed = true; } } public void flush() throws IOException { if ( fBuffer.size() != 0 ){ if ( !fIsClosed ) { processStream(); fBuffer = new ByteArrayOutputStream(); } } } /** Perform the core processing, by calling the abstract method. */ public void processStream() throws IOException { fServletOutputStream.write(modifyResponse(fBuffer.toByteArray())); fServletOutputStream.flush(); } // PRIVATE // private ServletOutputStream fServletOutputStream; private ByteArrayOutputStream fBuffer; /** Tracks if this stream has been closed. */ private boolean fIsClosed = false; } }

    Read the article

  • elisp: call command on current file

    - by Jasie
    Hello, I want to set a key in emacs to perform a shell command on the file in the buffer, and revert the buffer without prompting. The shell command is: p4 edit 'currentfilename.ext' (global-set-key [\C-E] (funcall 'revert-buffer 1 1 1)) ;; my attempt above to call revert-buffer with a non-nil ;; argument (ignoring the shell command for now) -- get an init error: ;; Error in init file: error: "Buffer does not seem to be associated with any file" Completely new to elisp. From the emacs manual, here is the definition of revert-buffer: Command: revert-buffer &optional ignore-auto noconfirm preserve-modes Thanks!

    Read the article

  • android: error on SQLiteDatabase rawQuery (fetching data)

    - by Jin
    So I have a SQliteDatabase mDb. It only has one column, and its data are Strings for previously saved inputs. I'm trying to populate all the data from mDb into a String[] for AutoCompleteTextView (so that the autocomplete is based on previous inputs), and here's my code to get all of the String. public String[] fetchAllSearch() { ArrayList<String> allSearch = new ArrayList<String>(); Cursor c = mDb.rawQuery("select * from " + DATABASE_TABLE, null); c.moveToFirst(); if (c.getCount() > 0) { do { allSearch.add(c.getString(c.getColumnIndex("KEY"))); } while (c.moveToNext()); } String[] foo = (String[]) allSearch.toArray(); if (foo == null) { foo = new String[] {""}; } return foo; } my CREATE_TABLE command is private static final String DATABASE_CREATE = "create table " + DATABASE_TABLE; .. public void onCreate(SQLiteDatabase db) { db.execSQL(DATABASE_CREATE); } But for some reason the line mDb.rawQuery(...) is giving me "no such table found" exception, and for the life of me I can't figure out why. Any pointers?

    Read the article

  • help convert pop3 connection to imap

    - by MyHeadHurts
    tcpClient.Connect(hostName, 110) Dim networkStream As NetworkStream = tcpClient.GetStream() Dim bytes(tcpClient.ReceiveBufferSize) As Byte Dim sendBytes As Byte() networkStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize)) sendBytes = Encoding.ASCII.GetBytes("User " + userName + vbCrLf) networkStream.Write(sendBytes, 0, sendBytes.Length) sTemp = networkStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize)) sendBytes = Encoding.ASCII.GetBytes("Pass " + userPassword + vbCrLf) networkStream.Write(sendBytes, 0, sendBytes.Length) sTemp = networkStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize)) sendBytes = Encoding.ASCII.GetBytes("STAT" + vbCrLf) networkStream.Write(sendBytes, 0, sendBytes.Length) sTemp = networkStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize)) sendBytes = Encoding.ASCII.GetBytes("RETR " + messageNumber + vbCrLf) networkStream.Write(sendBytes, 0, sendBytes.Length) networkStream.Read(bytes, 0, CInt(tcpClient.ReceiveBufferSize)) returnMessage = Encoding.ASCII.GetString(bytes) EmailContent.Text = returnMessage sendBytes = Encoding.ASCII.GetBytes("QUIT" + vbCrLf) networkStream.Write(sendBytes, 0, sendBytes.Length) tcpClient.Close() Catch ex As Exception EmailContent.Text = "Could not retrieve email or your inbox is empty" End Try

    Read the article

  • python - remove string from words in an array

    - by tekknolagi
    #!/usr/bin/python #this looks for words in dictionary that begin with 'in' and the suffix is a real word wordlist = [line.strip() for line in open('/usr/share/dict/words')] newlist = [] for word in wordlist: if word.startswith("in"): newlist.append(word) for word in newlist: word = word.split('in') print newlist how would I get the program to remove the string "in" from all the words that it starts with? right now it does not work

    Read the article

  • My Apache doesn't execute PHP code with <? ?> Tag [closed]

    - by amateurs
    Possible Duplicate: How to enable PHP short tags ? I am using Apache Friends XAMPP (Basis Package) version 1.7.3 Apache 2.2.14 (IPV6 enabled) MySQL 5.1.41 (Community Server) with PBXT engine 1.0.09-rc PHP 5.3.1 (PEAR, Mail_Mime, MDB2, Zend) and i am running php files, that i code with <? ?> tags not <?php ?>. but the apache server won't execute my code, but if i try with <?php ?> tags, the code works. Anyone know how to enable the server to execute php code with <? ?> tags ?

    Read the article

  • Mac OS X and static boost libs -> std::string fail

    - by Ionic
    Hi all, I'm experiencing some very weird problems with static boost libraries under Mac OS X 10.6.6. The error message is main(78485) malloc: *** error for object 0x1000e0b20: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug [1] 78485 abort (core dumped) and a tiny bit of example code which will trigger this problem: #define BOOST_FILESYSTEM_VERSION 3 #include <boost/filesystem.hpp> #include <iostream> int main (int argc, char **argv) { std::cout << boost::filesystem::current_path ().string () << '\n'; } This problem always occurs when linking the static boost libraries into the binary. Linking dynamically will work fine, though. I've seen various reports for quite a similar OS X bug with GCC 4.2 and the _GLIBCXX_DEBUG macro set, but this one seems even more generic, as I'm neither using XCode, nor setting the macro (even undefining it does not help. I tried it just to make sure it's really not related to this problem.) Does anybody have any pointers to why this is happening or even maybe a solution (rather than using the dynamic library workaround)? Best regards, Mihai

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >