Search Results

Search found 10546 results on 422 pages for 'apache commons'.

Page 178/422 | < Previous Page | 174 175 176 177 178 179 180 181 182 183 184 185  | Next Page >

  • How can I do an SSL connection with PHP

    - by Anth0
    Hi, I need to develop a PHP class to communicate with Apple servers in order to do Push notification (APNS). I have the certificate (.pem) and I tried to follow various tutorials found on Internet but I'm still getting error trying to connect to ssl://gateway.sandbox.push.apple.com:2195 with stream socket : $apnsHost = 'gateway.sandbox.push.apple.com'; $apnsPort = 2195; $apnsCert = 'apns-dev.pem'; $streamContext = stream_context_create(); stream_context_set_option($streamContext, 'ssl', 'local_cert', $apnsCert); $apns = stream_socket_client('ssl://'.$apnsHost.':'.$apnsPort, $error, $errorString, 2, STREAM_CLIENT_CONNECT, $streamContext); A telnet on this URL works so port 2195 is opened. Openssl is activated on PHP since I get "Registered Stream Socket Transports : tcp, udp, ssl, sslv3, sslv2, tls" with a phpinfo(). My certificate is well read (PHP is_readable(certif.pem) returns true on the file) Is there anything else to activate in Apache or PHP to get it work ?

    Read the article

  • Should I be concerned about performance with connections to multiple databases?

    - by Josh Ryan
    I have a PHP app that is running on an Apache server with MySQL databases. Based on the subdomain that users access, I am connecting them to a database (sub1.domain.com connects to database_sub1 and sub2.domain.com connects to database_sub2). Right now there are 10 subdomain-database combos, but that number could potentially grow to well over 100. So, is this a bad thing? Considering my situation, is myslq_pconnect a better way to go? Thanks, and please let me know if more info would be helpful. Josh

    Read the article

  • GAE datastore querying integer fields

    - by ParanoidAndroid
    I notice strange behavior when querying the GAE datastore. Under certain circumstances Filter does not work for integer fields. The following java code reproduces the problem: log.info("start experiment"); DatastoreService datastore = DatastoreServiceFactory.getDatastoreService(); int val = 777; // create and store the first entity. Entity testEntity1 = new Entity(KeyFactory.createKey("Test", "entity1")); Object value = new Integer(val); testEntity1.setProperty("field", value); datastore.put(testEntity1); // create the second entity by using BeanUtils. Test test2 = new Test(); // just a regular bean with an int field test2.setField(val); Entity testEntity2 = new Entity(KeyFactory.createKey("Test", "entity2")); Map<String, Object> description = BeanUtilsBean.getInstance().describe(test2); for(Entry<String,Object> entry:description.entrySet()){ testEntity2.setProperty(entry.getKey(), entry.getValue()); } datastore.put(testEntity2); // now try to retrieve the entities from the database... Filter equalFilter = new FilterPredicate("field", FilterOperator.EQUAL, val); Query q = new Query("Test").setFilter(equalFilter); Iterator<Entity> iter = datastore.prepare(q).asIterator(); while (iter.hasNext()) { log.info("found entity: " + iter.next().getKey()); } log.info("experiment finished"); the log looks like this: INFO: start experiment INFO: found entity: Test("entity1") INFO: experiment finished For some reason it only finds the first entity even though both entities are actually stored in the datastore and both 'field' values are 777 (I see it in the Datastore Viewer)! Why does it matter how the entity is created? I would like to use BeanUtils, because it is convenient. The same problem occurs on the local devserver and when deployed to GAE.

    Read the article

  • construct test environment for web application on PC - directory issues

    - by ernie
    I have a site that physically has this directory structure. -public_html --conf > contains file conf.php -SiteFiles -LiveSite > contains file ConfLive.php Directory public_html/conf/ contains a file called conf.php this file contains the following include include_once('/home/mydir/SiteFiles/LiveSite/conf/ConfLive.iphp'); I want to copy this application to test PC to test it. Test PC uses XAMPP Apache. "Root" directory on the test machine is: C:\xampp\htdocs\ My questions: 1. Where is logical path "/home/mydir/" defined? 2. What steps should I take to get this to work on my test machine preferably by server configuration and not changing application. Thanks. (PS maybe this question is better posed at Server Overflow site.)

    Read the article

  • Un-readable files uploaded via PHP FTP functions

    - by Mike
    I just setup a LAMP development server and am still trouble-shooting some things. The server is installed on one computer and I use a Windows laptop to write my code and test the site via the web browser. My file uploading script works in that JPEG image files are successfully uploaded to the server, but when I try to view the images in the web browser, permission is denied. I check the permissions on the file via the server and they are 600. I can fix the issue by chmod 777 theimage.jpg, but this doesn't seem like a good solution at all. Does the solution have something to do with Apache configuration? Or is there something else I should be doing. Thank-you, Mike

    Read the article

  • Useful ways for multilanguage navigation and static content on your site?

    - by vitto
    Hi, I have a big site running under Apache and PHP and in few mounths I should consider to add some different language version of it, but I'm not sure about the right way (or ways). My problem it isn't the user data, because I can use db tables with different languages (en, de, it, etc.) so I want concentrate my answer on navigation and static content. For now I can't use gettext because I don't have a dedicated server and I can't reboot it every time I want, but surely will be a future choice. So my main problems are these: In the site, I have classical XHTML elements like the menus, lists, div and various static texts in various pages (should be perferct for gettext, but I need a alternative) The other part of the sites has XHTML elements which are dynamically created via AJAX and jQuery, and here I haven't any idea of what can I do... So does exists some example I can see in some link to solve it (or some useful tecnique)?

    Read the article

  • How to use a different path name in ProxyPass than the Tomcat context name

    - by Diptendu Dutta
    Hello, I am using Tomcat 5.5.9 and Apache 2.x We are trying to use a path name in ProxyPass that is different than the Tomcat context name. ProxyPass /path http://localhost:8080/contextname However, this does not work. When these two are the same then everything works fine. Most examples I see on the net also have the path equal to the Tomcat context name. I am using "context.xml" within the Tomcat context and do NOT have "server.xml" entries. Also, I am using plain httd.conf and NOT using any VirtualHost entries. Any help is appreciated. Regards, Diptenu

    Read the article

  • 2 different php request at same time per user

    - by Oguz
    I have a website which has 2 pages , (home_page.php and action_page.php)Action page takes aprx. 2 minutes to completely load (server side takes 2 minutes) . But if user clicks to home page link while action page is loading , browser does not go to home page , until action page is completely loaded . First of all what is the reason of this ? (bowser ? php ? apache ?) and how can I avoid this ? Thank you

    Read the article

  • How do I throttle my site's API users?

    - by scotts
    The legitimate users of my site occasionally hammer the server with API requests that cause undesirable results. I want to institute a limit of no more than say one API call every 5 seconds or n calls per minute (haven't figured out the exact limit yet). I could obviously log every API call in a DB and do the calculation on every request to see if they're over the limit, but all this extra overhead on EVERY request would be defeating the purpose. What are other less resource-intensive methods I could use to institute a limit? I'm using PHP/Apache/Linux, for what it's worth.

    Read the article

  • mod_rewrite in conjunction with "options indexes"

    - by Travis
    I have a directory ("files") where sub-directories and files are going to be created and stored over time. The directories also need to deliver a directory listing, using "options indexes", but only if a user is authenticated, and authorized. I have that part built, and working, by doing the following: <Directory /var/www/html/files> Options Indexes IndexOptions FancyIndexing SuppressHTMLPreamble HeaderName /includes/autoindex/auth.php </Directory> Now I need to take care of file delivery. To force authentication for files, I have built the following: RewriteCond %{REQUEST_URI} -f RewriteRule /files/(.*) /auth.php I also tried: RewriteCond %{REQUEST_URI} !-d RewriteRule /files/(.*) /auth.php Both directives are redirecting to auth.php when I request: foo.com/files/bar/ foo.com/files/bar/baz I am outputting the SERVER global on auth.php during testing and it is showing the requests as I made them (I thought Apache may have been doing something behind the scenes by adding something like "index.html" to the end with "Options Indexes" being on). Ideas?

    Read the article

  • Favicon for all the pages in my website

    - by Senthil Kumar
    I've learned that the way to add favicon for a web page is to have the following lines in the page. <link rel="SHORTCUT ICON" type="image/x-icon" href="http://mysite.com/faviconfilename.ico"/> <link rel="icon" type="image/x-icon" href="http://mysite.com/faviconfilename.ico" /> Should i add this code in each and every page my site has?? I use Apache - tomcat clustering to serve pages. Is there any other easy way to do this?

    Read the article

  • In the java DBCP connection pool - what is an idle connection?

    - by Ravenor
    A colleague at work insists that a DBCP idle connection is a connection that has lain unused for 30 minutes. I believe a dbcp idle connection is a connection that is in the pool available to be borrowed, and an active connection is one that is borrowed. Looking through the code I found no reference to 30 minutes or other magic values and a cursory glance through the code for assuring minidle does not show any such logic. If he is correct can you please back that up with a code or documentation reference. For the complete answer I would like it answered for both DBCP 1.1 and 1.6.

    Read the article

  • modrewrite RewriteRule problem

    - by timpone
    I am using Apache 2.2 and mod_rewrite. I would like to take the following urls and map them to another url. The pattern is simple and like this: http://domain/test/ex1.html - http://domain/app/index.php/content/?name=ex1 I tried the following in an .htaccess file: RewriteEngine On RewriteBase /app/ RewriteRule (.*)\.html index.php/content/?name=$1 and RewriteEngine On RewriteRule (.*)\.html /app/index.php/content/?name=$1 I wasn't sure if the backreference was correct so set to $0 and $2 but never seemed to help. I also tried setting the RewriteLogLevel to 9. There is a step where it is almost there: rewrite 'ex1.html' - 'index.php/content/?name=ex1' The last line of the rewrite log is as follows: [perdir /var/www/domain/htdocs/test/] internal redirect with /app/index.php/content/ [INTERNAL REDIRECT] How can I get this to rewrite to /app/index.php/content/?name=ex1 ? thanks

    Read the article

  • The whole site is blocked while one page is waiting for blocking operation (PHP, ASP.NET). Why?

    - by artvolk
    Good day! I've found interesting behaviour for both LAMP stack and ASP.NET. The scenario: There is page performing task in 2-3 minutes (making HttpWebRequest for ASP.NET and curl for PHP). While this page is processed all other requests to this virtual host from the same browser are not processed (even if I use different browsers from one machine). I use two pages written in PHP and C#. I've tested with Apache+PHP in both mod_php and fast_cgi modes on Windows and Debian. For ASP.NET I use IIS6 (with dedicated app pool for this site and with default app pool) and IIS7 in integrated mode. I know that it is better to use async calls for such things, but I'm just curious why single page blocks the entire site and not only the thread processing the request? Thanks in advance!

    Read the article

  • Point subdirectory to another domain is IIS 6

    - by Liviu
    Is it possible to rewrite somehow www.mysite.com/Pictures to point to test.mysite.com/Pictures or even more broadly www.someothersite.com/Pictures ? Note: www.mysite.com and test.mysite.com are on separate machines and built with different technologies (one is ASP.NET and the other is PHP) but I have access to both of them. I want that when I reference a picture like www.mysite.com/Pictures/pic12345.png the picture to display correctly, even though there is not /Pictures folder on that server and the pictures has to be retrieved by going to test.mysite.com/Picture/pic12345.png Ideally I want to do this in IIS6 to test it. However I am interested if it possible to do in any webserver (Apache, IIS7)

    Read the article

  • My site not directing links correctly.

    - by mystycs
    I have a site at http://badassmonkeys.com/ and when i click any of the links it does not direct it to the actual page but still pulls up the link. For some reason it works perfectly on linux cpanel and actually loads the pages, but on windows in apache, or in IIS even with a rewrite mod for it, it just doesnt work. The links dont go correctly. Is it a php.ini setting? This is my htaccess file if curious, but it works perfect in linux, but not on windows.... DirectoryIndex index.html index.htm default.htm index.php Options +FollowSymlinks RewriteEngine on RewriteRule ^(.*\.(css|swf|js|xml|gif|jpg))$ $1 [L,QSA,NE] RewriteRule ^((images|contactus|css|blog|script|style|docs|admin|fck|swf|Scripts|includes|images|img|uploads|templates|js|css|calendar|expert_area|fckfiles|flvplayer|highslide)/.*) $1 [L,QSA,NE] RewriteRule ((fb_login|phpinfo|aim|csql|info|cron|index|site|simg|img|ajax|ari|fck_install|ffmpeg_test|file|redirect|rss_blogs|rss_info)\.php) $1 [L,QSA,NE] RewriteRule ^ajax/?$ ajax.php [L,QSA,NE] RewriteRule ((xd_receiver)\.htm) $1 [L,QSA,NE] RewriteRule ((google7a9ea27ccf395e97)\.html) $1 [L,QSA,NE] RewriteRule ((favicon)\.ico) $1 [L,QSA,NE] RewriteRule ((W4uFNrPc9U9SAfP7qiJFwCfp7vk)\.txt) $1 [L,QSA,NE] RewriteRule ^(.*)$ index.php?htaccesss=%{HTTP_HOST}%{REQUEST_URI} [L,QSA,NE]

    Read the article

  • combination of open source licenses

    - by Nicola Montecchio
    Hi I'm about to release some software as open source. It uses Lucene (Apache license) and jopt simple (MIT license). Are there any constraints on the license that I am going to apply to my own software? In particular, it is an adaptation of Lucene for performing content-based search on audio (so, many classes are inherited and in one case copied with a little modification). It only uses jopt simple for handling command line arguments (i.e. no modification at all, just "import" and "new OptionParser..."). Thanks for your help Nicola Montecchio

    Read the article

  • Wanted red color for text in the error message in the log file

    - by swati
    Hello Everyone, I have a question but not sure it is possible or not. I am using apache logger for my logging which creates a log file which works fine with no issues.my question is when i open the log file i get the different messages like messages with INFO,DEBGU,ERROR etc. But i wanted to see the error message in red color in text in my logger file.. is it possible? So in that way if some one opens my log file if some thing is there in red they can clearly can guess that it is an error message.. Is it possible.. I would really appreciate if some one can respond to me . Thanks, Swati

    Read the article

  • mod_xsendfile serving download.php and not the filename

    - by azz0r
    Hello, The apache mod_xsendfile is a good solution for what I want but its not working properly. In firefox it serves the file but as download.php (name of the file with the code in). In safari and chrome it serves an empty file. Here is my code: header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; file="test_hi.wmv"'); header('X-Sendfile: /sites/dot.com/trunk/public/files/store/b/test_hi.wmv'); exit; Anyone used it before / have a solution

    Read the article

  • problem when migrating from development into live server

    - by justjoe
    I'm facing problem when migrate my web app project from development server to live server. the reason is because i just realize that the live server has different PHP version and available memory lower then mine. i found this after client give me their ftp and cpanel access of their server, which is a shared host. so, how do we handle this situation ? and avoid similar problem in the future ? What is the most suitable configuration of a development server ? btw, i use xampp in windows. it's has apache and mysql.

    Read the article

  • Stopping httpd causes a process started from perl CGI script to receive SIGTERM

    - by Pranav Pal
    I am running a shell script from a perl CGI script: #!/usr/bin/perl my $command = "./script.sh &"; my $pid = fork(); if (defined($pid) && $pid==0) { # background process system( $command ); } The shell script looks like this: #!/bin/sh trap 'echo trapped' 15 tail -f test.log When I run the CGI script from browser, and then stop httpd using /etc/init.d/httpd stop, the script receives a SIGTERM signal. I was expecting the script to run as a separate process and not be tied in anyway to httpd. Though I can trap the SIGTERM, I would like to understand why the script is receiving SIGTERM at all. What wrong am I doing here? I am running RHEL 5.8 and Apache HTTP server 2.4. Thanks, Pranav

    Read the article

  • htaccess: only do [some lines of code] for one domain, no others.

    - by Coronatus
    Say I have a htaccess file shared by "dev.server" and "server.site.com". The first domain should allow all users to access it unchallenged (it only exists on my local development server). The second domain I want to authenticate users with Apache (NOT by database). The code to authenticate users is: AuthType Basic AuthName "Server Admin" AuthUserFile "/path/to/passwd" require valid-user What I can't do is make those 4 lines only matter if the domain is "server.site.com". How can I do this? I searched for something like <IfEnv HTTP_HOST "site.server.com"> but had no luck.

    Read the article

  • Access Rails under /app/, not /app/public/

    - by blinry
    I'm trying to deploy Rails 2.1.2 with Apache 2.2.10 and FastCGI (yeah, bad, ancient, ugly, I know). And I know it's no programming question, but please bear with me. My application can be accessed via example.com/app/public/, but I want to access it via example.com/app/. In my .htaccess-File (in the app/-directory!) I have: RewriteEngine On RewriteBase /app/ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ public/dispatch.fcgi [QSA,L] How can I forward each request going to app/ to app/public/? Every time I try this (like, with RewriteRule ^.*$ public/$1 [QSA]) I get a routing error: No route matches "/app/" with {:method=>:get} Help?

    Read the article

  • VirtualHost problem with passenger (mod_rails)

    - by Jake
    Hi all, I'm at my wit's end here with virtual hosting. I'm trying to install redmine and it works with the webrick test server, but when I tried to use passenger (mod_rails) to host and go to the address I specified when in the virtualhost part of my apache config file nothing happens. Here is the relavent section of /etc/httpd/conf/httpd.conf where I try to set up the virtual host: <VirtualHost *:80> SetEnv RAILS_ENV production ServerName redmine.MYSITE.com:80 DocumentRoot /opt/redmine-1.0.5/public/ <Directory /opt/redmine-1.0.5/public/> Options -MultiViews Allow from all AllowOverride none </Directory> However, when I got to redmine.MYSITE.com:80 nothing happens, I just get our normal home page. I have no idea what the problem is, any help our guidance would be greatly appreciated. If you need any other information, please tell me and I'll provide it.

    Read the article

  • Randomly Losing Session Variables Only In Google Chrome & URL Rewriting

    - by Toby
    Using Google Chrome, I'm seemingly losing/corrupting session data when navigating between pages (PHP 5.0.4, Apache 2.0.54). The website works perfectly fine in IE7/8, Firefox, Safari & Opera. The issue is only with Google Chrome. I narrowed down the problem. I'm using search friendly URL's, and hiding my front controller (index.php) via a .htaccess file. So the URL looks like: www.domain.com/blah/blah/ Here's the .htaccess file contents: Options +FollowSymlinks RewriteEngine on #allow cool urls RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*) index.php [L] #allow to have Url without index.php If I remove the .htaccess file, and expose the front controller in the URL: www.domain.com/index.php/blah/blah/, Chrome works perfectly fine. Any thoughts ideas? I'm thinking it's some kind of problem with how Chrome identifies what cookie to use and send to the server? This happens in Chrome 4 & 5. Thanks!

    Read the article

< Previous Page | 174 175 176 177 178 179 180 181 182 183 184 185  | Next Page >