Search the Community
Showing results for tags 'apache'.
-
Hello, There is one php file, the logic is when this code is executing it is getting some data and place in DB, The problem is that when this file I executing from browser, it is working, but when I execute this file from linux shell (as apache user, or root user) like "/usr/bin/php script.php", It is not working, but without any errors. Please advise what I am missing. P.S. Centos8, apache, php 7.4.9
-
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.
-
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]
-
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>
- 5 replies
-
- pretty urls
- url
-
(and 3 more)
Tagged with:
-
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.
-
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
-
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
-
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
-
hello dear php-community, today i have an special-question: the notebook samsung q 210 has got no brightness. in other words i cannot controll it. it is too dark see the data: Samsunng q 210, 12,1" OpenSuse 13.1: Intel® Core™ 2 Duo Proz. P8400 2,26 GHz 1066 MHz FSB 3 MB PC2-6400 (800 MHz), DDR2 SODIMM ; NVIDIA GeForce® 9200M GS any idea to change that?! love to hear from you greetings
-
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
-
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.
- 6 replies
-
- htaccess
- mod_rewrite
-
(and 1 more)
Tagged with:
-
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
-
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
-
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!?
-
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)
-
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
-
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..
-
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 -
-
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>
-
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?
-
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?
-
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.
- 2 replies
-
- loadmodules
- apache
-
(and 1 more)
Tagged with:
-
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/
-
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
-
Hi, my name is Pete Mardell, a development manager for Smart Recruit Online. We have recently teamed up with a gaming company based in Norwich and are looking to find two new developers to work on our award winning platform. We are specifically looking for a php web developer (Junior or Senior) and a front end web developer (Junior / Senior) to work together on projects to improve our platform and services. You will be working remotely from our head office in Milton Keynes at Norwich in a software warehouse with other talented developers and will have graphic designer resources available to use to create masterpieces. Please apply at the links below if interested: PHP Developer: https://www.smartrecruitonline.com/Jobs/frontendwebdeveloper-html5css3jquery-5483 Front End Developer: https://www.smartrecruitonline.com/Jobs/frontendwebdeveloper-html5css3jquery-in-norwich-7057 Kind Regards, Pete
-
- permenant
- php developer
-
(and 2 more)
Tagged with: