Skip to content

Tag: php

PHP stream remote video file

Let’s say I have a video on a remote server and this its url “http://domain/video-path/video.mp4” What is the correct way to stream this video using php with seekable.. I know how to stream the …

How to add main menu url with a url instead of slug in wordpress?

I have used the following function to add menu in wordpress admin backend. But i cant able to add url eg: http://www.google.com in menu href any solution for this ? Answer The short answer is that this is not possible to do using the add_menu_page() function. Probably for good reason, WordPress does not allow…

Clickhouse connection refuse

I have a problem with connection to clickhouse-server by http over 8123 port. All parameters are default. Please help me to resolve this problem. Answer First of all check if even you clickhouse-server is running properly or not using this command: sudo lsof -i :8123 You should be able to see a similar output…

PHP binding method to another class

Can i bind method of class Foo to class Bar? And why the code below throws a warning “Cannot bind method Foo::say() to object of class Bar”? With function instead of method code works fine. P.S. I know about extending) it is not practical question, just want to know is it real to bind non-static m…

How to run 2 or more input files in the same form with PHP

I would like to know how to run 2 or more input files in the same form, I have to upload some documents by using php, I made separate forms and they work, but I need to all together however I dont know how. I need to put only two forms as example actually I need to put 3 but

Upgrade PHP on AWS Linux

I have an AWS server running a website with NGINX and PHP. I originally installed these using the following: sudo yum install -y nginx php-fpm The version of PHP that is installed is 5.3.29 which but I need at least 5.4 to run a payments plug-in. All the info online indicates a PHP upgrade actually involves a…

Insert null or something if value of csv is null

I have a problem uploading a csv to mysql. I have the following csv. I need to upload the marked fields the max fields the csv can contain are 48 but some csv contain only 36 or less. I have a form which if csv contains 48 cells uploads succesfully to mysql but if the csv is less than 48