PHP info not loading
Hello,
In the php info :
"Configuration File (php.ini) Path no value
Loaded Configuration File (none)"
Windows 10 pc with apache and php
C:\php
in Windows PATH added C:\php
php.ini is in the C:\php (not php.ini_dev)
PHP Version 8.2.2
apache server restarted, pc restarted
Why not loading the php.ini ?
95 Replies
are you sure that the file exists?
Yes, I can edit php.ini
can you show the explorer window, with the php.ini file selected?
Yes, please give me a minute. How can I upload picture here?
copy-paste
drag&drop
both work the same
does
php -i
show anything?I don't understand. Where should I have to use -i ?
in the command prompt
or powershell
Yes
A lot
does it say anything about the php.ini file?
also, why are you installing php like this?
I am looking. Where can I found it?
should be at the top
you should try to redirect the output to a file
but if the file is there, php should use it
but not all values will be set, by the way
"loaded configuration file"
look for that
Yes it is there
You can see on the image
yup, so, the file is being loaded
are you using
php -S
?index.php with phpinfo() not show it
And sqlite not working
which server are you using?
Apache
you're in the wrong folder
apache doesn't use that, unless you manually installed apache and manually configured it to use phpmod or php-fpm for that specific directory
which i doubt it
how did you install apache?
Folowed a youtube video
I had to download from apache.org
you went about it the absolute hardest way
it's a lot easier to download xampp and use that
No, that is not good.
Take security gate open
are you going to host your website on your pc?
and have it available to the entire world from your pc?
Should have to deactivate UAC to install. No
then why do you care that it is a tiny tiny tiny bit less secure, if you have an actual working php, mysql and apache install in minutes?
and no, you don't have to disable anything
I am create website to myself as a hobby. Not shared.
then just use xampp
No, I don't want it
I am not disable UAC
^ this
so what?
you click the button, it works
Before install start it shows this and close the install
that is only if you want to install it as a service
and if you do that, you're asking for trouble
No, I not take risk. It is only a hobby
🤦♂️
well, i can't help you with this then
Thank you so much for your help
my advice: stop ignoring tools that do the work perfectly fine because you're scared of a message that means nothing
I am appreciate it
installing apache manually is a pain
if i were you, since you had all the work to install apache
is to find where it thinks that php is, then you add the php.ini file there
Only sql not working
Everything else is fine
since i don't know what you did, i can't tell you where things are
that's why i can't help you
I just not use sql
you have to enable the extensions in php.ini
No worries.
which is where the php file is
It is enabled
which only you and apache know where it might be
the folder you've shown is the wrong one
I deleted the ; from the beginning
But that is my php folder
C:\php\ext\
apache is getting php from somewhere else
This is the extension folder
yeah, but apache doesn't care if it is using some other php install somewhere else
which is the problem
How can I check where apache using it?
where's apache installed?
C:\Apache24
try to look inside there, maybe you will find php somewhere
how did you even configured a website?
No php in that folder
how did you enabled the php module?
I don't remember
It was about 3 years ago
yeah, you're SOL
you can try to go through the configuration files, and see if any points to any php install
you can also try to open the command prompt in some random place and run
php -i
and see what happensI found something on youtube
I have to add apache conf httpd.conf a few lines
try checking that file
I do not have there
yeah
well, if you don't want the perfectly fine easy mode, why don't you install it in wsl2?
i recommend debian over ubuntu, due to disk size
If I paste those lines the apache server not start. So I have to found what should I have to write there
honestly, the juice isn't worth the squeeze
remove it, start over
you'll spend hours banging your head, and we will come to the conclusion that it's beyound f*cked
I never give up 🙂 problems coming to someone solve it. I am that one 🙂
It takes time, but I learn
that's the thing: you're on windows, and you're doing something almost nobody does anymore
people install docker in wsl2, download a pre-built image with everything configured and just work
or like me: xampp or wsl -> apt install what i need -> done
yes, i use xampp on my personal computer, a lot
and uac is very enabled
what you learn here won't be very useful outside of windows, and windows isn't that used for web hosting (unless you use asp.net and stuff like that)
Ok
I got it
php.net have an example
that is surprising
For apache httpd.conf file
I had to copy paste
windows stuff is the most horrible you can imagine
and it works now?
And it is working fine
that is very surprising
Now we learned 🙂
can you share that?
Never give up
it's not giving up
Yes
it's just using my time better
I hope it is readable
can you share the link instead?
images aren't useful for copy-paste
php.net/manual/en/install.windows.apache2.php
thank you
by the way, php 8.2.2 is very outdated
Thank you
I am working on it 2 days ago
you should install php 8.3.7
also, be careful because some settings were removed in 8.3
Oh
I will look after it
Thank you to let me know
And thank you so much for your help
I am so happy now
you're welcome
i was surprised there was any info at all
linux-centered stuff usually has poor/no documentation for windows
If you know what are you looking easy to found. You help me to show where should I have to search
Apache was the magic word
Thanks again
you're welcome