Run PHP application (Zend Framework) on the server

3

I'm already clear that I'm not a PHP programmer but Java, but I have to upload an application from my company to an instance in AWS (Amazon Web Services).

Well, I'm having a hard time, because it's the first time I work with projects PHP. I have a machine running Apache2 MySQL and PHP5.5 (hope it satisfies the deploy). From what I think the application was developed in the Zend Framework.

I made the copy of the application to the relative path on the server /var/www/html

Now I do not know what the next step is. How do I start the application.

To help here is the project apache is serving

link

EDITION

Well folks after a long conversation with Oedipus (which was great), unfortunately we could not run the application.

But I did not give up! Create a new instance by installing LAMP server just as I downloaded Zend and copied the contents of the library (from the framework) folder into the library of my project, but it has a 404 error! Does anyone know what I might be trying to do to fix the problem?

Below is 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
    
asked by anonymous 15.04.2015 / 03:57

1 answer

6

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

  • Install PHP 5.5 because the server was using PHP 5.3 and the project used PHP 5.4 syntax
  • Installing the mysql driver for the PDO
  • Enable mod_rewrite
  • Copy the application to the server
  • Copy the Zend Framework 1 to the library folder of the project.
  • Configure the project's public directory as the apache root instead of /var/www/html .
  • Import the database
  • Configure the database in the application/configs/application.ini
  • It was not easy, with each step a different error appeared, in fact the steps were not done in that order, I put an ideal order here in the stack.

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

  • Set write permission on the folders where files are generated.
  • This is very common for applications that have uploaded files, for example images from a CMS.

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

    Errors and Solutions

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

    References:

    15.04.2015 / 04:36