Search Results

Search found 8408 results on 337 pages for 'cgi bin'.

Page 165/337 | < Previous Page | 161 162 163 164 165 166 167 168 169 170 171 172  | Next Page >

  • How Do I Rollout WP-Cache To 1000 WordPress Blogs?

    - by Volomike
    My client has 1000 WordPress blogs hosted on a server for customers. Each one is in its own domain through cpanel and SuPHP, running in CGI mode on Apache2.2. Now he wants me (I'm the PHP programmer) to get WP-Cache loaded out on each of these blogs and not just activated, but enabled. He also wants the timeout value set to 2 days instead of the default setting. I have root on LAMP. What is the preferred way to roll out an update to each blog such that on a page view, it sees if WP-Cache is enabled or not. If not, it needs to copy it out from a central source, activate it, and then enable it along with the different timeout value being used.

    Read the article

  • preg_match not defined in php4 in openwrt?

    - by user2723949
    I have installed the packages PHP4 and PHP4-CGI in openwrt through command line (opkg install) when I tried this simple code by putting this in the openwrt www folder, <?php $subject = "abcdef"; $pattern = '/^def/'; preg_match($pattern, $subject, $matches, PREG_OFFSET_CAPTURE, 3); print_r($matches); ?> I got this error Fatal error: Call to undefined function: preg_match() in /www/phptest.php on line 4 but php manual says preg_match() is defined in php4 also.. What might be the reason for this error? Is there any other PHP module that is to be installed? Or is there any alternate method for preg_match?

    Read the article

  • Win32 script environment for testing http redirects?

    - by Anders Lindahl
    The past few days I've been working with setting up an Apache server on Windows. The server is supposed to host several .htaccess files, each redirecting (or, in some cases, proxying) to different hosts. I want to create tests for these redirectons, and the solution I'm currently considering is a CGI script running on the same server, sending GET requests to it and verifying that it gets the correct redirection headers back. A scripting solution (vscript/jscript) seems worth exploring, but so far I've only managed to rule out Microsoft.XMLHTTP because it follows the redirect "behind the scenes". Are there any libraries or other solutions already present on a reasonably standard Windows Server that can do this kind of low-level HTTP work? If not, any other suggestions of simple environments to set up for verifying redirects?

    Read the article

  • Error 500 on template.render() with jinja2

    - by Asperitas
    I am working on playing with some Python to create a webapp. At first I put the HTML in a string, using %s to fill certain elements. That all worked perfectly. Now I want to put the HTML in a template, so I followed this tutorial. My code looks like this (I deleted irrelevant code for this error): import codecs import cgi import os import jinja2 jinja_environment = jinja2.Environment(loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__)))) class Rot13Handler(webapp2.RequestHandler): def get(self): template = jinja_environment.get_template('rot13.html') self.response.out.write(template.render({'text': ''})) When I replace just template.render({'text': ''}) a random string, the program works fine. I did add the latest jinja2 library to my app.yaml, and naturally my rot13.html does exist with the {{ text }} added. So could anyone please help me in the right direction? I don't know why it's going wrong.

    Read the article

  • Zend Server CE Apache mod_rewrite REQUEST_FILENAME SCRIPT_FILENAME Problem

    - by liumiuyong
    Hi,there! I use this .htaccess file in a project: RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] It works well in Apache 2.2 Recently I started to use Zend Server CE , the ReWrite Rule didn't work ! And this works: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] This is what Apache's document say: The variables SCRIPT_FILENAME and REQUEST_FILENAME contain the same value - the value of the filename field of the internal request_rec structure of the Apache server. The first name is the commonly known CGI variable name while the second is the appropriate counterpart of REQUEST_URI (which contains the value of the uri field of request_rec). Anyone can figure out why? Appreciate!

    Read the article

  • What are the common patterns in web programming?

    - by lankerisms
    I have been trying to write my first big web app (more than one cgi file) and as I kept moving forward with the rough prototype, paralelly trying to predict more tasks, this is the todo that got accumulated (In no particular order). * Validations and input sanitizations * Object versioning (to avoid edit conflicts. I dont want hard locks) * Exception handling * memcache * xss and injection protections * javascript * html * ACLs * phonetics in search, match and find duplicates (for form validation) * Ajaxify!!! (I have snipped off the project specific items.) I know that each todo will be quite tied up to its project and technologies used. What I am wondering though, is if there is a pattern in your todo items as well as the sequence in which you experienced guys have come across them.

    Read the article

  • Extract files from zip folder and store these files in blobstore

    - by Eng_Engineer
    i want to upload zip folder from file input in form the i want to extract the contents of this uploaded zip folder,and store the contents (files)of this zip in the blobstore in order to download them after putting these files in one folder,but the problem is that i can't deal with the zip folder directly(to read it), i tried as this: form = cgi.FieldStorage() file_upload = form['file'] zip1=file_upload.filename zipstream=StringIO.StringIO(zip1.read()) But the problem still that i can't read the zip as previous,also i tried to read zip folder directly like this: z1=zipfile.ZipFile(zip1,"r") But there was an error in this way.Please can any one help me.Thanks in advance.

    Read the article

  • Transferring binary file from web server to client

    - by Yan Cheng CHEOK
    Usually, when I want to transfer a web server text file to client, here is what I did import cgi print "Content-Type: text/plain" print "Content-Disposition: attachment; filename=TEST.txt" print filename = "C:\\TEST.TXT" f = open(filename, 'r') for line in f: print line Works very fine for ANSI file. However, say, I have a binary file a.exe (This file is in web server secret path, and user shall not have direct access to that directory path). I wish to use the similar method to transfer. How I can do so? What content-type I should use? Using print seems to have corrupted content received at client side. What is the correct method?

    Read the article

  • mod_perl and libs

    - by paulj3000
    Hi, I just installed my system with Oracle 64bit Linux5.4 running Apache Server version: Apache/2.2.3 and mod_perl 2. Now, I have my perl libraries set in a specific path: /my/perl/libs and I have adjusted my httpd.conf to compensate for this (I added the below): SetEnv MY_LIBS /my/perl/libs and in my cgi I'm setting my environment to compensate: use lib($ENV{'MY_LIBS'}); Now the problem: Sometimes my perl modules will recognize the path of /my/perl/libs and call all the functions appropriately, and sometimes they won't, thus thowing a 500 error. Some observations: when I restart apache (/etc/init.d/httpd restart), things work fine but then the 500 error comes up. Are there any ideas? What should I be looking at? Thanks

    Read the article

  • Why does Google Page-Speed say that elements need compressing, when they already are compressed?

    - by Peter Snow
    My page is compressed using the following in .htaccess <ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </ifModule> Yslow says that the page and specifically the elements which Page-Speed is complaining about, are compressed and it gives the page an overall score of 90/100. Why then, does Page-Speed say that Compressing the following resources with gzip could reduce their transfer size by 118.8KiB (70% reduction). and it gives the page an overall score of 33/100?

    Read the article

  • Web app implementation question.

    - by John Berryman
    I would like to create a web app similar to Stack Overflow in that the users will have different "point" levels and that their capabilities within the web app will be different based upon their point level. Question: How can this best be implemented? How can it be implemented in a way that is un-hackable (i.e. accessing capabilities that should not be available)? I figure there are two ways to do this: server-side and client-side. For the server-side solution, for each page request you check who the user is and have the CGI rewrite the page so that the client only gets a web page with the intended capabilities. For the client-side solution, the server gives the client the fully capable app and it is the client's job to check the point level and to handicap the app appropriately. It seems like the client-side solution would be easier on the server, (which is really important for my app), but more susceptible to someone hacking and using capabilities unwarranted by their point level.

    Read the article

  • Are volatile data members trivially copyable?

    - by Lightness Races in Orbit
    Whilst writing this answer I realised that I'm not as confident about my conclusions as I usually would ensure before hitting Post Your Answer. I can find a couple of reasonably convincing citations for the argument that the trivial-copyability of volatile data members is either implementation defined or flat-out false: https://groups.google.com/forum/?fromgroups=#!topic/comp.std.c++/5cWxmw71ktI http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48118 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3159.html#496 But I haven't been able to back this up in the standard1 itself. Particularly "worrying" is that there's no sign of the proposed wording change from that n3159 issues list in the actual standard's final wording. So, what gives? Are volatile data members trivially copyable, or not? 1   C++11

    Read the article

  • File encodings with ruby

    - by pablorc
    Hi, I'm having a bit problems with file encodings. I'm receiving a url-encoded string like "sometext%C3%B3+more+%26+andmore", unescape it, process the data, and save it with windows-1252 encoding. The conversions are these: irb(main) >> value => "sometext%C3%B3+more+%26+andmore" irb(main) >> CGI::unescape(value) => "sometext\303\263 more & andmore" irb(main) >> #Some code and saved into a file using open(filename, "w:WINDOWS-1252") irb(main) >> # result in the file: => sometextA³ more & andmore And the result should be sometextó more & andmore

    Read the article

  • global applied stylesheet link on debian box

    - by James
    Hi there, Having some trouble identifying what is wrong with my link to an external CSS stylesheet... I am using a debian box to host some things... including a file i am accessing page.py which is located in /var/www/cgi-bin. I need this page to link to a css file which currently has the pathname /var/www/styles.css. Now I know I could link as: <link rel="stylesheet" href="**../styles.css**" type="text/css"> and the problem is solved but I would rather have a 'global' link, that I can use in other py files elsewhere in my filesystem and they will all point to /var/www/styles.css The information I have searched suggests that <link rel="stylesheet" href="**/var/www/styles.css**" type="text/css"> should work fine... but it doesn't. I have tried multiple combinations of everything I know but it doesn't seem to link as I would expect. Can anyone point me in the right direction?

    Read the article

  • Getting data into MATLAB from HTTPS

    - by yuk
    Anybody know if it's possible? I'm trying to get the data by using the following code url = 'https://cgwb.nci.nih.gov/cgi-bin/hgTracks'; params = {'org','Human','db','hg18','position','EGFR'}; urltxt = urlread(url,'get',params); but get the error ??? Error using ==> urlread at 111 Error downloading URL. Your network connection may be down or your proxy settings improperly configured. If I substitute https to http, it works, but I get "301 Moved Permanently" page with the above https-link. The link in browser works properly in both cases (redirecting http request). The site does not require any authentication. May be there are other ways than urlread?

    Read the article

  • MEF + Plug-In not updating

    - by mybrokengnome
    I asked this on the MEF Codeplex forum already, but I haven't gotten a response yet, so I figured I'd try StackOverflow. Here's the original post if anyone's interested (this is just a copy from it): MEF Codeplex "Let me first say that I'm completely new to MEF (just discovered it today) and am very happy with it so far. However, I've ran in to a problem that is very frustrating. I'm creating an app that will have a plugin architecture and the plugins will only be stored in a single DLL file (or coded into the main app). The DLL file needs to be able to be recompiled during run-time and the app should recognize this and re-load the plugins (I know this is difficult, but it's a requirement). To accomplish this I took the approach covered http://blog.maartenballiauw.be/category/MEF.aspx there (look for WebServerDirectoryCatalog). Basically the idea is to "monitor the plugins folder, copy the new/modified assemblies to the web application’s /bin folder and instruct MEF to load its exports from there." This is my code, which is probably not the correct way to do it but it's what I found in some samples around the net: main()... string myExecName = Assembly.GetExecutingAssembly().Location; string myPath = System.IO.Path.GetDirectoryName(myExecName); catalog = new AggregateCatalog(); pluginCatalog = new MyDirectoryCatalog(myPath + @"/Plugins"); catalog.Catalogs.Add(pluginCatalog); exportContainer = new CompositionContainer(catalog); CompositionBatch compBatch = new CompositionBatch(); compBatch.AddPart(this); compBatch.AddPart(catalog); exportContainer.Compose(compBatch); and private FileSystemWatcher fileSystemWatcher; public DirectoryCatalog directoryCatalog; private string path; private string extension; public MyDirectoryCatalog(string path) { Initialize(path, "*.dll", "*.dll"); } private void Initialize(string path, string extension, string modulePattern) { this.path = path; this.extension = extension; fileSystemWatcher = new FileSystemWatcher(path, modulePattern); fileSystemWatcher.Changed += new FileSystemEventHandler(fileSystemWatcher_Changed); fileSystemWatcher.Created += new FileSystemEventHandler(fileSystemWatcher_Created); fileSystemWatcher.Deleted += new FileSystemEventHandler(fileSystemWatcher_Deleted); fileSystemWatcher.Renamed += new RenamedEventHandler(fileSystemWatcher_Renamed); fileSystemWatcher.IncludeSubdirectories = false; fileSystemWatcher.EnableRaisingEvents = true; Refresh(); } void fileSystemWatcher_Renamed(object sender, RenamedEventArgs e) { RemoveFromBin(e.OldName); Refresh(); } void fileSystemWatcher_Deleted(object sender, FileSystemEventArgs e) { RemoveFromBin(e.Name); Refresh(); } void fileSystemWatcher_Created(object sender, FileSystemEventArgs e) { Refresh(); } void fileSystemWatcher_Changed(object sender, FileSystemEventArgs e) { Refresh(); } private void Refresh() { // Determine /bin path string binPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Plugins"); string newPath = ""; // Copy files to /bin foreach (string file in Directory.GetFiles(path, extension, SearchOption.TopDirectoryOnly)) { try { DirectoryInfo dInfo = new DirectoryInfo(binPath); DirectoryInfo[] dirs = dInfo.GetDirectories(); int count = dirs.Count() + 1; newPath = binPath + "/" + count; DirectoryInfo dInfo2 = new DirectoryInfo(newPath); if (!dInfo2.Exists) dInfo2.Create(); File.Copy(file, System.IO.Path.Combine(newPath, System.IO.Path.GetFileName(file)), true); } catch { // Not that big deal... Blog readers will probably kill me for this bit of code :-) } } // Create new directory catalog directoryCatalog = new DirectoryCatalog(newPath, extension); directoryCatalog.Refresh(); } public override IQueryable<ComposablePartDefinition> Parts { get { return directoryCatalog.Parts; } } private void RemoveFromBin(string name) { string binPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ""); File.Delete(Path.Combine(binPath, name)); } So all this actually works, and after the end of the code in main my IEnumerable variable is actually filled with all the plugins in the DLL (which if you follow the code is located in Plugins/1 so that I can modify the dll in the plugins folder). So now at this point I should be able to re-compile the plugins DLL, drop it in to the Plugins folder, my FileWatcher detect that it's changed, and then copy it into folder "2" and directoryCatalog should point to the new folder. All this actually works! The problem is, even though it seems like every thing is pointed to the right place, my IEnumerable variable is never updated with the new plugins. So close, but yet so far! Any suggestions? I know the downsides of doing it this way, that no dll is actually getting unloaded and causing a memory leak, but it's a Windows App and will probably be started at least once a day, and the plugins are un-likely to change that often, but it's still a requirement from the client that it does this without re-loading the app. Thanks! Thanks for any help you all can provide, it's driving me crazy not being able to figure this out."

    Read the article

  • How to check if file exists in Apache

    - by Rick
    I've set this up successfully in IIS in the past, but i'm not sure how to do it in Apache. I want to check to see if a file exists, whether it be: /path/to/file.php /path/to/file.cfm /path/to/file.html /path/to/ If the file does not exist, I want to redirect to /404/, where I have a file that does all 404 related handling. Lastly, when doing this in IIS, it gave me a CGI.QUERY_STRING of something like: 404;http://example.com/prettyurl Can apache do the same? This is what i've tried to so far, to no success. (I'm probably way off here...) RewriteEngine on RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI} -f RewriteRule (.*)$ /404/ [R,L,NC] Thanks..

    Read the article

  • How can I *prevent* Apache2 from setting the Content-Type header?

    - by Norm
    I have a CGI script that prints the following on stdout: print "Status: 302 Redirect\n"; print "Server: Apache-Coyote/1.1\n"; print "Location: $redirect\n"; print "Content-Length: 0\n"; print "Date: $date\n\n"; Where $redirect and $date are reasonable values. What Apache2 actually sends also includes a Content-Type: header (text/plain). I've commented out the DefaultType in the server configuration file. I'm trying to debug a downstream problem that arises when no Content-Type: header is sent. So what magic incantation do I have to perform to prevent Apache2 from adding the content type header?

    Read the article

  • How does unbundle work

    - by Ashithraj
    Before explaining my problem let me tell you the Mercurial setup, We have the following repos, RELEASE DEVELOPMENT BUGFIX All the above repo are running on a central server using IIS and hgwebdir.cgi Now coming to the problem, I clone a local repo from DEVELOPMENT repo. I make changes to the clone and commit (Not push). I make a bundle from the clone and pass the bundle to QA who has cloned the RELEASE repo. Now I try to apply the bundle to the RELEASE repo clone using hg unbundle I get an error, abort: error: ftp error: no host given What am I doing wrong? Can you give solution to the above problem keeping a Windows setup in mind?

    Read the article

  • Is it possible to run node script from a web page as differnt user?

    - by Blame
    I'am searching for days now but could not get an answer. I would like to do the following: User connects to editor.html (Apache2 with basic http auth) User want to open a file on the server with his user/pass (same as in passwd) Node.js Script gets startet with user rights from above and user can edit file The Node Script will handly the connection via websockets and read/writes files. I think the biggest problem is that its not possible to run a node script on the server from a web page... and I don´t want to involve any php/cgi scripts... only Apache and Node.js / JS. Please also comment or answer if you know that it is really not possible... Thanks! Kodak

    Read the article

  • What is the best way to prevent a webpage coded completely in HTML (no PHP or any server side langua

    - by racl101
    I thought by placing these two lines that it would prevent the page from being cached but this is not the case between the head tags: <meta http-equiv="pragma" content="no-cache" /> <meta http-equiv="cache-control" content="no-cache" /> As already mentioned this is on server that doesn't support PHP (or any server side language, well, that's not true, it has cgi-bin folder that supports perl scripts but I don't know perl and have no time to engage in it.) What else could I do to prevent the page from caching? It caches on Firefox and IE (and not so much in Chrome or Safari.)

    Read the article

  • Execution sequence inside a jquery event handler

    - by user576358
    I have a big issue with the execution squence inside this jquery handler : Was wondering if anyone has come accross this before: I have a simple form: <form action='foo.cgi' id='myForm' > <input type=text name='name' /> <input type=submit value='Find it!'/> </form> when user clicks on Find it! would like to change the cursor to 'progress' before the data is returned through an ajax call: $(document).ready(function(){ $("#myForm ").submit(function(){ $("body").css("cursor", "progress") ; htmlobj=$.ajax({url:server_url,..........); } } However: The cursor [line 2 above ] does not change until data is returned through ajax - Seems like line 3. gets executed before 2. Any help is greatly appreciated

    Read the article

  • How to manually close connection in BaseHTTPServer?

    - by user1657188
    I have a script that sends a request to an HTTP server. HTTP server script (snippet): ... class MyHandler(BaseHTTPServer.BaseHTTPRequestHandler): def do_GET(sa): pdict = cgi.parse_header(sa.headers.getheader('referer')) q = pdict[0] q = urllib.unquote(q) if q == "enternetixplorer" # basically just ignore this, doesn't have to do with the question sa.wfile.write("blah blah blah") # now restart server httpd.server_close() python = sys.executable os.execl(python, python, * sys.argv) ... The "blah blah blah" is sent back, but the connection does not seem to close, and my script is waiting forever until I abort the server. (My thought is BaseHTTPServer automatically closes connection when the last part in "do_GET()" is computed, but I prevent this by restarting the script.) If I'm right, how do I close the connection? If not, what else might be the problem? Edit: The server script HAS to restart the entire program.

    Read the article

  • Is it possible to do an Ajax request for an ICS file?

    - by Kyle
    I am trying to do an Ajax request for an ICS file. Yeah, I know it sounds crazy, but I found the perfect library to parse the iCal data. Any ideas why the data comes up blank when I do this? $.ajax({ success:function(data){ alert(data); }, url:"http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=15714&cat=98&platform=osx&method=sa/Swiss32Holidays.ics" }); It makes the request fine, but the data still comes up blank.

    Read the article

  • Is it possible to deploy a Ruby app on a plain clean Passenger setup?

    - by Folletto
    I'm thinking to something really similar on what you can do with mod_php: drop an application in some way inside Apache and making it run with Passenger, without adding anything inside httpd.conf (no vhost, nothing except the basic Passenger configuration). It's something very similar to Wordpress or many other frameworks: just unzip/svn checkout it inside a folder and run it. I know that it's possible with CGI and FCGI, but I'm wondering if it's also possible to tap in the speed of Passenger. I've tried fiddling with the Rack instructions on the official website trying to find a specific .htaccess and config.ru configuration, but nothing so far. I know it's not common, but... is it even possible?

    Read the article

< Previous Page | 161 162 163 164 165 166 167 168 169 170 171 172  | Next Page >