Hosting php site [closed]

0

I developed a php application and when hosting it, it returns the following problem to me.

  

Warning: require_once (service / QualificationService.php)   [function.require-once]: failed to open stream: No such file or   directory in   /var/www/html/caipiraimoveis/web/Model/IndexModel.php on line 5

     

Fatal error: require_once () [function.require]: Failed opening   required 'service / QualificationService.php'   (include_path = '.: / usr / share / pear') in   /var/www/html/caipiraimoveis/web/Model/IndexModel.php on line 5

The above directories are in place, in the localhost works, do I need to do something on the web server? I'm using uol host

<?php 
 require_once 'viewsmodel/ImovelViewModel.php';
 require_once 'viewsmodel/ConsultaResumidaViewModel.php';

 require_once 'service/QualificacaoService.php';
 require_once 'service/UtilService.php';
 require_once 'service/YouTubeService.php';

 class IndexModel extends PersistModelAbstract {
    
asked by anonymous 24.08.2014 / 22:28

3 answers

3

It is probably a problem with a file system, on a linux server the file system is case sensitive in windows not. Make sure the file name and path are exactly the same.

    
25.08.2014 / 14:28
0

Are these directories outside the web access directory? Try using at start of script

<?php 
  set_include_path(/var/www/html/viewsmodel/);
   set_include_path(/var/www/html/service/);

 require_once 'ImovelViewModel.php';
 require_once 'ConsultaResumidaViewModel.php';

 require_once 'QualificacaoService.php';
 require_once 'UtilService.php';
 require_once 'YouTubeService.php';

I assume that the paths in the set_include_path are correct

    
25.08.2014 / 12:15
0

I had a similar problem and had to contact the server to give certain permissions I could not configure through the control panel. But for all I know, you should create the same database there on the server with the same name and with the same tables and fields. all the same.

    
14.10.2015 / 02:03