PHP Tutorials & HowTos

PHP is an open-source server-side scripting language and one of the most popular in web development. This section includes PHP programming related syntax, questions and answers ( rss feed ).

I am new Red Hat Enterprise Linux version 7 user/sysadmin/developer. This version made the big number change for RHEL 7/CentOS 7. How can I install LAMP (Linux, Apache, MariaDB, PHP) stack on a RHEL version 7 or CentOS Linux version 7 using CLI or over ssh based session?

{ 13 comments }

I am a new CentOS / RHEL / Red Hat / Fedora Linux server user. I need to provide tidy library support using php. How do I install php-tidy on RHEL or CentOS Linux for Apache server?

{ 3 comments }

I am using Apple OS X Mountain Lion 10.8.4 on my Macbook pro. For my school project I need to write an app in PHP 5 and Apache. However, I am unable to find the Web Sharing option from the Sharing panel in System Preferences. How do I install Apache and PHP5 in OS X version 10.8.4? How do I enable HTTPD and test my web app?

{ 6 comments }

I am in the process of setting Apache and PHP for my small business server. I’m not utilizing file upload functionality in any of my PHP scripts. How do I disallow uploading files under CentOS or Ubuntu Linux based LAMP server?

{ 1 comment }

I have a PHP application developed and running on LAMP. I have APC installed on the server. APC is a free, open, and robust framework for caching and optimizing PHP intermediate code. The APC based caching is good for my web site, but my cron jobs and php cli scripts fail to
fetch correct data due to caching. How do I disable APC module at the command line (php-cli) under Linux or Unix like operating systems for all my cron jobs?

{ 0 comments }

One of my php script called setoptions.php is hosted on my new vps server. However, it is not working so I setup php error log as described here and, and I see the following warning repeated in my log file:

PHP Warning: fread(): Length parameter must be greater than 0 in /var/www/html/scripts/setoptions.php on line 311

The line no # 311 is as follows in my php script:
$fname = 'myappconfig.php';
$content = fread($fhandle,filesize($fname));

How do I fix this problem under Unix/Apache/php5 server?

{ 1 comment }

How do I install phpMyAdmin to handle the administration of MySQL database server over the World Wide Web under Fedora / Scientific / CentOS / RHEL / Red Hat Enterprise Linux 6.x server systems? How do I install and securely configure phpMyAdmin on a CentOS 6.x / RHEL 6.x server?

{ 15 comments }