Enable pdo mysql on codespace #58212
Replies: 3 comments 2 replies
-
I installed PHP from a famous PPA. sudo apt update
sudo apt install software-properties-common ca-certificates lsb-release apt-transport-https
LC_ALL=C.UTF-8 sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install -y php8.2 php8.2-mysql php8.2-mbstring php8.2-xml php8.2-curl
echo APP_URL=https://$CODESPACE_NAME-8000.app.github.dev >> .env
php8.2 artisan serve |
Beta Was this translation helpful? Give feedback.
-
You can install pdo_mysql:) curl -L https://gist.githubusercontent.com/GitHub30/2d51bfa327a6eddbde33b77214511584/raw/install_pdo_mysql.gh-codespaces.sh | bash or Manual install cd
VERSION=$(php -r 'echo phpversion();')
wget https://www.php.net/distributions/php-$VERSION.tar.gz
tar xf php-$VERSION.tar.gz
cd php-$VERSION/ext/pdo_mysql
phpize
./configure
make
make test
make install
sed -i 's/;extension=pdo_mysql/extension=pdo_mysql/' /opt/php/$VERSION/ini/php.ini
php -i | grep drivers https://gist.github.com/GitHub30/2d51bfa327a6eddbde33b77214511584 other modules # mysqli
curl -L https://gist.githubusercontent.com/GitHub30/0b8d548d0912ff4cc7b065e378904fd0/raw/install_mysqli.gh-codespaces.sh | bash
# exif
curl -L https://gist.githubusercontent.com/GitHub30/0b8d548d0912ff4cc7b065e378904fd0/raw/install_exif.gh-codespaces.sh | bash
# imagick
curl -L https://gist.githubusercontent.com/GitHub30/0b8d548d0912ff4cc7b065e378904fd0/raw/install_imagick.gh-codespaces.sh | bash
# zip
curl -L https://gist.githubusercontent.com/GitHub30/0b8d548d0912ff4cc7b065e378904fd0/raw/install_zip.gh-codespaces.sh | bash
# gd
curl -L https://gist.githubusercontent.com/GitHub30/0b8d548d0912ff4cc7b065e378904fd0/raw/install_gd.gh-codespaces.sh | bash
# intl
curl -L https://gist.githubusercontent.com/GitHub30/0b8d548d0912ff4cc7b065e378904fd0/raw/install_intl.gh-codespaces.sh | bash |
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
Hi,
I check only pdo sqlite is enabled on my codespaces. How to enable pdo_mysql?
I have tried reinstalling PHP and its extensions but to no avail.
Beta Was this translation helpful? Give feedback.
All reactions