php Questions

10

Solved

I'm using Laravel so all the views are .blade.php files. Visual Studio Code won't format the HTML because of the PHP extension. I removed the "blade" part of the filename, but it still isn't format...
Fane asked 26/12, 2016 at 11:40

5

Solved

I know that in C# you can nowadays do: var a = new MyObject { Property1 = 1, Property2 = 2 }; Is there something like that in PHP too? Or should I just do it through a constructor or through m...
Largish asked 1/10, 2010 at 9:26

12

Solved

I'm generating a pdf document using dompdf 0.6.0, and have a strange issue where a blank page is being created at the end. My (simplified) html: <!DOCTYPE html> <html> <head> &lt...
Ramiform asked 10/1, 2014 at 7:57

2

I'm sending a WinHttp request with POST data to a php script on an IIS7 server, and the POST body isn't being received by the server. If I send via WinHttp using GET, or POST with a NULL body, or t...
Furlani asked 24/9, 2010 at 22:38

7

Solved

I'm doing an operation that inserts hundreds of records into a MySQL database. After inserting exactly 176 records I get this error: [PDOException] SQLSTATE[HY000]: General error: 2006 MySQL serve...
Benedict asked 21/10, 2015 at 3:31

1

I am using one separate table called members to to keep sign up information. I am storing password using wp_hash_password($password). But when I want login by using wp_signon() then it send 0 as r...
Calamint asked 7/8, 2015 at 9:12

2

Solved

I'm using CakePHP v3.x and I'm trying to figure out how to insert some records via the migrations tool. The documentation only lists methods for modifying the schema. Will I need to insert records ...
Lead asked 8/6, 2015 at 15:13

2

Solved

I am using Laravel with a local filesystem as storage driver. I have understood that I can save files in the storage/public folder to make them accessible through myapp.dev/storage/image.jpg. I ha...
Discretion asked 11/10, 2017 at 10:29

8

Solved

In our application, users can create custom export functions in form of SQL statements. Something like this: SELECT name, age, date_birth FROM users WHERE group_id = 2 I don't want them to clear...
Censorship asked 7/5, 2015 at 8:34

4

How I can stop symfony trying to create the table for the view I created on a doctrine migration? Entity mapping the view /** * Class TenancyPendingInspection * @ORM\Entity(repositoryClass="DJ...
Sexagesima asked 24/11, 2017 at 16:46

15

Solved

I've rewritten my site php-code and added MySQL Stored Procedures. In my local version everything works fine but after I uploaded my site to hosting server I'm constantly getting fatal error 'Prepa...
Bandurria asked 7/12, 2010 at 19:36

14

Solved

Is there a PHP function that can extract a phrase between 2 different characters in a string? Something like substr(); Example: $String = "[modid=256]"; $First = "="; $Second = "]"; $id =...
Girl asked 15/2, 2013 at 9:36

3

Solved

Assume I have a method/function with the following signature: foo($bar = 0) Inside foo, how do I tell if $bar was set or not? isset will alway return a TRUE since $bar is assigned 0 in the event...
php
Eigenvalue asked 12/8, 2010 at 20:40

11

I am sending message to telegram channel using bot. With using webhook method. I'm sending file_id via the link. I got the file_id from a channel post. For some files like GIF & video format...
Where asked 9/3, 2017 at 14:19

16

Greetings fellow developers, I am trying to use composer for a PHP project of mine on a development server I recently booted up and for some reason I am unable to. I successfully installed composer...
Herbalist asked 12/7, 2017 at 6:2

13

Solved

Is it possible to get Visual Studio Code to format mixed HTML and PHP code on Windows Visual Studio Code version 0.7.1?
Yap asked 26/8, 2015 at 20:22

3

Solved

My dream is to include a php file in a theme which checks if a set of plugins are installed, and installs the ones which are not. Kind of like a set of dependencies for the theme, but also just a g...
Colvert asked 27/4, 2012 at 15:53

14

Solved

I need to execute a stored procedure after my form submits data. I have the stored procedure working like I want it, and I have my form working properly. I just do not know the statement to execute...
Exhaustion asked 28/12, 2015 at 16:27

4

Solved

Is it possible to install PHP7.4 on stock Alpine 3.12 Docker image? I have seen this repo and its dockerfile which is using bintray cert and repository path, but I was wondering if there is a more ...
Incorporating asked 10/7, 2020 at 14:48

9

After upgrading phpmyadmin lots of warnings and notices is being shown while running any task. errors is shown below. Deprecation Notice in .\vendor\twig\twig\src\Loader\FilesystemLoader.php#40 rea...
Kerrin asked 19/5, 2022 at 11:43

6

Im using Phpunit. If I just run my tests with: phpunit --log-junit output.xml this runs within a second. But if I want a code coverage: phpunit --coverage-html ./report --log-junit output.x...
Boulevard asked 5/9, 2014 at 9:37

2

Solved

This what I'm trying to do: $output = ''; $stream = popen("some-long-running-command 2>&1", 'r'); while (!feof($stream)) { $meta = stream_get_meta_data($stream); if ($meta['unread_bytes']...
php
Fuddyduddy asked 19/12, 2012 at 13:59

4

Solved

Laravel 8 makes it possible to create custom Validation rules: https://laravel.com/docs/8.x/validation#custom-validation-rules php artisan make:rule Euro But then you have to pass the rule as a obj...
Lumbricalis asked 25/8, 2021 at 11:29

10

Solved

I have been using php with mamp on mac for a year even with old versions of MacOS, since I installed MacOS Monterrey if I type php on the terminal I get a message:zsh: command not found: php Using ...
Shonna asked 31/10, 2021 at 11:2

5

I'm using PHP Laravel 7.4 on Ubuntu 20.04.and trying to get data from SQL server located in windows server on another cloud. this method was tested on my PC (Windows) and it successfully got the da...
Soiree asked 26/9, 2021 at 12:59

© 2022 - 2024 — McMap. All rights reserved.