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

FAQ
It is currently Sun Aug 20, 2017 6:17 pm


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 : 439 | 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 : 1057 | 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 : 1715 | 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 : 2956 | 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 : 1252 | 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 : 9954 | 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 : 1053 | Replies : 0

Top

Last 10 active topics


Shell Scripting and Programming

No new posts AWK: How to replace a newline with actual \n
View the latest post
No new posts How to use $variable in conditional sentences?
View the latest post
No new posts Scan IP range using nmap
View the latest post
No new posts Password generator with user inputs bash script
View the latest post

Virtualization

No new posts SSH Login to Vmware ESXi with ssh keys
View the latest post
No new posts How to retrieve Vmware ESXi license from ssh shell command line
View the latest post

TCP/IP Networking

No new posts TCP ack after two packets
View the latest post

Junos Tips & Tricks

No new posts MTR / My traceroute in Junos
View the latest post

VPS Hosting & Security

No new posts Host a gmod server on a vps or shared host?
View the latest post

Juniper virtual MX (vMX)

No new posts Juniper Virtual MX (vMX) 14.2R5.3 Phase 2 (RE and MPC on different VMs)
View the latest post

Login

Username:   Password:   Log me on automatically each visit  

Statistics

Statistics

Total posts 601 | Total topics 970 | Total members 1193



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