Questions tagged [php]

PHP is a free server-side, general-purpose scripting language that is especially suited for web development. Originally PHP stood for Personal Home Page, now it stands for PHP: Hypertext Preprocessor.

48 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3 votes
0 answers
125 views

405 for POST requests, download triggered for GET requests for specific php file only

Apologies, I know this is a basic question, but I'm learning nginx! I've inherited a Nginx driven site, the problem is that when browsing to a specific php file it initiates a download. The file, ...
user avatar
  • 31
2 votes
0 answers
35 views

Can I check for thumbnail existence with RewriteCond !-f and have my controller create files that don't exist?

My team have an application written in PHP. Most requests are rewritten to our index.php file using the condition below, in the Apache .conf RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /...
user avatar
2 votes
0 answers
109 views

500 error from Mediawiki for first request after an idle period: Premature end of script headers

So I've got a Mediawiki on a subdomain, and until fairly recently everything was fine (if occasionally a little slow). A few weeks ago we started occasionally getting 500 Internal Server errors. ...
user avatar
  • 445
2 votes
0 answers
533 views

503 service unavailable error for ALL files except PHP files when using Apache virtual hosts

Apache 2.4/ PHP 7.0 Virtual hosts setup working correctly. There are no issues loading JPG files when pointing directly to the server using IP address. <VirtualHost *:80> ServerName example....
user avatar
2 votes
0 answers
723 views

How to start troubleshooting extremely high ttfb on large queried pages?

We have a dedicated server that feeds a very large wordpress site with a lot of advanced queries - large integrated CMS/Video-enabled with a ton of extra WP fields added on. The server is 32G memory, ...
user avatar
  • 424
2 votes
0 answers
88 views

Remote document root being overwritten with local

Today an interesting problem has arisen. A piece of code that relies on the Server Document Root suddenly stopped working on only my browsers. My machine is where I develop locally using xampp, and ...
user avatar
  • 21
2 votes
0 answers
47 views

running multiple website through one site on apache2

I am new to web development but giving it a try to learn and whilst make use of it I have installed sites gogs , pydio and reviewboard on apache2 running on Raspbian. right now I have to start each ...
user avatar
2 votes
0 answers
712 views

Google reCAPTCHA "Type the Text"

I'm currently trying out Google reCAPTCHA and I want the challenges to be "Type the Text" where it will only shows digitized text/numbers and the user will just type what they see on the digitized ...
user avatar
2 votes
0 answers
762 views

Xampp and file paths

I'm having hard time with xampp, it really getting me crazy. I have few installations of WordPress with Roots Template, which was loading without any css, js..etc. And the solution was to delete ...
user avatar
  • 223
2 votes
1 answer
325 views

"wiki is currently unable to handle this request" after installing SimpleMathJax on MediaWiki

I need to show mathematical terms in mediawiki-1.26.2 so I tried to install SimpleMathJax on mediawiki. I followed the described in extension page: I downloaded SimpleMathJax-master.zip then extract, ...
user avatar
1 vote
0 answers
31 views

How to 301 redirect site alias domain to a subdomain on the same hosting?

We have the following problem in Cpanel / htaccess file when trying to 301 redirect example.hu (alias) pages to example.com (subdomain) pages: Cpanel example.hu to example.com redirection is working, ...
user avatar
1 vote
0 answers
30 views

How to place manual ads of Google Adsense in the pages where URL is dynamically changing?

I have a url like www.example.com/test/aYnThInG Where last part is a random string,it is creating randomly. In this page I have placed manual Google Adsense ads. When we open this url instantly after ...
user avatar
1 vote
0 answers
15 views

AWS EFS setup for general site, throughput concerns

I want to use AWS EFS combo to setup a site with 2 EC2 instances reading off an EFS drive. My site is basic, Php Mvc ( all dynamic content ), 20 MB of files spanning templates ( + users templates ), ...
user avatar
1 vote
0 answers
60 views

How can I add an image to a WhatsApp message created from a click on my website through the API?

I want to send an image, text with product URL to WhatsApp from my website when the user clicks on the WhatsApp icon. Currently I can send text with product URL but I don't know how to add a image ...
user avatar
1 vote
0 answers
70 views

I consider if I should delete a /load.php?lang= URL resource and I don't know if it would cause a problem

I have an Hebrew 1.35.1 all-core MediaWiki website; generally I have no significant performance problems reported in Google Page Speed insights with that website besides one problem which occurs in ...
user avatar
1 vote
0 answers
21 views

How do I configure the available memory in my PHP-FPM pools?

I have 20 GB available for PHP-FPM on my server, the average consumption of my PHP-FPM pools is 55 MB. I want to create a www.conf for the site and a www2.conf for routines that run during the day. I ...
user avatar
1 vote
1 answer
47 views

Server Side Amazon Affiliate Ads Possible?

Is it possible to have server-side Amazon Affiliate ads - from my server, in order to bypass ad blockers? If I use the code supplied by the Amazon Affiliate tools, I get something like this (...
user avatar
1 vote
0 answers
34 views

Why does Dreamweaver save the same .php file twice?

I am creating a website on localhost (WAMP) as of now. I have set up the testing server the new php files that I create are saved in a sub-foldor of www folder specific for my website. [ C:\wamp64\...
user avatar
1 vote
0 answers
19 views

Monthly search value in adwords api is much larger then in a Keyword Planner

I am trying to use an adword api to get some keyword statistics. But what I see is that with a same parameters my monthly search volue is about 7 mln searches. While adword keyword planner shows ...
user avatar
1 vote
0 answers
43 views

Which PHP extensions do most web hosts commonly have installed and enabled?

I'm building a WordPress plugin intended for wide release, and would like to be able to rely on the openssl and gmp extensions, which require that PHP was compiled with those extensions specified and ...
user avatar
  • 123
1 vote
0 answers
340 views

How can a file download link download an old file that doesn't exist?

Early last year, I created a website that parses a CSV file and parses / displays it in a certain way for internal use. One page of this website provides an upload / download function so that the CSV ...
user avatar
  • 121
1 vote
0 answers
158 views

Use .htaccess/SSH/Cpanel to prevent a specific part of a specific PHP script from being processed

I have a website built with MediaWiki CMS which I host on a CentOS based Apache "shared server environment" (SiteGround) in which I can partially control Apache by: .htaccess files SSH Some Cpanel ...
user avatar
1 vote
0 answers
1k views

How to fix .htaccess error? Keeps asking for authentication

I'm setting up basic http authentication for my subdomain dev Laravel site with .htaccess and .htpasswd. First, I created my .htpasswd user and password by command htpasswd -bc .htpasswd admin ...
user avatar
1 vote
0 answers
91 views

Is it safe to give write permission to index.php file?

Today I accidentally gave write permission to my index.php file to using sudo chmod +x index.php. I don't know what permission it had before. My index.php contains a php script for collecting number ...
user avatar
  • 19
1 vote
0 answers
26 views

All In One WordPress SEO plugin creates a meta description from the post and joins lines without using any spaces

I have a question regarding Worpress All in One SEO pack. It creates description without space to new lines. Here is an example: <meta name="description" content="Welcome to my websiteHere is ...
user avatar
1 vote
0 answers
283 views

Why is my Last-Modified header always sent using GMT timezone?

I want to send the last-modified in IST timezone, But it always sends in GMT. What is wrong with this PHP code? echo "Timezone " . date_default_timezone_get () ; //==>verified, timezone set ...
user avatar
  • 1,297
1 vote
0 answers
526 views

IIS showing 404 error for CakePHP routing prefixes for instance located in subfolder

I have this Single Page Application built using AngularJS that resides in the document root. The SPA communicates with an API built using CakePHP 3.5.x. The CakePHP instance resides in a folder named ...
user avatar
1 vote
0 answers
375 views

Wordpress in Suexec or suphp

I have a Hsphere 3.6S.0SPU installation (that I am begging management to get rid of, but anyways...) that has several customer WordPress installations in it. I have discovered that the only ...
user avatar
1 vote
0 answers
105 views

Google Analytics PHP API Getting fullReferrer

I want to get fullReferrer using Google Analytics API with PHP. And I tried as follows: return $analytics->data_ga->get('ga:' . $profileId, '7daysAgo', ...
user avatar
1 vote
0 answers
73 views

Facebook Web app development: Storing user access token in a session variable

If i store facebook user access token in session variable , as there will be huge users (may be 10000 daily) will it cause the hosting server any issue ? EDIT 1: Server specification: 400mb disk ...
user avatar
1 vote
0 answers
170 views

mod_php5 as a static apache module in a cpanel environment

One source claims that apache would perform about 5% slower when using modules that are dynamically loaded (shared). Because of this, I want to be able to make PHP on the server run faster by ...
user avatar
1 vote
0 answers
316 views

Installing WP in Bitnami with php 7

I wanted to test possible incompatibilities of my WordPress site with php 7. So I downloaded the php 7 wamp installer and installed it without problems. Then I downloaded the WordPress module But ...
user avatar
  • 292
1 vote
0 answers
497 views

GAPI output doesn't match Google Analytics website

I have to get the main info about my Google Analytics Goals. I'm using GAPI lib, with this code: <?php require_once 'conf.inc'; require_once 'gapi.class.php'; $ga = new gapi(ga_email,ga_password)...
user avatar
  • 111
1 vote
0 answers
171 views

Best practice for suEXEC on complex sites?

What is best practice for using suEXEC on complex sites? We've got a site running under a single vhost, and we want to be able to run different PHP web apps eg /forum /wiki /crm as their own UIDs, to ...
user avatar
  • 86
1 vote
1 answer
90 views

PHP webpages in sub-directory cannot be accessed

I've got a university club website at thing.uni.ac.uk/meow/foobar which also has the domain foobar.co.uk. I don't have access to the config. I set up this website using HTML/CSS/JS alone and it's been ...
user avatar
0 votes
0 answers
13 views

How do I show 2 or more categories as a h1 title in category.php in WordPress after clicking a link with a plus mark? domain/category/X+Y/

When I click on a link for example https://hokkaido.a4jp.com/category/en-beaches+en-free/ I get the first category "beaches" in the title but how do I get 2 keywords or more. <?php ...
user avatar
0 votes
0 answers
35 views

Getting Visitors' IP Addresses and Showing Related Content

I want to list certain things for different cities. In other words, when someone from New York visits my website, I want to list "Best Language Courses in New York". I can do that by using ...
user avatar
0 votes
0 answers
37 views

How can I include C#, php, NodeJS, etc. in one website?

I'm wondering how I can include C#, PHP, NodeJS all in one website. Are there servers that provide ways to use all 3, and possibly more (like WordPress)? Maybe I need more than one server, but I'm ...
user avatar
0 votes
0 answers
22 views

Issues with infinityfree and filezilla

very new to PHP and web hosting so bear with me! Having issues with infinityfree hosting. I'm trying to reach 'index.php' inside 'PHP-Assignment2-DylanB' but having no luck. The page refreshes and ...
user avatar
  • 1
0 votes
0 answers
16 views

"Cannot Modify Header" error when moving MediaWiki to a subfolder on localhost

I installed, configured, and populated MediaWiki on localhost and have been maintaining my wiki locally for 4 years. Today I simply dragged the mediawiki folder into a subfolder I created for better ...
user avatar
0 votes
0 answers
39 views

Permission Problems in ubuntu 18 avoid wordpress plugins to run?

i'm getting 2 main errors when i activate a wordpress plugin. It was working fine but just after changing some settings got 500 internal error. After debug I found these warnings like if there were a ...
user avatar
0 votes
0 answers
163 views

System PHP version upgraded to 7.3 but domain is stuck at 7.2

I recently upgraded PHP from 7.2 to 7.3 on my Centos and Apache server by using cPanel/WHM. I'd updated the System PHP version to 7.3 but the domain is still stuck at 7.2. When I attempt to upgrade ...
user avatar
0 votes
0 answers
83 views

Adsense not showing

This is kind of a strange glitch, but still..? I can’t figure it out. When I go to a question on my database almost every time, the ads don’t show, but when I change the url by adding page.php?...
user avatar
0 votes
0 answers
106 views

Running Python script via PHP exec() on shared hosting

I have a PHP script that launches a Python script. It works fine when I am testing locally, but not on the shared hosting server. I've made the Python script, as well as the Python program files, ...
user avatar
  • 109
0 votes
0 answers
30 views

Update "hosts" file on CentOS server with cPanel

I'm migrating from an old server to a new server running cPanel/WHM v86.0.18 and I'm in the process of migrating and testing two websites, let's say example.com and web.example.com. These two websites ...
user avatar
  • 21
0 votes
0 answers
134 views

How to track internal redirect urls on Google Analytics User Explorer?

In our wp site the external urls replaced with internal links and when someone clicks on them they go to redirected external url, but those are not logged by google analytics user explorer. How to ...
user avatar
0 votes
0 answers
839 views

Why cannot I reproduce Confirm form resubmission scenario?

I have the following code, which is just a simple HTML form (POST method). I have tried to get the "Confirm form resubmission" message of the browser, by sending the form, hitting browser's back ...
user avatar
  • 405
0 votes
0 answers
454 views

Godaddy linux hosting The PDO extension is required for this adapter but the extension is not loaded

I'm getting following error on GoDaddy economy linux hosting. How to fix that. The PDO extension is required for this adapter but the extension is not loaded Error can be found at following url: ...
user avatar
  • 101