Run PHP (Zend Framework) application on the server

Asked

Viewed 1,740 times

3

I already make it clear that I am not a PHP programmer but Java, but I have to upload an application of my company in an instance in AWS (Amazon Web Services).

Well, I’m having a hard time, because it’s my first time working on projects PHP. I have a machine running Apache2 Mysql and PHP5.5 (I hope it satisfies deploy). It seems to me that the application was developed by Zend Framework.

I copied the application to the relative path on the server /var/www/html

Now I don’t know what the next step is. How do I "start" the application.

To help here is the project that apache is serving

http://trust.joocebox.com

EDITION

Well personal after a long talk with Oedipus (which was of great value), unfortunately we could not run the application.

But I didn’t give up! I created a new instance by installing the LAMP server just like I did Zend Download and copied the contents of the folder library (framework) into the library of my project, but it presents error 404! Someone knows what I may be trying to do to remedy the problem?

Below follows the log:

[Wed Apr 15 17:39:59.956167 2015] [:error] [pid 7336] [client
177.157.34.20:13725] script '/opt/lampp/htdocs/trustbox/index.php' not found or unable to stat cat: /opt/lampp/var/mysql/ip-172-30-0-15.pid: Permission denied cat: /opt/lampp/var/mysql/ip-172-30-0-15.pid: Permission denied

1 answer

6


After a long conversation, we were able to move up the application with these steps.

  1. Install PHP 5.5 because the server was using PHP 5.3 and the project used PHP 5.4 syntax
  2. Install mysql driver for PDO
  3. Enable the mod_rewrite
  4. Copy the application to the server
  5. Copy Zend Framework 1 to the folder library of the project.
  6. Set the project’s public directory as the apache root instead of the /var/www/html.
  7. Import the database
  8. Configure the database in the file application/configs/application.ini

It wasn’t easy, with each step there was a different error, actually the steps weren’t even made in that order, I put an ideal order here in the stack.

If your application generates files, as step 9 I suggest:

  1. Set write permission in folders where files are generated.

This is very common for applications that upload files, for example the images of a CMS.

What helped us to get to that was to look at the log files, some of my experience to identify possible causes of errors, enable the error display in the settings of the application.ini.

Errors and Solutions

  • I was suspicious of the need for item 1 because we had a log indicating error in a syntax that started with [, looking at the file saw the syntax of short array, we also saw the application using short tags to print <?=, and they are enabled in PHP 5.4 by default.
  • I was suspicious of the need for item 2 because we were receiving null in a foreach, to confirm, run a script to test the connection to the database.
  • I was wary of the need for item 3 because when typing any application route in the url, I received a file message not found. The correct behavior was to direct to the index.php.
  • I was suspicious of the need for item 5 because we were having a blank screen and in the logs I was not finding the class Zend\Application.
  • I was suspicious of the need for item 6 because we were having route errors, besides being necessary in production.

References:

Browser other questions tagged

You are not signed in. Login or sign up in order to post.