Ubuntu Servers :: Mod_rewrite Breaks PHP Post
Aug 29, 2010My .htaccess file looks like this:
Code:
Options -indexes
RewriteEngine on
RewriteBase /
[Code].....
My .htaccess file looks like this:
Code:
Options -indexes
RewriteEngine on
RewriteBase /
[Code].....
Trying to track down reasons why mod_rewrite won't load, I found this site; hopefully, this will reduce the idiocy of this question.
Based on it and other sources:
Code:
graton# locate mod_rewrite.so
/root/share/openh323/lib/apache2/modules/mod_rewrite.so
/root/share/pwlib/lib/apache2/modules/mod_rewrite.so
[code]...
I have mod_rewrite and mod_proxy loaded properly for the apache2 package in 11.04. I added the following to the bottom of my apache2.conf:
RewriteEngine: On
RewriteRule: ^/$ /test [L]
The server restarts fine, but / is not getting rewritten in the slightest. And when I added the RewriteLog directive, the log file had absolutely nothing in it.
I've got a strange problem. I have the following system:
[Code]...
After doing this install everything works fine as expected. I can reboot, shutdown and bootup as I much as I want to and the system will work. Now, I proceed to do the following (as root obviously - sudo bash)
[Code]...
When I try to restart the system now, I get to the grub boot loader and then it just breaks with the following message I've identified 'mdadm' as being the culprit here. Any idea why this would happen? Just a subnote. The reason I'm installing mdadm is to create a soft-raid as follows with the remaining space on each drive:
[Code]...
I updated my server (Ubuntu 10.04 LTS) today and had about 23 updates in Webmin. After the update suddenly apache doesn't render php pages anymore, instead letting you download the source code for the scripts. I checked the logs and found this:
Code: Syntax error on line 1 of /etc/apache2/mods-enabled/php5.load: Cannot load /usr/lib/apache2/modules/libphp5.so into server: /usr/lib/apache2/modules/libphp5.so: cannot open shared object file: No such file or directory I tried reinstalling php5 but I can't get it to work. I also hope that this was a glitch and that updates that break stuff like this don't get through QA.
I'm sending files to a remote server by way of FTP via a PHP script. With the firewall turned on these files are getting to the remote server with 0kb and the remote server is timing out before all the files are received. When the firewall is turned off the all files are received in tact. There are no outbound rules set in the iptables, looking for ideas on what to check next.
View 4 Replies View RelatedAlright, so I upgraded my old fedora 10 server to Fedora 11 with a netinstall CD, but now service httpd restart is broken. I already had to delete the old config file and reinstall apache, but now I can't restart it. I can kill it and then start it manually, but it never stops the running instance and fails to bind the port. I know it's because /var/run/httpd/htpd.pid is in the wrong place, which would be /var/run/httpd.pid, but do I have to make a symlink every time I want to restart it? I edited all the config files to point to the right place, but the system does not honor them. What do I do?
View 3 Replies View Relatedmy server :
ubuntu jaunty 9.04 32bits
apache2 2.2.11-2ubuntu2.5
php5 5.2.6.dfsg.1-3ubuntu4.5
I have a problem uploading large files : from 0 to 1 048 576 000 octet (1000mega) : OK greater... KO... i mean even no file uploading temporaly in /tmp I have tried using "jyraphe" or "openupload" in the server part and from mozilla or IE in the client part.... always the same thing...
php.ini :
post_max_size = 5G
upload_max_filesize = 5G
I even set "LimitRequestBody 10000000000" in /etc/apache2/sites-available/default thinking the default value (not set OR 0) didnt work but...
I have a problem with a PHP/Apache program.
The website creates a RPG character through a traditional Wizard. It calls itself with a hidden variable being the page number and tests which page and returns the page data with the page incremented.
Each page should be treated as a seperate page and so would be unique. I am echoing the contents of POST to the top of the page and so I can see variables being returned. When I get data from an Ajax query from page three it saves the data (23 post fields of no more than 25 characters for each field). Page four does the same but with less fields - but it is NOT returning the data - only four fields being those that were originally posted.
I cut/paste the function from section three to section four and changed the displayed text and the names of variables to test so there are no code errors, since page three works and is saved to a database.
So the only option is that there is a PHP or Apache2 issue when POST variables are returned? I am completely out of ideas as to why this would even be an issue or how it could possibly appear.
Is the number of variables an issue? This page is less than the previous page.... And the form is POSTed...
PS: I am getting NOTICE errors from PHP being the POSTed variables that are not displayed/returned... I used:
error_reporting (E_ALL ^ E_NOTICE);
to stop these form being reported but do I need to test each one? PPS: Using If Isset($_POST['xxx']) does NOT allow that variable through...
PS: I have the default Ubuntu 10.04 Apache2 with all the ubuntu 10.04 updates...
I just rented a godaddy dedicated, the ubuntu variety comes loaded with 8.04...(& I need PHP 5.3)Followed the directions here: URL...I did have to change my sources.list, everything after that went as expected (not like i'd know what to expect)At one point it asked if I wanted to update my grub/menu.lst to the release version, or use my old one, I updated it.Once the upgrade completed, I checked the menu.lst again to ensure it was gonna boot 10.04 (as warned by the guide)However once I sent reboot, I couldn't SSH back in, I waited 5m, 15m, tried again, still couldn't SSH then I had the server power cycled via my godaddy control panel, and still nothing, attempts on port 22 timed out & other ports were refused.
I think I overlooked something because, from what I've read here and there this is technically possible, I also just found this guide here:URL...The first user comment (above link/guide) seems to have a tip for what I'm trying.Anyways had the server re-provisioned via my control panel & I'm about to try again, only this time. uh, check the SSH settings post upgrade/pre restart?
I am using apache2 with subversion and trying to get post commit script to run an svn update command. All svn commands seem to work fine manually
Everything used to work fine but then the server ip changed and I can no longer access it with the web name and have to use the ip directly
I am using tortoise svn with vista on my work machine
Here is the script
#!/bin/sh
export LC_CTYPE=en_US.UTF-8
/usr/bin/svn update /home/common/webroot/bob
Here is the result.
Command: Commit
Modified: C:UsersMattDesktopcheckout - bobindex.php
Sending content: C:UsersMattDesktopcheckout - bobindex.php
Completed: At revision: 63
Error: post-commit hook failed (exit code 1) with output:
code....
I think what i need to do is update the certifcate for the apache2, but I'm not sure how to do this, where to put it, and then which of the thousand apache config lines needs to be changed
I want to use rewite module to change my site url from site/index.php to site/cat/ for example I have created .htaccess file in the directory where the file is and add to it:
Code:
RewriteEngine on
Rwerite ^cat$ /site/index.php
Here site is not my site, it just in example. I have rewrite.load in the loading list of modules and I can see it loads in phpinfo(). AllowOverride is set to All for the current site, but no redirect is made on site/cat
I would like to use mod_rewrite to rewrite all instances of .php and _ in file names in the root directory
So far I have:
But this throws out error 500. Could someone correct my code?
I am still struggling to get non-www to www. At the moment I have following code to redirect from non-www to www. RewriteCond %{HTTP_HOST} !^www.hoteldealscatcher.com$ [NC]
RewriteRule ^(.*)$ http://www.hoteldealscatcher.com/$1 [R=301,L]It works totally fine for home page but not for other deep links, such as /city/Sydney.php, they are still going to non-www pages. What 's the best approach I could use to solve it
I have tried this a million ways, got it to work once but it didn't work sitewide for some reason. I have a url: [URL] and I want it to be found by going to: [URL] I am using this
Code:
RewriteCond %{REQUEST_URI} ^/agents/tp/
RewriteRule ^([^/]+)/?$ agents/tp/$1/index.php [L]
and have also tried something as basic as
Code:
RewriteCond %{REQUEST_URI} ^/agents/tp/
RewriteRule ^(.*)$ agents/tp/$1/index.php [L]
I keep getting "The requested URL /JoeAgent/ was not found on this server." why it's not working?
I've given a bit of support using Mod_rewrite to use magical urls to redirect to scripts, but when I migrated to Ubuntu's Apache2... I'm lost. I basically want to rewrite like this:
Code: RewriteRule ^artist/(.+)/$ artist.php?artname=$1 But I noticed that it wasn't passing the artist=$1 to the server GET vars. Then I noticed that if I changed the name of the file in both the rule and the file system to artists.php, typing artist/blah/ no longer was found. So then I realized that if I removed the rewrite rule artist/hello/ would still resolve to artist.php without any parameters my htaccess is like so:
[Code]...
I have ubuntu 10.10. I installed apache2 Php mysql and phpmyadmin through the package handler. it worked after that I instaled Imagemagick , and imagick for PHP. than I installed mod_rewrite for appache2. I created a folder in /var/www/ called shimmie. I copied there my codes and after setting up htaccess it worked fine. url rewrite worked. thumbnails with imagick appeared along with normal images. Yesterday I got another webpage project. but it required apache mod_ expires and mod_headers and installed it. And installed Xdebug for PHP. after this I put the webpage to another /var/www/ folder called fashion. Now in fashion everything works as its needs to: url rewrite , expires.. everything. But now my original folder shimmi, doesnt works: no url rewrite, no imagick thumbnails nor the original image shows up.
the folder belongs to my user and set is that every thing can read it and write it.
EDIT: I even copied the shimmie folder toa new and still didnt work, so i re created it... and still doesn't work.... why is thats the only thing that cant use .htacces and imagick?
[URL]
With: Code: sudo apt-get clean ; sudo apt-get update ; sudo apt-get upgrade I get:
[Code]...
I am running Apache2 on Novell SLES 11. I am using Virtual Hosting for two sites. One site only has a single domain whereas the other site has two domains registered. surrounding my one virtual host with the two domains. I want anyone that point to [URL] gets redirected to [URL]. I am trying to do this for trending but not 100% on how to go about doing this. I've read about mod_rewrite but most of the information I've read about is about a single site running on Apache and not much around Virtual Hosting within Apache. I am currently using Server Alias within my vhost.conf file which allows either [URL] or [URL] to see the site but I really want to redirect [URL] to [URL].
View 12 Replies View RelatedI am running 8.04 Server on a VPS. I have installed Citadel. I also have some web pages that use sendmail for contacts.I see my mail.info logging a lot of the following entries.
Code:
mail sendmail[14051]: o0GNe7bS014051: from=smmsp, size=404, class=0, nrcpts=1, msgid=<201001162340.o0GNe7bS014051@mail.server.com>, relay=smmsp@localhost
[code]...
I want to enable Pretty URLs in Concrete5 and Joomla CMSs. So far I have- enabled pretty urls in the CMS- created .htaccess files (as they showed)- changed AllowOverride None to All in /etc/Apache2/httpd.conf <directory>- restarted ApacheBut the pretty urls still don't work, When I click any link on either site it gives me a page not found error. If I use the "non-pretty" URLs, all the links work. So I guess Apache either doesn't read the httpd config file or it doesn't read the .htaccess files or something else. Has anyone got this working? What else did you do?
View 9 Replies View RelatedFor some odd reason, I cannot post on the ubuntu forum and the LinuxMint forum. Yea, I know.... the irony... I am using Mozilla and have tried Chromium, but that did not fix my problem. When I click on "submit" to post a thread, the page will just say "loading..." and nothing happens for a really long time. Does anyone know what is up? I tried posting on one other forum that I go to often and it seems to work out fine. I haven't tried any other forums though.
View 7 Replies View RelatedOn one of my servers (Centos 5.5), I have been hosting articularly complex CRM application for one of my clients. Recently they have asked about configuring SSL connections to the CRM. Problem is, SSL is already configured for their main domain but not the sub-domain where the CRM application is accessed. Rather than purchasing another SSL certificate for their sub-domain (and probably another IP address),ld it be possible to setup a redirection from the subdomain to a sub-directory in the SSL directory using mod_rewrite. I have searched online and through the other posts on LinuxQuestions but nothing I have tried works.For example:[URl]
View 2 Replies View RelatedI just upgraded to the new 9.10. In 8.04 when I went into "Restricted Drivers" it showed something for my video card. Now there is nothing.
I'm trying to play a game (Counter-Strike) and it's just too laggy, probably because I don't have any drivers installed for the video card.
It's an ATI Radeon X-1950 Pro. What can I do?
we were able to get my officejet g55 and others' g85s working with karmic. the old tricks are not working for me.
i have lucid 64-bit.
notice at line 81 it goes rather strange - this goes on for another 9000 odd lines and looks like the set script is broken out and cat-ing to the screen - can't prove this as I've not been able to find the set script that is invoked...e.g.
uname@Sol:~$ set |head -200
BASH=/bin/bash
BASHOPTS=checkwinsize:cmdhist:expand_aliases:extgl
[code]....
After i tried a lot of mpd.conf tricks, I followed the tips on [url], namely, adding the mpd user to groups pulse and pulse-access. Now, which makes me really happy, MPD can have audio output. Downside: no other program can make sound, I can't make my beats again with lmms etc. The volume icon in the top right is always on mute, when i click preferences, the hardware tab didn't even show a device. Now it does, but nothing comes out except mpd out - and pressing the volume keys will display a notification but the main icon in the bar stays on "---" mute. Can i make mpd just an application on the pulseaudio outputs list, so that it can play nicely with the other guys?
View 1 Replies View RelatedI've been stuck in the windows side of my dual boot for about a month, I came back over to the ubuntu side and updated/upgraded and ran into this issue: When I log in everything sound related works fine. I can play audio and record audio off of the monitor using audacity. As soon as I start firefox though, all audio breaks. I can't play audio in any other program, recording in audacity fails, etc. Closing Firefox doesn't help, rebooting seems to be the only thing that works. I've already tried purging and reinstalling flash, but that doesn't seem to have had any effect. When starting audacity it throws this error:
Code:
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
Expression 'stream->capture.pcm' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3653
I'm on Lucid if that is of any relevance. It seems to me that firefox is monopolizing the audio device both while running and after it closes. What is odd is that I've never had this problem before, and all I did was update. I often run audio in firefox and record it with audacity.
p.s. I use pavucontrol to set up recording, and firefox no longer shows up as a playback application when playing audio.
I work a lot with Unix bash shell environment. Whenever I go down the directory tree to several subdirectories, i.e., /home/a/b/c/d/ and so on and type in a long command, what happens is that command text wraps around onto the new line but when trying to edit command I can only go back to the beginning of the new line. So, for, instance, say I go to directory and type something like:
/home/a/b/c/d/find . -type f -exec sed -i <- end of line
's/blah/blah/g' {} ; <- new line
Here, the problem is I can't go back to the real beginning of my command that starts with "find", I can only scroll to the beginning of the new line with the part "'s/blah/blah/g' {} ;"
So I effectively loose control over what I typed and can't edit it when the command wraps to a new line. Does anyone else experience this problem?
I also have this problem on our Debian servers so I always have to make sure I type the right command the first time because I can't move back and forth to edit it when it wraps to a new line.
It seems that updating the Kernel breaks my installation. I've tried it twice, and both times it disabled my gui desktop. I'm posting this with links2 in my terminal. The terminal works perfectly.
This is really annoying, as I can't even use my computer. What do you think is the problem?