We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Third Party Script on phalcon

Hi ,im using nginx , i have a problem about run another script on phalcon directory.

my directory scheme;

-root --app --public ----firmapaneli --vendor --.htaccess --index.html

when i want to run thirdpartyscript there is an error:

FirmapaneliController handler class cannot be loaded

How can i solve it?

Thanks

Hi, nobody can help you if you not put any example, only directory structure. your bootstrap should be in /public/index.php, your application structure vendor folder, composer.json etc should be in /app directory, if you need use external library or script you have to configure properly loader, or composer.json whatever you use for autoloading class or libraries. If you want help put your project on github ... only what is needed to help solve your problem



39.3k

Hİ,

Sorry for my message, i only want that my firmapaneli directory not route with phalcon , it will be the script itself.

(its codeigniter , and i will call it "www.myserver.com/firmapaneli" and it will run (without phalcon redirect)

How can i do that ?

Show me your nginx config, it is nginx configuration problem, not phalcon



8.1k

You can create 2 location in your nginx config :

  • one to the phalcon (for example public location root/public)
  • and another location yourthirdparty ( root/firmpanel)

Many examples can be found here https://wiki.nginx.org/Configuration



39.3k
edited Mar '14
#error_log   /var/log/nginx/error.log;
    #access_log  /var/log/nginx/access.log  main;
    root   /clvol/webdata/popsbuy.com/htdocs/public;

    index index.php index.html index.htm;

    try_files $uri $uri/ @rewrite;

    location @rewrite {
        rewrite ^/(.*)$ /index.php?_url=/$1;
    }

    error_page  404              /404.html;
    location = /404.html {
        root   /clvol/webdata/popsbuy.com/htdocs/public;
    }

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /clvol/webdata/popsbuy.com/htdocs/public;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   https://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php$ {
        fastcgi_pass   phpbackends;
    fastcgi_buffer_size 128k;
    fastcgi_buffers 4 256k;
    fastcgi_busy_buffers_size 256k;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  /clvol/webdata/popsbuy.com/htdocs/public$fastcgi_script_name;
        include        fastcgi_params;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    location ~ /\.ht {
        deny  all;
    }

its my nginx conf