Search Results

Search found 2305 results on 93 pages for 'mod fcgid'.

Page 10/93 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • What Apache/PHP configurations do you know and how good are they?

    - by FractalizeR
    Hello. I wanted to ask you about PHP/Apache configuration methods you know, their pros and cons. I will start myself: ---------------- PHP as Apache module---------------- Pros: good speed since you don't need to start exe every time especially in mpm-worker mode. You can also use various PHP accelerators in this mode like APC or eAccelerator. Cons: if you are running apache in mpm-worker mode, you may face stability issues because every glitch in any php script will lead to unstability to the whole thread pool of that apache process. Also in this mode all scripts are executed on behalf of apache user. This is bad for security. mpm-worker configuration requires PHP compiled in thread-safe mode. At least CentOS and RedHat default repositories doesn't have thread-safe PHP version so on these OSes you need to compile at least PHP yourself (there is a way to activate worker mpm on Apache). The use of thread-safe PHP binaries is considered experimental and unstable. Plus, many PHP extensions does not support thread-safe mode or were not well-tested in thread-safe mode. ---------------- PHP as CGI ---------------- This seems to be the slowest default configuration which seems to be a "con" itself ;) ---------------- PHP as CGI via mod_suphp ---------------- Pros: suphp allows you to execute php scipts on behalf of the script file owner. This way you can securely separate different sites on the same machine. Also, suphp allows to use different php.ini files per virtual host. Cons: PHP in CGI mode means less performance. In this mode you can't use php accelerators like APC because each time new process is spawned to handle script rendering the cache of previous process useless. BTW, do you know the way to apply some accelerator in this config? I heard something about using shm for php bytecode cache. Also, you cannot configure PHP via .htaccess files in this mode. You will need to install PECL htscanner for this if you need to set various per-script options via .htaccess (php_value / php_flag directives) ---------------- PHP as CGI via suexec ---------------- This configuration looks the same as with suphp, but I heard, that it's slower and less safe. Almost same pros and cons apply. ---------------- PHP as FastCGI ---------------- Pros: FastCGI standard allows single php process to handle several scripts before php process is killed. This way you gain performance since no need to spin up new php process for each script. You can also use PHP accelerators in this configuration (see cons section for comment). Also, FCGI almost like suphp also allows php processes to be executed on behalf of some user. mod_fcgid seems to have the most complete fcgi support and flexibility for apache. Cons: The use of php accelerator in fastcgi mode will lead to high memory consumption because each PHP process will have his own bytecode cache (unless there is some accelerator that can use shared memory for bytecode cache. Is there such?). FastCGI is also a little bit complex to configure. You need to create various configuration files and make some configuration modifications. It seems, that fastcgi is the most stable, secure, fast and flexible PHP configuration, however, a bit difficult to be configured. But, may be, I missed something? Comments are welcome!

    Read the article

  • Can't enable apache mod on emerge

    - by ranisalt
    I want to add mod_proxy and mod_proxy_http to Apache server on my Gentoo, but apparently some file with high priority on the system is disabling the mods and preventing me to install. I am currently editing /usr/portage/profiles/base/make.defaults file, but it gets updated (and changes lost) every time I update the system. I have to edit it every time I update the system/reinstall Apache. Besides that, I have already added dependencies to the /etc/portage/package.use file: www-servers/apache proxy proxy_http What other files do I have do change or should check flags so I can enable proxy and do not have to edit files again every time?

    Read the article

  • after enabling mod ssl apache stops listening on port 80

    - by zensys
    I have an ubuntu 12.04 server with zend server CE installed. I now wanted to enable https but after the first steps according to the documentation, 'a2enmod ssl' and 'apache service restart', apache does not listen on 443 but neither on 80, according to netstat -tap | grep http(s)! This is what I see in my error log, but I can't make much of it: [Fri May 25 19:52:39 2012] [notice] caught SIGTERM, shutting down [Fri May 25 19:52:41 2012] [warn] Init: Session Cache is not configured [hint: SSLSessionCache] [Fri May 25 19:52:41 2012] [notice] ModSecurity for Apache/2.6.3 (http://www.modsecurity.org/) configured. [Fri May 25 19:52:41 2012] [notice] ModSecurity: APR compiled version="1.4.5"; loaded version="1.4.6" [Fri May 25 19:52:41 2012] [warn] ModSecurity: Loaded APR do not match with compiled! [Fri May 25 19:52:41 2012] [notice] ModSecurity: PCRE compiled version="8.12"; loaded version="8.12 2011-01-15" [Fri May 25 19:52:41 2012] [notice] ModSecurity: LUA compiled version="Lua 5.1" [Fri May 25 19:52:41 2012] [notice] ModSecurity: LIBXML compiled version="2.7.8" [Fri May 25 19:53:11 2012] [notice] ModSecurity for Apache/2.6.3 (http://www.modsecurity.org/) configured. [Fri May 25 19:53:11 2012] [notice] ModSecurity: APR compiled version="1.4.5"; loaded version="1.4.6" [Fri May 25 19:53:11 2012] [warn] ModSecurity: Loaded APR do not match with compiled! [Fri May 25 19:53:11 2012] [notice] ModSecurity: PCRE compiled version="8.12"; loaded version="8.12 2011-01-15" [Fri May 25 19:53:11 2012] [notice] ModSecurity: LUA compiled version="Lua 5.1" [Fri May 25 19:53:11 2012] [notice] ModSecurity: LIBXML compiled version="2.7.8" [Fri May 25 19:53:12 2012] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.8-ZS5.5.0 configured -- resuming normal operations and here is my httpd.conf: # Name based virtual hosting <virtualhost *:80> ServerName www-redirect KeepAlive Off RewriteEngine On RewriteCond %{HTTP_HOST} ^[^\./]+\.[^\./]+$ RewriteRule ^/(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] </virtualhost> Alias /shared/js "/home/web/library/js" Alias /shared/image "/home/web/library/image" <IfModule mod_expires.c> <FilesMatch "\.(jpe?g|png|gif|js|css|doc|rtf|xls|pdf)$"> ExpiresActive On ExpiresDefault "access plus 1 week" </FilesMatch> </IfModule> ErrorLog ${APACHE_LOG_DIR}/error.log LogLevel warn <Directory /> Options FollowSymLinks AllowOverride None Order allow,deny allow from all </Directory> <Location /> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ /index.php [NC,L] </Location> netstat -tap gives: Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 *:mysql *:* LISTEN 765/mysqld tcp 0 0 *:pop3 *:* LISTEN 744/dovecot tcp 0 0 *:imap2 *:* LISTEN 744/dovecot tcp 0 0 *:http *:* LISTEN 19861/apache2 tcp 0 0 *:smtp *:* LISTEN 30365/master tcp 0 0 *:4444 *:* LISTEN 634/sshd tcp 0 0 *:kamanda *:* LISTEN 1167/lighttpd tcp 0 0 *:imaps *:* LISTEN 744/dovecot tcp 0 0 *:amandaidx *:* LISTEN 1167/lighttpd tcp 0 0 localhost.loc:amidxtape *:* LISTEN 19861/apache2 tcp 0 0 *:pop3s *:* LISTEN 744/dovecot tcp 0 384 mail.mysite.:4444 231.214.14.37.dyn:41909 ESTABLISHED 19039/sshd: web [pr tcp 0 0 localhost.localdo:mysql localhost.localdo:48252 ESTABLISHED 765/mysqld tcp 0 0 mail.mysite.:http 231.214.14.37.dyn:54686 TIME_WAIT - tcp 0 0 mail.mysite.:4444 231.214.14.37.dyn:42419 ESTABLISHED 19372/sshd: web [pr tcp 0 0 localhost.localdo:48252 localhost.localdo:mysql ESTABLISHED 19884/auth tcp 0 0 mail.mysite.:http 231.214.14.37.dyn:54685 TIME_WAIT - tcp6 0 0 [::]:pop3 [::]:* LISTEN 744/dovecot tcp6 0 0 [::]:imap2 [::]:* LISTEN 744/dovecot tcp6 0 0 [::]:smtp [::]:* LISTEN 30365/master tcp6 0 0 [::]:4444 [::]:* LISTEN 634/sshd tcp6 0 0 [::]:imaps [::]:* LISTEN 744/dovecot tcp6 0 0 [::]:pop3s [::]:* LISTEN 744/dovecot Anyone knows what I am doing wrong? Perhaps I should take some additional steps to make apache listen 0n 443 but that it stops listening on 80 altogether I can't understand.

    Read the article

  • Buildcraft Minecraft mod causing crashes, NVIDIA-304xx Linux Drivers, KDE

    - by wolfo9999
    All is perfect, 96 fps average. Until an item tries to enter a buildcraft pipe. Tekkit instantly crashes, no error dialog. I have no idea what logs to look at for information on the crash, or how to fix it. OpenGL is enabled in KDE, Driver package is nvidia-304xx lspci output: VGA compatible controller: NVIDIA Corporation GT218 [Quadro FX 380M] (rev a2) (prog-if 00 [VGA controller]) Subsystem: Hewlett-Packard Company Device 172b Flags: bus master, fast devsel, latency 0, IRQ 16 Memory at d2000000 (32-bit, non-prefetchable) [size=16M] Memory at c0000000 (64-bit, prefetchable) [size=256M] Memory at d0000000 (64-bit, prefetchable) [size=32M] I/O ports at 5000 [size=128] [virtual] Expansion ROM at d3080000 [disabled] [size=512K] Capabilities: <access denied> Kernel driver in use: nvidia

    Read the article

  • fcgi_mod and phpmyadmin

    - by Cudos
    I have setup Debian Lenny, Apache2, PHP 5.3.1 fcgi_mod, and MySQL and it works fine. But PHPMyadmin doesn't work. When I go to : http://phpmyadmin.domain.com it downloads the index.php under PHPMyadmin instead of executing it. I think I need to wrap the request in a fcgiwrapper like I did all the virtual hosts. But how do I do that? Apparently there are not that many tutorials on this.

    Read the article

  • Virtualhost setup for Ruby on Rails application (mod passenger)

    - by Ingo86
    Hi all, I'm trying to install Redmine under apache. The apache server works on a local network. My apache setup consist on a single virtual host. I can get insto different directories using simply the path corresponding: http://ip_address/folder_of_the_project_1 How can I setup the virtualhost to make redmine works in this situation? Here is my current virtualhost setup: NameVirtualHost * <VirtualHost *> ServerAdmin webmaster@localhost DocumentRoot /var/www/ RailsBaseURI /redmine <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> <Directory /var/www/redmine/public> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined ServerSignature On Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> Thank you, Ingo86

    Read the article

  • Apache + SuExec + php-fpm - how to set them up?

    - by FractalizeR
    Hello. I wonder if there is a good guide on how to setup Apache + SuExec + php-fpm? I have a server which I am going to use several separate website. So, I need php to be run as site-owner user. As I can see, php-fpm is a little different from php-fcgi. Is there a need in mod_fcgid from Apache in this case? How to set this all up? For now my site is running Apache + mod_suphp + php-cgi, so... it's good, but a little slow. I want to preserve security and gain an ability to use APC.

    Read the article

  • Several Server Errors (No database connect, can't create TCP/IP socket etc

    - by Tobias Baumeister
    My server stops taking requests on my website today. It works for some time, but then the server just stops working and throws several errors: 500 Internal Server Error Warning: mysql_connect(): Can't create TCP/IP socket (105) in [...] on line 7 Couldn't connect to database. Please try again. mysql_connect(): Host [...] is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' mod_fcgid: can't apply process slot for /var/www/cgi-bin/cgi_wrapper/cgi_wrapper (this is from Error Log) Any ideas what might cause it? operating system is Ubuntu

    Read the article

  • How can I override mod-php5's .php mapping to php4-cgi per VirtualHost or Directory?

    - by geocoo
    I am running Debian Linux with apache2 and libapache2-mod-php5 5.3.3-7. I have one VirtualHost which requires php4. So I researched and compiled php4-cgi. However, I cannot seem to: Override mod-php5's mapping of .php in that vhost (or even globally, without disabling php completley). Even find where that mapping is made, in hope of disabling it and enabling mod-php5 or php4-cgi per vhost. This is my php4-cgi mapping (Inside the one php4 vhost): ScriptAlias /php4 /usr/local/php4/bin <Directory /usr/local/php4/bin> Options +ExecCGI +FollowSymLinks </Directory> <Directory /www/test> AddHandler php4-cgi-script .php Action php4-cgi-script /php4/php Options +ExecCGI </Directory> This does not work, mod-php5 still runs all .php files in that vhost/directory. If I change the file extension in the AddHandler above from .php to .php4, then .php4 files do run php4-cgi as expected, but I can't change all the files in the app to .php4. I thought maybe I could disable the mod-php5's mapping in my vhost or directory, then do my cgi-config (as above) but many combinations of these in different contexts did not work: RemoveHandler .php RemoveType .php php_flag engine off (this seems to even disable my php4-cgi so that wont work) The only other place I can find any mapping is in /etc/mime.types, but commenting out the relevant lines and restarting apache2 does not affect mod-php5's .php mapping. I have searched as much as I can, it is now a mystery to me. Any help or direction would be greatly appreciated.

    Read the article

  • How to INF mod: Replacing 32bit dlls with 64bits

    - by Nime Cloud
    I've got a driver setup for 32 bit: An INF file and an x86 folder with two 32 bit dlls. I need to replace these 32 bit dll files with 64 bit ones. I just simply overwrite 32 bit files but no lock. How can I make 64 bit version of the driver? Update: I tried original setup files on 32 bit Windows XP, setup asks for WdfCoinstaller01009.dll, I just simply browse & point the file from somewhere on XP. ;-------------- WDF Coinstaller installation [DestinationDirs] CoInstaller_CopyFiles = 11 [silabser.Dev.NT.CoInstallers] AddReg=CoInstaller_AddReg CopyFiles=CoInstaller_CopyFiles [CoInstaller_CopyFiles] WdfCoinstaller01009.dll [SourceDisksFiles] WdfCoinstaller01009.dll=1 [CoInstaller_AddReg] HKR,,CoInstallers32,0x00010000, "WdfCoinstaller01009.dll,WdfCoInstaller" [silabser.Dev.NT.Wdf] KmdfService = silabser, silabser_wdfsect [silabser_wdfsect] KmdfLibraryVersion = 1.9

    Read the article

  • Can mod_fcgid maintain a hard-minimum number of available appserver processes?

    - by user9795
    ...and if so, how? I'm using Apache2 + mod_fcgid to serve a perl Catalyst application, on a box that I own, and I'd like for mod_fcgid to maintain a minimum number of spun-up processes ready to go. The docs say that FcgidMinProcessesPerClass only enforces a minimum number of processes that will be retained in a process class after finishing requests How do I get apache to start up with a certain number of appserver subprocesses on an idle server without using artificial load to get there?

    Read the article

  • Apache Mod SVN Access Forbidden

    - by Cerin
    How do you resolve the error svn: access to '/repos/!svn/vcc/default' forbidden? I recently upgraded a Fedora 13 server to 16, and now I'm trying to debug an access error with a Subversion server running on using Apache with mod_dav_svn. Running: svn ls http://myserver/repos/myproject/trunk Lists the correct files. But when I go to commit, I get the error: svn: access to '/repos/!svn/vcc/default' forbidden My Apache virtualhost for svn is: <VirtualHost *:80> ServerName svn.mydomain.com ServerAlias svn DocumentRoot "/var/www/html" <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory "/var/www/html"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <Location /repos> Order allow,deny Allow from all DAV svn SVNPath /var/svn/repos SVNAutoversioning On # Authenticate with Kerberos AuthType Kerberos AuthName "Subversion Repository" KrbAuthRealms mydomain.com Krb5KeyTab /etc/httpd/conf/krb5.HTTP.keytab # Get people from LDAP AuthLDAPUrl ldap://ldap.mydomain.com/ou=people,dc=mydomain,dc=corp?uid # For any operations other than these, require an authenticated user. <LimitExcept GET PROPFIND OPTIONS REPORT> Require valid-user </LimitExcept> </Location> </VirtualHost> What's causing this error? EDIT: In my /var/log/httpd/error_log I'm seeing a lot of these: [Fri Jun 22 13:22:51 2012] [error] [client 10.157.10.144] ModSecurity: Warning. Operator LT matched 20 at TX:inbound_anomaly_score. [file "/etc/httpd/modsecurity.d/base_rules/modsecurity_crs_60_correlation.conf"] [line "31"] [msg "Inbound Anomaly Score (Total Inbound Score: 15, SQLi=, XSS=): Method is not allowed by policy"] [hostname "svn.mydomain.com"] [uri "/repos/!svn/act/0510a2b7-9bbe-4f8c-b928-406f6ac38ff2"] [unique_id "T@Sp638DCAEBBCyGfioAAABK"] I'm not entirely sure how to read this, but I'm interpreting "Method is not allowed by policy" as meaning that there's some security Apache module that might be blocking access. How do I change this?

    Read the article

  • How to get uncaught PHP errors from fcgi server

    - by jason
    My web hosting company recently replaced suPHP with fcgi on my dedicated server because I needed opcode functionality. Since then I see loads of 500 errors in apache error and php error log is empty. I have no way to figure out whats the root cause. One reason I found out was time out so my hosting company changed FcgidConnectTimeout and FcgidIOTimeout to a value of 200. I believe there are no more timeout errors in my php script. My question is how do I capture PHP error before 500 internal server error page display to user? I am using Centos 5.8 server, WHM 11.34.0 (build 9), PHP 5.3.18 and Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_fcgid/2.3.6

    Read the article

  • How to setup Apache 2.2 (prefork) with mod_fcgid to test a C++ application?

    - by skyeagle
    I have written my first fastcgi application (C/C++), and I need to test it to ensure that it is behaving the way I expect it to. I have searched for examples on setting up Apache 2.2. with mod_fcgid, but all of teh tutorials etc I have seen, relate to PHP, Python, Perl etc. Is anyone aware of a resource that shows how I may setup Apache to use mod_fcgid (NOT mod_fastcgi) to test my binary? If no online resource is available (I'd be surprised), then could someone please point out the steps required to do the testing?

    Read the article

  • How to setup Apache 2.2 (prefork) with mod_fcgid to test a C++ application?

    - by skyeagle
    I have written my first fastcgi application (C/C++), and I need to test it to ensure that it is behaving the way I expect it to. I have searched for examples on setting up Apache 2.2. with mod_fcgid, but all of teh tutorials etc I have seen, relate to PHP, Python, Perl etc. Is anyone aware of a resource that shows how I may setup Apache to use mod_fcgid (NOT mod_fastcgi) to test my binary? If no online resource is available (I'd be surprised), then could someone please point out the steps required to do the testing?

    Read the article

  • The use of mod operators in ada

    - by maddy
    Hi all, Can anyone please tell me the usage of the following declarations shown below.I am a beginner in ada language.I had tried the internet but that was not clear enough. type Unsigned_4 is mod 2 ** 4; for Unsigned_4'Size use 4;

    Read the article

  • Mod Rewrite MS Hosting Hide Long Annoying URL By displaying the short URL?

    - by NJTechGuy
    Scenario : I have a PHP Forum and a Asp.Net site hosted on Linux and MS Hosting respectively (obvious right?!). My domain ABC.com is currently configured with PHP host whereas my ASP.Net site is using the default 1and1 generated URL (s0987465.onlinehome.us). So my question is, how to display ABC.com for any URL that includes s0987465.onlinehome.us? Example : s0987465.onlinehome.us/test.aspx?id=100 should display ABC.com or ABC.com/test.aspx?id=100 in the address bar by displaying content generated by s0987465.onlinehome.us?

    Read the article

  • Using mod-rewrite to conditionally select existing file in a subdirectory based on Host header?

    - by Kevin Hakanson
    I'm working through a problem where I want to select a different static content file based on the incoming Host header. The simple example is a mapping from URLs to files like this: www.example.com/images/logo.gif - \images\logo.gif skin2.example.com/images/logo.gif - \images\skin2\logo.gif skin3.example.com/images/logo.gif - \images\skin3logo.gif I have this working with the following RewriteRules, but I don't like how I have to repeat myself so much. Each host has the same set of rules, and each RewriteCond and RewriteRule has the same path. I'd like to use the RewriteMap, but I don't know how to use it to map the %{HTTP_HOST} to the path. <VirtualHost *:80> DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs" ServerName www.example.com ServerAlias skin2.example.com ServerAlias skin3.example.com RewriteEngine On RewriteCond %{HTTP_HOST} skin2.example.com RewriteCond %{DOCUMENT_ROOT}$1/skin2/$2 -f RewriteRule ^(.*)/(.*) $1/skin2/$2 [L] RewriteCond %{HTTP_HOST} skin3.example.com RewriteCond %{DOCUMENT_ROOT}$1/skin3/$2 -f RewriteRule ^(.*)/(.*) $1/skin3/$2 [L] </VirtualHost> The concept behind the rules is if the same filename exists in a subdirectory for that host, use it instead of the direct targeted file. This uses host based subdirectories at the lowest level, and not a top level subdirectory to separate content.

    Read the article

  • Converting Mod-rewrite rules which use %(QUERY_STRING) to NGINX rewrite format?

    - by HipHop-opatamus
    I've been stuck the last few days trying to convert the following Apache/Mod_Rewrite rewrite rule to NGINX format. Anyone know where I am going wrong? MOD_REWRITE: RewriteCond %{QUERY_STRING} topic=([0-9]+) RewriteRule /forum/index\.php /forum/vbseo301.php?action=thread&oldid=%1 [L] NGINX: location /forum/index.php { if ($args ~ "topic=([0-9]+)"){ rewrite ^/forum/index\.php?topic=(.+)$ /forum/vbseo301.php?action=thread&oldid=$1 last; } }

    Read the article

  • htaccess mod rewrite files to go through php first?

    - by jiexi
    I have a directory full of files. Originally people were allowed to direct link to these files. Now i would like to run all files through a php file first. Could someone help me with the .htaccess needed to do that? The phpfile used to handle the downloads will be called download.php and it will have a get variable called $ref So i need noob.com/games.zip to goto noob.com/download.php?ref=games.zip BUT still retaining the url of noob.com/games.zip Thanks!

    Read the article

  • JavaScript doesn't parse when mod-rewrited through a PHP file?

    - by Newbtophp
    If I do the following (this is the actual/direct path to the JavaScript file): <script href="http://localhost/tpl/blue/js/functions.js" type="text/javascript"></script> It works fine, and the JavaScript parses - as its meant too. However I'm wanting to shorten the path to the JavaScript file (aswell as do some caching) which is why I'm rewriting all JavaScript files via .htaccess to cache.php (which handles the caching). The .htaccess contains the following: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^js/(.+?\.js)$ cache.php?file=$1 [NC] </IfModule> cache.php contains the following PHP code: <?php if (extension_loaded('zlib')) { ob_start('ob_gzhandler'); } $file = basename($_GET['file']); if (file_exists("tpl/blue/js/".$file)) { header("Content-Type: application/javascript"); header('Cache-Control: must-revalidate'); header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 3600) . ' GMT'); echo file_get_contents("tpl/blue/js/".$file); } ?> and I'm calling the JavaScript file like so: <script href="http://localhost/js/functions.js" type="text/javascript"></script> But doing that the JavaScript doesn't parse? (if I call the functions which are within functions.js later on in the page they don't work) - so theirs a problem either with cache.php or the rewrite rule? (because the file by itself works fine). If I access the rewrited file- http://localhost/js/functions.js directly it prints the JavaScript code, as any JavaScript file would - so I'm confused as to what I'm doing wrong... All help is appreciated! :)

    Read the article

  • Mod rewrite with 3 parameters ?

    - by Axel
    Hello, I did tons of methods to figure out how to make this mod rewrite but i was completly unsuccessful. I want a .htaccess code that rewrite in the following method: http://www.mydomain.com/apple/upcoming/2 --- http://www.mydomain.com/handler.php?topic=apple&orderby=upcoming&page=2 This is easy to do, but the problem is that all parameters are not required so the link has different levels of parameters each time like this: http://www.mydomain.com/apple/popular/2 -- topic=apple&orderby=popular&page=2 http://www.mydomain.com/apple/2 -- topic=apple&orderby=&page=2 http://www.mydomain.com/all/popular/2 -- topic=all&orderby=popular&page=2 http://www.mydomain.com/apple/upcoming/ -- topic=apple&orderby=upcoming&page= So briefly, the url has 3 optional parameters in one static order: (topic) (orderby) (page) Note: the ORDERBY parameter can be "popular" or "upcoming" or nothing. Thanks

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >