php - Parse_url not working correctly on staging server -



php - Parse_url not working correctly on staging server -

i facing problem parse_url function. if utilize parse_url on local scheme getting next output. url parsing used www.youtube.com/embed/u-j1nx_hy5o

array ( [host] => www.youtube.com [path] => /embed/u-j1nx_hy5o )

but parse same url on staging got next output.

array( [path] => //www.youtube.com/embed/u-j1nx_hy5o )

ie. not getting host name on staging server.

note : php version on staging server 5.3.3. can allow me know why happening.

many thanks,

m.

there bug prior 5.4.7: 5.4.7 fixed host recognition when scheme omitted , leading component separator present.

check if staging server's version lower 5.4.7.

as additional advice: utilize same version , configuration (except error reporting settings) in of environments.

edit

if can not update staging environment, adding scheme url (http:// example) help. downgrade development environment version running on staging , production environment.

php parse-url

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -