apache

PHP and Permissions

Hi, I recently moved my website to a new host and now am experiencing some broken code.. I have an uploading script that is now returning this: move_uploaded_file() failed to open stream: Permission denied in *.. I've set the upload directory to 777 which worked fine, but my script is needed to have top level permissions.. (As...

how to edit .htpasswd using php?

hey all i have a protected directory where only user on .htpasswd can access, but sometimes it requires the user to change password or username, edit a specific username password to his username him self sample users kevien : kka mike : mike And let say i want to change kevien to XYZ And same thing goes to password ...

mod_rewrite: Different rules on different domains, same www-root

I have 8 domainnames that point to the same www-root. If the main domain is accessed, you are pointed to index.php, and from there on, the URL's are like: index.php?p=contact etc. If, however, you access one of the other 7 domains, that point to different units, you are initially pointed to: index_local.php, and from there on it goes lik...

Can I use properties in an ivy.xml file to avoid repeating version numbers of dependencies?

Here's what part of my ivy.xml looks like right now: <dependency org="org.springframework" name="org.springframework.core" rev="3.0.2.RELEASE" /> <dependency org="org.springframework" name="org.springframework.context" rev="3.0.2.RELEASE" /> <dependency org="org.springframework" name="org.springframework.jdbc" rev="3.0.2.RELEASE" /> <de...

apache2 mod_defleat, how it serves precompressed pages... like html.gz

hi all gurus, I am new to apache2 and want to host gz compressed files like html.gz.I read some where over google and found the mod_defleat and mod_gzip but unable to configure it. any one can help me. I am using Ubuntu 9.10 ...

Cookies ignored on Apache/Magento installation

I'm running a Magento based website store on Linux/Apache. In order that user logins are maintained, I've set my cookie lifetime to be close to two years. The cookies are sent out with the right times, I can see them in my browsers. When I visit the site from a previously logged-in browser after about a day, the user is logged out. ...

Trying to make mod_rewrite to work on Windows

Hello guys, I'm having some trouble confinguring Apache mod_rewrite on Windows. I'm using latest version of XAMPP on Windows Vista. Here's my httpd.conf file: LoadModule rewrite_module modules/mod_rewrite.so <Directory /> Options FollowSymLinks AllowOverride All </Directory> <Directory "D:/Server"> Options Indexes FollowSymL...

disable Virtual Directory Support in apache

hi, i am using php and apache for my local system. when i get my phpinfo details using phpinfo(), i got that my Virtual Directory Support | enabled how can i disable this... any one have idea about this? Thanks in Advance ...

How can I do an SSL connection with PHP

Hi, I need to develop a PHP class to communicate with Apple servers in order to do Push notification (APNS). I have the certificate (.pem) and I tried to follow various tutorials found on Internet but I'm still getting error trying to connect to ssl://gateway.sandbox.push.apple.com:2195 with stream socket : $apnsHost = 'gateway.sandbox...

Redirect question using mod_rewrite (no extensions - root of site)

Hi, I'm having a small problem with mod_rewrite I have the following in my .htacces: Options +FollowSymlinks RewriteEngine on RewriteRule ^(.+)\.htm$ index.php?name=$1 [NC] This is my index.php file: <?php echo $_GET['name']; ?> This works great for the following url: www.mySite.com/this is an example.htm this would display ...

Unexpected htaccess behaviour (mod_rewrite and apache)

Yeah, mod_rewrite is driving me crazy. Here is the problem: my htaccess RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [L,QSA] when i try to access the page advantix (so address was www.mywebsite.com/advantix), i'm being redirected to advantix/?url=advantix Looking at the access log, i have a suspicious ...

how can i make sure only a single record is inserted when multiple apache threads are trying to access the database?

I have a web service (xmlrpc service to be exact) that handles among other things writing data into the database. Here's the scenario: I often receive requests to either update or insert a record. What I would do is this: If the record already exists, append to the record, If not, create a new record The issue is that there are cert...

Firefox shows apache 2 test page, while internet explorer works just fine

When I am trying to access Topspeed.com, my internet explorer shows the page just fine, but if I try firefox then I end up on the apache 2 test page... any idea why ? ...

RewriteRule help

I have successfully setup htaccess to do this: domain.com/ad.php?ad_id=bmw_m3_2498224 INTO: domain.com/ads/bmw_m3_2498224 However, I have a link on the page which makes the page submit to itself... The link saves the ad inside a cookie: domain.com/ad.php?ad_id=bmw_m3_2498224&save=1 // Note the 'save' variable I need to ...

.htaccess rules in Kohana 3.0 ?

Hi I'm running a Kohana setup on my local apache server. I've created a 'htdocs' folder which houses the index.php file in the kohana directory. So that the system files are not available to visitors. Now I wan't to remove index.php from the URL everytime I visit another controller, so I've tried fooling around with the .htaccess provid...

sprintf bug with php & apache in windows?

I've run into a strange problem on a WAMP server setup (PHP version 5.3.0, Apache 2.2.11). When using sprintf to output a number, I occasionally get erroneous characters in the output string. Example: (not trimmed from anything, this is the only code in the script) $dt1 = new DateTime('now'); $dt2 = new DateTime('now - 10 min'); $int...

Clean URLs for images

I'm unable to get a working .htaccess that should accept clean URLs to load images. I mean, for example, if a user type this: http://mysite.com/image/example It works perfectly, as my PHP process and parse it. However, if the user type: .../image/example.jpg It doesn't work. I mean, if a user writes that, I want to load the module wi...

Apache Axis web service clients vs plain SOAP requests.

I'm looking for the best way to consume a Java web service that returns rather large and complex objects. I am currently using Apache Axis clients generated from the wsdl, (using eclipse "generate web service client" tool). We have concerns about performance of this. The service proxy objects are not thread safe, and they are rather h...

Should I use the java.net or org.apache.http library for HTTP in my Java application?

What should I know about the trade-offs between these two HTTP libraries? ...

Apache - "dynamic" rewrite rule

Hi there. I'm working on a Zend Framework project where I've stumbled across a bit of a problem. The problem originates from the fact that modules are 2nd class citizens in Zend Framework. In my project, I'd like for each module to have a folder containing files which are to be accessed from the outside - files such as stylesheets, java...