如何在 HostGator 上使用 PHP Composer [英] How to use PHP Composer on HostGator

查看:18
本文介绍了如何在 HostGator 上使用 PHP Composer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近决定在 Zend Framework 2 中启动一个项目,但无法让它在 HostGator 共享服务器上运行.

I recently decided to start a project in Zend Framework 2 and was having trouble getting it to run on a HostGator shared server.

默认情况下,HostGator 的共享服务器在 PHP 5.2.2 中运行,如果您上传 ZF2 骨架应用程序,它不会开箱即用.

By default, HostGator's shared servers run in PHP 5.2.2 and if you upload the ZF2 Skeleton Application, it will not run out of the box.

另外,如果您碰巧对您的 HG 共享帐户具有 SSH 访问权限(您通常必须请求它),您将无法运行 .PHAR 文件,因为 PHP 的 CLI 版本也是 5.2.2.

Also, if you happen to have SSH access to your HG Shared account (You usually have to request it), you won't be able to run .PHAR files because the CLI version of PHP is also 5.2.2.

幸运的是,我让它工作了......见下文.

Luckily, I got it to work... see below.

推荐答案

Hostgator CPanel 中有一个选项.只需转到 PHP 配置并选择 PHP 版本之一.现在您可以在 5.2、5.3、5.4 和 5.5 之间进行选择.

There is an option in Hostgator CPanel. Just go to PHP Configuration and choose one of PHP versions. Now you can choose between 5.2, 5.3, 5.4 and 5.5.

这篇关于如何在 HostGator 上使用 PHP Composer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆