LAMP

prevent Apache from serving pages with 304 status code

纵然是瞬间 提交于 2019-12-12 01:53:55
问题 I have a server, LAMP, set up and a CakePHP App. When I request a web page through any web browser, it always replies with a 304 status, serving old pages even after i have changed the page. It seems like the server keeps any previously accessed page in a cache and serves it back to anybody that request it afterwards. E.g: User "X" logs into this system and access the page "home" and logs out. When a different user "Y" logs into the system, he is going to see "X"'s "home" whereas he is

HTTP - 400 bad request while downloading file

只愿长相守 提交于 2019-12-11 23:52:55
问题 After further investigation on basis of previous question url encode/decode is working properly. Issue is something with Apache server (might be) which serves file download request Specially if my file name ends with % sign, it fails. For e.g. Original File name: 204153_20090605_Aluminiumacetotartraat_DCB_oordruppels_1,2%.pdf Url in browser after clicking on download link: http://pdf/204153_20090605_Aluminiumacetotartraat_DCB_oordruppels_1%2C2%25.pdf This returns 400 error with bad request. I

EOL compatibility on BOTH Linux and Dos/Windows servers?

孤人 提交于 2019-12-11 20:25:58
问题 Using Notepad++ on a windows box, ( 100s of files into a plugin I've been developing for Wordpress ) I bumped up against a problem wherein the differences in newline characters between Linux and Dos/Windows causes some of my scripts to break when hosted on a LAMP server, which otherwise work fine on my WAMP Dev Server. Reading up on Notepad++ EOL Conversion , one might infer that a different code base must be maintained for each, but surely that's not the case? How does one ensure EOL

Permission denied inside /var/www/html when creating a website and it's files with the apache2 server

走远了吗. 提交于 2019-12-11 14:42:28
问题 UPDATE** The screenshot is within atom, but when I navigate to the directory using the file explorer, and right click, the option to rename or create a new folder are restricted and I cannot click on them. I just finished setting up the LAMP stack on my fresh UBUNTU 18.04 installation. I have everything working, the default /var/www/html/index.html page from Apache2 is being served on localhost, no port forwarding or any unique domain name, i just wanna run this on my network from my computer

unable to upload an excel file in codeigniter

我怕爱的太早我们不能终老 提交于 2019-12-11 12:57:31
问题 I have a Codeigniter project that can insert data into database through uploading an excel file and reading it with PHPExcel. It is working on my localhost however when I uploaded it in a LAMP server, It gives me an error The filetype you are attempting to upload is not allowed. How am I going to solve this? EDIT In my project, I also have a file image uploading.. public function uploadConfig(){ $this->load->library('PHPExcel'); $this->load->library('PHPExcel/IOFactory'); $config['upload_path

Start remote service through PHP

佐手、 提交于 2019-12-11 12:18:05
问题 Basically i want to pass different commands to the server through PHP ssh2_connect function. But i need to pass it through using different buttons for different commands, But unable to do it. Below is my code with button: <?php $connection = ssh2_connect('ipaddress', 22); ssh2_auth_password($connection, 'root', 'password'); if (isset($_POST['button'])) ssh2_exec($stream = ssh2_exec($connection, 'systemctl stop apache2')); ?> <form action="" method="post"> <button type="submit" name="button"

virtual LAMP server, developing on mac. what's the best way to achieve this?

核能气质少年 提交于 2019-12-11 11:58:54
问题 I'm currently running a virtual Ubuntu Server on my mac via Parallels. It is really quite alright, but working in the virtual environment can be a little slow. I am looking to just run the server, but do the actual development on the mac side. I really just want the server to run silently in the background whilst all dev work is handled on the mac. Has anyone set up something like this and would be able to point me to a fairly concise tutorial? Some of the challenges (for me) are : accessing

Getting Error 500 with this .htaccess on Linux, works fine on Windows

妖精的绣舞 提交于 2019-12-11 11:57:24
问题 I'm using XAMPP on Windows and LAMPP on Linux (Ubuntu) to develop in PHP locally. I have this in my .htaccess file: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.html -f RewriteRule ^(.*)$ $1.html RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php As you can see I don't want to type the extensions of filenames that end with either HTML or PHP. My both .htaccess contains same above content. Amazingly, when I am requesting any file (or

concurrency issues in web applications

送分小仙女□ 提交于 2019-12-11 11:39:10
问题 Before I have started to do web-programming I had thought it was easy. Now, after a year of experience I think it can be really damn hard mainly because of concurrency issues. Because that was some very unexpected finding out, I tried to ask my more experienced friends (they had made some apps like e-shops etc.) about it. Specifically, I asked them if you can really have concurrency issues that you need to solve or otherwise you are at danger of your data becoming inconsistent and they were

ftp_get() corrupt large file download

梦想的初衷 提交于 2019-12-11 09:04:29
问题 I have to download a large file(approx~-9mb) in .gz format from the server using ftp. I have written a function which downloads the file completely and correctly but when i put this code online , the file is downloaded but the file gets corrupt. Here is my code: function downloadFile($ftp_server, $username, $password, $server_file, $local_file) { // download server file $ftp_conn = ftp_connect($ftp_server) or die("Could not connect to $ftp_server"); $login = ftp_login($ftp_conn, $username,