How do I install Zend OPcache Extension on my Media Temple Grid Server site? - shared-hosting

CMS's like Drupal 8 strongly recommend that you enable OPcache on your server to speed up page rendering. How does one install this extension if your site is hosted on Media Temple's shared Grid server service?

Log in to your Media Temple account and go to the Admin section for your domain.
Under File Management click the File Manager link
Navigate to the /etc folder. If there is a file there called php.ini skip to step 5
Rename the file php.ini.sample to php.ini
Open the file php.ini and add the following lines to the bottom of that file:
zend_extension=/usr/local/php-7.2.12/lib/php/20170718/opcache.so
opcache.enable=1
I believe this assumes you are running php 7.2.12, so the URL may change if and when PHP is updated on the grid.

Related

How can I run an index.html file on my localhost server?

I purchased a fancy little "visual menu maker" over at envato (Code Canyon) from here: https://codecanyon.net/item/z-menu-maker-drop-down-and-mega-menu/9240528
I was using their sample app where you can test out the tool and I was able to create a nice little menu for my site. But you have to purchase a license to export the code.
I purchased the license and the first "Getting Started" requirement is to "Start your Web Server and open the index.html file. This is where I'm lost. BTW... for reference, you can scroll to the bottom of that documentation page to see all the files that were included in the download.
When I try to open that "index.html" file in my browser, it doesn't load.
I followed some instructions to get my native Mac Apache server running, and everything seems to be working, with my localhost, but I don't know how to open this file through my Apache Web Server.
Any help would be so appreciated!!
I am assuming you have your Apache installed on your Mac under /etc/apache2 folder
If you want to serve your html files and related components, you need to tell apache from where to find your files
So , you need to configure apache so that it can server your files.
first you need to open an terminal from lunch menu then go to the apache2 installation directory
cd /etc/apache2
Then you need to open httpd.conf file and make necessary changes,
sudo nano /etc/apache2/httpd.conf
You will see "DocumentRoot" line/. Change it with your directory where you put your files.
Change also Directory path with yours. (It should be in same config file such as
with
<Document "some_path">
Then you should restart apache server with command
sudo apachectl restart
Now you can try to access your file . you can also check http://localhost to validate
You need to put the files somewhere within the DocumentRoot of your Apache web server, and then you should be able to visit them with http://localhost/ (assuming the index.html file is in the root of the DocumentRoot).
I'm not familiar with the default setting of DocumentRoot on the Mac port of Apache, but you should be able to find that quite easily in the configuration. On Linux that would commonly be found somewhere under /etc/apache2 or /etc/httpd.
There may be further configuration needed if the files expect some sort of server-side module to be activated (e.g. PHP), but it sounds like they are just plain HTML.
Some good answers were given but I think this particular app needed a few extra steps in order to work properly.
The developer got back to me and told me I'd need to install a MAMP solution in order to run the app.
So I installed that and then took the unzipped folder and all its contents in this folder /MAMP/htdocs/
Then when I visit http://localhost:8888/ZMenuMaker/ the app runs without a hitch!

How to run app from root url (localhost:port/) instead of (localhost:port/path/index.html)

This is a problem that I have when I run/debug the app from Webstorm.
The run/debug configuration dialog doesn't give us much to work with, we can just specify the path of the index.html file there.
I wanna be able to set up a configuration similar to what yeoman's angular generator gives us out of the box.
WebStorm built-in web server serves the project from 'http://localhost:<built-in server port>/<project root>'. If you like to change the default web path on built-in web server, you have to re-configure the server by editing your system hosts file accordingly - see http://youtrack.jetbrains.com/issue/WEB-8988#comment=27-577559. But, as it's mentioned in this comment, there are currently some issues with serving dart apps on server configured this way.
Please follow WEB-14047 for updates

How do I stop WANdisco Subversion conflicting with Apache24?

EDIT:
I did find out a few key things:
In Windows 7, (Maybe other OS's?) There is a hosts file. That hosts file controls custom local URL addresses. You can define a custom name for a local host URL. For example: mywebserver.localhost. If you want your browser to serve local files from your computer with a custom URL name, you can set that in the hosts file. The hosts file is located in Drive:\Windows\System32\drivers\etc. If you don't have permissions to write to that file, you'll get an error message stating the the file isn't found, or something like that when you try to save the file.
Apache has a conf folder with a file in it named: httpd.conf. That controls the configuration directives for Apache.
If you want to link PHP to Apache, PHP has a PHP.ini file that needs to be configured.
END EDIT
I installed WANdisco Subversion, for Windows7 32bit (Link for reference)
Subversion - Version Control
and it installed with APACHE 2.2 in a sub-folder.
The only reason I install Subversion, was that a Google help page:
Install the Google Client Library for PHP
stated that it was required to download the source code needed for the Google API PHP Client Library.
Then I installed PHP and Apache 2.4 in their own folders, and configured the C:\Apache24\conf\httpd.conf file to point to a local webserver. (Along with some other configurations)
YouTube install Apache on Windows 7
The path in my operating system is:
C:\Program Files\WANdisco\Subversion\Apache2\bin;C:\Program
Files\WANdisco\Subversion;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:Python27;C:Python27\Scripts;C:\php
The localhost in my web browser will load an HTML file from the Apache set up in the Subversion Directory, but not from the C:\Apache24 directory.
How am I going to keep both Apache installations, and get the localhost to load HTML files from someplace other than the C:\Program Files\WANdisco\Subversion directory? I'm tempted to just delete the Apache folder from WANdisco\Subversion. Or just unistall the whole Subversion software. I'll probably never use it again.
Sounds to me like you don't need a server install of Subversion, but only the client.
I'd suggest uninstalling the version you have an installing the Client only download, which won't come with Apache httpd.

Zend server CE - Will not load .php file rather downloads it

I installed Zend Server CE on Windows 8. When I try to load a .php file in my browser it does not load but downloads the php file instead.
My root for the server is C:\Program Files (x86)\Zend\Apache2\htdocs\
I looked everywhere on the web but there is no documentation.
I would recommend against having your document root in program files because of all the security. Reinstall it outside of program files and it might/will probably work.
How do you invoke the file? You cannot use the full windows path there ie: c:\Zend\apache2\etc.. But probably localhost/yourfile.php or 127.0.0.1/yourfile.php. Can you open zend's interface at localhost:100081?
If you get a internal server error well then it serves php files. Now enable errors in php.ini and find out what is wrong probably some path. You are getting a php error and they are set to not display so you get the server error. That does mean php files are parsed by apache and not downloaded. This question here on so has pretty much what you need to configure.
Just remembered you had the zend-framework tag so you could check in application.ini for error handling settings.

how to access php.ini file of server?

My application was working fine, I dont know what happened suddenly image upload function stoped functioning.It gives this error-
URL file-access is disabled in the server configuration in D:\Hosting\6448289\html\upload.php on line 112
for any file access allow_url_fopen must be ON but this is OFF now.
if you open this link - www.shizin.com/phpinfo.php
you can see that allow_url_fopen is OFF. My hosting compny is GoDaddy.com.
How and Where I can access php.ini file of my project so that I can set it ON or is there any php commands that can be run to set this permission ON.Please suggest.
You will probably have a custom php.ini or php5.ini file somewhere in your account. Launch your FTP client and find it.
Found via Google:
http://community.godaddy.com/godaddy/tips-for-protecting-your-php-based-website/
http://community.godaddy.com/help/article/5647