apache

Creating a PHP web page that enables you to reboot the server in Linux?

I want to create a web page that allows the user to initiate a reboot on the linux server. Obviously this would only be avaliable for system admins and would also be controlled by using iptables. Below is a sample of code that I was thinking of using but I wanted to know if there is another way to do this and how also to use this in a w...

Can't get websrvmng to run in Plesk SSH terminal.

I am following this MediaTemple KB article and stuck at the last step. When I try to run the websrvmng (using the ssh terminal in Plesk) using the code the KB references: /usr/local/psa/admin/sbin/websrvmng -v -a I receive a 'File or Directory not found' error. I am a n00b when it comes to this stuff and would really appreciate any ad...

Image display permissions in PHP/Apache

I have a PHP site with a login system, and am trying to make a feature where only specific usernames can view particular images. I think what I'm trying to do is more involved than merely changing the .htaccess file, because a) this won't help discern between users that are/aren't allowed to view the image, and b) if someone enters the e...

Opening two connections to my Apache server?

Hi guys. I have an Apache server running PHP. Everything works fine. But If I have a script that runs for a long time, and I try to open another page to the same server, the second page waits till my first page finishes. This behavior happens to me on Linux and PC. I'm running Apache V2.2.9, and PHP 5.2.6. I'm not sure why this happ...

how to specify query string in url with apache bench

hi, My rails application is running on thin server which i want to benchmark using apachebench the command am using is ab -n 1 -c 1 http://localhost:3001/welcome/search?query="doctor"&rad=5 But thin server is not taking this url.Its giving !! Invalid Request Can any one help me how to give the url such that thin accepts th...

Apache sites-enable

Why in sites-enable the file name is 000-default but not default as in sites-aviable? ...

PHP is making me use <?php instead of <?

Hi, My Apache/PHP installation is making me use <?php ... ?> instead of <? ... ?>. Where is this found in the configuration file so that I don't need to do the former? I'm assuming it's in php.ini, but not sure what it would be called. ...

Apache URL rewrite query

Can anyone tell me how to do this? i'm stumped! I need a modified URL in this format this55-is-a-test-id-23.html But I need the 23 as a GET. I can't rely on searching for 'id' as this may occur elsewhere in the URL. Is there any way of searching for the last occurrence of id and passing that as a get using an Apache RewriteRule in .ht...

xdebug for PHP 5.2 on Windows 7 64bit

Hi all, Previous posters have linked to http://fusionxlan.com/PHPx64.php to install 64-bit capable versions of xdebug. I need PHP 5.2 compatibility for Magento, and fusionxlan has disappeared and archive.org doesn't have a copy. Does anyone have a copy of the fusionxlan download or dll that they can share? Thanks, JD ...

Apache proxy to Lighttpd: changing $_SERVER['HTTP_HOST'] in php

I have a WordPress blog running on lighttpd-1.4.19, listening at www00:81. On the same host, apache-2.2.11 listens on port 80, which creates a proxy connection from http://blog.mydomain.org:80 to http://blog.mydomain.org:81 (both being the same physical machine). The Apache virtualhost looks as follows: <VirtualHost *:80> ServerNam...

Performance problems in apache server with php

Hi all. I think I have a performance problem in my apache server. I have apache server on solaris 10 with php and some flash client applications. The clients get data from server in XML formation with HTTPService requests. sometimes the data doesn't arrive and sometimes it does. maybe performance in the apache server or in the php (maybe...

Problem to Import certificate to Apache tomcat: Failed to establish chain from reply

Hi, After I got certificate, I tried to import it as specified here: http://tomcat.apache.org/tomcat-5.5-doc/ssl-howto.html#Edit%20the%20Tomcat%20Configuration%20File But I got this error: C:\Program Files (x86)\Java\jre6\bin>keytool -import -alias tomcat -keystore C:\ SSL.keystore -file C:\SSL\SSL_Internal_Certificate_for_isdc-plannin...

Flex Client application - HTTPRequest problem in the initialize function.

Hello all. I have a serious problem in my flex client applications. I have an apache server with php web services. the flex client makes an httpservice requests. I noticed that the httpservice requests that runs from the creationComplete event of the application does not always get data from the server. but HTTPservice requests called fr...

What's holding up my PHP script?

We've got a PHP crawler running on our web server. When the crawler is running, there are no cpu, memory or network bandwidth spikes. Everything is normal. But our website (also PHP), hosted on the same server, stops responding. Basically the crawler blocks any other php script from running. What could be the problem? EDIT: ** fsockop...

Ajax cache control

Hello, I am having a problem with ajax requests in Internet Explorer and in Chrome - I cannot bust the cache. Normal pages don't have the problem - it's just the ajax requests. I know that one workaround is to append a random query string variable to the end of the URL. However, I don't want to lose all the benefits of caching, I jus...

URL Rewrite problem

Hi, I did a .htaccess that change urls like www.site.com/sell.php to www.site.com/sell. Sell page exists at my / and it works fine. The problem is when i try something like www.site.com/sadasdasdasdadsdfgfds, because "sadasdasdasdadsdfgfds" doesn't exist. I receive a 500 Apache's error. This is my .htaccess file: RewriteEngine On Rewri...

Rewrite rule index.php?/controller/method/param to /controller/method/param

I need a rewrite rule for this url http://localhost/~user/frame/lib/index.php?/controller/method/12/22/ How can i rewrite it that i can call it like this http://localhost/~user/frame/lib/controller/method/12/22/ What is the rewrite rule for the above problem? I hope i could explain my question clear. ...

Should I be concerned about performance with connections to multiple databases?

I have a PHP app that is running on an Apache server with MySQL databases. Based on the subdomain that users access, I am connecting them to a database (sub1.domain.com connects to database_sub1 and sub2.domain.com connects to database_sub2). Right now there are 10 subdomain-database combos, but that number could potentially grow to wel...

How to determin how much space is freeon your server? (php)

So I have Apache Web Hosting from some provider. how to determin how much freespace (mb's) for hosting files I have using php function? ...

Redirect old directory to new website

I want to use htaccess to redirect all traffic from www.oldsite.com/directory to www.newsite.com I want to make it so that when visitors view any webpage within www.oldsite.com/directory (ie. www.oldsite.com/directory/contact.html) it gets redirected to the homepage of www.newsite.com I tried "Redirect /directory http:www.newsite.com" ...