Jump to content

Search the Community

Showing results for tags 'apache'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (Dreamweaver, Zend, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 26 results

  1. Hi all, I've done something similar with my wp-content folder where I protect the files from being downloaded if you are not logged in and everything works just fine. With the following code I am trying to say: #if the user doesen't have the cookie "wordpress_login_in" # and the url is wp-json ... # redirect to google RewriteCond %{HTTP_COOKIE} !.*wordpress_logged_in.*$ [NC] RewriteCond %{REQUEST_URI} ^.*wp-json/wp/v2/(users|comments|posts|pages|media|types|statuses|taxonomies|categories|tags|settings) [NC] RewriteRule ^ http://www.google.com [NC,L] Can anybody tell me why the script doesn't work? I am still seeing the JSON file (i have tried redirects from files and folders and everything seems okay. I've also tried creating wp-json folder but then that breaks the api from displaying)
  2. hello dear PHP-experts i run opensuse 13.2 i ve set up an apache webserver - well - if i type localhost into the browser then i see: it works but i want to see also phpmyadmin: the phpmyadmin on apache server - installed but not visible - what can i do now. I think that i have to check the running services on the machine!!? Which test can be done - with the terminal ? Which tests can i run on commandline ? love to hear from you greetings
  3. I am using apache web server on linux. I am using PHP for web designing. On web server, i want to show the configuration data by reading the ini file. I am creating this ini file from one php code itself. If this php code i run through linux terminal, the file is created with file and group owner as root.(i am having sudo rights on machine) Then if i try to read the ini file from my apache web server, it gives warning as failed to open stream: permission denied. I have tried changing the owner, and permissions to 777 of the file. Still it is not readable. On the other hand, if i run the php code of ini file creation through web server, ini file is created with file and group owner as apche. and web server is able to read/ write the file. But i want to create that file from root or some other user and later read/written by apache. How to give this access permission?
  4. hello dear PHP-experts, today i create a rescue-system for the emergency-situation: i am creating a little resque-usb for SUSE-DVD on USB-Stick currently plan to create a litle Rescue-USB while using Suse-ISO DVD on a USB medium 1:1 copied step 1. Suse-ISO download: here: http://ftp5.gwdg.de/pub/linux/suse/opensuse/distribution/13.2/iso/openSUSE-13.2-Rescue-CD-x86_64.iso step 2 copy the file onto a USB stick with the following command dd if=openSUSE-13.2-Rescue-CD-x86_64.iso of=/dev/sdX bs=32kwhere sdX=sdb or sdc is the USB stick ready - now i can test the rescue-usb
  5. hello dear linux-community if a server needs to meed some requirements - eg for installation wordpress and if the server needs to run eg see here: https://wordpress.org/about/requirements/ then i need to have a closer look at the apache2handler in the php-ini Apache Version Apache all the mentioned are listed in the php-info.file note: here are no mod_rewrite Apache module so what
  6. The server is AWS linux apache running PHP, with me the sole developer as owner ec2-user. Objective: To upload files from the app user's browser (handled) to a temporary directory (/test_sub below) within the /html tree, then for security purposes, to have PHP move this file to outside the /html tree (/private_sub below) where it will remain unable to be read, written to or deleted except when the app requires PHP to do this. The app needs PHP to make any directory permission changes via chmod, and perhaps owner changes and group changes (preferably not the last two). Here is the directory structure and SUDO output to accomplish this: /var drwxr-xr-x 21 root root 4096 Dec 11 19:23 /var /www drwxrwsr-x 11 root www 4096 May 1 16:50 /var/www : /html drwxrwsr-x 5 root www 4096 Apr 25 19:51 /var/www/html : : /AWS_s drwxrwsr-x 8 ec2-user www 4096 May 1 16:54 /var/www/html/AWS_s : : : /test_dir drwxrwsrwx 3 ec2-user www 4096 May 1 16:52 /var/www/html/AWS_s/test_dir : : : : /test_sub drwxrwsrwx 4 ec2-user www 4096 May 1 23:14 /var/www/html/AWS_s/test_dir/test_sub : : : : : /test_file.txt -rw-r--r-- 1 ec2-user www 13 Apr 24 13:36 /var/www/html/AWS_s/test_dir/test_sub/test_file.txt : : /private_dir drwxrwxrwx 3 ec2-user www 4096 May 1 21:02 /var/www/private_dir : : /private_sub drwxrwxrwx 2 ec2-user www 4096 May 1 21:19 /var/www/private_dir/private_sub : : : /moved_file.txt -rw-r--r-- 1 ec2-user ec2-user 13 Apr 24 13:36 /var/www/private_dir/private_sub/moved_file.txt : : : /copied_file.txt -rw-r--r-- 1 apache apache 13 May 1 23:49 /var/www/private_dir/private_sub/copied_file.txt : : /private_sub2 drwxr-xr-x 2 apache apache 4096 May 2 00:18 /var/www/private_dir/private_sub2 The PHP scripts are run in the /test_sub directory. The default permissions for directories are drwx rws r-x 2775. Only when the /private directories are both set to 777 and the setgid is unset will they allow files to be written to them. When the two /test directories are set to the default of 775 with the setgid set, they allow files to be copied from them. However, when the move (rename) script is run, the delete function of the copy and delete process throws an error unless both /test directories are reset to 777 clearly allowing files to be deleted. I'm concerned that the /test and /private directories need to be 777, opening them up to bad actors. I've spent days researching and testing many options but have failed to resolve this. Clearly, I'm missing something fundamental here My questions: 1. Why do the two /test and the two /private directories need to have the 'other' set to rwx? I read that PHP uses group www and therefore that group www should allow the writes in the /private directories and the reads and deletes in the /test directories. 2. Why does copied_file.txt have owner:group as apache:apache instead of ec2-user:www and likewise when I mkdir /private_sub2 in PHP? 3. Why does moved_file.txt have owner:group ec2-user:ec2-user instead of ec2-user:www? 4. Why did PHP mkdir create the non-default permission 0755 in /private_sub2? 5. Why, using PHP, do chown, chgrp and chmod fail to make changes to /private_sub/moved_file.txt?
  7. i run several wordpress on domains - and wthin the wordpress i have a plugin that allows uploads of images -within a certain plugin the interesting thing: image upload is - sometimes possible and sometinmes impossible: see here the circumstances - PHP Version : 5.3.28 PHP Safe Mode : On image upload is impossible - and on the same server - a second vhost PHP Version : 5.3.28 PHP Safe Mode : off image upload is possible why is this so - does it have to do with the safe-mode -
  8. I need help to shorten the following url in apache .htaccess example.com/index.php?q=1&w=2 if possible, the url that i would like is... example.com/index.php/1/2 or better yet... example.com/index/1/2
  9. hello everyone. could you advise me on the structure of my code to check if it is correct: RewriteRule ^/user/([a-z]+)/cake/([a-z\ .*A-Zx0-9-_]+)$ /cakes.php?userid=$1&cakebaked=$2 what i am trying to do is to add a - instead of a whitespace which appears in the url as %20.
  10. I implemented google's reCAPTCHA V2 on http:// on the remote apache shared server and it worked 100%. I then changed the protocol to my shared server SSL using the same PHP script as the non-SSL script. The older version of reCaptcha had an SSL 'false' to 'true' SSL parameter, whereas I can't find one for V2. I had to use htaccess to redirect the example.com to the shared SSL server https://serverid.net/example/ which works perfectly without recCAPTCHA. I incorporated reCAPTCHA V2 and the error message where the reCAPTCHA image should be shows "ERROR: Invalid domain for site key". Here's the htaccess: RewriteEngine On RewriteCond %{HTTP_HOST} ^(.*)example\.com [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://servername.net/example/$1 [R,L] And the recaptchalib.php code in case that helps: https://github.com/google/ReCAPTCHA/blob/master/php/recaptchalib.php Anyone know how to make this work? (If this is not the right forum for this, please direct me to the appropriate one. Thx)
  11. hello - dear phpfreaks, i portet over a wordpress site to localhost. (an opensuse linux-box) all went nice and was very smooth to do so. after porting over the files and the db; i added the db-name and user-name etc. but nothing more. then i looked at the site http://localhost/mysite i saw the site - but only once - that is very very interesting. i read that i have to do more. Probably these changes - mentioned below are mandantory in order to avoid a blank page cf: https://managewp.com/how-to-create-a-local-copy-of-a-live-wordpress-site#comment-148613 question: is this true? Do i need to make these changes to avoid a blank page!?
  12. shaddf

    pretty urls

    how can I rewrite localhost/base/stage/Major.php to main-shop my htaccess file is located in folder base together with the index file and has this in it RewriteRule ^my-shop/?$ /stage/Major.php [R=301,L]
  13. First thing: I formatted my drive today and fresh installs of Apache2, PHP5 and MariaDB on Linux Mint 17.1. No files have been messed with. Not one. I created info.php and placed it in var/www dir. The file consists of one line: <?php phpinfo(); ?> When I run it our of my web editor (Bluefish), instead of showing me on my web browser the PHP info page that's suppose to show, I get: <?php phpinfo(); ?> I've been fighting this for two days! Done everything suggested by many others online...and that's why I had to scrub my drive; forgot all the files I augmented. Does anyone know why my PHP files behave this way? I'd love to start working with PHP, but I can't until whatever's broken is fixed. Any ideas? Any suggestions? I'm at my wit's end with this. Landslyde
  14. Zachary_Williams

    Social Media Sites Not Displaying

    Hey there, I'm pretty new to this proxy server thing and planning on getting some kind of deggree/major in computer science and I have made some pretty substantial progress just by doing some fairly superficial research. I've succesfully set up my phproxy and everything works reletively fine, except for social media sites such as facebook, twitter, myspace, etc. whenever I try to go to these pages via my proxy, it loads just fine but the screen is blank; no logos or information of any type is displayed on the browser when I attempt accessing these sites. However youtube works just fine without a problem. When I initially set up the server I had to edit the Apache program on my computer server to allow access. Thats when everything started working correctly except for the display screw up on social media sites. Any ideas on how to make the damn thing display would be graciously accepted lol. for the life of me ive tried screwing with everything and even different phproxy programs. Thanks! ~~This kid P.s my OS is Widows 7 and ive tried on multiple browsers. also if yall have questions on info that ive provided, or havent, please dont hesitate to ask.
  15. fivestringsurf

    V-Hosts on OSX Disappeared!

    Ever have one of those problems that makes no sense? Yep that's me for the past 2 days... I've had apache/php stack set up on my osx machine for at least 6 years with little to no problems. I had all of my v-hosts for local sites under /etc/apache2/other (they were included via httpd.conf) All of a sudden my local sites stopped working and after tracking down the problem by using: >sudo apachectl -t I found out that my v-hosts where no longer there... heck the whole directory /etc/apache2/other was missing. Now I'm quite sure I did not touch this...the question remains... what the hell happened? Now I'm not foolish enough to think someone is going to be able to tell me what happened precisely but some insight would be nice: Has this happened to any of you before? Did osx auto update something and wipe things out? I mean ... I didn't update to a major release... still on El Capitan. Was it an automatic xcode update? I'm very baffled right now.
  16. I am trying call an R batch file inside php script from browser. The R script basically generate an imgae and save in a folder. Unfortunately, I could call the R within php (means that no image is saved in the folder) using BROWSER. But when I run the php script from the commadline, it works and image is saved in the folder. <?php exec("Rscript /var/www/html/phil/figs/map.R"); ?> Execuition of following R batch code and php codes work and save image in the specified folder from the terminal. 58A-UD3R:~$ php /var/www/html/phil/x.php 58A-UD3R:~$ Rscript /var/www/html/phil/figs/map.R I totally in confusion why browser cannot successfully save image. Or is there anythinng need to be change in server for generating image? Anyone please help me for solving this probelm. Thank You..
  17. I am using apache web server on linux. I am using php for coding. My php code is not able to read the files from /var/tmp folder. If apache itself creates some files in /var/tmp folder then php code is able to read it. Why this permission denied issues are there though full access permissions are given to each file?
  18. I created this to test the connection to my ms sql server with a web page. I can connect with isql with out fail. when I open this I get PHP SQL Test END PHP SQL Test I was expecting to get sql data between the above lines. What am I doing wrong. <html> <head> <title>PHP SQL Test</title> </head> <body> <p> PHP SQL Test </p> <? $conn =odbc_connect("datasource","user","password"); if(!$conn) { exit("Connection Failed: " . $conn); } $sql="SELECT top 10 * from WIP_master"; $rs =odbc_exec($conn,$sql); print_r($rs); if(!$rs){ exit("Error in SQL"); } odbc_close($conn); ?> <p> End PHP SQL Test </p> </body> </html>
  19. sano2011

    PHP fails to load extentions

    I have installed a new extension on my server. After installation, i see the .so file in the extension directory. I also added the extension to the php.ini file. However, php still fails to load the extension. Any suggestions on how i can fix this? I am running PHP 5.* with Apache/2.* (CentOS) Restarted apache server after adding the extension in the php.ini file. I followed the installation instructions as listed on this website: http://www.mickgenie.com/howto-install-pdflib-lite-and-pdflib-on-centos-server/
  20. hello dear php-experts on my notebook an Akoya P 6512 15" AMD Athlon X2 P320, 2,10 GHz, 4 GB that runs OpenSuse 13.1 i want to prepare the new installation of opensuse 13.1 but i cannot boot from a my DVD with the openSuse 13.2 b. my cd with the Gparted i tried out to enter the boot menu with f 2 - and subesquently editing the boot-device f 10 and switching the boot device nothing works - i have no glue what i can do now ? note : i run the following BIOS American Megatrends version 02.61 i need your help now - should i do a bios ubdate or what? many thanks for any and all help
  21. Greetings forum. I am attempting to configure loadmodules for PHP 5.6 in Apache 2.4 on Windows Server 2012. Here is the configuration I am attempting to add into httpd.conf: # For PHP 5 do something like this: LoadModule php5_module "c:/php/php5apache2_4.dll" AddType application/x-httpd-php .php # configure the path to php.ini PHPIniDir "C:/php I place it in the loadmodules section, right at the end of all of the modules. If I try to restart Apache it produces an error and will not run/restart, when I remove my added configuration the Apache server starts up again no worries at all. I believe my configuration to be wrong in this scenario and would like to ask how I should deal with this and/or if I am doing something wrong here. Thank you, Droffo.
  22. hello dear php-experts, i want to run and show facebook-actiity feeds (in other words "streams of two different facebook sites) that said i cannot do this with one plugin - can i? well some guys taled bout a solution of copying and cloing a wordpress plugin I want to have multiple instances of the plugin running so i can have different related content on a single page. that said i heard that some guys just do one thing; they coly the copy the plugin. https://wordpress.org/support/topic/installing-2-copies-of-the-same-plugin?replies=8 but thie does not work - so i have to do one facebook-feed with a version like so question - how to include the code: https://developers.facebook.com/docs/plugins/activity Initialize the JavaScript SDK using this app: booksocial123 Include the JavaScript SDK on your page once, ideally right after the opening <body> tag. <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=473241986032774&version=v2.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> Place the code for your plugin wherever you want the plugin to appear on your page. <div class="fb-activity" data-site="facebook.com/literaturen" data-action="likes, recommends" data-width="350px" data-height="350px" data-colorscheme="light" data-header="true"></div> how to include that into a wordpress
  23. Hi there, I'm fairly new to sever management and apache. I'm having issues with curl requests on my website and i'm been told to: However even with searching online I can see how to add the exceptions for pages ending in certain file types and not for the exception mentioned above. Here is my HTACCESS FILE: # STARTNITRO RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}] ExpiresActive On #CSS JS XML TXT - 1 WEEK <FilesMatch "\.(xml|txt|css|js)$"> Header set Cache-Control "max-age=604800, public" ExpiresDefault "access plus 1 week" </FilesMatch> #JPG JPEG PNG GIF SWF SVG - 1 MONTH <FilesMatch "\.(jpg|jpeg|png|gif|swf|svg|JPG|JPEG|PNG|GIF|SWF|SVG)$"> Header set Cache-Control "max-age=2678400, public" ExpiresDefault "access plus 1 month" Header set Last-Modified "Wed, 05 Jun 2009 06:40:46 GMT" </FilesMatch> #OTF WOFF TTF ICO PDF FLV - 1 MONTH <FilesMatch "\.(otf|ico|pdf|flv|woff|ttf)$"> Header set Cache-Control "max-age=2678400, public" ExpiresDefault "access plus 1 month" </FilesMatch> # ENDNITRO # STARTCOMPRESSNITRO RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(\/?((catalog)|(assets)).+)\.css$ assets/style.php?l=4&p=$1&c=604800 [NC,L] RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^(\/?((catalog)|(assets)).+)\.js$ assets/script.php?l=4&p=$1&c=604800 [NC,L] AddType image/svg+xml .svg AddOutputFilterByType DEFLATE image/svg+xml # ENDCOMPRESSNITRO RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] # SEO URL Settings RewriteEngine On RewriteBase / RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L] RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] I would really appreciate if someone could walk me through the code to modified to an the above exceptions. I believe it would be the following code I would need to edit: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] But like I mentioned i'm not entirely sure.
  24. Say below is my normal html href link. How would you turn this into a pretty URL using .htaccess? Also if I understand it correctly, this link will also have to be changed to match the pretty url. What would the new link look like? <a href="shop.php?type=45&name=belts">Belts</a>
  25. hello dear friends if we want to put a facebook-fanbox on a wordpress-page - so that it looks like this here: http://www.designchemical.com/blog/index.php/frequently-asked-questions/social-media-tabs/ we can go like so: we take the test from the facebook-deeloper site: https://developers.facebook.com/docs/plugins/like-box-for-pages Initialize the JavaScript SDK using this app: books-page... <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&appId=473241986032774&version=v2.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> Include the JavaScript SDK on your page once, ideally right after the opening <body> tag. or do i need to inclue this <div class="fb-like-box" data-href="https://www.facebook.com/FacebookDevelopers" data-colorscheme="light" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div>` love to hear from you

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.