Tag Archives: apache

java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter when starting Simple Struts2 Application

Questions: I am trying to run a simple Struts2 application but it always throw the following exception: java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter I have followed the step by step tutorial in http://struts.apache.org/development/2.x/docs/create-struts-2-web-application-using-maven-to-manage-artifacts-and-to-build-the-application.html but I cannot make it work. I also managed to find other Struts2 tutorial which uses maven but all failed. It throws the same exception when… Read More »

Netty vs Apache MINA

Questions: They both provide roughly the same functionality. Which one should I choose to develop my high-performance TCP server? What are the pros & cons? Reference links: Apache MINA (source) Netty (source) Answers: While MINA and Netty have similar ambitions, they are quite different in practice and you should consider your choice carefully. We were… Read More »

How to get the list of apache modules enabled with php

Questions: I have tried this <?php print_r(apache_get_modules()); ?> and got this Fatal error: Call to undefined function apache_get_modules() in Why the error for built in function and how to get list of modules Answers: The manual page contains details about the PHP and Apache version that support apache_get_modules(). You must be running PHP >= 4.3.2… Read More »

Apache rewrite for Laravel /public

Questions: I am sorry about this, but my htdocs root is wrong and I can’t change that. So I have to make it work in the /public folder. I use the normal Laravel .htaccess file with the following rewrite: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] If I open http://kemtime2_neu.pr.domain.de/public I get… Read More »

htaccess is not working after moving from XAMPP to LAMP on ubuntu 13.10 (Enable htaccess in apache linux server)

Questions: My CodeIgniter project is running successfully on my XAMPP system with the url, http://localhost/newsfeeds/users/allCategories/ When I move this project to another system has LAMP server on Ubuntu 13.10. To run the same page I need the url, http://localhost/newsfeeds/index.php/users/allCategories/ I need the index.php file otherwise it shows a page not fount error. My htaccess file… Read More »

PHP mail() works from command line but not apache

Questions: I’m trying to figure out why the mail function in PHP fails when called via web browser (i.e. apache), but I can run the same script from the command line using php -f mailtest.php This is one of my client’s Fedora servers, so I don’t grok it completely, but I do have root access… Read More »

Fatal error: Call to undefined function mysql_connect() in C:\Apache\htdocs\test.php on line 2

Questions: Fatal error: Call to undefined function mysql_connect() in C:\Apache\htdocs\test.php on line 2 I’ve spent 11 hours today trying to get past this ONE problem. I have installed: MySQL 5.1 Apache 2.2.14 PHP 5.2.17 these were the versions referred to in the book “PHP and MySQL”. When I run the script: <?php mysql_connect (‘localhost’, ‘root’,… Read More »

Apache Virtual Host not parsing PHP

Questions: I decided to enable virtual hosts on my Apache server, and chose to make it port-based. First thing I did, of course, was RTM. I followed the instructions found here. Well, it worked — kind of. As far as the virtual host running, it does. The content pulled from :80 is different from :8080.… Read More »

How to show php-files as plain text in Apache

Questions: for a certain folder on my local Apache-Server (running with Ubuntu) I’d like that all *php-files will be displayed as if they were plain text-files. I need this since I only want to see the source-code of these files and NOT run them. While searching, I found that most people have the opposite problem… Read More »