“disable_functions” (Güvenlik)
“disable_functions” ile serverınızda birçok fonksiyonun çalışmasını engelleyebilirsiniz bu sayede sitenize inject edilen scriptler, sheller için güvenliğinizi almış olursunuz. Bu kadar fonksiyon fazla gelebilir ama iyi bir güvenlik için şart.

Code:
disable_functions = foreach, glob, openbasedir, posix_getpwuid, f_open, system,dl, array_compare, array_user_key_compare, passthru, cat, exec, popen, proc_close, proc_get_status, proc_nice, proc_open, escapeshellcmd, escapeshellarg, show_source, posix_mkfifo, ini_restore, mysql_list_dbs, get_current_user, getmyuid,pconnect, link, symlink, fin, passthruexec, fileread, shell_exec, pcntl_exec, ini_alter, parse_ini_file, leak, apache_child_terminate, chown, posix_kill, posix_setpgid, posix_setsid, posix_setuid, proc_terminate, syslog, allow_url_fopen, fpassthru, execute, shell, curl_exec, chgrp, stream_select, passthru, socket_select, socket_create, socket_create_listen, socket_create_pair, socket_listen, socket_accept, socket_bind, socket_strerror, pcntl_fork, pcntl_signal, pcntl_waitpid, pcntl_wexitstatus, pcntl_wifexited, pcntl_wifsignaled, pcntl_wifstopped, pcntl_wstopsig, pcntl_wtermsig, openlog, apache_get_modules, apache_get_version, apache_getenv, apache_note, apache_setenv, virtual
Eğer bu kadar fonsiyonu devre dışı bırakmak fazla geldiyse alttaki gibi de ayarlayabilirsiniz bu da güvenliğiniz için yeterlidir:

Code:
disable_functions = glob, posix_getpwuid, array_compare, array_user_key_compare, ini_restore, exec, proc_get_status, proc_nice, proc_open, allow_url_fopen, fin, pconnect, system, dl, passthruexec, shell_exec, proc_close, proc_get_status, chown, chgrp, escapeshellcmd, escapeshellarg, fileread, passthru, popen,curl_exec, shell, execute

Safe Mode Güvenlik
“Safe Mode” adından da anlaşılacağı gibi “Güvenli Mod” anlamına geliyor. “Safe Mode” genelde birçok serverda “Off” durumdadır ve bu da birçok tehlikeye davetiye çıkaran unsurlar arasında yer alır. “Güvenli Modu Açık” durumuna getirmek shellerin serverımızda istedikleri gibi dolaşmalarını, exploitlerin çalıştırılmasını ve komutların execute edilmelerini önler. Günümüzde “açık olan güvenlik modunu” kapalı duruma getiren scriptler mevcut fakat altta anlatılan önlemlerle bunun da önüne geçilebilir.

Code:
safe_mode = on
çalışmayan script olursa httpd.conf ve .htaccess dosyasından kullanıcıya gerekli izin verilebilir. örnek aşağıdaki gibi

Code:
php_flag safe_mode Off
“register_globals” (Güvenlik ve Performans)
php.ini dosyasında bulunan “post” “get” ile gönderilen değerlere kullanıcı adlarıyla ulaşılıp ulaşılamayacağını belirtir. Session, cookie değerlerini kendi adıyla tanımlayarak birer değişken olmasına neden olur. “Off” olarak ayarlanırsa bu gibi değerlere kendi tanımladığı şekilde ulaşılamaz.

Code:
register_globals = off
çalışmayan script olursa on değerini htaccess dosyasına koyup sadece o siteye açabilirsiniz. veya httpd.conf dosyasına

Code:
php_flag register_globals on
“allow_url_fopen” (Güvenlik)
“allow_url_fopen” default olarak “açık” şeklinde gelir ve bunun “on” açık olması “file_get_contents()”, “include()”, “require()” fonksiyonlar uzaktaki dosyaları da işlemesine olanak tanır. Bunlara verilen bilgiler hiçbir kontrolden geçirilmezse kritik güvenlik açıklarını sebep olur. (eğer safe mode açıksa ve open basedir aktif ise bunun açık kalmasında hiç bir sorun yok. Kapalı kalması durumunda bir çok script çalışmaz. en basit örnek olarak php nuke çalışmaz.)

Code:
allow_url_fopen = off
“display_errors” (Güvenlik)
Bu seçenek sitenizin çalışmasında oluşacak bir hatayı tarayıcıya yansıtıp yansıtmayacağını belirler yani siteniz için diyelim bir forum veya portal kullanıyorsunuz ve bunların çalışması esnasında genelde “Fatal error: Call to undefined function get_header() in /home/ahmo/public_html/index.php on line 37” şeklinde benzeri hata görülür bunların gözükmesini engellemek için bu değeri kapalı duruma getirmek gerekir zira kötü niyetli kişiler sitenizin serverda bulunan tam yolunu öğrenmiş olurlar.
(Eğer safe mod açık ve open basedir aktif ise bunu kapatmanıza gerek yoktur. zira bu tür hatalar ayrıca scriptinde hata neresinde olduğunu gösterdiği için host kullanıcısına sitesini düzenlemesi için büyük kolaylık sağlıyor.)

Code:
display_errors = Off
“cgi.force_redirect” (Güvenlik)
Bu değer normalde “on” “1” yani açık olarak gelir ve Windows sunucularında IIS, OmniHTTPD gibi buralarda kapatılması gerekir. Kendi sunucunuz için bu durum yoksa değiştirmenize gerek yoktur.

Code:
cgi.force_redirect = 0
“magic_quotes_gpc” (Güvenlik ve Performans)
Magic Quotes işlemi GET/POST yöntemiyle gelen Cookie datasını otomatikmen PHP script’e kaçırır. Önerilen bu değerin kapalı olmasıdır.

Code:
magic_quotes_gpc = off
“magic_quotes_runtime” (Güvenlik ve Performans)
Magic quotes çalışma sürecinde data oluşturur, SQL’den exec()’den, vb.
Önerilen:

Code:
magic_quotes_runtime = Off
“magic_quotes_sybase” (Güvenlik ve Performans)
Sybase-style magic quotes kullanır (Bunun yerine \’ ‘ bununla ” kaçırır)

Code:
magic_quotes_sybase = Off
“session.use_trans_sid” (Güvenlik)
Bu ayarı dikkatli ayarlayın, kullanıcı emaile aktif oturum ID’si içeren URL gönderebilir
kullnıcının güvenliği için bunu kapatıyoruz.
Önerilen:

Code:
session.use_trans_sid = off
“expose_php” (Güvenlik)
“expose_php” açık ise kapalı yapılması önerilir. Aksi takdirde PHP ile yaptığınız herşeyde sunucu tarafından PHP sürümü gibi bilgiler gösterilir. Hackerlar hatta Lamerlar bu bilgileri severler (ne boh anlıyorlarsa sanki). Bunları engellemek için “off” konumuna getiriniz.

Code:
expose_php = Off
“html_errors” (Güvenlik)
Bu değerin açık olması durumunda PHP tıklanabilir hata mesajları üretecektir. Kapalı olması güvenlik için önerilir. başında “;” işareti varsa kaldırıyoruz ve değeri kapatıyoruz.

Code:
html_errors = off
“max_execution_time” (Güvenlik)
Scriptinizi maksimum uygulamayı yürütme zamanı mesela kullanıcı bir linke tıkladı ve bu linkin açılması belirtilen saniyeden fazla olursa sayfa sitenizin serverda bulunduğu tam yolu göstererek hata verir. Bu hataların gözükmesi güvenlik açısından sakıncalıdır. 300 saniye yazan yeri istediğiniz zaman ile değiştirebilirsiniz. bana kalırsa bırakın yolu görsün çok fazla sayfa beklerse extra yğunluk demektir. direk bırakın hata versin. süreyi 30 yapalım.

Code:
max_execution_time = 30
“max_input_time” (Güvenlik)
Scriptinizin aynı şekilde bir dataya ulaşmak için istek yolladığında maksimum geçen zaman 60 yapalım. fazla bile

Code:
max_input_time = 60
“allow_call_time_pass_reference” (Performans)
Fonksiyonların çağrılma zamanında yaşanan uyumsuzluklarla ilgili uyarı verir.
örneğin ilk belittiğimiz yasak komutlarda hiç bir uyarı vermeden bom boş sayfa çıkarır karşıya. böyle bir durumda scripte bakmaktansa tekrar bunu açık duruma getirirsiniz hatayı gördükten sonra tekrar kapatın fonksiyonu.

Code:
allow_call_time_pass_reference = off
“enable_dl” (Güvenlik)
Bu değerin “off” kapalı olması gerekir aksi halde kişilerin sistemde php modüllerinde çalışma yapmasına olanak sağlar ve sistemde rahat dolaşmalarını sağlar güvenlik için kesinlikle kapalı olması gerekir.

Code:
enable_dl = off
“track_errors” (Güvenlik ve Performans)
Sürücülerde meydana gelen hatalarda yetki verildiği taktirde hata mesajı errormsg olarak değişkende gösterilir.
track_errors = Off
“file_uploads” (Güvenlik)
Eğer sunucda tek site barındırıyorsanız ve o sitede her hangi birşey sunucuya yükletilmiyorsa kapalı kalmasında yarar var. Ama çoklu site barındırıyorsanız. Günümüzdeki tüm siteler artık avatardır, dosya v.s uploat ediyor karar sizin.
ben yine kapatın diyeyimde.

Code:
file_uploads = off
“ignore_repeated_errors” (Güvenlik ve Performans)
Kapalı olursa tekrarlanan hataları loglamaz.
ignore_repeated_errors = Off
“ignore_repeated_source” (Güvenlik ve Performans)
Tekrarlanan mesajlar engellendiğinde, mesaj kaynağını engeller Bu ayar açık yapıldığında hataları loglamayacaktır farklı dosyalardan ya da kaynaklardan tekrarlanan mesajlarla.
ignore_repeated_source = Off
“display_startup_errors” (Güvenlik ve Performans)
“display_errors” değeri “on” açık olsa bile, Php’nin çalışma sırasında meydana gelen hatalar gözükmeyecektir. Bu değerin şiddetle “off” kapalı duruma getirilmesi önerilir.

Code:
display_startup_errors = off
“safe_mode_gid” (Güvenlik)
UID – GID kontrollerini sadece UID ile yapmasına izin verir böylece aynı grupta dosyalar bulunsa bile göremezler yani serverda bulunan diğer clientların scriptlerini v.s görmeleri engellenir.

Code:
safe_mode_gid = Off
“output_buffering = 4096” (Performans)
4 KB’lik bir tampon çıktısı ayarlar “output buffer”

Code:
output_buffering = 4096
“register_argc_argv” (Performans)
Kapalı olursa gereksiz ARGV ve ARGC kayıtlarını önler. PHP nin ARGV ve ARGC değişkenlerini bildirip bildirmemesini anlatır.

Code:
register_argc_argv = Off
“php_value session.use_trans_sid – php_value session.use_only_cookies”
Bu şekilde ayarlanması URL’deki PHPSESSID bilgilerini kaldırır.
seo filan yapanlar için uygun. genlede smf, phpbb forumlarda ve sension koruma uyguladığınız scriptler için PHPSESSID bilgilerini url ye eklemez. başlarında ; işareti varsa kaldırın.

Code:
session.use_trans_sid = 0
session.use_only_cookies = 1
“session.auto_start”
Oturum başlatmayı başlangıçta isteme
session.auto_start = 0
“session.cookie_lifetime”
Cookie’nin zaman ayarı
session.cookie_lifetime = 0
“memory_limit”
Scriptin tükettiği maksimum hafıza miktarı
değeri istediğinizgibi verin. 8M çokfazla bir değer. sadece kendi siteniz barınıyorsa bu değer normal. ama host ile uğraşıyorsanız 512K yapmanız daha uygun.

Code:
memory_limit = 8M
“post_max_size”
PHP’nin kabul edeceği maksimum POST data boyutu.
isteğinize bağlı 1 Mb vermek için 1M yazın

Code:
post_max_size = 256K
“upload_max_filesize”
Upload edilen dosyaların maksimum boyutu
buda sizin isteğinize bağlı isterseniz 50M yapın. o zaman kullanıcı 50 Mb’a kadar dosya upload edebilir.

Code:
upload_max_filesize = 256K
“variables_order”
(Ortam, GET, POST, Çerez, Sunucu) bunların işlenmedeki sıralarını belirler.
variables_order = “EGPCS”
Bu kadar ondan sonra ctrl x y diyip kaydediyoruz ve
service httpd restart diyoruz.
Genelde çoğu fonksiyon zaten böyle dediğim değerdedir. 3-5 tanesi hariç tabi. Yeni başlayan arkadaşlar için anlattımki hangisi ne işe yarar öğrenmiş olsunlar.

batch change all user passwords linux console

Tum kullanicilarin parolalarini toplu halde degistirmek icin hos bir script.

Isim acele oldugundan scripti duzenlemeye vakit ayiramadim oldugu gibi kullandim.

mesela uid i 1000 ve yuksek olanlari listelemesi gereken awk satiri calismiyor adam gibi.

vaktim olunca bakarim bir ara 🙂

orjinal scriptin random password generatoru baska birseyler istediginden onu degistirdim vs vs..


#!/bin/bash
# Script to update user password in batch mode
# You must be a root user to use this script
# -------------------------------------------------------------------------
# Copyright (c) 2005 nixCraft project
# This script is licensed under GNU GPL version 2.0 or above
# -------------------------------------------------------------------------
# This script is part of nixCraft shell script collection (NSSC)
# Visit http://bash.cyberciti.biz/ for more information.
# ----------------------------------------------------------------------
# /root is good place to store clear text password
FILE="/root/batch.passwd"

# get all non-root user account
# By default on most linux non-root uid starts
# from 1000

USERS=$(awk -F: ‘{ if ( $1 >1000 ) print $1}’ /etc/passwd)

# create file with random password
echo “Generating file, please wait…”

# overwrite file
>$FILE

for u in $USERS
do
p=$(dd if=/dev/urandom count=200 bs=1 2>/dev/null|tr “\n” ” “|sed ‘s/[^a-zA-Z0-9]//g’|cut -c-8) # create random password
echo “$u:$p” >> $FILE # save USERNAME:PASSWORD pair
done
echo “”
echo “Random password and username list stored in $FILE file”
echo “Review $FILE file, once satisfied execute command: ”
echo “chpasswd < $FILE”

# Uncomment following line if you want immediately update all users password,
# be careful with this option, it is recommended that you review $FILE first
# chpasswd < $FILE
sonra

batch.passwd dosyasini uid 1000 den asagi kullanicilari temizlemek icin editle.
sonra ver gazi.

chpasswd < batch.passwd

oldu bitti.

C:\Documents and Settings\sHuKKo>nslookup -q=mx geyikhane.com
Server:
Address:  192.168.3.1

DNS request timed out.
timeout was 2 seconds.
Non-authoritative answer:
geyikhane.com   MX preference = 10, mail exchanger = 235695291.pamx1.hotmail.com

geyikhane.com   nameserver = ns1.nicomedya.com
geyikhane.com   nameserver = ns2.nicomedya.com

GRUB (GRand Unified Bootloader)

Briefly, a boot loader is the first software program that runs when a computer starts. It is responsible for loading and transferring control to an operating system kernel software (such as Linux). The kernel, in turn, initializes the rest of the operating system (e.g. a GNU system).

GNU GRUB Homepage
http://www.gnu.org/software/grub/

Problem

“There is not a boot manager screen at all, it just boots right into windows but GRUB boot window does not appear. I cannot figure out to access fedora, I do not have a boot disk and need to know if there is someway to boot into fedora”

“I forgot to install GRUB, I didn’t install GRUB in the MBR, I chose to install GRUB on the first track on the partition where I installed Fedora but that was not an active primary partition”.

Solution

You have to install GRUB on the MBR (Master Boot Record). To do this just follow this steps:

(First of all, enter your BIOS setup and in BOOT Sequence window choose to boot with CDROM first.)

1) Boot with your Fedora Core Installation CD 1.

2) Type “linux rescue” at the prompt.

3) Answer the questions about keyboard and language.

4) Tell the rescue mode to use your proper partition to mount (the one that you want to get booted into)

5) When you come to the console prompt type: chroot /mnt/sysimage

6) Type grub

7) Set the GRUB’s root device to the partition containing the boot directory like this:

grub> root (hd0,0)

Filesystem type is ext2fs, partition type 0x83

I have Windows 98 in hd0,0 ; Windows XP in hd0,1, Fedora Core /boot partition in hd0,2 and Mandrake /boot partition in hd0,6. So in my case the command should be: > root (hd0,2)

If you are not sure which partition actually holds this directory, use the command ‘find’ like this:

grub> find /boot/grub/stage1

This will search for the file name ‘/boot/grub/stage1’ and show the devices which contain the file.
Once you’ve set the root device correctly, run the command ‘setup’.

8) Then, run the command setup

grub> setup (hd0)

Checking if “/boot/grub/stage1” exists……. no
Checking if “/grub/stage1” exists……. yes
Checking if “/grub/stage2” exists……. yes
Checking if “/grub/e2fs_stage1_5” exists……. yes
Running “embed /grub/e2fs_stage1_5 (hd0)”……. 15 sectors are embedded
succeded
Running “install /grub/stage1 (hd0) (hd0) 1+15 p (hd0,2)/grub/stage2 /grub/grub.conf……. succeded
Done

This command will install GRUB boot loader on the Master Boot Record (MBR) of the first drive.

9) Type quit

grub> quit

GRUB is now in the MBR.

10) Finally, you’ll have to edit your /boot/grub/grub.conf, for example whith nano:

> nano /boot/grub/grub.conf

(/etc/grub.conf or /boot/grub/grub.conf or /boot/grub/menu.lst, they are the same file) This file has the boot partitions of the disk/s.

11) Restart your PC without the Fedora Core CD 1 Installation.

My grub.conf

default=0
timeout=30
splashimage=(hd0,2)/grub/splash.xpm.gz

title GNU/Linux Fedora Core 1 (2.4.22-1.2188.nptl)
root (hd0,2)
kernel /vmlinuz-2.4.22-1.2188.nptl ro root=LABEL=/ hdc=ide-scsi hdd=ide-scsi apm=off acpi=on vga=788
initrd /initrd-2.4.22-1.2188.nptl.img

#title GNU/Linux Fedora Core 1 (2.4.22-1.2174.nptl)
#root (hd0,2)
#kernel /vmlinuz-2.4.22-1.2174.nptl ro root=LABEL=/ hdc=ide-scsi apm=off acpi=on rhgb
#initrd /initrd-2.4.22-1.2174.nptl.img

title GNU/Linux Mandrake 9.2
kernel (hd0,6)/vmlinuz root=/dev/hda8 devfs=mount hdc=ide-scsi resume=/dev/hda9
initrd (hd0,6)/initrd.img

title Microsoft Windows 98 SE & XP Pro
rootnoverify (hd0,0)
chainloader +1

List of commands,

default=0
My default boot system is, of course, Fedora.

timeout=30
Fedora will boot in 30 seconds if you don’t touch anything.

splashimage=(hd0,2)/grub/splash.xpm.gz
Generally the splash image is in your /boot partition. In my case, hd0,2 is where I have the image.

title GNU/Linux Fedora Core 1 (2.4.22-1.2174.nptl)
The name of your OS that will appear in your menu at starup, you can write anything you want.

root (hd0,2)
This is your /boot partition specifies which partition contains your Linux kernel image. So “root (hd0,2) tells GRUB that the kernel is on the 3rd primary partition of my first hard disk (I have two), in my case (hd0,2).

kernel /vmlinuz-2.4.22-1.2174.nptl ro root=LABEL=/ hdc=ide-scsi apm=off acpi=on rhgb
Tells GRUB where to find your kernel, my kernel version is 2.4.22-1.2174, you have to type your kernel version.

rhgb
Red Hat Graphical Boot

apm=off acpi=on
I had to add ‘apm=off acpi=on’ to my kernel parameters to get power-off to work properly.

initrd /initrd-2.4.22-1.2174.nptl.img
Tells where your init ramdisk image is located.

title Microsoft Windows 98 SE & XP Pro
As I said, I have Windows 98 in hd0,0 and Windows XP in (hd0,1).

rootnoverify (hd0,0)
rootnoverify tells GRUB to boot from the Windows partition, but not to attempt to mount it.
(hd0,0) is where Windows XP puts the boot.ini to boot into Windows 98 and XP.

chainloader +1
chain-load is the mechanism for loading unsupported operating systems by loading another boot loader. It is typically used for loading DOS or Windows.
chainloader tells GRUB to chain to Windows’ boot loader which will start Windows.

Other options you can use:

map
If you have installed DOS (or Windows) on a non-first hard disk, you have to use the disk swapping technique, because that OS cannot boot from any disks but the first one.

Map the drive from_drive to the drive to_drive. This is necessary when you chain-load some operating systems, such as DOS, if such an OS resides at a non-first drive. Here is an example:

grub> map (hd0) (hd1)
grub> map (hd1) (hd0)

This performs a virtual swap between your first and second hard drive.

Caution: This is effective only if DOS (or Windows) uses BIOS to access the swapped disks. If that OS uses a special driver for the disks, this probably won’t work.

makeactive
Set the active partition on the root disk to GRUB’s root device. This command is limited to primary PC partitions on a hard disk.

Code:

title Windows 98 SE map (hd0) (hd1) map (hd1) (hd0) makeactive rootnoverify (hd1,0) chainloader +1

hide
Hide the partition partition by setting the hidden bit in its partition type code. This is useful only when booting DOS or Windows and multiple primary FAT partitions exist in one disk.

unhide
Unhide the partition partition by clearing the hidden bit in its partition type code. This is useful only when booting DOS or Windows and multiple primary partitions exist in one disk.

Explanation and examples of the hide and unhide commands

If you installed more than one set of DOS/Windows onto one disk, they could be confused if there are more than one primary partitions for DOS/Windows. There is a solution if you do want to do so. Use the partition hiding/unhiding technique.

If GRUB hides a DOS (or Windows) partition, DOS (or Windows) will ignore the partition. If GRUB unhides a DOS (or Windows) partition, DOS (or Windows) will detect the partition. Thus, if you have installed DOS (or Windows) on the first and the second partition of the first hard disk, and you want to boot the copy on the first partition.

Here’s how to create two installations of Windows, hda1 and hda2 or (hd0,0) and (hd0,1), using the commands hide and unhide.

For Windows 98 SE “My Entry”:

Code:

title My Entry unhide (hd0,0) hide (hd0,1) rootnoverify (hd0,0) makeactive chainloader +1

For Windows 98 SE “Family Entry”

Code:

title Family Entry unhide (hd0,1) hide (hd0,0) rootnoverify (hd0,1) makeactive chainloader +1

I did not have to use the ‘hide’ or ‘unhide’ command ’cause Windows XP, 2000 or NT have a boot manager (boot.ini) included. So, I only had to point where this boot.ini is. In my case, Windows XP copies this boot.ini where Windows 98 is installed, (hd0,0)
You should definitely use the ‘hide’ or ‘unhide’ command if you have,for example, two installations of Windows 98 or ME.

If everything went just fine, voila, GRUB now becomes your main boot manager for your multi OS system.

GRUB and Linux Partitions

First of all, GRUB requires that the device name be enclosed with ( ). Please, note that the partition numbers are counted from zero, not from one.

(hd0) in GRUB = is hda in Linux
Here, ‘hd’ means it is a hard disk drive. The first integer ‘0’ indicates the drive number, that is, the first hard disk.

(hd1) in GRUB = is hdb in Linux
The first integer ‘1’ indicates the drive number, that is, the second hard disk.

(hd0,1) in GRUB = is hda2 in Linux
This expression means the second primary partition of the first hard disk drive. In this case, GRUB uses one partition of the disk, instead of the whole disk.

(hd0,4) in GRUB = hda5 in Linux
This specifies the first extended partition of the first hard disk drive. Note that the partition numbers for extended partitions are counted from ‘4’, regardless of the actual number of primary partitions on your hard disk.

(hd0,5) in GRUB = hda6 in Linux
This is the first logical unit of the extended partition of the the first hard disk.

(hd1,0) in GRUB = is hdb1 in Linux
This is the first primary partition of the second hard disk.

he Windows NT/2000 Resource Kit provides two utilities that allow you to create a Windows user-defined service for Windows applications and some 16-bit applications (but not for batch files).

Whats needed for Windows NT/2000:
Instrsrv.exe installs and removes system services from Windows NT/2000
Srvany.exe allows any Windows application to run as a service.
You can download both files here srvany.zip

This zip includes three files. The two you need srvany.exe and instsrv.exe to install the services and also srvany.wri which documents everything you can do with the program.
Note: Make sure the Services Manager is closed while running the DOS commands.
devami icin t ikla.

http://www.tacktech.com/display.cfm?ttid=197

semget: No space left on device Last Modified: Mar 28, 2006, 11:30 am

This relates to semaphores on your system (you’ve run out). Run the following to clear them out:

ipcs | grep apache | awk ‘{print $2}’ > sem.txt
for i in `cat sem.txt`; do { ipcrm -s $i; }; done;