APC and Drupal benchmark - drupal-6

I install apc to my debian on localhost. I tested my drupal site performance with "ab -n 500 -c 10 http://localhost/mydrupalsite" , but I see that there is no change on "request per second". I looked php.info and apc is active. also I added extension=apc.so to my php.ini file. After I restarted the apache.
How can I understand my apc installation is succesfull?
If it is succesfull, why there is no change on test result?

When you install APC on your server, it contains an apc.php file, copy this file or symlink the file to your webroot (in this case, http://localhost/apc.php).
Viewing this file will give you insight into what APC is caching, if anything, and if there are cache hits/misses. You can also clear the APC cache from this file.

Related

WordPress site showing "This page isn't working" after installing it on Amazon EC2 (Linux) Instance via the Duplicator Plugin installer

So I configured My FREE Amazon EC2 (Linux) server with PHP and MySQL using SSH. Then Installed WordPress and set it up accordingly. Which went smoothly and could access perfectly through my "IP/directoryname". After that I had a lot of issues with writing directories and Transferring files. Which I took care of using these commands,
sudo chown -R apache:apache /var/www/html
sudo chown -R ec2-user:ec2-user /var/www/html
sudo chmod -R 755 /var/www/html
Increased the PHP Upload limit using SSH to 256M. And when my test site was running perfectly, I decided to install a Prebuilt site of mine using the Duplicator Plugin which has an installer.php file with the "Old Site Files and Database" a package. It requires an empty directory. So I deleted all my files using FTP from my test site Directory and uploaded the Duplicator Package and Installer. Installed the site and put my EC2 mysql info accordingly. I selected to overwrite my old Database and delete all existing tables. Which installed successfully (At least the installer said that!). But I can't seem to access my site anymore. Now my site says, "This page isn't working". I don't know what to do here. Can you guys spare me a little bit of your time. Any info you need , just ask. Could this be a WordPress Permalink issue? I don't know how to update the Permalink table using SSH. Maybe I've deleted an important Directory file when I deleted the Old Directory files?
Your Friendly Neighborhood Sidekick,
Ratul

How to change NGINX install location Ubuntu 14.04

My aim is to change directory of NGINX installation to run as a web server. Motive - custom compiled NGINX, with functions which doesn't come with standard.
I've compiled NGINX from source and as was suggested on this page, all configuration was pointed in the new location /usr/local/nginx when compiled. Default installation is at /usr/share/nginx.
After starting the service, NGINX still runs on the default installation.
I've tried to load nginx with new configuration nginx -c /usr/local/nginx/nginx.conf which breaks everything, returning error 404 for index.html.
Multiple attempts at searching, only shows up with changing site directory.
Is there a solid solution to specify from where NGINX loads?
Edit:
As suggested by John Ankanna below, the following fixed it:
sudo mv /usr/share/nginx /usr/share/nginx.bkp - just renaming the
directory to recover current setup.
sudo ln -s /usr/local/nginx /usr/share/nginx - create symlink in place of original.
Debian/Ubuntu use a standard directory hierarchy. The command man hier will describe this for you. It is common for packages to create symlinks to place files in the correct place when the program expects them elsewhere.
Try Creating Symlink
sudo ln -s /usr/share/nginx /usr/local/nginx

whmcs cron not running says ioncube not installed

ioncube is installed on my server, this can be verified at http://www.webhostingmumbai.co.in/phpinfo.php
but when i run the cron at webhostingmumbai.co.in/manage/crons/cron.php , it gives me the following error:
Site error: the file /nfs/c04/h03/mnt/60142/domains/webhostingmumbai.co.in/html/manage/crons/cron.php requires the ionCube PHP Loader ioncube_loader_lin_5.3.so to be installed by the website operator. If you are the website operator please use the ionCube Loader Wizard to assist with installation.
in php.ini the ioncube installation has been mentioned at webhostingmumbai.co.in/ioncube/...
can someone help me what what needs to be done to make the cron work?
The php.ini file at /nfs/c04/h03/mnt/60142/etc/php.ini is the one being used by default. The server uses CGI, so a php.ini file found in the same location as the first page of a request may take precedence. See if you have php.ini files anywhere within your hosting area and ensure that the Loader is reference in each one just in case.
Kindly try to run following command via SSH to check which php.ini files are loaded on your server
php -i | grep -i 'php.ini'
and be sure that you add ioncube zend_extension path to all files which you get listed by this command.
Also check whether full path to whmcs installation directory is set or not in cron config.php
goto
whmcsfolder/crons/
you will see config.php file , add the complete path to whmcs installation directory like
$whmcspath = '/var/www/html/clientarea/';
where clientarea is whmcs root directory.
This will definitely help you.

Drupal 7 Install on Redhat w/ Apache - sites/default/files is not writable

I have spent numerous hours on an issue that has left me puzzled. I am attempting to install Drupal on Linux Redhat using apache, but it will not allow me to pass step 3 due to the fact that sites/default/files is not writable.
I have followed the instructions on Drupal's site, in their install.txt file as well as the instructions of others who have had the same error with no success.
I have granted permissions access all different ways root:root 777, root:apache 777, I have verified that apache is the user running the apache process and I am still stuck.
Note: I was able to complete the install on windows.
Any new ideas?
Okay, so after following directions from both official and non-official web sources, the one thing that was never instructed to do or try was to reboot the application AFTER making permission changes to the files directory. I tried it, and this solved the issue.
This is weird because I've never had to reboot an OS after making permission changes on a directory. Additionally I did restart httpd after each change thinking that would be sufficient. Hopefully this can help anyone else running Redhat 7 with the same issue.
Thanks, TH
I solved this problem by changing the security context of the directory "sites".
My Drupal core files are in: /var/www/html/drupal
Then I applied the command:
chcon -R -t httpd_sys_content_rw_t /var/www/html/drupal/sites/

Edit php.ini with .htaccess

I'm slowly getting back into PHP, and now I run into a problem, I want to install some web software on our host and I need to have either the latest Zend (which they don't have) or IonCube on the server and IonCube requires enable_dl to be on in the php.ini. Now a colleague of mine thinks I can update this via an .htaccess file on the server. So I created a s.htaccess on my machine as Windows doesn't like emptiness before the file extension. So I added the line php_flag enable_dl On to the file uploaded it and renamed the file to just .htaccess on the server. When I refresh the file is gone, when I keep it as s.htaccess it's fine but my php info still shows it as Off.
What n00b mistake am I making?
The documentation says that this can only be set in the php.ini (not in .htaccess). You can see this by looking at the table where it says "PHP_INI_SYSTEM", which means - "Entry can be set in php.ini or httpd.conf".
Unix way to hide files is prepending it with a dot. The file is there, but it's just hidden. Your ftp-software should have a setting for showing hidden files. IIRC you can rename the file to .htaccess through cmd in windows. The .htaccess only has effect in the current dir and sub directories. This might also be (because of security) one of those settings that is only setable through php.ini

Resources