Comments (7)
CC : @tomsik68
from docker-xampp.
Now that I am able to run the test PHP script. I went into my actual folder and tried to run that. It ran successfully but not able to fetch data.
I have simple webpage which taking form data and on clicking save button redirecting to reg.php file. But on http://localhost:41062/www/reg.php
nothing opens.
from docker-xampp.
Here is the repo link, if you want to look at code. https://github.com/Logan1x/php-docker
from docker-xampp.
Hi, I cloned your repo, started your container like this docker run -p 41062:80 -it newtestwithnewcontainer
. Then, I created record
database and ran your sql script on it in phpmyadmin. This is what I see on localhost:41062
.
Then, I tried to click the add new
button. And I got the following php error:
[23-Feb-2021 17:35:10 Europe/Berlin] PHP Fatal error: Uncaught PDOException: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: '' for column `record`.`mydb`.`Sno` at row 1 in /www/reg.php:17
Stack trace:
#0 /www/reg.php(17): PDOStatement->execute(Array)
#1 {main}
thrown in /www/reg.php on line 17
I had to check /opt/lampp/logs/php_error_log
inside the container to find the error, but php should display errors. Since this is meant to be developer-friendly cotainer, I created #29 to track this.
Quick glance at your code suggests that your ':sno' => ''
association causes this.
https://github.com/Logan1x/php-docker/blob/c3852e26a1a1468d71b07dc6c832241005162e35/reg.php#L17
from docker-xampp.
Thank you for helping out with this. Do I have to create db every time I built it? I want to push my project on docker hub so the person who is downloading image have to do create db ?
from docker-xampp.
I think there's a way to create the DB inside the container. You can copy your sql script to the container and then import it with mysql cli.
Please beware that this image is not ready for production. This is merely a development environment.
from docker-xampp.
Thanks I'll look into it.
from docker-xampp.
Related Issues (20)
- Happy work next version with these features as these years work practice HOT 1
- docker-compose.yml sample file
- Update to the latest XAMPP versions HOT 1
- [Question] Setting up DVWA on docker-xampp HOT 1
- how to install "ixed.8.1.lin" loader from the SourceGuardian site HOT 2
- Unknown command or add-on HOT 2
- How do I install a PHP module like IMAGICK? HOT 2
- I want to mount my php folder so i can open the page on it. HOT 13
- It does not copy the source files from the directory to the /www being mounted HOT 7
- Separate mysql socket of mysql data HOT 1
- XAMPP running as `daemon` user instead of `www-data` HOT 2
- Mount existing db to container HOT 2
- Mysql is not starting HOT 7
- disable mysql? HOT 2
- Add 8.3.6 HOT 2
- cant remap ports to container HOT 4
- denied HOT 1
- Path Problem HOT 3
- Install xdebug HOT 1
- Mysql Default password HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-xampp.