Two Laravel applications on the same server conflict

I have 2 Laravel applications running on the same server. The server is Apache 2.4 and I have vhosts set up to serve each application on a different domain. The first application is an API and it's .env file is set up like this: APP_ENV=production AP

Using the WooCommerce API to Obtain Country / State Lists

I"m using the WooCommerce API to get the country list. I am doing: $woo_countries = new WC_Countries(); $countries = $woo_countries->get_allowed_countries(); However, how does one get the state list for the default selected country? Also, when the

Calling an indefinite method MY_Loader :: _ ci_load_library ()

I'm new to Codeigniter, and currently I just installed Codeigniter 2.2.0 with HMVC and ORM Datamapper version 1.8.2 . I'm sure I have installed the ORM correctly, but when I test the Link, It give me this Fatal error: Call to undefined method DM_Load

How to join two tables with one will be a limit in php mysql

I am having a hard time configuring on how to join two tables, which the second one should be limit. Below are the samples of my table. This is employee table: id EmpID Lastname Firstname Department 1 4 Joe Dylan Admin 2 5 Black Teddy Admin This is t

create a table for the search result

may I know how to create a HTML table for displaying my queries search results? here is my code for search <?php //This connects the file to your database. // Change the "database-username & database-password" to the one you've setup alre

Linking images regardless of file type

I'm building a little site at the moment and users can upload their own profile picture but obviously some users pictures will be png and some jpeg, does anyone know anyway to be able to accept both when using the images as a background image in css.

preg_replace on everything before character

I am trying to remove parts of a string which has an ID and : before it. So for example: 2846:ZE1,2847:ZE2,2848:ZE3,713:DY10,412:CF10 But I want it to look like this: ZE1,ZE2,ZE3,DY10,CF10 I have tried the following preg_replace: $remove = preg_repla

PHPEXCEL Sets the title for all worksheets

I'm trying to change the name of all the worksheets exported into xlsx from my code below. The export works fine, but the title of all the worksheets are just worksheet 1, 2, 3, etc I want to grab the names from the column "asset_name" from my p

View the image on specific pages

I want to let users upload a picture, and show the picture they uploaded only on the event page that they just created. For that, I have a database in PHP with all the events created. Each event have a random key of 25 characters, to make them unique

What is an unknown column in the "field list"?

This is my code in html+php. Whenever I run this page and try to input in this table of my database, a message occurs "Unknown column 'phone_outlet' in 'field list'".. What should I do? :( I can't find any error in my code? :( This is my table i

Calculate overtime and update overtime on the chart

I have table columns workhours and overtime, and I would like to do a SQL or PHP query that checks if the workinghours are over 8 hours and if so it UPDATEs the worked overtime to overtime column. Here's my table: id workinghours overtime 1, 4.79, --

How to anti-alias an image with PHP?

Possible Duplicate: Remove white background from an image and make it transparent I currently have a code that removes the white background from an image, it looks like this: function transparent_background($filename, $color) { $img = imagecreatefrom

PHP preg_replace regex for dashboard

I am trying to replace anything in the string that is not a letter, number, or dash "-". How do I modify this line to include the dash? $link = preg_replace('/[^a-z0-9]/', "", strtolower($_POST['link_name'])); Do I just insert it in th

PHP function / library to create a screenshot of the movie

I have a site where users upload movies (MP4, FLV, OGV). I need a PHP function to generate a poster/screenshot in JPG automatically from an uploaded movie. The screenshot should be for the opening scene of the movie. If it is a javascript utility (ra

to retrieve images from multiple mysql tables using php

I've been trying for the last couple of days to try and understand how to fetch data from multiple tables, but I cant say that I fully understood how it works. Anyway :) What I am trying to do is to fetch the images stored in multiple tables using a

include the xy () function of a wordpress plugin

I want to build a WordPress admin dashboard widget which should return some information from another plugin. This dashboard widget should read the functions of this plugin here:

php - associative ranking

In PHP, do associative array indexes need to follow that same rules and variable names (can't start with a number, etc.) I am looking for both working and philosophical answers to this question.From the manual: A key may be either an integer or a str

PHP file_get_contents problem

I am having a problem with PHP's file_get_contents command. $url = "".$format.$auth_token.$filter."&api_sig=".$md5.$apikey.$method; $content = file_get_contents($url); $array = json_deco

PHP var becomes negative

I have this code : <?php $integer = 33963677451; $integer &= 0xFFFFFFFF; echo $integer; ?> But, when I execute it, the output is -396060917 The same function in Python if __name__ == '__main__': integer = 33963677451 integer &= 0xFFFFFFFF pr

Activating $ _GET in codeigniter

I've been trying to figure out how to enable $_GET in CI. It appears the framework deliberately destroys the $_GET array, and that enabling it requires serious tinkering with the core classes. can anyone say why this is, and how to overcome it? mind

PHP Call Answer SoapClient missing parts of answer

I am having trouble with PHP parsing of a SoapClient call's response. For some types of answers, it is returning arrays of empty stdClass objects instead of initialized stdClass objects. The server is a java webservice deployed with axis2 on tomcat6.