উবুন্টু 16.04 আপগ্রেড হওয়ার পরে অ্যাপাচি পিএইচপি ফাইলগুলি পাঠ্য হিসাবে রেন্ডার করছে।
অ্যাপাচি ইনস্টল হয়ে চলছে। পিএইচপি 7 চলছে। যখন আমি নিম্নলিখিত কমান্ডটি কার্যকর করি তখন আমি সঠিক আউটপুট পাই:
php -r 'echo "\n\nYour PHP installation is working fine.\n\n\n";'
তবে আমি যখন http: //localhost/info.php বা অন্য কোনও পিএইচপি ফাইল অ্যাক্সেস করি তখন আমি পৃষ্ঠার পরিবর্তে ফাইল সামগ্রী পাই contents
অনলাইনে বেশিরভাগ সহায়তা উবুন্টু এবং পিএইচপি উভয়ের পুরানো সংস্করণগুলির জন্য, সুতরাং আমি নিশ্চিত নই যে তারা নির্ভরযোগ্য বা না।
আপডেট: libapache2-mod-php7.0 ইনস্টল করার পরে এবং php7.0 সক্ষম করার পরে অ্যাপাচি শুরু হবে না। আউটপুট দেখুন:
douglas@douglas-acer:~$ sudo service apache2 restart
douglas@douglas-acer:~$ sudo apt-get install libapache2-mod-php
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
libapache2-mod-php
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/2.960 B of archives.
After this operation, 15,4 kB of additional disk space will be used.
Selecting previously unselected package libapache2-mod-php.
(Reading database ... 263897 files and directories currently installed.)
Preparing to unpack .../libapache2-mod-php_1%3a7.0+35ubuntu6_all.deb ...
Unpacking libapache2-mod-php (1:7.0+35ubuntu6) ...
Setting up libapache2-mod-php (1:7.0+35ubuntu6) ...
douglas@douglas-acer:~$ sudo service apache2 restart
douglas@douglas-acer:~$ sudo a2enmod php7.0
Considering conflict php5 for php7.0:
Enabling module php7.0.
To activate the new configuration, you need to run:
service apache2 restart
douglas@douglas-acer:~$ sudo service apache2 restart
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
douglas@douglas-acer:~$ sudo apt-get purge php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'php5' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
এর আউটপুট systemctl status apache2.service
:
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Dom 2016-04-24 08:21:35 BRT; 14s ago
Docs: man:systemd-sysv-generator(8)
Process: 9216 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
Abr 24 08:21:35 douglas-acer apache2[9216]: * The apache2 configtest failed.
Abr 24 08:21:35 douglas-acer apache2[9216]: Output of config test was:
Abr 24 08:21:35 douglas-acer apache2[9216]: [Sun Apr 24 08:21:35.235583 2016] [:crit] [pid 9226:tid 140666367190912] Apache is running a threade
Abr 24 08:21:35 douglas-acer apache2[9216]: AH00013: Pre-configuration failed
Abr 24 08:21:35 douglas-acer apache2[9216]: Action 'configtest' failed.
Abr 24 08:21:35 douglas-acer apache2[9216]: The Apache error log may have more information.
Abr 24 08:21:35 douglas-acer systemd[1]: apache2.service: Control process exited, code=exited status=1
Abr 24 08:21:35 douglas-acer systemd[1]: Failed to start LSB: Apache2 web server.
Abr 24 08:21:35 douglas-acer systemd[1]: apache2.service: Unit entered failed state.
Abr 24 08:21:35 douglas-acer systemd[1]: apache2.service: Failed with result 'exit-code'.
আউটপুট journalctl -xe
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has finished shutting down.
Abr 24 08:37:59 douglas-acer systemd[1]: Starting LSB: Apache2 web server...
-- Subject: Unit apache2.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has begun starting up.
Abr 24 08:37:59 douglas-acer apache2[10261]: * Starting Apache httpd web server apache2
Abr 24 08:37:59 douglas-acer apache2[10261]: *
Abr 24 08:37:59 douglas-acer apache2[10261]: * The apache2 configtest failed.
Abr 24 08:37:59 douglas-acer apache2[10261]: Output of config test was:
Abr 24 08:37:59 douglas-acer apache2[10261]: [Sun Apr 24 08:37:59.748900 2016] [:crit] [pid 10271:tid 139911432607616] Apache is running a threa
Abr 24 08:37:59 douglas-acer apache2[10261]: AH00013: Pre-configuration failed
Abr 24 08:37:59 douglas-acer apache2[10261]: Action 'configtest' failed.
Abr 24 08:37:59 douglas-acer apache2[10261]: The Apache error log may have more information.
Abr 24 08:37:59 douglas-acer systemd[1]: apache2.service: Control process exited, code=exited status=1
Abr 24 08:37:59 douglas-acer systemd[1]: Failed to start LSB: Apache2 web server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has failed.
--
-- The result is failed.
Abr 24 08:37:59 douglas-acer systemd[1]: apache2.service: Unit entered failed state.
Abr 24 08:37:59 douglas-acer systemd[1]: apache2.service: Failed with result 'exit-code'.
Abr 24 08:37:59 douglas-acer sudo[10258]: pam_unix(sudo:session): session closed for user root
Abr 24 08:38:02 douglas-acer sudo[10276]: douglas : TTY=pts/18 ; PWD=/home/douglas ; USER=root ; COMMAND=/bin/journalctl -xe
Abr 24 08:38:02 douglas-acer sudo[10276]: pam_unix(sudo:session): session opened for user root by (uid=0)
Abr 24 08:38:38 douglas-acer sudo[10276]: pam_unix(sudo:session): session closed for user root
Abr 24 08:39:01 douglas-acer CRON[10297]: pam_unix(cron:session): session opened for user root by (uid=0)
Abr 24 08:39:01 douglas-acer CRON[10299]: (root) CMD ( [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean)
Abr 24 08:39:01 douglas-acer CRON[10297]: pam_unix(cron:session): session closed for user root
Abr 24 08:39:01 douglas-acer CRON[10298]: pam_unix(cron:session): session opened for user root by (uid=0)
Abr 24 08:39:01 douglas-acer CRON[10300]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && /usr/lib/php/sessionclean)
Abr 24 08:39:02 douglas-acer CRON[10298]: pam_unix(cron:session): session closed for user root
Abr 24 08:39:51 douglas-acer sudo[10122]: pam_unix(sudo:session): session closed for user root
Abr 24 08:39:53 douglas-acer sudo[10368]: douglas : TTY=pts/5 ; PWD=/home/douglas ; USER=root ; COMMAND=/bin/journalctl -xe
Abr 24 08:39:53 douglas-acer sudo[10368]: pam_unix(sudo:session): session opened for user root by (uid=0)
ত্রুটি সংক্রান্ত Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP
আমি কিছু সাহায্য এটি করেনি https://wiki.archlinux.org/index.php/Apache_HTTP_Server এই সমস্যা সংক্রান্ত অবশ্য ফাইল পাথ উবুন্টুতে বেশী মিল পাওয়া যায়নি, তাই আমি কাজে লাগানোর চেষ্টা করা হয়নি প্রস্তাবিত ফিক্স।