Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Fri Dec 15, 2017 1:23 am


News News of PHP and other web technologies

Site map of PHP and other web technologies » Forum : PHP and other web technologies


Message
 Post subject: php
PostPosted: Wed Jun 29, 2016 7:07 am 
Write down the code for save an uploaded file in php.

Read more : php | Views : 595 | Replies : 3

Top
 Post subject: PHPBB-SEO sets canonical URL to http when server protocol is set to HTTPS
PostPosted: Mon Feb 16, 2015 3:51 pm 
Canonical URLs are a way of setting a fixed resource URL when the same resource is servered over multiple URLs (duplicate URLs).

A bug in phpbb_seo_class.php file incorrectly checks if server protocol is HTTP or HTTPS, thus causing canonical URLs to be set to http. Example of CANONICAL URL for ivorde.com forum before fix:
Code:
<link rel="canonical" href="http://forum.ivorde.com/" />


TO fix this, open ./phpbb_seo/phpbb_seo_class.php and find the following line:
...
$this->ssl['forced'] = (bool) (($config['server_protocol'] === 'https//')); ...

Read more : PHPBB-SEO sets canonical URL to http when server protocol is set to HTTPS | Views : 1191 | Replies : 0

Top
 Post subject: Google reCaptcha not showing in phpbb 3 after moving from HTTP to HTTPS
PostPosted: Mon Feb 16, 2015 9:57 am 
If you've recently moved phpbb from http to HTTPS and your recaptcha image is not shown on registration page, you might need some extra work.

PHPBB recaptcha module is checking if the protocol is HTTP or HTTPS in includes/captcha/plugins/phpbb_recaptcha_plugin.php:






class phpbb_recaptcha extends phpbb_default_captcha
{
var $recaptcha_server = 'http://www.google.com/recaptcha/api';
var $recaptcha_server_secure = 'https://www.google.com/recaptcha/api'; // class constants :(

// We are opening a socket to port 80 of this host and send
// the POST request asking ...

Read more : Google reCaptcha not showing in phpbb 3 after moving from HTTP to HTTPS | Views : 1941 | Replies : 4

Top
 Post subject: Phpbb: How to list the most/least viewed topics
PostPosted: Fri Jan 23, 2015 7:43 pm 
Two mysql SELECT queries using select on "topic_views" column will show the most or the least viewed articles in the forum.

List most viewed articles in phpbb forum:


Code:
SELECT topic_id,topic_title,from_unixtime(topic_last_post_time) AS Post_date ,topic_views FROM phpbb_topics WHERE (topic_approved='1' AND topic_reported='0') ORDER BY topic_views DESC LIMIT 0, 40;


List most viewed articles in phpbb forum:


Code:
SELECT topic_id,topic_title,from_unixtime(topic_last_post_time) AS Post_date ,topic_views FROM phpbb_topics WHERE (topic_approved='1' AND topic_reported='0') ORDER BY topic_views ASC LIMIT 0, 40;

Read more : Phpbb: How to list the most/least viewed topics | Views : 3266 | Replies : 0

Top
 Post subject: PHP Fatal error: Call to undefined function gzencode() - missing zlib support
PostPosted: Sat Jan 17, 2015 5:14 pm 
With a PHP-FPM deployment, there are two levels of compression: in php and in nginx.
Nginx comes with gzip support in all flavors of Linux. The above error occurs when php is built from source without zlib support.

Here is how to configure php zlib extension separately assuming you still have the source:


root@server:/usr/src/php-5.6.4/ext/zlib# /opt/php-5.6.4/bin/phpize
Cannot find config.m4.
Make sure that you run '/opt/php-5.6.4/bin/phpize' in the top level source directory of the module

root@server:/usr/src/php-5.6.4/ext/zlib# ...

Read more : PHP Fatal error: Call to undefined function gzencode() - missing zlib support | Views : 1433 | Replies : 0

Top
 Post subject: Google reCaptcha - An internal error occurred
PostPosted: Thu Jan 15, 2015 9:38 pm 
Recaptcha is a free CAPTCH service offered by google in the fight against automatic html form submission as it is exploited for spam purposes.
According to Google documents https://code.google.com/p/recaptcha/wiki/HowToSetUpRecaptcha :
Quote:
The keys are unique to your domain and sub-domains and will not work for other domains unless you:

Sign up for multiple keys (one for each site)
Create a global key by checking the box for "Enable this key on all domains (global key)"

An ...

Read more : Google reCaptcha - An internal error occurred | Views : 10534 | Replies : 0

Top
 Post subject: Php hide/remove X-Powered-By HTTP header
PostPosted: Thu Jan 15, 2015 9:35 pm 
Inspecting HTTP traffic at layer 7 on a fresh http/php web server yelds some interesting results: A php header that exposes the php version.
Here is http traffic as seen on the network with tcpdump:
Code:
Server: nginx
Date: Fri, 16 Jan 2015 00:11:49 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: PHP/5.5.20
Cache-Control: private, no-cache="set-cookie"
Expires: 0
Pragma: no-cache
Content-Encoding: gzip


How to configure php from exposing "X-Powered-By" header:. Edit php.ini and change ...

Read more : Php hide/remove X-Powered-By HTTP header | Views : 1165 | Replies : 0

Top

Last 10 active topics


Shell Scripting and Programming

No new posts BASH shell script to mointor a directory and move file without overwriting destination
View the latest post
No new posts FreeBSD: Install python package manager (pip)
View the latest post
No new posts Shell scripting
View the latest post

OpenLDAP - Lightweight Directory Access Protocol

No new posts Synchronize OpenLDAP and Microsoft Active Directory
View the latest post

Routing and dynamic routing protocols

No new posts BGP Notification Message (3), length: 21, OPEN Message Error (2), subcode Authentication Failure
View the latest post
No new posts JUNOS BGP: How to drain a BGP peering router gracefully without bgp session reset
View the latest post

TCP/IP Networking

No new posts Problem pinging and using server with mobile hotspot
View the latest post

Memory, Storage, Backup and Filesystems

No new posts FreeBSD: List disk drives and re-scan after adding hot-add disk (in virtual environments)
View the latest post

Apache, Nginx, Lighttpd and other web server software

No new posts NGINX: 413 Request Entity Too Large
View the latest post

System administration

No new posts MAC OS X: read image/jpeg EXIF information on command line
View the latest post

Login

Username:   Password:   Log me on automatically each visit  

Statistics

Statistics

Total posts 612 | Total topics 982 | Total members 1192



News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO