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
2
votes
1answer
70 views

Not receiving mail sent through PHP SM_SMTP, but can get mail when sent through same server via telnet

Having heard so many bad things about PHP mail() I skipped it and downloaded kid moses' SM_SMTP class. This seemed easy enough to config. server, port, user, password etc. But when I tested it I ...
1
vote
1answer
105 views

New line characters stopped getting written to PHP app's log file after switching FTP clients

I have a website running on PHP and I fwrite a log file. I append PHP_EOL to get each log entry on a new line. This was working fine but about a week ago the newlines stopped appearing so the ...
4
votes
2answers
1k views

Apache not working on AWS Linux after reboot - 301 Response code

I have setup an EC2 instance with the Amazon Linux image and installed LAMP and Wordpress as per the Amazon docs. It works fine, serves the default Wordpress page, but as soon as the instance is ...
1
vote
0answers
73 views

Why is my Ubuntu server not sending emails from my website visitors through PHP? [closed]

I have hosted my website on my Ubuntu server. I have added an email forum on my website so visitors can send emails to me. But it is not working anymore. Here's the full php code <?php $...
2
votes
0answers
80 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 ...
1
vote
0answers
49 views

php - A website works in server , same code downloded and tried to run using xampp its not working [closed]

Recently I have joined to a company. They given me task of maintaining the website and to add new features to existing website. This site is developed 3 yrs back.Developed using Php and sql as backend....
1
vote
2answers
2k views

Is it illegal to track website visitors' ip addresses? If so, what precautions can you take to make sure you're covered?

Essentially what I'm wanting to know is, if I set up my website to collect user IP addresses using a mysql database to see when they first visited + when they last visited and other info like what ...
1
vote
1answer
95 views

Use .htaccess to make pretty URLs that expand abbreviation codes

Yes, I know, there are tons of questions like this, but I can't find one which solves my problem so at cost of receiving downvotes I'm going to ask this again. Even a duplicate link may help me. This ...
1
vote
1answer
29 views

All contact forms in all Wordpress sites on the same VPS stopped working - php mail() malfunctioning?

On my VPS I use Ubuntu 16.04.2, Apache2 and PHP 7.0.15. Back when I installed the server environment I executed: php-zip php-curl php-xml php-gd php7.0-mcrypt php7.0-mbstring -y apt-get install lamp-...
1
vote
1answer
346 views

Nginx deny-all fails to execute PHP code in 403.html

I want to deny access to some directories and files, so I use the deny_all option to return a 403.html page. However, it does not allow me to execute any PHP code in that page. Something to do with "...
1
vote
0answers
126 views

How do I create flat link URL with .htaccess [closed]

I am relatively new to URL rewriting. I recently created a forum and wishes to rewrite some of the thread URLs. I want to internally rewrite this link www.example.com/306/slug-title/6 (on client ...
2
votes
1answer
101 views

Redirect 301 from old domain to a new one affect google rank

I did the redirect from my old domain store to a new domain using 301 rules on .htaccess as simplified below: Options +FollowSymLinks RewriteEngine on RewriteCond %{THE_REQUEST} /store/catalogsearch/...
-1
votes
2answers
3k views

PHP website page loading is very slow in localhost [closed]

PHP website pages are taking very long time to load for huge data in localhost(using Xampp). The page loading becomes faster for less data. Could anyone tell why how this can be?
2
votes
2answers
77 views

Deleting WordPress and replacing with php files

I have a website with a "tips" section administered using WordPress (the rest of the site is made up of basic HTML files). For multiple reasons (including security and the fact I rarely add content ...
3
votes
1answer
1k views

open_basedir restriction causing huge error_log in WordPress

I am running a Wordpress blog with cpanel and I get an huge error_log file (40GB) in my public_html folder. The content: Warning: is_readable(): open_basedir restriction in effect. File(/var/www/...
2
votes
1answer
1k views

PHP doesn't work on Amazon AWS S3 for email contact form

I built a website with Adobe Muse, it as HTML, uploaded it to a bucket in Amazon AWS S3, enable webhosting on the bucket, and attached the domain to my website with Amazon Route 53. It can be visited ...
3
votes
4answers
2k views

How to hide h1 and h2 tags using JavaScript while still having them for SEO

My website does not currently use H1 and H2 tags, but I want to use them and hide them to make my site SEO friendly.
0
votes
1answer
70 views

Cannot connect to Wordpress MySQL on Fedora 25

On Fedora 25, I want to develop a Wordpress website. Here's a summary of what I did, but I still cannot get it to work and enter Wordpress management panel: 1- I started MySQL by running sudo ...
3
votes
1answer
662 views

HTTP To HTTPS sitemap issues

Today I moved my site from HTTP to HTTPs successfully. Code I used: if($_SERVER["HTTPS"] != "on"){ if(php_sapi_name() === 'cli'){ } else{ $host = $_SERVER['HTTP_HOST']; ...
1
vote
0answers
321 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 ...
2
votes
1answer
107 views

Browser Cache Control | Individual Resources

The boss suggested to read the documentation on Google Leverage Browser Cache after testing with Google Page Speed Insights ... There was a list of about 30 or so resources that need to be cached for ...
0
votes
1answer
36 views

Forcing better logging of mail requests in PHP

I provide virtual hosting for a number of websites (mainly wordpress) maintained by others. Unfortunately one of them gets compromised and used to send spam (typically from a PHP script) from time-to-...
1
vote
1answer
149 views

Desktop application vs web application [closed]

I have a custom accounting + user specific needs desktop application (which i developed using delphi 7 + mysql and over 20 users are actively using the application), it has bills, personnels, banks, ...
2
votes
1answer
1k views

Make 404 error not redirect when on different domain/subdomain

I have a PHP file on my error subdomain (https://errors.example.com). And this is meant to serve as the error page for all subdomains. The format it goes through is https://errors.example.com?type=...
0
votes
1answer
89 views

Extracting from JSON REST API

I would like to know how to extract particular field of data from the REST API. I would like to get the "bits-per-second-tx" data, only and I have tried http://localhost/net/json?field=bits-per-...
-1
votes
1answer
22 views

RE MEDICAL SEO and web building [closed]

From an SEO Point of view, what is better for a medical or dental website? PHP, HTML or Wordpress and why? My SEO person said php is read better by google bots - Somebody verify....thanks
2
votes
1answer
741 views

Serving HTTP images in a HTTPS site. Can I add a “safe domain”?

I know that by the title this may have been asked many times, but I haven't really found a similar situation asked (well, one) and I wondered if there could be a different approach? I have a ...
1
vote
1answer
68 views

New domain SEO and default header file

I am migrating to a new domain, the previous domain that I had it was really just used for me to learn how to develop websites, so the traffic, if any, of the old website is not important for me, the ...
1
vote
1answer
1k views

Use robots.txt to prevent privacy policy, terms and conditions, and guarantees from being crawled and indexed by Google

I need to block pages such as privacy policy, terms and conditions, and guarantees from being crawled and indexed by Google. They might be unoriginal. I use them for my multiple websites and they ...
1
vote
0answers
40 views

How to create an SEO friendly custom post type title using Yoast [closed]

I have used this code to filter $title of a custom post type, and it works perfectly fine when there are search results on the post type e.g A query for Mercedes Benz cars for sale in Paris would show ...
2
votes
1answer
2k views

How can I mask URLs with subdirectories to display the same URL?

We have a website called example.com I want these paths and their subdirectories: example.com/vip/members/alice/watch example.com/vip/members/alice/bag to be permanently displayed to visitors as: ...
1
vote
0answers
228 views

How to fix xml and php live search [closed]

Hi i have been wondering on how to make a live search on my movie website and im trying to do it without a database. So i decided to go with php and xml. These are my code so far. please help me fix ...
1
vote
0answers
65 views

PHP database information in a table that can be displayed on a website [closed]

Hey guys i just want to put the information from the database into a table which i can display on a website but i have no idea how to do it. <?php include 'database_conn.php'; // make db ...
3
votes
1answer
210 views

How do I comply with Google's First Click Policy with PHP?

I recently password protected my site and made it a requirement for users to sign on or register in order to view the content and post on the forums. In doing this, Google dropped most of my pages ...
1
vote
1answer
528 views

How do I change my website's upload limit using .htaccess without getting a 500 Internal Server Error?

I just bought a year of web hosting and I paid for the 50GB plan. I want to allow small attachments up to 260MB each on my website. I used this: php_value upload_max_filesize php_value post_max_size ...
2
votes
2answers
433 views

which component handle php's GET parameters in a URL

In a webserver, which component handles the translation of URL parameters to the $_GET global variable? Is that a module in PHP engine, or a module of the web server (Apache, Nginx)? I'm asking ...
1
vote
0answers
444 views

How to get a github release filesize using CURL without downloading a file? [closed]

For a project I need to fetch the file size of a GitHub release file using CURL without actually downloading the entire file. $url = 'https://github.com/atom/atom/releases/download/v1.10.2/AtomSetup....
2
votes
1answer
4k views

How to use X-Content-Type-Options for .css and .png file?

I have this code in my initialization file. header("Content-Security-Policy: default-src 'none'; script-src 'self'; connect-src 'self'; img-src 'self'; style-src 'self' 'unsafe-inline';"); ...
0
votes
2answers
633 views

how can i send email in php through google apps [closed]

My client is using godaddy to host a php site, and has recently signed up for google apps account for email, hoping it will help stop his automated emails from getting rejected as spam. The code sends ...
0
votes
2answers
561 views

Is it possible to create a full SEO website with Firebase?

I work a lot with PHP, and as many of you know, you have a lot of flexibility when it comes to creating dynamic pages. You have sessions for authentication, database queries, etc. But the most ...
1
vote
1answer
74 views

Capturing a variable from a clicked link or url using php [closed]

I've build a php page called pageById.php that pulls in and displays data from a MySQL database, but the query is 'static'. $sql = "SELECT * FROM table WHERE id = 879"; I want to change this so it ...
2
votes
0answers
40 views

Common header and footer in HTML, should I use JavaScript, PHP or other for SEO? [duplicate]

Firstly, I am aware this question is similar to others asked in the paste, however I'm specifically asking about the reliability of SEO in this question (also many of the other questions are outdated)....
2
votes
1answer
426 views

Session cookie lifetime in PHP different on RHEL vs Mint?

Sorry if this is long-winded: I have the same site running on two servers (server_old & server_new). It's a hand-rolled PHP & Ajax thing I made for managing my inventory and loaning out ...
3
votes
1answer
185 views

suexec policy violation error for a javascript file

I deployed a web-app on DreamHost shared hosting. During tests, I got the "500 Internal Server Error" on one of the JavaScript files called jquery.timeago.pl.js (the jQuery timeago plugin locale ...
3
votes
1answer
383 views

SEO for importing the page header with JavaScript rather than PHP

My website has the same header/sidebar/footer on every page, so I have been importing them using PHP. To do this I forced all html files to be processed through the apache servers PHP handler via ...
3
votes
1answer
1k views

What is the 'right way' to serve static content from my AWS S3 bucket on my ElasticBeanstalk deployment?

I've hosted a small PHP environment on AWS ElasticBeanstalk. The static content (.css, .js, .jpg files etc) is inaccessible directly from ElasticBeanstalk, and must come from another source. I've ...
5
votes
6answers
2k views

Is it bad practice to put PHP directives in .html files and have the server interpret them as PHP?

I've been running my company's website, which uses the same header, footer and left column on every page, since late 2014. Because of this I set up the Apache server to interpret HTML documents as if ...
2
votes
1answer
714 views

How to protect my files on Heroku

My sendemail.php file is located in the root of my website, is there a way to protect it? Also i want to protect or hide my js folder, so noone can see my code with direct link or via the google ...
3
votes
1answer
185 views

Issue with 301 redirect to Index page only

I have a bunch of 301 redirects in my .htaccess for old pages, which work great. But a problem that's been plaguing me for years is that there's a lot of links out there to my old index page (index....
1
vote
0answers
12 views

High Memory (~8GB) pay per compute time server requirement [duplicate]

I'm looking for an AWS Lambda replacement in order to generate map tile images in parallel. Unfortunately Lambda has a memory limit of 1.5GB and some of my source images sizes are 80MB, using around 7 ...

1 2 3
4
5
22