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.

Filter by
Sorted by
Tagged with
1 vote
0 answers
31 views

Disallow URLs made with mod_rewrite in robots.txts [closed]

Here is my robots.txt file: User-agent: * Disallow: /head.php Disallow: /head/ Disallow: /head Disallow: /header.php Disallow: /header/ Disallow: /header Disallow: /footer.php Disallow: /footer/ ...
user avatar
3 votes
1 answer
43 views

Problem with .htaccess for files having similar kind of names

I have a file with name lang.php and another file in the same folder with same lang_inst.php. The .htaccess am using is: RewriteEngine On Options -Indexes RewriteCond %{REQUEST_FILENAME} !-d ...
user avatar
  • 31
2 votes
1 answer
104 views

Redirecting from one page to another page on my website causes 404 error after using .htaccess file

Currently I'm working on a PHP blog. Where I have used an .htaccess file to get a clean URL, here is the code: RewriteEngine On RewriteCond %{HTTPS} !=off RewriteCond %{HTTP_HOST} ^example\.com$ ...
user avatar
1 vote
1 answer
463 views

Amazon s3 error 500 when instantiating S3Client

The amazon php sdk is uploaded to site and the autoloader is included successfully. But I'm getting an error 500 with no further details. I believe I've isolated the issue to the instantiation of ...
user avatar
  • 19
3 votes
1 answer
2k views

Installing mPDF PHP library for website without root access

I would like to install mPDF for use on my website. However, I don't own my own server, and am using shared web hosting. I can log in using FTP, but AFAIK I do not have access to a terminal nor root ...
user avatar
  • 636
3 votes
2 answers
599 views

Multiple PHP versions on one Digital Ocean droplet

Is there an easy way of using multiple php versions on one single digital ocean droplet. Basically, I want something like what we have for cPanel (https://documentation.cpanel.net/display/68Docs/...
user avatar
  • 224
3 votes
1 answer
275 views

Why would googlebot be trying to crawl a URL "https://www.example.com/https://www.example.com/other/things"?

I've been trying to clean up crawl errors on my company's website. In one menu, google bot is trying to crawl every link with an extra-base URL attached. These pages (perhaps obviously) don't exist ...
user avatar
4 votes
1 answer
885 views

Nginx rewrite problem - displaying same page with or without .php extension after rewrite

I have implemented the following Nginx code: location / { try_files $uri $uri.php $uri/ @extensionless-php; index index.html index.htm index.php; } location ~ \.php$ { try_files $uri =...
user avatar
  • 81
2 votes
1 answer
282 views

How to enable a the php_soap extension from .user.ini (no acces to php.ini)

Our application is being hosted on GoDaddy (plesk). We need to enable 'php_soap' extension for our application to work. We contacted the customer support that we don't have access to php.ini file to ...
user avatar
2 votes
0 answers
535 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
1 vote
0 answers
208 views

Trouble with .htaccess rewriting .png/.php [closed]

I'm currently creating a "dynamic signature" for a forum or email signature. The php code writes perfectly fine onto an image with the .php page. When trying to access the .png file with the ...
user avatar
1 vote
2 answers
2k views

Figure out which Instagram users click my referral link

I have an external bio link on my Instagram business page, i want to detect "which" Instagram users click on link and visited my website. Is this possible by analyzing referral link or other ways? , ...
user avatar
  • 13
3 votes
1 answer
129 views

Redirecting to subdomain, impact on SEO?

I've been working on a web platform project for a client, and we are nearing completion. Basically, the platform is a small social network for a specific group of people. Part of the specification is ...
user avatar
-1 votes
1 answer
87 views

How do I upload text without losing extra blank spaces

I am an editor faced with editing text in which the style requirements say there should be TWO blank spaces between sentences. So I was going to write a straightforward PHP routine with an HTML form ...
user avatar
0 votes
1 answer
50 views

Efficiency of generating a list of pages on the fly

I am currently working on improving the extensibility of my website. One of the things I am working on is automatically generating a list of pages for the navbar, sidebar, index, etc, rather than ...
user avatar
  • 185
1 vote
1 answer
3k views

Does a 504 Gateway Timeout error mean a server has crached?

I am running a php script on a website that creates thumbnails from a big image. The script uses imagick to generates 10 thumbnails per image. It runs on first page load, when the thumbnails don't ...
user avatar
  • 189
0 votes
1 answer
315 views

Multilanguage SEO and site map

I make a multilanguage web. I change language dynamically with php. When user click on any language from dropdown box, they call translated file (lang.eng.php, lang.es.php, lang.de.php etc.) Default ...
user avatar
  • 115
2 votes
1 answer
266 views

Why does switching php versions from 56 to 71 in httpd.conf give me a 403 access denied error? (MacOS localhost)

Recently installed php71 on my local test environment. I have an index.php file with phpinfo() in the web root directory. When I LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5....
user avatar
  • 131
1 vote
0 answers
402 views

XAMPP phpMyAdmin - different users access same MySQL database [closed]

I have created a MySQL database on MyPHPAdmin (XAMPP 3.2). This is for a group project and I need to have different users access the same database. If they have XAMPP installed on their computer, is ...
user avatar
1 vote
2 answers
1k views

Can I use the Laravel Database Framework without using all of Laravel?

I work at a company with a custom PHP framework we have built over the years. For the most our custom framework suits our needs and includes almost everything Laravel offers, however, our database ...
user avatar
1 vote
1 answer
278 views

How can I stop this PHP Notice or fix the problem that clutters up the debug.log after switching to PHP 7? [closed]

EDIT: I am the administrator of several websites and when I turn debug on to track down a problem on one of the sites, the debug.log is cluttered with hundreds of lines of PHP notices each day about a ...
user avatar
4 votes
1 answer
66 views

How to fix two PHP errors I cannot get the plugin author to answer [closed]

I am the administrator of my website and when I turn debug on to track down a problem on the site, the debug.log is cluttered with hundreds of lines of PHP notices each day about two PHP problems in a ...
user avatar
1 vote
1 answer
637 views

Apache 2.4: Symlinks to CIFS mount are served, but not seen by PHP or mod_autoindex

I'm trying to run the Piwigo image gallery/DAM on a Raspberry Pi via Arch Linux ARM with Apache 2.4 and PHP7. Piwigo is running happily. For a chain of reasons outside the scope of this question, my ...
user avatar
3 votes
1 answer
115 views

blog/index.php/author/ how to create this kind of a URL for my php page?

WordPress blog URL has this notation. chapter .php there is another path. it is not an actual existing directory on the server. my question is how they do that? can I do something like that on my ...
user avatar
2 votes
1 answer
76 views

blog/index.php/author/ what kind of a URL?

as mentioned in the title my WordPress blog has this URL. which is not familiar to me. that not a GET request right? what is that? please help.
user avatar
2 votes
1 answer
965 views

cPanel Mail Function [closed]

There is a wordpress installation installed on a cpanel account. They have a contact form on that wordpress installation that is sending using the php mail function. It is supposed to be sending like ...
user avatar
  • 143
0 votes
2 answers
567 views

If there is a time delay before a redirect, is link juice affected?

If a redirect happens with the following code: <?php $delay = 5; //seconds sleep($delay); header('HTTP/1.1 301 Moved Permanently'); header("Location: http://www.example.com"); ?> is the ...
user avatar
  • 9,599
0 votes
1 answer
30 views

PHP syntax issue [closed]

I'm reading a Sentry tutorial for implementing an authentication workflow in a webapp. I'm a PHP beginner. There's a thing I don't understand in this code: <?php // set up autoloader require ('...
user avatar
1 vote
0 answers
287 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
208 views

Safari 11.0 is blocking some of our scripts [closed]

Here is a quick video describing the issue - https://screencast.com/t/zTnbBoWYmY Since the new Safari 11 we have an issue where our content isn't loading properly. We are getting messages such as ...
user avatar
  • 11
1 vote
1 answer
45 views

How to deal with a big structure website performance

first of all thanks in advance for taking the time to help me out. My doubt resides in how the performance is affected if I decide to develop a website only with html, css and javascript or if I ...
user avatar
  • 125
1 vote
0 answers
527 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
4 votes
6 answers
277 views

Should my users' profile page URL be /user/bob or just /bob?

Currently, the URL to a user's page is this: website.com/user/bob But I'm considering changing this to be: website.com/bob Without the /user/ part. It comes across as much cleaner and easier to ...
user avatar
2 votes
2 answers
161 views

Is this document write of content fetched from another site cross site scripting or something different?

This was on a website I had to work on. It seems to me its a horrible idea, but I was hoping to get other input before I told them it was. var url = 'https://www.otherdomain.com/magic_php_file.php'; ...
user avatar
  • 21
1 vote
2 answers
14k views

500 Server Error: Cannot serve directory: No matching directory index

I recently purchased a GoDaddy hosting package and uploaded all of my website files written primarily in PHP from scratch. But when I try going to my site, it only loads the head portion of the file ...
user avatar
1 vote
0 answers
71 views

Disallowing adblock.php in robots.txt causes Google to report "Severe health issues are found in your property"? [closed]

I need google don't crawl my adblock.php URL, after i added this URL in my robot.txt file like, Disallow: /adblock.php The google shows report like, I had added adblock.php to robots.txt ...
user avatar
  • 181
1 vote
1 answer
54 views

If there is no page, redirecting to the other site

I moved my site and I want to use the old site. The best way to use both is to show the current pages, if there is no page, redirect to the same address on the new site. Can I do this only from the ....
user avatar
  • 35
1 vote
1 answer
219 views

setting rewrite rules in httpd.config file at host server

I am a new webmaster. I plan to host my website on a dedicated server. The website has three TLD: .com, .ma and .fr. I have a couple of rewrite directives in my .htaccess file that force the URL ...
user avatar
  • 117
0 votes
1 answer
37 views

AJAX compatibilty [closed]

In 2015 Google stopped supporting their AJAX for Adsense program, So I've researched and developed tons of AJAX content. I understand the flaws so I'm striving for backwards compatibility. loadPage('...
user avatar
  • 1
1 vote
1 answer
391 views

Is it possible to Host single website on multiple server? [duplicate]

I have a file sharing website . It's hosted on a dedicated server which have 16gb RAM and 2tb storage . Now I need more storage and RAM but my hosting service can't provide more than 2tb on single ...
user avatar
1 vote
1 answer
87 views

After uploading sendmail.php to the webserver, what is its URL?

How do I correctly write out a path to a sendmail.php that is in the parent directly after it's uploaded to the hosting server? Is it https://www.example.com or https://www.example.com/sendmail.php ...
user avatar
3 votes
1 answer
5k views

Logged Out Too Soon; PHP Sessions Expire Too Quickly. Is this a Linux, CentOS, Cookies, CPanel problem?

Recently, I've been getting logged out sooner than expected on several websites that I manage on Linux servers. The problem started spontaneously a few months ago. At the time, I had not made any ...
user avatar
  • 51
3 votes
1 answer
910 views

Can't find the IP address of regular visitor which creates %100 Bounce Rate on my site!

Everyday :(, the following user creates one hit on my google analytics which has 3-5 sessions and %100 bounce rate. ISP: Digital Ocean Operating System: Linux City: san francisco I want to block ...
user avatar
  • 410
0 votes
1 answer
6k views

How to detect visitor's country from his IP for my PHP website right on the server [closed]

the problem: I need to detect visitor's country from his IP so I can display specific code based on the user location (different ads, etc.) in my PHP website. There is many different external ...
user avatar
0 votes
1 answer
352 views

Will domain name with keyword "Android" makes any legal problem? [closed]

I am planning to buy a domain with keyword "Android" to my website. But i am worried about having any legal problem doing this. If i am buying what all things i have to look forward?
user avatar
1 vote
1 answer
392 views

Why is the php.ini timezone setting is not used to determine when a PHP cron job runs?

I use shared hosting at Bluehost and changed the default date.timezone to UTC in my php.ini. Everything works fine with my PHP script and date() return the UTC time as expected. The problem occurs ...
user avatar
  • 141
2 votes
1 answer
711 views

Redirect subdomain to their folders without double slash and such that parameters get sent through login

I have a wildcard DNS setup on my server, something like .example.com. In my root folder there are some sites, so what I need is to have something like this: test.example.com should use test directory ...
user avatar
  • 21
3 votes
1 answer
6k views

Which version of XAMPP is compatible for php 5.4.45 and where can I find it?

My hosting server have php 5.4.45 installed along with mysql 5.6.28-76.1 cpanel 58.0 (build 47) I've got so many errors because I was using latest XAMPP with PHP 7.1 on my computer. I want to be in ...
user avatar
3 votes
1 answer
585 views

Why are there requests for non-existent WordPress URLs on my vb.net website?

I have a vb.net website and in the website I've also a WordPress blog website. I'm getting unknown URL in my log file which do not exist in the website. I logged in to Google Webmaster Tools and there ...
user avatar
2 votes
1 answer
4k views

Url rewrite not work in wamp localhost

I am developing a PHP web application. I have pages, posts, categories, product and etc. Here is my .htaccess file to create SEO friendly URL: Options -Indexes RewriteEngine on RewriteRule ^Page/(.*)...
user avatar

1 2 3
4
5
23