apache2

PHP: include inside included file

老子叫甜甜 提交于 2019-12-24 05:11:35
问题 I've gotta solve this once and for all. I'm currently working on a 4 years old project, written in PHP and that is run on Apache server. We are a team of about 40 folks and each of us uses the prefered OS, so we have Windows, Macs and Linuxes running this code. I'm among those who prefer Ubuntu. Anyway, everytime I clone this project, I have to modify some portions of code so it'll work in my machine, because of the following old include / require issue: So suppose I have the following files

LocationMatch and DAV svn

时光总嘲笑我的痴心妄想 提交于 2019-12-24 03:53:25
问题 I am trying to make our subversion repository accessible via multiple URLs. To do so, I was thinking to use the LocationMatch directive. My configuration is: <Location ~ "/(svn|repository)"> DAV svn SVNPath /opt/svn AuthzSVNAccessFile /etc/subversion/access </Location> The above configuration does NOT work ... Strange thing is that if i use for example this configuration, it works well for both URLs: <Location ~ "/(svn|repository)"> SetHandler server-status </Location> For me it looks like

New site conf file for Apache 2.4.6

笑着哭i 提交于 2019-12-24 01:54:27
问题 I had just upgraded to Ubuntu 13.10 earlier today. The version of Apache2 is 2.4.6 now. I removed the old site config file and tried to create a new one. When I was trying to copy default.conf, I found the format had been changed significantly. And here is an example of the new conf file. As lots of people do, I also have the forbidden problem even if I set my folder permission to 777. 1 <VirtualHost *:80> 2 # The ServerName directive sets the request scheme, hostname and port th at 3 # the

PHPExcel $objWriter->save() fails

纵饮孤独 提交于 2019-12-24 00:59:01
问题 I am creating an Excel file based on records from a database with PHPExcel and am facing an odd problem when generating it on a large data set. I have narrowed it down to a single problem-causing line: $objWriter->save('php://output'); It just spits out a blank file instead of the expected workbook. Also, the effect is similar if I try to save the result into a local file instead of redirecting to the browser - no file is ever created. The kicker is that it works perfectly for a smaller data

File not found - http://localhost/path-file-script-or-image

谁说胖子不能爱 提交于 2019-12-24 00:49:51
问题 When I visit my node application running on my raspberry pi at 10.0.my.ip.address the app loads but get 404 multiple files not found. The src to my files, scripts and images look similar to this <link rel="stylesheet" href="http://localhost/Ziroid_Functions/Clovis_App/public/clovisapp.css"> <img src="http://localhost/Ziroid_Functions/Clovis_App/public/img/doubleUp.png" alt="Smiley face" > <script type="text/javascript" src="http://localhost/Ziroid_Functions/Clovis_App/public/js/radar.js"><

PHP “mail()” function sends mail from php5 cli but not when the script is run by a browser

荒凉一梦 提交于 2019-12-24 00:32:01
问题 I have configured my server to send mail by setting "sendmail_path = "/usr/sbin/sendmail" in "/etc/php5/apache2/php.ini" and sendmail is installed on the server. When I run this script, or any variation of it, from php5 via the cli the mail sends just fine, but when I have a browser run it, i.e. Chrome or Firefox, it fails everytime. <?php $to = "notreal@email.com"; $subject = "Hi!"; $body = "Hi,\n\nHow are you?"; if (mail($to, $subject, $body)) { echo("<p>Message successfully sent!</p>"); }

Web server not reading .htaccess file

戏子无情 提交于 2019-12-23 20:49:57
问题 I have Ubuntu 12.10 with apache2 installed, and my .htaccess file is not working. I have it set up to be able to not have .php file extensions in the links, so it looks like www.website.com/login instead of /login.php, but it says that the URL "/login" is not found on the server. I have read this page and it says something about "AllowOverride All" but I don't know where that is, or if I need to add it, where I would add it. EDIT: I have found this link and have found what it says, but it

Problem with Executing CGI Scripts on Apache

∥☆過路亽.° 提交于 2019-12-23 19:16:04
问题 Pretty much a complete Linux/Apache newbie here, I am in the process of moving a site from a shared host to a Linode VPS. It's all been going smoothly until I starting trying to move my Moveable Type blog which runs using a series of CGI scripts. I am running Ubuntu 10.04 and Apache2. After hours of messing about I got a PERL hello world script (hello.cgi) to execute from a the web browser in the root HTML directory. Here's the script: #!/usr/bin/perl -w use strict; print "Content-Type: text

In Rails, should I enable serve_static_assets?

♀尐吖头ヾ 提交于 2019-12-23 18:53:17
问题 I am currently using Apache to proxy to Thin (using this article) None of my static assets work (e.g. stylesheets, javascripts). Is Apache supposed to be serving them or do I have to enable config.serve_static_assets in config/environments/production.rb ? If Apache is supposed to serve them, then what am I probably doing wrong? Here is my Apache config: <VirtualHost *:80> ServerName example.com ServerAlias www.example.com DocumentRoot /home/r/public_html/example/public RewriteEngine On <Proxy

Apache2: 429, Too Many Requests response

我与影子孤独终老i 提交于 2019-12-23 18:14:53
问题 My Apache returns a 429 error code when I start using my API intensively. De API calls are generated by SAP BusinessObject and send to my 'Reverse Proxy' to convert HTTP to HTTPS. The Reverse Proxy forwards the HTTP request to the webserver over HTTPS. After 15 requests, the Reverse Proxey returns a 429 error in the Apaches error.log. These 15 requests are made within 9 minutes. How can I configure Apache so it will handle this kind of load/traffic? Becase I've another 300 requests after the