Welcome! Log In Create A New Profile

Advanced

problem when accessing post from last post section after using php-fpm !!

Posted by HuMaN-BiEnG 
problem when accessing post from last post section after using php-fpm !!
April 09, 2011 07:39PM
hello there,

i just used php-fpm today, & everything works fine (very fine & speedy),

but i get a problem which removed after i stop forwarding php requests to nginx php-fpm instead of apache

the problem is, when any visitor/member try to click on the subject of a post in the "Last Post" column

the post didnt open because the actual url which is :

http://www.domain.com/vb/showthread.php?188447-%DF%ED%DD-%ED%D3%CA%D8%ED%DA-%C7%E1%DA%C8%CF-%C7%E4-%ED%E1%CA%E3%D3-%C7%CB%D1-%CD%C8-%C7%E1%E1%E5-%DD%ED-%DE%E1%C8%E5&p=3242168#post3242168

convert (when using php-fpm only & dont know why) to

http://www.domain.com:0/showthread.php?188447-%DF%ED%DD-%ED%D3%CA%D8%ED%DA-%C7%E1%DA%C8%CF-%C7%E4-%ED%E1%CA%E3%D3-%C7%CB%D1-%CD%C8-%C7%E1%E1%E5-%DD%ED-%DE%E1%C8%E5&p=3242168#post3242168

so the /vb in the original URL converted (when using php-fpm) to :0

this is the domain location configuration :

# forwarding php requests to nginx FCGI
#location ~ \.php$ {
#fastcgi_pass unix:/usr/local/nginx/php/var/run/php-fpm.sock; # Note : it is better to use UNIX socket
#include /usr/local/nginx/conf/fpm.conf;
#}

this is fpm.conf configuration :

# main FCGI module directives
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
#fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_index index.php;
fastcgi_ignore_client_abort off;
fastcgi_intercept_errors off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_store on;
fastcgi_store_access user:rw;
fastcgi_temp_path /tmp/nginx_fastcgi;
#fastcgi_max_temp_file_size 1G;
fastcgi_temp_file_write_size 256k;
fastcgi_buffers 4 256k;
fastcgi_buffer_size 128k;
#fastcgi_send_lowat 0;
fastcgi_pass_request_body on;
fastcgi_pass_request_headers on;
fastcgi_next_upstream off;
fastcgi_catch_stderr "PHP Fatal error:";

# FCGI caching
#fastcgi_cache cach1;
#fastcgi_cache "$scheme$host$request_uri $cookie_user";
fastcgi_cache_methods POST;
fastcgi_cache_min_uses 1;
#fastcgi_cache_path /tmp/nginx_cache levels=1:2 zone=cach1:10m inactive=10m max_size=200M;
fastcgi_cache_use_stale error timeout;
fastcgi_cache_valid 200 24h;

please could anyone here tell me what is wrong ??
&
why /vb in URL converted to :0 only when accessing post (by clicking on its name or subject) from "Last Post" column ??

any help will be appretiated,

may all accept my best regards
Re: problem when accessing post from last post section after using php-fpm !!
April 10, 2011 02:28PM
hello there,

could anyone here help me !!!
exactly how are you converting your URL? Which function do you use? because
I don't see how you get zero (0) from /vb/

On Sun, Apr 10, 2011 at 9:28 PM, HuMaN-BiEnG <nginx-forum@nginx.us> wrote:

> hello there,
>
> could anyone here help me !!!
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?3,189786,189940#msg-189940
>
>
Re: problem when accessing post from last post section after using php-fpm !!
April 11, 2011 09:30AM
Ovidiu Alexa Wrote:
-------------------------------------------------------
> exactly how are you converting your URL? Which
> function do you use? because
> I don't see how you get zero (0) from /vb/
>

Hello Ovidiu Alexa,

first i'd like to thank you for your caring about my problem,

second, i'm also like you didnt know how & why & what cause to convert /vb in URL to :0 & also why this only happens when i try to go to any post by clicking its name from "Last Post" column :( !! especially there are no rewrite or htaccess codes in this account

please man could you help me !!

because of this problem, i had to stop using php-fpm & loosing the great speed of it :( :( till i found a solution for this problem !!!

Ovidiu Alexa accept my best regards man,,

& wish you good luck
Hi,

if you use PHP why don't u echo $_SERVER['REQUEST_URI'] and see what you
get from that. If you don't see the /vb/ then you should put the
specific URL in the ACTION parameter in the form. Like this:



<form name="my_form" method="POST" action="/vb/showthread.php?VARIABLES">

</form>

If you don't have access to that parameter can you modify .htaccess to
redirect the showthread.php to /vb/shothread.php? I'll give you an example:

here:

add this to .htaccess:
RewriteCond $1 !^(vb)
RewriteRule ^(.*)/shothread.php?(.*)$
http://DOMAINNAME.LTD/vb/shothread.php?$1 [L]

and REPLACE DOMAINNAME.LTD WITH your website name and extension

Give me feedback if you managed to do this right or if it doesn't work,
ok? Don't dispare, there are still people on the web who want to help.
No charge, no tricks.

Also if you want more opinions, please join the Professional PHP
Developers Group here http://groups.google.com/group/professional-php I
guarantee that you will get more answers there. It's a very active group.

Cheers!




I'm not always right,
but I'm never wrong.
Please visit my site http://bit.ly/fT24vu

On 4/11/2011 16:30, HuMaN-BiEnG wrote:
> Ovidiu Alexa Wrote:
> -------------------------------------------------------
>> exactly how are you converting your URL? Which
>> function do you use? because
>> I don't see how you get zero (0) from /vb/
>>
> Hello Ovidiu Alexa,
>
> first i'd like to thank you for your caring about my problem,
>
> second, i'm also like you didnt know how& why& what cause to convert
> /vb in URL to :0& also why this only happens when i try to go to any
> post by clicking its name from "Last Post" column :( !! especially there
> are no rewrite or htaccess codes in this account
>
> please man could you help me !!
>
> because of this problem, i had to stop using php-fpm& loosing the great
> speed of it :( :( till i found a solution for this problem !!!
>
> Ovidiu Alexa accept my best regards man,,
>
> & wish you good luck
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?3,189786,190140#msg-190140
>
>
Re: problem when accessing post from last post section after using php-fpm !!
April 13, 2011 03:34PM
Hello

about echoing the php variable,

i create a php file in vb directory called "t.php" & when i access it through the web browser (without implementing php-fpm) i get the following :

/vb/t.php

now i implement php-fpm & tried to access the php file called "t.php" through the browser, but i didnt get anything just a white page, & also through shell i tried to open the file "php /home/user/public_html/vb/t.php" & also get nothing when i execute the command :( :( , & only get the following error in nginx error log file :


2011/04/13 19:24:14 [crit] 22133#0: *9632029 open() "/home/user/public_html/vb/t.php.0073415328" failed (13: Permission denied) while reading upstream, client: 174.36.235.231, server: domain.com, request: "GET /vb/t.php HTTP/1.1", upstream: "fastcgi://unix:/usr/local/nginx/php/var/run/php-fpm.sock:", host: "domain.com"

this error i always get it (either implementing php-fpm or not), but i dont know how to solve it, & nginx uses user & group nobody

please man could you help :( :(
Are you using FPM user as nobody too?

Sent from my iPhone

On Apr 13, 2011, at 14:34, "HuMaN-BiEnG" <nginx-forum@nginx.us> wrote:

> Hello
>
> about echoing the php variable,
>
> i create a php file in vb directory called "t.php" & when i access it
> through the web browser (without implementing php-fpm) i get the
> following :
>
> /vb/t.php
>
> now i implement php-fpm & tried to access the php file called "t.php"
> through the browser, but i didnt get anything just a white page, & also
> through shell i tried to open the file "php
> /home/user/public_html/vb/t.php" & also get nothing when i execute the
> command :( :( , & only get the following error in nginx error log file
> :
>
>
> 2011/04/13 19:24:14 [crit] 22133#0: *9632029 open()
> "/home/user/public_html/vb/t.php.0073415328" failed (13: Permission
> denied) while reading upstream, client: 174.36.235.231, server:
> domain.com, request: "GET /vb/t.php HTTP/1.1", upstream:
> "fastcgi://unix:/usr/local/nginx/php/var/run/php-fpm.sock:", host:
> "domain.com"
>
> this error i always get it (either implementing php-fpm or not), but i
> dont know how to solve it, & nginx uses user & group nobody
>
> please man could you help :( :(
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?3,189786,191026#msg-191026
>
Re: problem when accessing post from last post section after using php-fpm !!
April 13, 2011 04:37PM
Hello Sammie Taunton,

yeah man i use php-fpm as the user & group nobody, as it shown in the "php-fpm.conf" :

listen.owner = nobody
listen.group = nobody
listen.mode = 0666

user = nobody
group = nobody

& thanks man for your help

please accept my regards
When FPM is started. Can you locate the socket itself and make certain the permissions are in fact set to the proper user? If so, try changing the socket path to /tmp/fpm.sock and try again. I encountered this issue myself and it was my situation.

Sent from my iPhone

On Apr 13, 2011, at 15:37, "HuMaN-BiEnG" <nginx-forum@nginx.us> wrote:

> Hello Sammie Taunton,
>
> yeah man i use php-fpm as the user & group nobody, as it shown in the
> "php-fpm.conf" :
>
> listen.owner = nobody
> listen.group = nobody
> listen.mode = 0666
>
> user = nobody
> group = nobody
>
> & thanks man for your help
>
> please accept my regards
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?3,189786,191056#msg-191056
>
Re: problem when accessing post from last post section after using php-fpm !!
April 13, 2011 10:11PM
Sammie Taunton Wrote:
-------------------------------------------------------
> When FPM is started. Can you locate the socket
> itself and make certain the permissions are in
> fact set to the proper user? If so, try changing
> the socket path to /tmp/fpm.sock and try again. I
> encountered this issue myself and it was my
> situation.

Hello Sammie Taunton,

man i changed nginx php-fpm socket path to "/tmp/fpm.sock" & its user & group ownership for nobody, while its permission is 644, but the main problem doesnt fixed yet also still couldnt get output when accessing the php file "http://domain.com/vb/t.php" & the error still appear in nginx log file

2011/04/14 02:03:14 [crit] 9069#0: *10448390 open() "/home/user/public_html/vb/t.php.0074173758" failed (13: Permission denied) while reading upstream, client: 41.206.148.97, server: anaqamaghribia.com, request: "GET /vb/t.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/fpm.sock:", host: "www.domain.com"

really dont know what is the reason :( :(
Re: problem when accessing post from last post section after using php-fpm !!
April 16, 2011 06:53AM
hello there,

anyone here could help me ..!!!

i expected a support for Nginx here ..!!!

please i'm loosing the great speed of Nginx php-fpm because of this problem ..!!

if i didnt get help here where should i get help !!!!!
Just out of curiosity, How was nginx/php-fpm installed?

What os and architecture? Have you tried using the NIC instead of socket?

Is the app you are running a publicly available CMS/software? If so maybe I
will try to reproduce the problem on a VM

Iain Wright
LAN Administrator
USC CTSI - CBIS
On Apr 16, 2011 3:53 AM, "HuMaN-BiEnG" <nginx-forum@nginx.us> wrote:
> hello there,
>
> anyone here could help me ..!!!
>
> i expected a support for Nginx here ..!!!
>
> please i'm loosing the great speed of Nginx php-fpm because of this
> problem ..!!
>
> if i didnt get help here where should i get help !!!!!
>
> Posted at Nginx Forum:
http://forum.nginx.org/read.php?3,189786,191686#msg-191686
>
Re: problem when accessing post from last post section after using php-fpm !!
April 23, 2011 10:13PM
hello Iain

sorry for late i tried what you have sugested & asked for

but nothing changed or solved my problem

please accept my best regards


iain wright Wrote:
-------------------------------------------------------
> Just out of curiosity, How was nginx/php-fpm
> installed?
>
> What os and architecture? Have you tried using the
> NIC instead of socket?
>
> Is the app you are running a publicly available
> CMS/software? If so maybe I
> will try to reproduce the problem on a VM
>
> Iain Wright
> LAN Administrator
> USC CTSI - CBIS
> On Apr 16, 2011 3:53 AM, "HuMaN-BiEnG"
> <nginx-forum@nginx.us> wrote:
> > hello there,
> >
> > anyone here could help me ..!!!
> >
> > i expected a support for Nginx here ..!!!
> >
> > please i'm loosing the great speed of Nginx
> php-fpm because of this
> > problem ..!!
> >
> > if i didnt get help here where should i get help
> !!!!!
> >
> > Posted at Nginx Forum:
> http://forum.nginx.org/read.php?3,189786,191686#ms
> g-191686
> >
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 272
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready